diff --git a/hosts/mtworx/configuration.nix b/hosts/mtworx/configuration.nix index 1614a12..4eaae53 100644 --- a/hosts/mtworx/configuration.nix +++ b/hosts/mtworx/configuration.nix @@ -79,6 +79,7 @@ in nixpkgs.hostPlatform = "x86_64-linux"; mj = { + profiles.desktop.enableUserServices = true; stateVersion = "23.11"; timeZone = "UTC"; username = "motiejus"; diff --git a/hosts/vno1-gdrx/configuration.nix b/hosts/vno1-gdrx/configuration.nix index 4ec0051..0ee626b 100644 --- a/hosts/vno1-gdrx/configuration.nix +++ b/hosts/vno1-gdrx/configuration.nix @@ -89,6 +89,8 @@ in }; mj = { + profiles.desktop.enableUserServices = true; + stateVersion = "24.05"; timeZone = "Europe/Vilnius"; username = "motiejus"; diff --git a/modules/profiles/desktop/default.nix b/modules/profiles/desktop/default.nix index 740f64e..8fa62d2 100644 --- a/modules/profiles/desktop/default.nix +++ b/modules/profiles/desktop/default.nix @@ -5,7 +5,13 @@ ... }: let + cfg = config.mj.profiles.desktop; inherit (config.mj) username; + inherit (lib) + types + mkOption + ; + firefox = if (pkgs.stdenv.hostPlatform.system == "x86_64-linux") then pkgs.firefox-bin else pkgs.firefox; brightness = pkgs.writeShellApplication { @@ -18,6 +24,13 @@ let }; in { + options.mj.profiles.desktop = with types; { + enableUserServices = mkOption { + type = bool; + default = false; + }; + }; + imports = [ ../physical ]; @@ -60,7 +73,7 @@ in "docker" ]; - services = { + services = lib.mkIf cfg.enableUserServices { blueman.enable = true; udev.packages = [ pkgs.yubikey-personalization ]; gnome.gnome-keyring.enable = true;