mirror of
https://github.com/youwen5/nixos.git
synced 2024-11-28 11:43:51 -08:00
feat: add rebuild and updater scripts
This commit is contained in:
parent
4684c6a9d6
commit
f89799649a
2 changed files with 12 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
inputs,
|
inputs,
|
||||||
system,
|
system,
|
||||||
|
osConfig,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
|
@ -28,6 +29,7 @@
|
||||||
home-manager.backupFileExtension = "backup";
|
home-manager.backupFileExtension = "backup";
|
||||||
home-manager.extraSpecialArgs = {
|
home-manager.extraSpecialArgs = {
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
|
inherit osConfig;
|
||||||
};
|
};
|
||||||
home-manager.users.youwen = {
|
home-manager.users.youwen = {
|
||||||
imports = [
|
imports = [
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
inputs,
|
inputs,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
osConfig,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
|
@ -71,4 +72,13 @@
|
||||||
|
|
||||||
# Let home Manager install and manage itself.
|
# Let home Manager install and manage itself.
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
programs.fish.functions = {
|
||||||
|
rebuild = ''doas nixos-rebuild --flake ~/.config/liminalOS\#${osConfig.networking.hostName} switch &| nom'';
|
||||||
|
nixos-update = ''
|
||||||
|
cd ~/.config/liminalOS
|
||||||
|
nix flake update --commit-lock-file
|
||||||
|
doas nixos-rebuild --flake ~/.config/liminalOS\#${osConfig.networking.hostName} switch &| nom
|
||||||
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue