mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 18:30:43 -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,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) enabled;
|
inherit (lib) enabled enableAttrs;
|
||||||
|
|
||||||
in {
|
in {
|
||||||
imports = with self.nixosModules; [
|
imports = with self.nixosModules; [
|
||||||
restic
|
restic
|
||||||
|
@ -18,13 +19,21 @@ in {
|
||||||
"tex"
|
"tex"
|
||||||
"node"
|
"node"
|
||||||
];
|
];
|
||||||
nix-ld = enabled;
|
} // enableAttrs [
|
||||||
docker = enabled;
|
"chrome"
|
||||||
vbox = enabled;
|
"desktop"
|
||||||
desktop = enabled;
|
"docker"
|
||||||
vpn = enabled;
|
"nix-ld"
|
||||||
chrome = enabled;
|
"vbox"
|
||||||
};
|
"vpn"
|
||||||
|
];
|
||||||
|
# nix-ld = enabled;
|
||||||
|
# docker = enabled;
|
||||||
|
# vbox = enabled;
|
||||||
|
# desktop = enabled;
|
||||||
|
# vpn = enabled;
|
||||||
|
# chrome = enabled;
|
||||||
|
# };
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
zk
|
zk
|
||||||
|
|
|
@ -1,9 +1,15 @@
|
||||||
final: prev: let
|
final: prev: let
|
||||||
inherit (final) hasSuffix;
|
inherit (final) hasSuffix;
|
||||||
runes = import ../modules/runes;
|
runes = import ../modules/runes;
|
||||||
in {
|
in rec {
|
||||||
enabled = {enable = true;};
|
enabled = {enable = true;};
|
||||||
disabled = {enable = false;};
|
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;
|
isNixFile = path: hasSuffix ".nix" path;
|
||||||
mkIfIn = name: list: prev.mkIf (builtins.elem name list);
|
mkIfIn = name: list: prev.mkIf (builtins.elem name list);
|
||||||
mkRune = {
|
mkRune = {
|
||||||
|
|
Loading…
Reference in a new issue