mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
hosts/ni/setups/desktop: automatically set networking setup
This commit is contained in:
parent
9cd586231e
commit
3d4b8fa578
@ -29,7 +29,6 @@
|
|||||||
hardware.qol.enable = true;
|
hardware.qol.enable = true;
|
||||||
networking = {
|
networking = {
|
||||||
enable = true;
|
enable = true;
|
||||||
setup = "networkmanager";
|
|
||||||
wireguard.enable = true;
|
wireguard.enable = true;
|
||||||
};
|
};
|
||||||
services.backup.enable = true;
|
services.backup.enable = true;
|
||||||
|
@ -3,12 +3,16 @@
|
|||||||
let
|
let
|
||||||
hostCfg = config.hosts.ni;
|
hostCfg = config.hosts.ni;
|
||||||
cfg = hostCfg.setups.desktop;
|
cfg = hostCfg.setups.desktop;
|
||||||
|
|
||||||
|
hasAnyWorkflowEnabled = workflows:
|
||||||
|
lib.lists.any (workflow: config.workflows.workflows.${workflow}.enable) workflows;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.hosts.ni.setups.desktop.enable =
|
options.hosts.ni.setups.desktop.enable =
|
||||||
lib.mkEnableOption "desktop environment setup";
|
lib.mkEnableOption "desktop environment setup";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable (lib.mkMerge [
|
||||||
|
{
|
||||||
# Bring all of the desktop goodies.
|
# Bring all of the desktop goodies.
|
||||||
profiles.desktop = {
|
profiles.desktop = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -29,14 +33,16 @@ in
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Make it in multiple languages. Take note this is meant to be set up by
|
# Make it in multiple languages. Take note the input method engine is set
|
||||||
# the workflow module of choice...
|
# up by the workflow module of choice...
|
||||||
profiles.i18n.enable = true;
|
profiles.i18n.enable = true;
|
||||||
|
|
||||||
# ...which is by the way is this one.
|
# ...which is by the way is this one.
|
||||||
workflows.workflows.a-happy-gnome.enable = true;
|
workflows.workflows.a-happy-gnome.enable = true;
|
||||||
|
}
|
||||||
|
|
||||||
# Backup for the almighty archive, pls.
|
(lib.mkIf (hasAnyWorkflowEnabled [ "a-happy-gnome" "knome" "mosey-branch" ]) {
|
||||||
tasks.backup-archive.enable = true;
|
hosts.ni.networking.setup = "networkmanager";
|
||||||
};
|
})
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user