Add config builder

This commit is contained in:
Peter Selby 2023-11-06 13:59:39 -08:00
parent e0bffa4095
commit 7fbdb29e10
4 changed files with 21 additions and 22 deletions

View File

@ -23,11 +23,11 @@
"rotate-text": "rotate-text"
},
"locked": {
"lastModified": 1627398156,
"narHash": "sha256-Ru1aV3NuIFXAsvUE3de8KR7xDZOo1GCBJdsWKJn+Ebw=",
"lastModified": 1666806097,
"narHash": "sha256-4/QpDoyf2I7RvhbmK15PB+qPuLYU3Lm0woUChA1fn+k=",
"owner": "vlaci",
"repo": "nix-doom-emacs",
"rev": "fee14d217b7a911aad507679dafbeaa8c1ebf5ff",
"rev": "cc495913aeb4212349392e1c68a62b8e63248123",
"type": "github"
},
"original": {
@ -187,11 +187,11 @@
]
},
"locked": {
"lastModified": 1633596850,
"narHash": "sha256-5+qVLYvfOropjLAvpQs/APtD8eYnEIbAd9a36lGHZM0=",
"lastModified": 1646616315,
"narHash": "sha256-A1g4AjM/4kVWBzfCx9HqCszVFlcsk+C9NHG3X6hRjaI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "49695f33aac22358b59e49c94fe6472218e5d766",
"rev": "454abeb5a891b2b56f10a30f2a846e8341cbfe9b",
"type": "github"
},
"original": {
@ -204,11 +204,11 @@
"niten-doom-config": {
"flake": false,
"locked": {
"lastModified": 1633712607,
"narHash": "sha256-6PAw7Xvoj4JROeTqK1nhT2zv7bPpiQlm9t7H5HQ0f2k=",
"ref": "master",
"rev": "0a4f8ce4121ba3d64d29b0d52733c08febfb83d8",
"revCount": 35,
"lastModified": 1684432992,
"narHash": "sha256-ex/H6we7BLjidBxo0n5EZ9YUflLr03sLWdf5YGsF6jU=",
"ref": "refs/heads/master",
"rev": "47773717b06d21004db3dea96f2329f912ef8dd3",
"revCount": 64,
"type": "git",
"url": "https://git.fudo.org/niten/doom-emacs.git"
},
@ -251,11 +251,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1634115022,
"narHash": "sha256-K9DZMQ47VRrg9gtTPwex5p0E8LnwM/dDkNe7AQW0qj0=",
"lastModified": 1659914493,
"narHash": "sha256-lkA5X3VNMKirvA+SUzvEhfA7XquWLci+CGi505YFAIs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "564cb4d81d4f734dd068684adec5a60077397fe9",
"rev": "022caabb5f2265ad4006c1fa5b1ebe69fb0c3faf",
"type": "github"
},
"original": {

View File

@ -24,5 +24,8 @@
(import ./module.nix { inherit doom-emacs niten-doom-config; })
];
};
mkHomeManagerConfiguration = { username, user-email, home-dir, enable-gui, ... }: import ./niten.nix {
inherit username user-email home-dir enable-gui doom-emacs niten-doom-config;
};
};
}

View File

@ -38,18 +38,15 @@ in {
user-email = if (user-cfg.email != null) then
user-cfg.email else "${username}@${config.instance.local-domain}";
home-dir = config.users.users.${username}.home;
in (import user-configs.${username} {
in ((import user-configs.${username} {
inherit
config
lib
pkgs
doom-emacs
niten-doom-config
username
user-email
home-dir
enable-gui;
});
}) { inherit config, lib, pgks, ...});
in mapAttrs generate-config local-users;
};
}

View File

@ -1,9 +1,6 @@
{
doom-emacs,
niten-doom-config,
config,
lib,
pkgs,
username,
user-email,
home-dir,
@ -11,6 +8,8 @@
...
}:
{ config, lib, pkgs, }:
with lib;
let