From e5ade464b9d7a4a820f3dfd960ffd39e3b8c385c Mon Sep 17 00:00:00 2001 From: "RingOfStorms (Joshua Bell)" Date: Thu, 10 Oct 2024 16:42:35 -0500 Subject: [PATCH] cosmic updates --- flake.nix | 14 +++++++++----- modules/de/cosmic.nix | 2 ++ modules/home_manager.nix | 1 + users/josh/home_manager/de/gnome.nix | 5 +++-- users/josh/home_manager/de/gtk.nix | 4 ++-- users/josh/home_manager/file_browser.nix | 9 +++++++-- 6 files changed, 24 insertions(+), 11 deletions(-) diff --git a/flake.nix b/flake.nix index 3656e3f..fd1b6f5 100644 --- a/flake.nix +++ b/flake.nix @@ -136,14 +136,18 @@ in (lib.nixosSystem { modules = - [ - cosmic.nixosModules.default - ./hosts/configuration.nix - ] + [ cosmic.nixosModules.default ] ++ ylib.umport { path = lib.fileset.maybeMissing ./modules; recursive = true; - }; + } + ++ ylib.umport { + path = lib.fileset.maybeMissing ./modules_post; + recursive = true; + } + ++ [ + ./hosts/configuration.nix + ]; specialArgs = inputs // { inherit ylib; settings = diff --git a/modules/de/cosmic.nix b/modules/de/cosmic.nix index 2de8164..1684ef2 100644 --- a/modules/de/cosmic.nix +++ b/modules/de/cosmic.nix @@ -2,6 +2,7 @@ cosmic, config, lib, + pkgs, settings, ... }: @@ -28,5 +29,6 @@ in # Enable cosmic services.desktopManager.cosmic.enable = true; services.displayManager.cosmic-greeter.enable = true; + environment.cosmic.excludePackages = with pkgs; [ cosmic-edit cosmic-term cosmic-store ]; }; } diff --git a/modules/home_manager.nix b/modules/home_manager.nix index 1ee240a..4f84422 100644 --- a/modules/home_manager.nix +++ b/modules/home_manager.nix @@ -15,6 +15,7 @@ in home-manager.useUserPackages = true; home-manager.useGlobalPkgs = true; home-manager.extraSpecialArgs = { + nixConfig = config; inherit settings; inherit ylib; inherit (inputs) ragenix; diff --git a/users/josh/home_manager/de/gnome.nix b/users/josh/home_manager/de/gnome.nix index c732363..67055a7 100644 --- a/users/josh/home_manager/de/gnome.nix +++ b/users/josh/home_manager/de/gnome.nix @@ -2,6 +2,7 @@ pkgs, settings, lib, + nixConfig, ... }: with lib.hm.gvariant; @@ -10,13 +11,13 @@ with lib.hm.gvariant; # use `dconf dump /` before and after and diff the files for easy editing of dconf below # > `dconf dump / > /tmp/dconf_dump_start && watch -n0.5 "dconf dump / > /tmp/dconf_dump_current && diff --color /tmp/dconf_dump_start /tmp/dconf_dump_current -U12"` # OR (Must be logged into user directly, no SU to user will work): `dconf watch /` - # OR get the exact converted config from `dconf dump / | dconf2nix | less` and search with forward slash + # OR get the exact converted nixConfig from `dconf dump / | dconf2nix | less` and search with forward slash # gnome.dconf-editor # gnomeExtensions.workspace-switch-wraparound #gnomeExtensions.forge # probably don"t need on this on tiny laptop but may explore this instead of sway for my desktop ]; - dconf = { + dconf = lib.mkIf (!nixConfig.mods.de_cosmic.enable) { enable = true; settings = { "org/gnome/desktop/session" = { diff --git a/users/josh/home_manager/de/gtk.nix b/users/josh/home_manager/de/gtk.nix index b42a49b..3b51b63 100644 --- a/users/josh/home_manager/de/gtk.nix +++ b/users/josh/home_manager/de/gtk.nix @@ -1,6 +1,6 @@ -{ pkgs, ... }: +{ pkgs, lib, nixConfig, ... }: { - gtk = { + gtk = lib.mkIf (!nixConfig.mods.de_cosmic.enable) { enable = true; cursorTheme = { diff --git a/users/josh/home_manager/file_browser.nix b/users/josh/home_manager/file_browser.nix index 68f8964..86c3157 100644 --- a/users/josh/home_manager/file_browser.nix +++ b/users/josh/home_manager/file_browser.nix @@ -1,4 +1,9 @@ -{ pkgs, ... }: { - home.packages = with pkgs; [ gnome.nautilus qimgv ]; + pkgs, + lib, + nixConfig, + ... +}: +{ + home.packages = lib.mkIf (!nixConfig.mods.de_cosmic.enable) (with pkgs; [ gnome.nautilus qimgv ]); }