Add settings for conditionally installing programs
This commit is contained in:
parent
26bc15a769
commit
dcb1f57c59
|
@ -1,9 +1,11 @@
|
||||||
{ lib, ... }:
|
{ lib, config, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib)
|
inherit (lib)
|
||||||
mkOption
|
mkOption
|
||||||
types
|
types
|
||||||
;
|
;
|
||||||
|
|
||||||
|
cfg = config.valhalla;
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./i18n.nix
|
./i18n.nix
|
||||||
|
@ -43,6 +45,62 @@
|
||||||
description = "The X11 keyboard layout of the system.";
|
description = "The X11 keyboard layout of the system.";
|
||||||
default = null;
|
default = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
software =
|
||||||
|
let
|
||||||
|
inherit (cfg.software)
|
||||||
|
common
|
||||||
|
school
|
||||||
|
;
|
||||||
|
in {
|
||||||
|
essential = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
description = "A value indicating whether essentials should be installed.";
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
common = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
description = "A value indicating whether common software should be installed.";
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
school = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
description = "A value indicating whether software for studies should be installed.";
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
productivity = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
description = "A value indicating whether productivity apps should be installed.";
|
||||||
|
default = common || school;
|
||||||
|
};
|
||||||
|
|
||||||
|
socialMedia = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
description = "A value indicating whether social media apps should be installed.";
|
||||||
|
default = common;
|
||||||
|
};
|
||||||
|
|
||||||
|
media = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
description = "A value indicating whether media apps should be installed.";
|
||||||
|
default = common;
|
||||||
|
};
|
||||||
|
|
||||||
|
gaming = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
description = "A value indicating whether gaming apps should be installed.";
|
||||||
|
default = common;
|
||||||
|
};
|
||||||
|
|
||||||
|
coding = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
description = "A value indicating whether development apps should be installed.";
|
||||||
|
default = common;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue