Add heaven (my server)

This commit is contained in:
Hadi
2024-06-07 21:21:03 +02:00
parent d917ac9f6a
commit 17f93ea60b
25 changed files with 238 additions and 17 deletions

View File

@@ -7,10 +7,6 @@ let
sudo nixos-rebuild switch --flake ${homedir}/.config/nixos#nixy
'';
nixy-edit = pkgs.writeShellScriptBin "nixy-edit" ''
$EDITOR ${homedir}/.config/nixos/
'';
nixy-upgrade = pkgs.writeShellScriptBin "nixy-upgrade" ''
sudo nixos-rebuild switch --upgrade --flake ${homedir}/.config/nixos#nixy
'';
@@ -27,13 +23,37 @@ let
sudo /run/current-system/bin/switch-to-configuration boot
'';
heaven-rebuild = pkgs.writeShellScriptBin "heaven-rebuild" ''
sudo nixos-rebuild switch --flake ${homedir}/.config/nixos#heaven
'';
heaven-upgrade = pkgs.writeShellScriptBin "heaven-upgrade" ''
sudo nixos-rebuild switch --upgrade --flake ${homedir}/.config/nixos#heaven
'';
heaven-update = pkgs.writeShellScriptBin "heaven-update" ''
cd ${homedir}/.config/nixos && sudo nix flake update
'';
heaven-gc = pkgs.writeShellScriptBin "heaven-gc" ''
cd ${homedir}/.config/nixos && sudo nix-collect-garbage -d
'';
heaven-cb = pkgs.writeShellScriptBin "heaven-cb" ''
sudo /run/current-system/bin/switch-to-configuration boot
'';
in {
home.packages = with pkgs; [
nixy-rebuild
nixy-edit
nixy-upgrade
nixy-update
nixy-gc
nixy-cb
heaven-rebuild
heaven-upgrade
heaven-update
heaven-gc
heaven-cb
];
}

1
home/scripts/server.nix Normal file
View File

@@ -0,0 +1 @@
{ imports = [ ./nixy ./nerdfetch ./compress ]; }