maybe modifying how the attrset merges in config will help
This commit is contained in:
parent
87747d15e3
commit
5e27e23c3d
2 changed files with 25 additions and 5 deletions
|
|
@ -16,7 +16,8 @@
|
||||||
in {
|
in {
|
||||||
lib = builtins.import ./lib.nix { pkgs = nixpkgs; };
|
lib = builtins.import ./lib.nix { pkgs = nixpkgs; };
|
||||||
nixosModules.fooud = { pkgs, lib, config, inputs, ... }: {
|
nixosModules.fooud = { pkgs, lib, config, inputs, ... }: {
|
||||||
options.programs.fooud.enable = lib.mkEnableOption ("fooud") // { default = true; };
|
options.programs.fooud.enable = lib.mkEnableOption ("fooud")
|
||||||
|
// { default = true; };
|
||||||
config = lib.mkIf config.programs.fooud.enable {
|
config = lib.mkIf config.programs.fooud.enable {
|
||||||
environment.systemPackages = [ package ];
|
environment.systemPackages = [ package ];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
27
lib.nix
27
lib.nix
|
|
@ -33,15 +33,34 @@ let
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
dest;
|
{
|
||||||
|
config = config;
|
||||||
|
dest = dest;
|
||||||
|
};
|
||||||
in
|
in
|
||||||
let
|
let
|
||||||
gitUpdater = config: { git, keys, dest, check }:
|
gitUpdater = config: { git, keys, dest, check }:
|
||||||
defaultUpdater { git = git; keys = keys; dest = dest; check = check; config = config; };
|
(defaultUpdater {
|
||||||
|
git = git;
|
||||||
|
keys = keys;
|
||||||
|
dest = dest;
|
||||||
|
check = check;
|
||||||
|
config = config;
|
||||||
|
}).dest;
|
||||||
fsUpdater = config: { path, dest, check }:
|
fsUpdater = config: { path, dest, check }:
|
||||||
defaultUpdater { path = path; dest = dest; check = check; config = config; };
|
(defaultUpdater {
|
||||||
|
path = path;
|
||||||
|
dest = dest;
|
||||||
|
check = check;
|
||||||
|
config = config;
|
||||||
|
}).dest;
|
||||||
urlUpdater = config: { url, dest, check }:
|
urlUpdater = config: { url, dest, check }:
|
||||||
defaultUpdater { url = url; dest = dest; check = check; config = config; };
|
(defaultUpdater {
|
||||||
|
url = url;
|
||||||
|
dest = dest;
|
||||||
|
check = check;
|
||||||
|
config = config;
|
||||||
|
}).dest;
|
||||||
|
|
||||||
lib = {
|
lib = {
|
||||||
inherit
|
inherit
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue