diff --git a/modules/default/aliases.nix b/modules/default/aliases.nix new file mode 100644 index 0000000..12ff522 --- /dev/null +++ b/modules/default/aliases.nix @@ -0,0 +1,22 @@ +{ lib, config, pkgs, ... }: + +{ + + options.glf.aliases.enable = lib.mkOption { + description = "Enable GLF Aliases configurations"; + type = lib.types.bool; + default = true; + }; + + config = lib.mkIf config.glf.aliases.enable { + + environment.shellAliases = { + glf-update = "sudo nix flake update --flake /etc/nixos"; + glf-rebuild = "nh os switch /etc/nixos -H GLF-OS"; + glf-build = "nh os build -H GLF-OS -H GLF-OS"; + glf-boot = "nh os boot -H GLF-OS -H GLF-OS"; + }; + + }; + +} diff --git a/modules/default/default.nix b/modules/default/default.nix index c7df192..335667d 100644 --- a/modules/default/default.nix +++ b/modules/default/default.nix @@ -14,6 +14,7 @@ ./system.nix # ./updateConf.nix ./version.nix + ./aliases.nix ]; } diff --git a/modules/default/nh.nix b/modules/default/nh.nix index b346092..baed475 100644 --- a/modules/default/nh.nix +++ b/modules/default/nh.nix @@ -14,6 +14,7 @@ programs.nh = { enable = true; + flake = "/etc/nixos"; clean = { enable = true; dates = "weekly";