diff --git a/dotfiles/kitagawa/niri.kdl b/dotfiles/kitagawa/niri.kdl index c77b89a..a0474d0 100644 --- a/dotfiles/kitagawa/niri.kdl +++ b/dotfiles/kitagawa/niri.kdl @@ -27,7 +27,7 @@ input { } screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png" prefer-no-csd -overview { zoom 0.666; } +overview { zoom 0.5; } layout { gaps 12 struts { @@ -158,4 +158,8 @@ animations { window-resize { spring damping-ratio=0.8 stiffness=650 epsilon=0.0001 } +} +layer-rule { + match namespace="^noctalia-backdrop" + place-within-backdrop true } \ No newline at end of file diff --git a/dotfiles/kitagawa/noctalia/settings.toml b/dotfiles/kitagawa/noctalia/settings.toml index 6395bf2..3c90437 100644 --- a/dotfiles/kitagawa/noctalia/settings.toml +++ b/dotfiles/kitagawa/noctalia/settings.toml @@ -4,8 +4,9 @@ config_version = 13 enable_sounds = true [backdrop] -blur_intensity = 0.099999997764825821 -tint_intensity = 0.14999999664723873 +blur_intensity = 0.74999998323619366 +enabled = true +tint_intensity = 0.19999999552965164 [bar.default] background_opacity = 0.79999998211860657 diff --git a/modules/capabilities/graphics.nix b/modules/capabilities/graphics.nix index e28aea0..a37b23d 100644 --- a/modules/capabilities/graphics.nix +++ b/modules/capabilities/graphics.nix @@ -1,36 +1,34 @@ { inputs, self, ... }: { flake.nixosModules.graphics = { config, pkgs, lib, ... }: { - options = { - components = { - displayManager = lib.mkOption { - # enum that dynamically populates itself with the contents of the display-managers directory - type = lib.types.enum (map (name: lib.removeSuffix ".nix" name) ( - builtins.attrNames (builtins.readDir "${self}/modules/components/display-managers") - )); - default = "lightdm"; - }; + options.components = { + displayManager = lib.mkOption { + # enum that dynamically populates itself with the contents of the display-managers directory + type = lib.types.enum (map (name: lib.removeSuffix ".nix" name) ( + builtins.attrNames (builtins.readDir "${self}/modules/components/display-managers") + )); + default = "lightdm"; + }; - windowManagers = lib.mkOption { - type = lib.types.either (lib.types.listOf ( - lib.types.enum (map (name: lib.removeSuffix ".nix" name) ( - builtins.attrNames (builtins.readDir "${self}/modules/components/window-managers") - )) - )) (lib.types.enum (map (name: lib.removeSuffix ".nix" name) ( + windowManagers = lib.mkOption { + type = lib.types.either (lib.types.listOf ( + lib.types.enum (map (name: lib.removeSuffix ".nix" name) ( builtins.attrNames (builtins.readDir "${self}/modules/components/window-managers") - ))); - default = []; - }; + )) + )) (lib.types.enum (map (name: lib.removeSuffix ".nix" name) ( + builtins.attrNames (builtins.readDir "${self}/modules/components/window-managers") + ))); + default = []; + }; - shells = lib.mkOption { - type = lib.types.either (lib.types.listOf ( - lib.types.enum (map (name: lib.removeSuffix ".nix" name) ( - builtins.attrNames (builtins.readDir "${self}/modules/components/shells") - )) - )) (lib.types.enum (map (name: lib.removeSuffix ".nix" name) ( - builtins.attrNames (builtins.readDir "${self}/modules/components/shells") - ))); - default = []; - }; + shells = lib.mkOption { + type = lib.types.either (lib.types.listOf ( + lib.types.enum (map (name: lib.removeSuffix ".nix" name) ( + builtins.attrNames (builtins.readDir "${self}/modules/components/shells") + )) + )) (lib.types.enum (map (name: lib.removeSuffix ".nix" name) ( + builtins.attrNames (builtins.readDir "${self}/modules/components/shells") + ))); + default = []; }; }; @@ -48,37 +46,63 @@ }; }; - flake.homeModules.graphics = { config, pkgs, ... }: { - home.packages = with pkgs; [ - bibata-cursors - x264 - gparted - vlc - iosevka-comfy.comfy - nerd-fonts.jetbrains-mono - ]; + flake.homeModules.graphics = { config, pkgs, lib, ... }: { + options.components = { + windowManagers = lib.mkOption { + type = lib.types.either (lib.types.listOf ( + lib.types.enum (map (name: lib.removeSuffix ".nix" name) ( + builtins.attrNames (builtins.readDir "${self}/modules/components/window-managers") + )) + )) (lib.types.enum (map (name: lib.removeSuffix ".nix" name) ( + builtins.attrNames (builtins.readDir "${self}/modules/components/window-managers") + ))); + default = []; + }; - dconf.settings = { - "org/gnome/desktop/interface" = { - color-scheme = "prefer-dark"; + shells = lib.mkOption { + type = lib.types.either (lib.types.listOf ( + lib.types.enum (map (name: lib.removeSuffix ".nix" name) ( + builtins.attrNames (builtins.readDir "${self}/modules/components/shells") + )) + )) (lib.types.enum (map (name: lib.removeSuffix ".nix" name) ( + builtins.attrNames (builtins.readDir "${self}/modules/components/shells") + ))); + default = []; }; }; - home.pointerCursor = { - enable = true; - package = pkgs.bibata-cursors; - name = "Bibata-Modern-Ice"; - size = 22; - gtk.enable = true; - x11.enable = true; - }; + config = { + home.packages = with pkgs; [ + bibata-cursors + x264 + gparted + vlc + iosevka-comfy.comfy + nerd-fonts.jetbrains-mono + ]; - gtk = { - enable = true; - colorScheme = "dark"; + dconf.settings = { + "org/gnome/desktop/interface" = { + color-scheme = "prefer-dark"; + }; + }; - gtk2.configLocation = "${config.home.homeDirectory}/.config/.gtkrc-2.0"; # prevents file conflicts between this and other parts of the nix config - gtk2.force = true; + home.pointerCursor = { + enable = true; + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Ice"; + size = 22; + gtk.enable = true; + x11.enable = true; + }; + + gtk = { + enable = true; + colorScheme = "dark"; + + gtk2.configLocation = "${config.home.homeDirectory}/.config/.gtkrc-2.0"; # prevents file conflicts between this and other parts of the nix config + gtk2.force = true; + }; }; }; } \ No newline at end of file diff --git a/modules/components/shells/noctalia.nix b/modules/components/shells/noctalia.nix index 434e514..04d543b 100644 --- a/modules/components/shells/noctalia.nix +++ b/modules/components/shells/noctalia.nix @@ -1,29 +1,39 @@ { inputs, self, ... }: { flake.nixosModules.graphics = { pkgs, config, lib, ... }: { config = lib.mkIf ((config.components.shells == "noctalia")||(builtins.elem "noctalia" config.components.shells)) { - environment.systemPackages = with pkgs; [ - inputs.noctalia.packages.${system}.default + environment.systemPackages = [ + inputs.noctalia.packages.${pkgs.system}.default ]; programs.noctalia.enable = true; - home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) ({ lib, config, ... }: { - home.activation = { + home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) { + components.shells = [ "noctalia" ]; + }; + }; + }; + + flake.homeModules.graphics = { pkgs, config, lib, inputs, ... }: { + config = lib.mkIf ((config.components.shells == "noctalia")||(builtins.elem "noctalia" config.components.shells)) { + home = { + packages = lib.mkIf (config.info.isStandalone) [ inputs.noctalia.packages.${pkgs.system}.default ]; + + activation = { symlinkNoctaliaState = lib.hm.dag.entryAfter ["writeBoundary"] (inputs.helpers.mkSymlinkActivationScript { - target = "${config.users.grey.homeDir}/.local/state/noctalia/settings.toml"; + target = "${config.home.homeDirectory}/.local/state/noctalia/settings.toml"; source = "${config.info.rootPath}/dotfiles/${config.info.hostName}/noctalia/settings.toml"; }); symlinkNoctaliaStatePlugins = lib.hm.dag.entryAfter ["writeBoundary"] (inputs.helpers.mkSymlinkActivationScript { - target = "${config.users.grey.homeDir}/.local/state/noctalia/plugins"; + target = "${config.home.homeDirectory}/.local/state/noctalia/plugins"; source = "${config.info.rootPath}/dotfiles/${config.info.hostName}/noctalia/plugins"; isDir = true; }); }; + }; - xdg.configFile."noctalia/settings.toml".source = "${self}/dotfiles/${config.info.hostName}/noctalia/settings.toml"; - xdg.configFile."noctalia/plugins".source = "${self}/dotfiles/${config.info.hostName}/noctalia/plugins"; - }); + xdg.configFile."noctalia/settings.toml".source = "${self}/dotfiles/${config.info.hostName}/noctalia/settings.toml"; + xdg.configFile."noctalia/plugins".source = "${self}/dotfiles/${config.info.hostName}/noctalia/plugins"; }; }; } \ No newline at end of file diff --git a/modules/components/window-managers/niri.nix b/modules/components/window-managers/niri.nix index 7150017..45d3a41 100644 --- a/modules/components/window-managers/niri.nix +++ b/modules/components/window-managers/niri.nix @@ -1,5 +1,5 @@ { inputs, self, ... }: { - flake.nixosModules.graphics = { config, pkgs, inputs, lib, ... }: { + flake.nixosModules.graphics = { config, pkgs, lib, ... }: { config = lib.mkIf ((config.components.windowManagers == "niri")||(builtins.elem "niri" config.components.windowManagers)) { environment.systemPackages = with pkgs; [ xdg-desktop-portal-gnome @@ -37,11 +37,19 @@ )); }; - home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) ({ lib, config, ... }: { - home.activation.symlinkNiriConfig = lib.hm.dag.entryAfter ["writeBoundary"] (inputs.helpers.mkSymlinkActivationScript { - target = "${config.users.grey.homeDir}/.config/niri/config.kdl"; - source = "${config.info.rootPath}/dotfiles/${config.info.hostName}/niri.kdl"; - }); + home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) { + components.windowManagers = [ "niri" ]; + }; + }; + }; + + flake.homeModules.graphics = { config, pkgs, lib, inputs, ... }: { + home = lib.mkIf ((config.components.windowManagers == "niri")||(builtins.elem "niri" config.components.windowManagers)) { + packages = lib.mkIf (config.info.isStandalone) [ pkgs.niri ]; + + activation.symlinkNiriConfig = lib.hm.dag.entryAfter ["writeBoundary"] (inputs.helpers.mkSymlinkActivationScript { + target = "${config.home.homeDirectory}/.config/niri/config.kdl"; + source = "${config.info.rootPath}/dotfiles/${config.info.hostName}/niri.kdl"; }); }; }; diff --git a/modules/features/nixos/home-manager.nix b/modules/features/nixos/home-manager.nix index c128aa6..aac9128 100644 --- a/modules/features/nixos/home-manager.nix +++ b/modules/features/nixos/home-manager.nix @@ -14,15 +14,11 @@ useGlobalPkgs = true; useUserPackages = true; backupFileExtension = "bak"; + extraSpecialArgs = { + inherit inputs; + }; + users.grey = self.homeModules.${config.info.hostName}; - sharedModules = [ - { features.nixos.stylix.enable = lib.mkDefault config.features.nixos.stylix.enable; } - ( lib.mkIf (config.features.nixos.stylix.enable) - ( if (config.features.applications.gui.floorp.enable) then { - stylix.targets.floorp.profileNames = [ "default" ]; - } else {}) - ) - ]; }; }; } \ No newline at end of file diff --git a/modules/features/nixos/stylix.nix b/modules/features/nixos/stylix.nix index 06f5b58..b8d36ba 100644 --- a/modules/features/nixos/stylix.nix +++ b/modules/features/nixos/stylix.nix @@ -10,10 +10,20 @@ stylix.enable = true; stylix.image = builtins.path { path = "${self}/modules/hosts/${config.info.hostName}/wallpaper.jpg"; }; stylix.polarity = "dark"; + + home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) { + features.nixos.stylix.enable = lib.mkDefault config.features.nixos.stylix.enable; + }; }; }; flake.homeModules.graphics = { pkgs, lib, config, ... }: { options.features.nixos.stylix.enable = lib.mkEnableOption "stylix"; + + config = lib.mkIf (config.features.nixos.stylix.enable) { + stylix.targets = lib.mkIf (config.features.applications.gui.floorp.enable) { + floorp.profileNames = [ "default" ]; + }; + }; }; } \ No newline at end of file diff --git a/modules/hosts/takamaki/takamaki.nix b/modules/hosts/takamaki/takamaki.nix index 3463d2a..af37b18 100644 --- a/modules/hosts/takamaki/takamaki.nix +++ b/modules/hosts/takamaki/takamaki.nix @@ -4,6 +4,7 @@ modules = with self.homeModules; [ takamaki ]; + extraSpecialArgs = { inherit inputs; }; }; flake.homeModules.takamaki = { pkgs, config, lib, ... }: {