Split up config files to multiple and added imports. Fixed default values for systemConfigs

This commit is contained in:
2025-04-15 12:48:27 +02:00
parent 9611b8bb8d
commit 16c4a8f46b
23 changed files with 149 additions and 163 deletions

View File

@ -23,10 +23,10 @@
# ========= Utilities =========
#
# Secrets management
sops-nix = {
url = "github:mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# sops-nix = {
# url = "github:mic92/sops-nix";
# inputs.nixpkgs.follows = "nixpkgs";
# };
# Catppuccin theming
catppuccin = {
url = "github:catppuccin/nix";
@ -76,7 +76,7 @@
lib = nixpkgs.lib.extend customLib;
libHm = home-manager.lib.extend customLib;
systems = [
systems = builtins.map (config: defaultAttrs // config) [
{
hostName = "desktop";
system = "x86_64-linux";
@ -94,6 +94,16 @@
# TODO Homelab config
];
defaultAttrs = {
user = {
name = common.username;
password = "temp";
};
version = common.system.version;
wayland.enable = true;
nvidia.enable = false;
};
in
{
#
@ -110,18 +120,9 @@
{
hostName,
system,
user ? {
name = common.username;
password = "temp";
},
version ? common.version,
wayland ? {
enable = true;
},
nvidia ? {
enable = false;
},
}@systemConfig: # TODO only pass in systemConfig
user,
...
}@systemConfig:
{
name = hostName;