diff --git a/home-manager/jimbo_deck.nix b/home-manager/jimbo_deck.nix index b9180ad..f258fe5 100644 --- a/home-manager/jimbo_deck.nix +++ b/home-manager/jimbo_deck.nix @@ -1,4 +1,4 @@ -{config, ...}: { +{ imports = [ # Common modules ./home.nix @@ -36,17 +36,4 @@ ./services/mako.nix ./services/udiskie.nix ]; - - # ZSH rebuild commands - programs.zsh = { - shellAliases = let - auth = import ./common/auth.nix; - hostname = "JimDeck"; - in { - flakedate = "${auth.method} nix flake update /etc/nixos"; - sysswitch = "${auth.method} nixos-rebuild switch --flake /etc/nixos/.#${hostname}"; - homeswitch = "home-manager switch --flake /etc/nixos/.#jimbo@${hostname}"; - nixdate = "flakedate; sysswitch; homeswitch; notify-send 'NixOS switch done.'"; - }; - }; } diff --git a/home-manager/jimbo_desktop.nix b/home-manager/jimbo_desktop.nix index 7ac56c6..20d71ff 100644 --- a/home-manager/jimbo_desktop.nix +++ b/home-manager/jimbo_desktop.nix @@ -39,19 +39,6 @@ ./services/udiskie.nix ]; - # ZSH rebuild commands - programs.zsh = { - shellAliases = let - auth = import ./common/auth.nix; - hostname = "JimDesktop"; - in { - flakedate = "${auth.method} nix flake update /etc/nixos"; - sysswitch = "${auth.method} nixos-rebuild switch --flake /etc/nixos/.#${hostname}"; - homeswitch = "home-manager switch --flake /etc/nixos/.#jimbo@${hostname}"; - nixdate = "flakedate; sysswitch; homeswitch; notify-send 'NixOS switch done.'"; - }; - }; - # Symlinks home.file = { "VMs".source = config.lib.file.mkOutOfStoreSymlink "/etc/libvirt/VMs"; diff --git a/home-manager/jimbo_lenovo.nix b/home-manager/jimbo_lenovo.nix index 85f9f5b..d90f830 100644 --- a/home-manager/jimbo_lenovo.nix +++ b/home-manager/jimbo_lenovo.nix @@ -1,4 +1,4 @@ -{config, ...}: { +{ imports = [ # Common modules ./home.nix @@ -36,17 +36,4 @@ ./services/mako.nix ./services/udiskie.nix ]; - - # ZSH rebuild commands - programs.zsh = { - shellAliases = let - auth = import ./common/auth.nix; - hostname = "JimLenovo"; - in { - flakedate = "${auth.method} nix flake update /etc/nixos"; - sysswitch = "${auth.method} nixos-rebuild switch --flake /etc/nixos/.#${hostname}"; - homeswitch = "home-manager switch --flake /etc/nixos/.#jimbo@${hostname}"; - nixdate = "flakedate; sysswitch; homeswitch; notify-send 'NixOS switch done.'"; - }; - }; } diff --git a/home-manager/jimbo_server.nix b/home-manager/jimbo_server.nix index 0f7997c..d31bb2e 100644 --- a/home-manager/jimbo_server.nix +++ b/home-manager/jimbo_server.nix @@ -1,21 +1,8 @@ -{config, ...}: { +{ imports = [ # Common modules ./home.nix ./users/jimbo.nix ./tuiapps/git.nix ]; - - # ZSH rebuild commands - programs.zsh = { - shellAliases = let - auth = import ./common/auth.nix; - hostname = "JimServer"; - in { - flakedate = "${auth.method} nix flake update /etc/nixos"; - sysswitch = "${auth.method} nixos-rebuild switch --flake /etc/nixos/.#${hostname}"; - homeswitch = "home-manager switch --flake /etc/nixos/.#jimbo@${hostname}"; - nixdate = "flakedate; sysswitch; homeswitch; notify-send 'NixOS switch done.'"; - }; - }; } diff --git a/home-manager/jimbo_ssh.nix b/home-manager/jimbo_ssh.nix index 5601753..3269777 100644 --- a/home-manager/jimbo_ssh.nix +++ b/home-manager/jimbo_ssh.nix @@ -1,4 +1,4 @@ -{config, ...}: { +{ imports = [ # Common modules ./home.nix @@ -9,9 +9,8 @@ programs.zsh = { shellAliases = let auth = import ./common/auth.nix; - hostname = "SSH"; in { - homedate = "home-manager switch --flake ~/.home-manager/.#jimbo@${hostname} --extra-experimental-features 'nix-command flakes'"; + sshswitch = "home-manager switch --flake ~/.home-manager/.#jimbo@SSH --extra-experimental-features 'nix-command flakes'"; }; }; } diff --git a/home-manager/tuiapps/zsh.nix b/home-manager/tuiapps/zsh.nix index 8da868d..a948b55 100644 --- a/home-manager/tuiapps/zsh.nix +++ b/home-manager/tuiapps/zsh.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{pkgs, config, ...}: { programs.zsh = let auth = import ../common/auth.nix; nixcfg = import ../common/nixcfg.nix; @@ -18,6 +18,13 @@ nixpurge = "${auth.method} nix-collect-garbage --delete-old; notify-send 'NixOS generation removed.'"; nixoptimize = "${auth.method} nix store optimise; notify-send 'NixOS store optimization finished.'"; + # Flake commands + flakedate = "${auth.method} nix flake update /etc/nixos"; + sysswitch = "${auth.method} nixos-rebuild switch --flake /etc/nixos"; + homeswitch = "home-manager switch --flake /etc/nixos"; + nixswitch = "sysswitch; homeswitch; notify-send 'NixOS switch done.'"; + nixdate = "flakedate && sysswitch; homeswitch; notify-send 'NixOS update done.'"; + # Shortcut aliases neo = "clear && fastfetch"; ip = "ip -c"; @@ -39,9 +46,6 @@ opusdl = "ytdl --recode-video opus"; ytopus = "opusdl --format 251"; spotdl = "spotdl --m3u --format opus"; - - # Flakes - buildiso = "${pkgs.nixos-generators}/bin/nixos-generate -f install-iso -c /home/jimbo/Downloads/NixISO/configuration.nix"; }; initExtra = '' ${pkgs.any-nix-shell}/bin/any-nix-shell zsh --info-right | source /dev/stdin; pfetch