From 52423ffdada144c1aca6839752760af98bcc36ec Mon Sep 17 00:00:00 2001 From: soraefir Date: Sun, 14 Apr 2024 22:24:23 +0200 Subject: [PATCH] more WM --- generator.nix | 8 ++++---- modules/nixos/gui/greet/default.nix | 5 ++--- modules/nixos/system/xdg/default.nix | 18 ++++++++++-------- modules/shared/syscfg/default.nix | 2 +- systems/ci/cfg.nix | 1 + systems/iriy/cfg.nix | 2 +- systems/valinor/cfg.nix | 1 + 7 files changed, 20 insertions(+), 17 deletions(-) diff --git a/generator.nix b/generator.nix index 1155d70..d99be63 100755 --- a/generator.nix +++ b/generator.nix @@ -7,12 +7,12 @@ "nixos" = inputs.nixpkgs.lib.nixosSystem { system = system; modules = [ - inputs.sops-nix.nixosModules.sops ./modules/shared/syscfg ./modules/shared/sops ./modules/nixos syscfg ./systems/${host} + inputs.sops-nix.nixosModules.sops inputs.home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; @@ -21,13 +21,13 @@ home-manager.users = builtins.listToAttrs (map (userConfig: nameValuePair userConfig.username { imports = [ - inputs.nix-colors.homeManagerModule - inputs.hyprland.homeManagerModules.default ./modules/shared/syscfg ./modules/shared/colors ./modules/home syscfg { usercfg = userConfig; } + inputs.nix-colors.homeManagerModule + inputs.hyprland.homeManagerModules ]; }) syscfg.syscfg.users); } @@ -46,7 +46,7 @@ home-manager.users.sora = { imports = [ inputs.nix-colors.homeManagerModule - inputs.hyprland.homeManagerModules.default + inputs.hyprland.homeManagerModules ./systems/${host}/home.nix ]; }; diff --git a/modules/nixos/gui/greet/default.nix b/modules/nixos/gui/greet/default.nix index ec1e3cc..bb87405 100644 --- a/modules/nixos/gui/greet/default.nix +++ b/modules/nixos/gui/greet/default.nix @@ -1,7 +1,6 @@ { lib, config, pkgs, ... }: -let cfg = config.syscfg.make.gui; -in { - config = lib.mkIf cfg { +{ + config = lib.mkIf (config.syscfg.make.gui) { services.greetd = { enable = true; diff --git a/modules/nixos/system/xdg/default.nix b/modules/nixos/system/xdg/default.nix index 56e5ee2..3492d40 100644 --- a/modules/nixos/system/xdg/default.nix +++ b/modules/nixos/system/xdg/default.nix @@ -1,13 +1,15 @@ { pkgs, ... }: { - xdg.portal = { - enable = true; - # wlr.enable = true; - extraPortals = with pkgs; [ - xdg-desktop-portal-hyprland - xdg-desktop-portal-gtk - ]; - config.common.default = [ "hyprland" "gtk" ]; + config = lib.mkIf (config.syscfg.make.gui) { + xdg.portal = { + enable = true; + # wlr.enable = true; + extraPortals = with pkgs; [ + xdg-desktop-portal-hyprland + xdg-desktop-portal-gtk + ]; + config.common.default = [ "hyprland" "gtk" ]; + }; }; environment.sessionVariables = rec { diff --git a/modules/shared/syscfg/default.nix b/modules/shared/syscfg/default.nix index 1f9721d..2618c42 100644 --- a/modules/shared/syscfg/default.nix +++ b/modules/shared/syscfg/default.nix @@ -4,7 +4,7 @@ let username = mkOption { type = types.str; }; wm = mkOption { type = types.enum [ "Wayland" "X11" "-"]; - default = "Wayland"; + default = "-"; }; git = { username = mkOption { type = types.str; }; diff --git a/systems/ci/cfg.nix b/systems/ci/cfg.nix index 205dd27..dd38507 100644 --- a/systems/ci/cfg.nix +++ b/systems/ci/cfg.nix @@ -4,6 +4,7 @@ defaultUser = "ci"; users = [{ username = "ci"; + wm = "-"; git = { email = "ci@ci"; username = "CI"; diff --git a/systems/iriy/cfg.nix b/systems/iriy/cfg.nix index b39b4d2..0b1bb71 100644 --- a/systems/iriy/cfg.nix +++ b/systems/iriy/cfg.nix @@ -4,7 +4,7 @@ defaultUser = "sora"; users = [{ username = "sora"; - wm = "-"; + wm = "Wayland"; git = { email = "soraefir+git@helcel"; username = "soraefir"; diff --git a/systems/valinor/cfg.nix b/systems/valinor/cfg.nix index 75faf3c..6fd08b8 100644 --- a/systems/valinor/cfg.nix +++ b/systems/valinor/cfg.nix @@ -4,6 +4,7 @@ defaultUser = "sora"; users = [{ username = "sora"; + wm = "Wayland"; git = { email = "soraefir+git@helcel"; username = "soraefir";