chore: make namespace generic so people can copy easier

This commit is contained in:
Christoph Hollizeck 2024-10-11 00:17:03 +02:00
parent 88593f53a2
commit 7ad43f35c8
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 1763BB530F50279E
45 changed files with 249 additions and 217 deletions

View file

@ -1,13 +1,14 @@
{
config,
pkgs,
lib,
namespace,
pkgs,
...
}:
with lib;
with lib.wyrdgard;
with lib.${namespace};
let
cfg = config.wyrdgard.nix;
cfg = config.${namespace}.nix;
substituters-submodule = types.submodule (
{ name, ... }:
@ -19,7 +20,7 @@ let
);
in
{
options.wyrdgard.nix = with types; {
options.${namespace}.nix = with types; {
enable = mkBoolOpt true "Whether or not to manage nix configuration.";
package = mkOpt package pkgs.lix "Which nix package to use.";
@ -50,7 +51,7 @@ in
let
users = [
"root"
config.wyrdgard.user.name
config.${namespace}.user.name
];
in
{
@ -73,7 +74,7 @@ in
cfg.default-substituter.key
] ++ (mapAttrsToList (name: value: value.key) cfg.extra-substituters);
}
// (lib.optionalAttrs config.wyrdgard.tools.direnv.enable {
// (lib.optionalAttrs config.${namespace}.tools.direnv.enable {
keep-outputs = true;
keep-derivations = true;
});