split out home-manager

This commit is contained in:
ari committed 2026-04-14 18:50:11 -04:00
1 parent 2d956525cc
commit 0b34a3cf11
12 files changed
+159 -124

No files matched your search

+24
View File
@@ -5,4 +5,28 @@
./macos.nix
./nix-substituters.nix
];
config = {
# Remote Builder
nix.buildMachines = [
{
hostName = "root@bigbox1.lab.internal";
system = "x86_64-linux";
protocol = "ssh-ng";
maxJobs = 1;
speedFactor = 2;
supportedFeatures = [
"nixos-test"
"benchmark"
"big-parallel"
"kvm"
];
mandatoryFeatures = [ ];
}
];
nix.distributedBuilds = true;
# optional, useful when the builder has a faster internet connection than yours
nix.extraOptions = ''
builders-use-substitutes = true
'';
};
}
+32 -3
View File
@@ -13,30 +13,43 @@ in
options = {
skyg.home-manager.version = mkOption {
type = types.str;
default = "24.11";
description = "The home-manager state version";
};
skyg.home-manager.extraImports = mkOption {
type = types.listOf types.anything;
default = [ ];
description = "Extra imports to add to the user's home-manager configuration";
};
skyg.user = {
enable = mkEnableOption "";
enable = mkEnableOption "home-manager configuration for the user";
name = mkOption {
type = types.str;
default = "";
description = "The username";
};
fullName = mkOption {
type = types.str;
default = "";
description = "The user's full name";
};
email = mkOption {
type = types.str;
default = "";
description = "The user's email address";
};
extraGitConfigs = mkOption {
type = types.listOf (
types.submodule {
path = mkOption {
type = types.str;
options = {
path = mkOption {
type = types.str;
};
};
}
);
default = [ ];
description = "Extra git configuration files to include";
};
};
};
@@ -50,6 +63,22 @@ in
);
in
mkIf cfg.user.enable {
# Ensure user.name is set when enabling
assertions = [
{
assertion = cfg.user.name != "";
message = "skyg.user.name must be set when skyg.user.enable is true";
}
{
assertion = cfg.user.fullName != "";
message = "skyg.user.fullName must be set when skyg.user.enable is true";
}
{
assertion = cfg.user.email != "";
message = "skyg.user.email must be set when skyg.user.enable is true";
}
];
programs.zsh.enable = true;
home-manager = {
backupFileExtension = ".bak";