Commit 8000cf3

HPCesia <me@hpcesia.com>
2026-06-20 20:32:41
Add Noctalia shell for desktop
1 parent 1cb8bd3
Changed files (5)
modules
desktop
env
users
hpcesia
modules/desktop/env/shell/noctalia/default.nix
@@ -0,0 +1,115 @@
+{inputs, ...}: {
+  flake-file.inputs.noctalia = {
+    url = "github:noctalia-dev/noctalia";
+    inputs.nixpkgs.follows = "nixpkgs";
+  };
+
+  den.aspects.desktop.env.shell.noctalia = {
+    persistHome = {config, ...}: {
+      directories = [
+        "${config.xdg.stateHome}/noctalia"
+      ];
+    };
+
+    homeManager = {
+      user,
+      config,
+      ...
+    }: {
+      imports = [inputs.noctalia.homeModules.default];
+
+      programs.noctalia = {
+        enable = true;
+
+        settings = {
+          battery.warning_threshold = 20;
+          notification.layer = "overlay";
+          osd.position_vertical = "top_right";
+          shell = {
+            avatar_path = "/var/lib/AccountsService/icons/${user.userName}.png";
+            panel = {
+              open_near_click_control_center = true;
+              transparency_mode = "glass";
+            };
+            screenshot = {
+              directory = "${config.xdg.userDirs.pictures}/Screenshots";
+              filename_pattern = "Screenshot_%Y-%m-%d_%H-%M-%S";
+            };
+          };
+          bar = {
+            order = ["default"];
+            default = {
+              background_opacity = 0.9;
+              margin_edge = 8;
+              margin_ends = 8;
+              radius = 14;
+              start = ["launcher" "privacy" "media"];
+              center = ["workspaces"];
+              end = [
+                "tray"
+                "notifications"
+                "clipboard"
+                "network"
+                "bluetooth"
+                "volume"
+                "brightness"
+                "battery"
+                "clock"
+                "control-center"
+              ];
+            };
+          };
+          widget = {
+            battery = {
+              display_mode = "graphic";
+              show_label = false;
+            };
+            brightness.show_label = false;
+            clock = {
+              capsule = true;
+              capsule_opacity = 0.9;
+              capsule_padding = 10.0;
+              format = "{:%Y-%m-%d %H:%M}";
+            };
+            control-center = {
+              capsule = true;
+              capsule_opacity = 0.9;
+            };
+            launcher = {
+              capsule = true;
+              capsule_opacity = 0.9;
+            };
+            media = {
+              capsule = true;
+              capsule_opacity = 0.9;
+            };
+            network.show_label = false;
+            privacy = {
+              capsule = true;
+              capsule_opacity = 0.9;
+            };
+            tray = {drawer = true;};
+            volume.show_label = false;
+            workspaces.hide_when_empty = true;
+          };
+        };
+      };
+    };
+  };
+
+  den.aspects.desktop.env.shell.noctalia.themes = {
+    catppuccin = {
+      homeManager = {pkgs, ...}: {
+        programs.noctalia = {
+          settings = {
+            theme = {
+              source = "builtin";
+              builtin = "Catppuccin";
+            };
+            wallpaper.default = pkgs.nixos-artwork.wallpapers.catppuccin-mocha;
+          };
+        };
+      };
+    };
+  };
+}
modules/desktop/env/shell/noctalia/integration.nix
@@ -0,0 +1,75 @@
+{den, ...}: {
+  den.aspects.desktop.env.shell.noctalia = {
+    includes =
+      den.lib.policy.when
+      ({host, ...}: host.hasAspect den.aspects.desktop.env.wm.niri)
+      [den.aspects.desktop.env.shell.noctalia.integration.niri];
+  };
+
+  den.aspects.desktop.env.shell.noctalia.integration = {
+    niri = {
+      homeManager = {
+        programs.noctalia.settings = {
+          backdrop.enabled = true;
+        };
+
+        programs.niri.extraConfig = {
+          pre = {
+            _children = [
+              {spawn-at-startup = "noctalia";}
+              {
+                layer-rule = {
+                  match._props = {namespace = "^noctalia-backdrop";};
+                  place-within-backdrop = true;
+                };
+              }
+              {
+                layer-rule = {
+                  match._props = {namespace = "^noctalia-(bar-[^\"]+|notification|dock|panel|attached-panel|osd)$";};
+                  background-effect = {
+                    xray = false;
+                  };
+                };
+              }
+              {
+                window-rule = {
+                  match._props = {app-id = "dev.noctalia.Noctalia.Settings";};
+                  open-floating = true;
+                  default-column-width = {fixed = 1080;};
+                  default-window-height = {fixed = 920;};
+                  background-effect = {
+                    xray = false;
+                  };
+                };
+              }
+            ];
+            binds = {
+              "Mod+Space" = {
+                _props.hotkey-overlay-title = "Toggle Application Launcher";
+                spawn-sh = "noctalia msg panel-toggle launcher";
+              };
+              "Mod+X" = {
+                _props.hotkey-overlay-title = "Toggle Noctalia Control Center";
+                spawn-sh = "noctalia msg panel-toggle control-center";
+              };
+              "Mod+V" = {
+                _props.hotkey-overlay-title = "Toggle Clipboard History";
+                spawn-sh = "noctalia msg panel-toggle clipboard";
+              };
+              "Mod+Alt+L" = {
+                _props.hotkey-overlay-title = "Lock Screen";
+                spawn-sh = "noctalia msg session lock";
+              };
+
+              XF86AudioRaiseVolume.spawn-sh = "noctalia msg volume-up";
+              XF86AudioLowerVolume.spawn-sh = "noctalia msg volume-down";
+              XF86AudioMute.spawn-sh = "noctalia msg volume-mute";
+              XF86MonBrightnessUp.spawn-sh = "noctalia msg brightness-up";
+              XF86MonBrightnessDown.spawn-sh = "noctalia msg brightness-down";
+            };
+          };
+        };
+      };
+    };
+  };
+}
modules/users/hpcesia/default.nix
@@ -17,6 +17,7 @@
       ++ (den.lib.policy.when
         ({host, ...}: host.hasAspect den.aspects.roles.desktop)
         (with den.aspects; [
+          desktop.env.shell.noctalia
           desktop.env.wm.niri
           desktop.gnupg
           desktop.terminal.foot
flake.lock
@@ -230,6 +230,26 @@
         "type": "github"
       }
     },
+    "noctalia": {
+      "inputs": {
+        "nixpkgs": [
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1783242167,
+        "narHash": "sha256-CiV3yPEfcDpko+xz0IAV/lFWmSpuVTzjQvLgTCLY6Es=",
+        "owner": "noctalia-dev",
+        "repo": "noctalia",
+        "rev": "2be5e68b202a37037330a90765ea76a63b6a3421",
+        "type": "github"
+      },
+      "original": {
+        "owner": "noctalia-dev",
+        "repo": "noctalia",
+        "type": "github"
+      }
+    },
     "nur": {
       "inputs": {
         "flake-parts": [
@@ -308,6 +328,7 @@
         "impermanence": "impermanence",
         "import-tree": "import-tree",
         "nixpkgs": "nixpkgs",
+        "noctalia": "noctalia",
         "nur": "nur",
         "nur-hpcesia": "nur-hpcesia",
         "vaultix": "vaultix"
flake.nix
@@ -34,6 +34,10 @@
     };
     import-tree.url = "github:denful/import-tree";
     nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
+    noctalia = {
+      url = "github:noctalia-dev/noctalia";
+      inputs.nixpkgs.follows = "nixpkgs";
+    };
     nur = {
       url = "github:nix-community/NUR";
       inputs = {