From 7cc0460181e27165cbde57730a22adfc8be52488 Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Thu, 5 Mar 2026 20:58:24 +0100 Subject: [PATCH] noctalia(-shell): Init modules --- flake.lock | 43 +++++++++++ flake.nix | 5 ++ modules/home/de/hyprland/noctalia.nix | 41 ++++++++++ modules/home/programs/noctalia-shell.nix | 96 ++++++++++++++++++++++++ 4 files changed, 185 insertions(+) create mode 100644 modules/home/de/hyprland/noctalia.nix create mode 100644 modules/home/programs/noctalia-shell.nix diff --git a/flake.lock b/flake.lock index 6b29af2..83139e9 100644 --- a/flake.lock +++ b/flake.lock @@ -290,6 +290,48 @@ "type": "github" } }, + "noctalia": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "noctalia-qs": "noctalia-qs" + }, + "locked": { + "lastModified": 1772659442, + "narHash": "sha256-F1oSoSwGvBiqtSfGU9YzsjL9sP6IQDYQeUIQbXma70U=", + "owner": "noctalia-dev", + "repo": "noctalia-shell", + "rev": "c56fa106b7d8c6ae3034ce6d706bc35432ac9ea6", + "type": "github" + }, + "original": { + "owner": "noctalia-dev", + "repo": "noctalia-shell", + "type": "github" + } + }, + "noctalia-qs": { + "inputs": { + "nixpkgs": [ + "noctalia", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1772227064, + "narHash": "sha256-f821ZSoGpa/aXrWq0gPpea9qBnX8KDyavGKkptz2Mog=", + "owner": "noctalia-dev", + "repo": "noctalia-qs", + "rev": "0741d27d2f7db567270f139c5d1684614ecf9863", + "type": "github" + }, + "original": { + "owner": "noctalia-dev", + "repo": "noctalia-qs", + "type": "github" + } + }, "radicale-birthday-calendar": { "flake": false, "locked": { @@ -320,6 +362,7 @@ "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_2", "nixpkgs-unstable": "nixpkgs-unstable", + "noctalia": "noctalia", "radicale-birthday-calendar": "radicale-birthday-calendar", "sops": "sops", "statix": "statix", diff --git a/flake.nix b/flake.nix index f251142..c7a0fd7 100644 --- a/flake.nix +++ b/flake.nix @@ -37,6 +37,11 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + noctalia = { + url = "github:noctalia-dev/noctalia-shell"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + vscode-extensions = { url = "github:nix-community/nix-vscode-extensions"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/modules/home/de/hyprland/noctalia.nix b/modules/home/de/hyprland/noctalia.nix new file mode 100644 index 0000000..8614bcf --- /dev/null +++ b/modules/home/de/hyprland/noctalia.nix @@ -0,0 +1,41 @@ +{ + config, + pkgs, + lib, + ... +}: +{ + options.custom.de.hyprland.noctalia.enable = lib.mkEnableOption ""; + + config = lib.mkIf config.custom.de.hyprland.noctalia.enable { + custom = { + programs = { + hyprland.enable = true; + noctalia-shell.enable = true; + }; + + services.cliphist.enable = true; + }; + + home.packages = [ pkgs.grimblast ]; + + wayland.windowManager.hyprland.extraConfig = lib.mkBefore '' + # Variables + $ipc = noctalia-shell ipc call + $play-pause = $ipc media playPause + $play-next = $ipc media next + $play-previous = $ipc media previous + $mute = $ipc volume muteOutput + $volume-up = $ipc volume increase + $volume-down = $ipc volume decrease + $mute-mic = $ipc volume muteInput + + # Launch programs + bind = SUPER, R, exec, $ipc launcher toggle + bind = SUPER, V, exec, $ipc launcher clipboard + + # Manage session + bindrl = SUPER CONTROL, L, exec, $ipc lockScreen lock + ''; + }; +} diff --git a/modules/home/programs/noctalia-shell.nix b/modules/home/programs/noctalia-shell.nix new file mode 100644 index 0000000..eec02ff --- /dev/null +++ b/modules/home/programs/noctalia-shell.nix @@ -0,0 +1,96 @@ +{ + config, + osConfig, + inputs, + lib, + ... +}: +{ + imports = [ inputs.noctalia.homeModules.default ]; + + options.custom.programs.noctalia-shell.enable = lib.mkEnableOption ""; + + config = lib.mkIf config.custom.programs.noctalia-shell.enable { + programs.noctalia-shell = { + enable = true; + systemd.enable = true; + settings = { + general = { + animationSpeed = 1.8; + enableShadows = false; + compactLockScreen = true; + autoStartAuth = true; + allowPasswordWithFprintd = true; + showSessionButtonsOnLockScreen = false; + avatarImage = "/home/seb/Pictures/face"; + telemetryEnabled = false; + }; + ui.boxBorderEnabled = true; + colorSchemes = { + darkMode = + { + dark = true; + light = false; + } + .${config.custom.theme}; + predefinedScheme = "GitHub Dark"; + }; + wallpaper = { + enabled = true; + directory = "/home/seb/Pictures/Wallpapers"; + transitionType = "fade"; + transitionDuration = 1000; + automationEnabled = true; + randomIntervalSec = 1800; + }; + bar = { + barType = "simple"; + position = "bottom"; + density = "default"; + fontScale = 1.2; + widgetSpacing = 10; + widgets = { + left = lib.singleton { + id = "Clock"; + formatHorizontal = "HH:mm ddd, d MMM"; + tooltipFormat = "yyyy-MM-dd HH:mm"; + }; + center = lib.singleton { + id = "Workspace"; + }; + right = [ + { id = "Tray"; } + { + id = "NotificationHistory"; + hideWhenZeroUnread = true; + } + { id = "Volume"; } + (lib.optionalAttrs osConfig.custom.networking.underlay.wireless.enable { id = "Network"; }) + (lib.optionalAttrs osConfig.custom.services.bluetooth.enable { id = "Bluetooth"; }) + (lib.optionalAttrs config.custom.programs.brightnessctl.enable { id = "Brightness"; }) + { + id = "Battery"; + displayMode = "icon-hover"; + } + ]; + }; + }; + dock.enabled = false; + appLauncher = { + overviewLayer = true; + showCategories = false; + enableSessionSearch = false; + enableSettingsSearch = false; + enableWindowsSearch = false; + enableClipboardHistory = true; + }; + location.name = "Darmstadt"; + sessionMenu = { + largeButtonsStyle = false; + countdownDuration = 3000; + }; + audio.mprisBlacklist = "firefox"; + }; + }; + }; +}