added core config

This commit is contained in:
ari committed 2024-08-09 12:32:30 -04:00
1 parent dbc538f5d7
commit a81a8ac57b
4 files changed
+52

No files matched your search

+21
View File
@@ -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 { };
}
+3
View File
@@ -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;
}
+22
View File
@@ -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;
};
}
+6
View File
@@ -0,0 +1,6 @@
{ ... }:
{
imports = [
./core.nix
];
}