diff --git a/modules/home-manager/gitconfigs.nix b/modules/home-manager/gitconfigs.nix new file mode 100644 index 0000000..d4a84ba --- /dev/null +++ b/modules/home-manager/gitconfigs.nix @@ -0,0 +1,21 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.skyg.home-manager.gitaliases; + gitconfigs = + (builtins.filterSource (path: type: type != "directory") ./gitconfigs); + gitconfigFiles = builtins.attrNames (builtins.readDir gitconfigs); + +in +{ + options = { + skyg.home-manager.gitaliases = { + enable = mkEnableOption + "Use my awesome git aliases"; + }; + }; + + config = mkIf cfg.enable { }; +} diff --git a/modules/main.nix b/modules/main.nix index fdcca76..e979c11 100644 --- a/modules/main.nix +++ b/modules/main.nix @@ -22,6 +22,7 @@ }: { ... }: { imports = [ + (import ./skyg) (import ./nix { user = user; systemStateVersion = systemStateVersion; @@ -51,4 +52,6 @@ ++ (if enableHomelabServices then [ (import ./hl-services) ] else [ ]) ++ (if enableHomelabServices then [ (import ./hl-hardware) ] else [ ]) ; + + skyg.core.hostName = hostName; } diff --git a/modules/skyg/core.nix b/modules/skyg/core.nix new file mode 100644 index 0000000..3b23b05 --- /dev/null +++ b/modules/skyg/core.nix @@ -0,0 +1,22 @@ +{ config, lib, ... }: + +with lib; + +let + cfg = config.skyg.core; +in +{ + options = { + skyg.core = { + hostname = mkOption { + description = "Machine Hostname"; + type = types.str; + }; + }; + }; + + config = { + home-manager.users.root.programs.git.userName = "root@${cfg.hostName}"; + networking.hostName = cfg.hostName; + }; +} diff --git a/modules/skyg/default.nix b/modules/skyg/default.nix new file mode 100644 index 0000000..74c4efa --- /dev/null +++ b/modules/skyg/default.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + imports = [ + ./core.nix + ]; +}