mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-12-21 19:24:15 +00:00
add nixos rebuild scripts
This commit is contained in:
parent
8c566779be
commit
1d7f360a45
1 changed files with 13 additions and 1 deletions
|
@ -8,6 +8,18 @@ let
|
|||
"-git-assume-unchanged-size 0"
|
||||
];
|
||||
|
||||
rebuild-scripts = (map
|
||||
(x: (pkgs.writeShellScriptBin "sc-${builtins.head x}" "nixos-rebuild ${lib.concatStringsSep " " (builtins.tail x)}"))
|
||||
[
|
||||
[ "switch" "switch" ]
|
||||
[ "build" "build" ]
|
||||
[ "boot" "boot" ]
|
||||
[ "switch-upgrade" "switch" "--recreate-lock-file" "--refresh" ]
|
||||
[ "build-upgrade" "build" "--recreate-lock-file" "--refresh" ]
|
||||
[ "boot-upgrade" "boot" "--recreate-lock-file" "--refresh" ]
|
||||
]
|
||||
);
|
||||
|
||||
in
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
@ -66,7 +78,7 @@ in
|
|||
echo "$(git ls-remote https://github.com/NixOS/nixpkgs.git "$branch" | cut -f1) latest available"
|
||||
echo
|
||||
'')
|
||||
];
|
||||
] ++ rebuild-scripts;
|
||||
|
||||
environment.variables.EDITOR = "vim";
|
||||
|
||||
|
|
Loading…
Reference in a new issue