mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-11-05 06:03:15 -06:00
make unnesscary function
This commit is contained in:
parent
71cab562fc
commit
4287d698b9
2 changed files with 24 additions and 9 deletions
|
@ -4,7 +4,8 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) enabled;
|
||||
inherit (lib) enabled enableAttrs;
|
||||
|
||||
in {
|
||||
imports = with self.nixosModules; [
|
||||
restic
|
||||
|
@ -18,13 +19,21 @@ in {
|
|||
"tex"
|
||||
"node"
|
||||
];
|
||||
nix-ld = enabled;
|
||||
docker = enabled;
|
||||
vbox = enabled;
|
||||
desktop = enabled;
|
||||
vpn = enabled;
|
||||
chrome = enabled;
|
||||
};
|
||||
} // enableAttrs [
|
||||
"chrome"
|
||||
"desktop"
|
||||
"docker"
|
||||
"nix-ld"
|
||||
"vbox"
|
||||
"vpn"
|
||||
];
|
||||
# nix-ld = enabled;
|
||||
# docker = enabled;
|
||||
# vbox = enabled;
|
||||
# desktop = enabled;
|
||||
# vpn = enabled;
|
||||
# chrome = enabled;
|
||||
# };
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
zk
|
||||
|
|
|
@ -1,9 +1,15 @@
|
|||
final: prev: let
|
||||
inherit (final) hasSuffix;
|
||||
runes = import ../modules/runes;
|
||||
in {
|
||||
in rec {
|
||||
enabled = {enable = true;};
|
||||
disabled = {enable = false;};
|
||||
|
||||
# ["a" "b"] -> {a.enable = true; b.enable = true;}
|
||||
enableAttrs = attrs: builtins.listToAttrs (map (attr: {name = attr; value = enabled; }) attrs);
|
||||
# ["a" "b"] -> {a.enable = false; b.enable = false;}
|
||||
disableAttrs = attrs: builtins.listToAttrs (map (attr: {name = attr; value = disabled; }) attrs);
|
||||
|
||||
isNixFile = path: hasSuffix ".nix" path;
|
||||
mkIfIn = name: list: prev.mkIf (builtins.elem name list);
|
||||
mkRune = {
|
||||
|
|
Loading…
Reference in a new issue