Inherit user app enablement from OS
This commit is contained in:
parent
bd7d8f8080
commit
fe37ad29e0
2 changed files with 24 additions and 5 deletions
|
@ -1,10 +1,33 @@
|
||||||
{ lib, config, ... }:
|
{ lib, config, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib) mkOption types;
|
inherit (lib) mkDefault mkOption types;
|
||||||
cfg = config.valhalla;
|
cfg = config.valhalla;
|
||||||
|
|
||||||
|
mkUsersOption = osConfig: mkOption {
|
||||||
|
type = types.attrsOf (types.submodule (
|
||||||
|
{ ... }: {
|
||||||
|
config = {
|
||||||
|
programs = builtins.mapAttrs (
|
||||||
|
name: config: {
|
||||||
|
enable = mkDefault config.enable;
|
||||||
|
}) osConfig.programs;
|
||||||
|
};
|
||||||
|
}));
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
|
imports = [
|
||||||
|
./programs/git.nix
|
||||||
|
./programs/nextcloud.nix
|
||||||
|
./programs/oh-my-posh.nix
|
||||||
|
./programs/rclone.nix
|
||||||
|
];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
valhalla = {
|
valhalla = {
|
||||||
|
users = mkUsersOption cfg;
|
||||||
|
linux.users = mkUsersOption cfg.linux;
|
||||||
|
windows.users = mkUsersOption cfg.windows;
|
||||||
|
|
||||||
software = let
|
software = let
|
||||||
inherit (cfg.software) coding common desktopExperience school server;
|
inherit (cfg.software) coding common desktopExperience school server;
|
||||||
in {
|
in {
|
||||||
|
|
|
@ -5,10 +5,6 @@ in {
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
./i18n.nix
|
./i18n.nix
|
||||||
./os.nix
|
./os.nix
|
||||||
./programs/git.nix
|
|
||||||
./programs/nextcloud.nix
|
|
||||||
./programs/oh-my-posh.nix
|
|
||||||
./programs/rclone.nix
|
|
||||||
./partition.nix
|
./partition.nix
|
||||||
./software.nix
|
./software.nix
|
||||||
./users.nix
|
./users.nix
|
||||||
|
|
Loading…
Reference in a new issue