diff --git a/flake.nix b/flake.nix index fd1b6f5a..c48e6728 100644 --- a/flake.nix +++ b/flake.nix @@ -136,15 +136,14 @@ in (lib.nixosSystem { modules = - [ cosmic.nixosModules.default ] + [ + cosmic.nixosModules.default + settings.home-manager.nixosModules.home-manager + ] ++ ylib.umport { path = lib.fileset.maybeMissing ./modules; recursive = true; } - ++ ylib.umport { - path = lib.fileset.maybeMissing ./modules_post; - recursive = true; - } ++ [ ./hosts/configuration.nix ]; diff --git a/modules/de/cosmic.nix b/modules/de/cosmic.nix deleted file mode 100644 index 1684ef2c..00000000 --- a/modules/de/cosmic.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ - cosmic, - config, - lib, - pkgs, - settings, - ... -}: -with lib; -let - name = "de_cosmic"; - cfg = config.mods.${name}; -in -{ - - options = { - mods.${name} = { - enable = mkEnableOption (lib.mdDoc "Enable COSMIC desktop environment"); - }; - }; - - config = mkIf cfg.enable { - # Use cosmic binary cache - nix.settings = { - substituters = [ "https://cosmic.cachix.org/" ]; - trusted-public-keys = [ "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" ]; - }; - - # 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/de/cosmic/config/com.system76.CosmicBackground/v1/all b/modules/de/cosmic/config/com.system76.CosmicBackground/v1/all new file mode 100644 index 00000000..fe65de8e --- /dev/null +++ b/modules/de/cosmic/config/com.system76.CosmicBackground/v1/all @@ -0,0 +1,9 @@ +( + output: "all", + source: Color(Single((0.0, 0.0, 0.0))), + filter_by_theme: false, + rotation_frequency: 900, + filter_method: Lanczos, + scaling_mode: Zoom, + sampling_method: Alphanumeric, +) diff --git a/modules/de/cosmic/config/com.system76.CosmicBackground/v1/same_on_all b/modules/de/cosmic/config/com.system76.CosmicBackground/v1/same_on_all new file mode 100644 index 00000000..27ba77dd --- /dev/null +++ b/modules/de/cosmic/config/com.system76.CosmicBackground/v1/same_on_all @@ -0,0 +1 @@ +true diff --git a/modules/de/cosmic/config/com.system76.CosmicComp/v1/active_hint b/modules/de/cosmic/config/com.system76.CosmicComp/v1/active_hint new file mode 100644 index 00000000..c508d536 --- /dev/null +++ b/modules/de/cosmic/config/com.system76.CosmicComp/v1/active_hint @@ -0,0 +1 @@ +false diff --git a/modules/de/cosmic/config/com.system76.CosmicComp/v1/descale_xwayland b/modules/de/cosmic/config/com.system76.CosmicComp/v1/descale_xwayland new file mode 100644 index 00000000..27ba77dd --- /dev/null +++ b/modules/de/cosmic/config/com.system76.CosmicComp/v1/descale_xwayland @@ -0,0 +1 @@ +true diff --git a/modules/de/cosmic/config/com.system76.CosmicSettings.Wallpaper/v1/cusom-colors b/modules/de/cosmic/config/com.system76.CosmicSettings.Wallpaper/v1/cusom-colors new file mode 100644 index 00000000..edb94975 --- /dev/null +++ b/modules/de/cosmic/config/com.system76.CosmicSettings.Wallpaper/v1/cusom-colors @@ -0,0 +1,3 @@ +[ + Single((0.0, 0.0, 0.0)), +] diff --git a/modules/de/cosmic/config/com.system76.CosmicTk/v1/apply_theme_global b/modules/de/cosmic/config/com.system76.CosmicTk/v1/apply_theme_global new file mode 100644 index 00000000..27ba77dd --- /dev/null +++ b/modules/de/cosmic/config/com.system76.CosmicTk/v1/apply_theme_global @@ -0,0 +1 @@ +true diff --git a/modules/de/cosmic/config/com.system76.CosmicTk/v1/header_size b/modules/de/cosmic/config/com.system76.CosmicTk/v1/header_size new file mode 100644 index 00000000..b2c1c78b --- /dev/null +++ b/modules/de/cosmic/config/com.system76.CosmicTk/v1/header_size @@ -0,0 +1 @@ +Compact diff --git a/modules/de/cosmic/config/com.system76.CosmicTk/v1/interface_density b/modules/de/cosmic/config/com.system76.CosmicTk/v1/interface_density new file mode 100644 index 00000000..b2c1c78b --- /dev/null +++ b/modules/de/cosmic/config/com.system76.CosmicTk/v1/interface_density @@ -0,0 +1 @@ +Compact diff --git a/modules/de/cosmic/cosmic.nix b/modules/de/cosmic/cosmic.nix new file mode 100644 index 00000000..dccda04b --- /dev/null +++ b/modules/de/cosmic/cosmic.nix @@ -0,0 +1,55 @@ +{ + config, + lib, + pkgs, + settings, + ... +}: +with lib; +let + name = "de_cosmic"; + cfg = config.mods.${name}; + + cosmicConfigDir = ./config; + cosmicFiles = builtins.attrNames (builtins.readDir cosmicConfigDir); + cosmicConfigFiles = map (fileName: { + name = "cosmic/${fileName}"; + value = { + source = "${cosmicConfigDir}/${fileName}"; + # enable = true; + }; + }) cosmicFiles; + cosmicConfigFilesAttrs = builtins.listToAttrs cosmicConfigFiles; +in +{ + + options = { + mods.${name} = { + enable = mkEnableOption (lib.mdDoc "Enable COSMIC desktop environment"); + }; + }; + + config = mkIf cfg.enable { + # Use cosmic binary cache + nix.settings = { + substituters = [ "https://cosmic.cachix.org/" ]; + trusted-public-keys = [ "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" ]; + }; + + # Enable cosmic + services.desktopManager.cosmic.enable = true; + services.displayManager.cosmic-greeter.enable = true; + environment.cosmic.excludePackages = with pkgs; [ + cosmic-edit + cosmic-term + cosmic-store + ]; + + # Config + home-manager.backupFileExtension = "bak"; + home-manager.users.${settings.user.username} = { + xdg.configFile = cosmicConfigFilesAttrs; + }; + }; + +}