diff --git a/flake.lock b/flake.lock index f86ff08..dcada77 100644 --- a/flake.lock +++ b/flake.lock @@ -117,11 +117,11 @@ "firefox-gnome-theme": { "flake": false, "locked": { - "lastModified": 1779670703, - "narHash": "sha256-UdfMivNMwCCqQsYDg5pSz8X2IOaOrIZLIIy+Bg3CO2o=", + "lastModified": 1783570805, + "narHash": "sha256-ptl5aRlCv9/uRSv2u8Hq8UFVFeZ6Q/bT049bpqNgc3w=", "owner": "rafaelmardojai", "repo": "firefox-gnome-theme", - "rev": "942159e73e40bf785816f7f1f5feed9ef3d7c8f9", + "rev": "5602ed62d638142c1ab31dccd01dfbfb28841225", "type": "github" }, "original": { @@ -135,11 +135,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1782949081, - "narHash": "sha256-vp6Y/Grm98ESt6ceOkWiHWyZRDV3J1RID4w+6NWK9yA=", + "lastModified": 1787559586, + "narHash": "sha256-onL0VLf9vPllmT0H/OlURIU5r5t5WIEl7t4tVNKT0Nw=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "17c9d6cdfc60c64f4ee8d306f9bc0b4ccb51481e", + "rev": "9d0d87172c374f89da73c1cfe6d81ae62feac1f1", "type": "github" }, "original": { @@ -188,18 +188,20 @@ "gnome-shell": { "flake": false, "locked": { - "lastModified": 1767737596, - "narHash": "sha256-eFujfIUQDgWnSJBablOuG+32hCai192yRdrNHTv0a+s=", + "host": "gitlab.gnome.org", + "lastModified": 1776175984, + "narHash": "sha256-RJFlFW8GiMei6oqUGrMkGEvVqOH8U7Q8abc1yK4VKD8=", "owner": "GNOME", "repo": "gnome-shell", - "rev": "ef02db02bf0ff342734d525b5767814770d85b49", - "type": "github" + "rev": "e0fdc4c13250e9a9b8ea9594c83925274f4a5dca", + "type": "gitlab" }, "original": { + "host": "gitlab.gnome.org", "owner": "GNOME", + "ref": "50.1", "repo": "gnome-shell", - "rev": "ef02db02bf0ff342734d525b5767814770d85b49", - "type": "github" + "type": "gitlab" } }, "home-manager": { @@ -209,11 +211,11 @@ ] }, "locked": { - "lastModified": 1784129366, - "narHash": "sha256-N5JiyICSeQF14x+OQebNyPpYowOT9Rs1iKyeCylSzOA=", + "lastModified": 1788199093, + "narHash": "sha256-gh09zTgEsbnoWwrNPzIDajc/HoE446Sc3yKDCPFa7Xs=", "owner": "nix-community", "repo": "home-manager", - "rev": "165228b0efefc3e635e5174020c40ea64271dc25", + "rev": "f772b7f968365e7b2b70a860c509d214639556fe", "type": "github" }, "original": { @@ -251,6 +253,26 @@ "type": "github" } }, + "nix-index-database": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1788080100, + "narHash": "sha256-n14luQo3F/ZLfCEHk1QieiI1nGnW92ZQZeZ0UIb0UMQ=", + "owner": "nix-community", + "repo": "nix-index-database", + "rev": "dbb978fa87faf13398e90ccbc52c343d21c7dd6d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-index-database", + "type": "github" + } + }, "nixos-facter": { "inputs": { "blueprint": "blueprint", @@ -264,11 +286,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1784178634, - "narHash": "sha256-qJpvdZicRE1WiknlghE/Rqhtju88kQF8SYr9guQKnQQ=", + "lastModified": 1787581647, + "narHash": "sha256-vOInXYkcq8i4pbDyvYf24S36vEWfd1tN9R0D1UI7uxc=", "owner": "nix-community", "repo": "nixos-facter", - "rev": "76e5d15080a4d62316416654c7cef5d7b8e39ce5", + "rev": "3406937da1e73c870c45c9ee0ee093179921482e", "type": "github" }, "original": { @@ -294,11 +316,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1784120854, - "narHash": "sha256-KesHgItiZPgGX740axSiQLcIQ8D24MDqNpkKYWIek8k=", + "lastModified": 1788179007, + "narHash": "sha256-hn1oU2rue2SYK8dAr8+WNZWtbsz1S2W5mnHlSEuh3bo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "753cc8a3a87467296ddd1fa93f0cc3e81120ee46", + "rev": "34ab99075ac4f7e40cf037eef32cb1c360bb85e9", "type": "github" }, "original": { @@ -310,11 +332,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1782614948, - "narHash": "sha256-ePjCwr1sNm9NYUqywL7QfK3JnlS015msC+eBu2zKlp8=", + "lastModified": 1785031560, + "narHash": "sha256-OmshNvn2vupOFpYinLUu+1Dnpu4n7Q5N3ggGVNHpkUI=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "db3f255737b94216eb71cce308e2912cf6bc2d7c", + "rev": "0e79af5e3d4dcfcd676ab5ba3f95d2e3352e078c", "type": "github" }, "original": { @@ -335,11 +357,11 @@ ] }, "locked": { - "lastModified": 1780281641, - "narHash": "sha256-M/+hUKoKbHXpV0xGVfELbN1Ds1aoe3pL5p5/t46YhVo=", + "lastModified": 1785549842, + "narHash": "sha256-DCwBZmGsySF7oKGTRgEv2HvpxVXkHT+38VhTM76k0B4=", "owner": "nix-community", "repo": "NUR", - "rev": "30f9ae2f04174de63ba8bcf3580ca90843b28a01", + "rev": "a9f987b57594e845e3e5cdd423b9a70846d70308", "type": "github" }, "original": { @@ -352,6 +374,7 @@ "inputs": { "flake-parts": "flake-parts", "home-manager": "home-manager", + "nix-index-database": "nix-index-database", "nixos-facter": "nixos-facter", "nixos-facter-modules": "nixos-facter-modules", "nixpkgs": "nixpkgs", @@ -380,11 +403,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1784059683, - "narHash": "sha256-q5MZrmKlg9A4ORx3EQcr7qkuidMU1gVZ+xJ3nCK+xgc=", + "lastModified": 1787771653, + "narHash": "sha256-DkkJSBOXWV/mja5Vy8az5g1KpZlsbUwlmH0BsQhowaQ=", "owner": "nix-community", "repo": "stylix", - "rev": "c8ccc31f3ea29dc3eb5b54945e5eb549529491d6", + "rev": "5e3809851f486e7fc7e84b40f174c74b60ecc784", "type": "github" }, "original": { @@ -410,15 +433,16 @@ }, "systems_2": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "lastModified": 1774449309, + "narHash": "sha256-brhZ8DmuGtzkCYHJg4HEd602amKm89Y9ytsFZ5uWD1w=", "owner": "nix-systems", "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "rev": "c29398b59d2048c4ab79345812849c9bd15e9150", "type": "github" }, "original": { "owner": "nix-systems", + "ref": "future-26.11", "repo": "default", "type": "github" } @@ -442,11 +466,11 @@ "tinted-schemes": { "flake": false, "locked": { - "lastModified": 1777806186, - "narHash": "sha256-PDF0/wObw4nIsSBeXVYLsloXOiphXCgIdsrNcVXguKs=", + "lastModified": 1785153830, + "narHash": "sha256-fNdfCTeCXU3tZG3TMincd+u68qBHQgCr2Ljr/M1mWP0=", "owner": "tinted-theming", "repo": "schemes", - "rev": "0c94645546f4f3ddac77a1a5fce54eb95bf50795", + "rev": "9bd28ed313560db3c5b605c63bc4e309e78e3fc8", "type": "github" }, "original": { @@ -458,11 +482,11 @@ "tinted-tmux": { "flake": false, "locked": { - "lastModified": 1778379944, - "narHash": "sha256-wPDFzMGSlARlw0Sfsn48Q2+jPSfk6N0Ng6BC/d+7Q24=", + "lastModified": 1785031658, + "narHash": "sha256-mZp9O2LjzdMzlqQF3l3fjqsuPBzXy+1qTfBEUGjTlpk=", "owner": "tinted-theming", "repo": "tinted-tmux", - "rev": "fe0203a198690e71a5ff11e08812a4673de3678d", + "rev": "5d2c67f61ea7af36f16865ab6d541cdba41dc257", "type": "github" }, "original": { @@ -474,11 +498,11 @@ "tinted-zed": { "flake": false, "locked": { - "lastModified": 1778378178, - "narHash": "sha256-OXPXRIQgGwV77HjYRryOHguh4ALX96jkg+tseLkGgHA=", + "lastModified": 1785030526, + "narHash": "sha256-klZf8UviewRkxuu74Bhbq6tqy7oxebQC7UVRWbbtQxU=", "owner": "tinted-theming", "repo": "base16-zed", - "rev": "9cd816033ff969415b190722cddf134e78a5665f", + "rev": "16f5a8adf4a6b1310d0a61ab172de963e8f76a02", "type": "github" }, "original": { @@ -495,11 +519,11 @@ ] }, "locked": { - "lastModified": 1780220602, - "narHash": "sha256-eynAfOmbmxJnkp7YewvCEbShNnnYJ9gLLqkzsYtBPeM=", + "lastModified": 1786901030, + "narHash": "sha256-WSFCsDSE5ffgD2MqzkM2CYjeFiKhRF/dJUN8uedb6YE=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "db947814a175b7ca6ded66e21383d938df01c227", + "rev": "27b3b12a8e6375f28ebe122f07d230ca5459bbfa", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index a51c0ed..7b7bc69 100644 --- a/flake.nix +++ b/flake.nix @@ -19,6 +19,12 @@ url = "github:nix-community/nixos-facter-modules"; }; + nix-index-database = { + url = "github:nix-community/nix-index-database"; + + inputs.nixpkgs.follows = "nixpkgs"; + }; + stylix = { url = "github:nix-community/stylix"; diff --git a/modules/home-manager/my/programs/dms/config.nix b/modules/home-manager/my/programs/dms/config.nix deleted file mode 100644 index a5cf67d..0000000 --- a/modules/home-manager/my/programs/dms/config.nix +++ /dev/null @@ -1,118 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -let - cfg = config.my.programs.dms; - fmt = pkgs.formats.json { }; - - # DankMaterialShell's `wallpaperFillMode` option requires sentence casing - toSentenceCase = string: let - head = lib.substring 0 1 string; - tail = lib.substring 1 (-1) string; - in - (lib.toUpper head) + tail; -in { - # NOTE: this is a re-implementation of the upstream DankMaterialShell module, - # because the aforementioned module is poorly written. - # - # see: https://github.com/AvengeMedia/DankMaterialShell/blob/master/nix/default.nix - config = lib.mkIf cfg.enable { - home.packages = with pkgs; [ - dgop - dms-shell - - # Needed for brightness functionality - brightnessctl - - # Needed for clipboard functionality - cliphist - wl-clipboard - - # Needed for monitor control - ddcutil - - # Needed for calendar events - khal - - # Needed for soundlets - kdePackages.qtmultimedia - ]; - - # Set some values for Stylix - my.programs.dms = lib.mkIf config.stylix.enable { - session = { - "isLightMode" = config.stylix.polarity == "light"; - - "wallpaperPath" = config.stylix.image; - }; - - settings = { - "fontFamily" = config.stylix.fonts.sansSerif.name; - "monoFontFamily" = config.stylix.fonts.monospace.name; - - "wallpaperFillMode" = toSentenceCase config.stylix.imageScalingMode; - }; - }; - - # Persist stateful data - my.persist.directories = [{ - path = "~/.local/state/DankMaterialShell"; - unique = true; - }]; - - programs.quickshell = { - enable = true; - package = pkgs.quickshell; - - configs = { - dms = "${pkgs.dms-shell}/share/quickshell/dms"; - }; - }; - - systemd.user.services.dms = { - Unit = { - PartOf = [ config.wayland.systemd.target ]; - After = [ config.wayland.systemd.target ]; - - X-Restart-Triggers = [ - config.programs.quickshell.configs.dms - ]; - }; - - Service = { - # Synchronise the default settings onto the expected settings path - # before DMS starts up. - # - # This fixes an issue with DMS failing to update its state after copying - # the default settings on startup. Instead, we perform the copy for it, - # which will correctly configure DMS. - # - # Note that this will destructively copy over any pre-existing file. - ExecStartPre = "${lib.getExe' pkgs.coreutils "cp"} " + - "--dereference --no-preserve=all " + - "${config.xdg.configHome}/DankMaterialShell/default-settings.json " + - "${config.xdg.configHome}/DankMaterialShell/settings.json"; - ExecStart = "${lib.getExe pkgs.dms-shell} run --session"; - Restart = "on-failure"; - }; - - Install = { - WantedBy = [ config.wayland.systemd.target ]; - }; - }; - - # TODO: hidden dangers of configuring `settings.json` directly? - xdg.configFile."DankMaterialShell/default-settings.json" = - lib.mkIf (cfg.settings != {}) { - source = fmt.generate "default-settings.json" cfg.settings; - }; - - xdg.stateFile."DankMaterialShell/default-session.json" = - lib.mkIf (cfg.session != {}) { - source = fmt.generate "default-session.json" cfg.session; - }; - }; -} \ No newline at end of file diff --git a/modules/home-manager/my/programs/dms/options.nix b/modules/home-manager/my/programs/dms/options.nix deleted file mode 100644 index 1f9eb35..0000000 --- a/modules/home-manager/my/programs/dms/options.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - lib, - pkgs, - ... -}: -let - fmt = pkgs.formats.json { }; -in { - options = { - my.programs.dms = { - enable = lib.mkEnableOption "DankMaterialShell"; - - session = lib.mkOption { - default = {}; - - type = fmt.type; - }; - - settings = lib.mkOption { - default = {}; - - type = fmt.type; - }; - }; - }; -} \ No newline at end of file diff --git a/modules/home-manager/my/programs/libreoffice/options.nix b/modules/home-manager/my/programs/libreoffice/options.nix index d3fbf77..6283d0a 100644 --- a/modules/home-manager/my/programs/libreoffice/options.nix +++ b/modules/home-manager/my/programs/libreoffice/options.nix @@ -8,7 +8,7 @@ my.programs.libreoffice = { enable = lib.mkEnableOption "libreoffice"; package = lib.mkOption { - default = pkgs.libreoffice-fresh; + default = pkgs.libreoffice-stable; type = with lib.types; package; }; diff --git a/modules/home-manager/my/programs/noctalia/config.nix b/modules/home-manager/my/programs/noctalia/config.nix new file mode 100644 index 0000000..8542ea0 --- /dev/null +++ b/modules/home-manager/my/programs/noctalia/config.nix @@ -0,0 +1,135 @@ +{ + config, + lib, + pkgs, + ... +}: +let + cfg = config.my.programs.noctalia; + fmt = pkgs.formats.toml { }; +in { + config = lib.mkIf cfg.enable { + home.packages = [ + cfg.package + ]; + + # Set some default based on Stylix. + # Mostly copied from the Stylix module for Noctalia. + # + # see: https://github.com/nix-community/stylix/blob/1e6ccadeda179d96728b4a9f20fc9d4dcf6b6059/modules/noctalia/hm.nix + my.programs.noctalia = lib.mkIf config.stylix.enable { + settings = { + theme = { + mode = config.stylix.polarity; + source = "custom"; + custom_palette = "stylix"; + }; + + wallpaper = { + enabled = true; + + fill_mode = config.stylix.imageScalingMode; + + # TODO: does not seem to apply. The stateful data in ~/.local/state + # gets created with the Noctalia default, even if I delete the state. + default = { + path = config.stylix.image; + }; + }; + + shell = { + font_family = config.stylix.fonts.sansSerif.name; + }; + }; + }; + + my.persist.directories = [{ + path = "~/.local/state/noctalia"; + unique = true; + }]; + + systemd.user.services.noctalia = { + Unit = { + PartOf = [ config.wayland.systemd.target ]; + After = [ config.wayland.systemd.target ]; + + X-Restart-Triggers = lib.optional (cfg.settings != {}) + "${config.xdg.configFile."noctalia/config.toml".source}"; + }; + + Service = { + ExecStart = "${lib.getExe cfg.package}"; + Restart = "on-failure"; + }; + + Install = { + WantedBy = [ config.wayland.systemd.target ]; + }; + }; + + xdg.configFile."noctalia/config.toml" = + lib.mkIf (cfg.settings != {}) { + source = let + toml = fmt.generate "config.toml" cfg.settings; + in pkgs.runCommand "config-validate" {} '' + ${lib.getExe cfg.package} config validate ${toml} + cp ${toml} $out + ''; + }; + + # Snippet copied from Stylix's module. + # + # see: https://github.com/nix-community/stylix/blob/1e6ccadeda179d96728b4a9f20fc9d4dcf6b6059/modules/noctalia/hm.nix + xdg.configFile."noctalia/palettes/stylix.json" = lib.mkIf config.stylix.enable { + source = (pkgs.formats.json { }).generate "stylix-palette.json" { + dark = with config.lib.stylix.colors.withHashtag; { + mPrimary = base0D; + mOnPrimary = base00; + mSecondary = base0E; + mOnSecondary = base00; + mTertiary = base0C; + mOnTertiary = base00; + mError = base08; + mOnError = base00; + mSurface = base00; + mOnSurface = base05; + mHover = base0C; + mOnHover = base00; + mSurfaceVariant = base01; + mOnSurfaceVariant = base04; + mOutline = base03; + mShadow = base00; + + terminal = { + foreground = base05; + background = base00; + cursor = base05; + cursorText = base00; + selectionFg = base05; + selectionBg = base02; + normal = { + black = base00; + red = base08; + green = base0B; + yellow = base0A; + blue = base0D; + magenta = base0E; + cyan = base0C; + white = base05; + }; + bright = { + black = base03; + red = base08; + green = base0B; + yellow = base0A; + blue = base0D; + magenta = base0E; + cyan = base0C; + white = base07; + }; + }; + }; + }; + }; + }; +} \ No newline at end of file diff --git a/modules/home-manager/my/programs/noctalia/options.nix b/modules/home-manager/my/programs/noctalia/options.nix new file mode 100644 index 0000000..bc67489 --- /dev/null +++ b/modules/home-manager/my/programs/noctalia/options.nix @@ -0,0 +1,26 @@ +{ + lib, + pkgs, + ... +}: +let + fmt = pkgs.formats.toml { }; +in { + options = { + my.programs.noctalia = { + enable = lib.mkEnableOption "Noctalia"; + + package = lib.mkOption { + default = pkgs.noctalia; + + type = with lib.types; package; + }; + + settings = lib.mkOption { + default = {}; + + type = fmt.type; + }; + }; + }; +} \ No newline at end of file diff --git a/modules/home-manager/programs/nix-index/module.nix b/modules/home-manager/programs/nix-index/module.nix index ffe52d1..5835d2a 100644 --- a/modules/home-manager/programs/nix-index/module.nix +++ b/modules/home-manager/programs/nix-index/module.nix @@ -10,11 +10,6 @@ in { { programs.nix-index.enable = lib.mkDefault true; } (lib.mkIf cfg.enable { - my.persist.directories = [{ - path = "~/.cache/nix-index"; - unique = false; - }]; - programs.command-not-found = { enable = lib.mkForce false; }; diff --git a/modules/nixos/programs/virt-manager/module.nix b/modules/nixos/programs/virt-manager/module.nix index d33118b..ef91186 100644 --- a/modules/nixos/programs/virt-manager/module.nix +++ b/modules/nixos/programs/virt-manager/module.nix @@ -11,10 +11,14 @@ in { virtualisation.libvirtd = { enable = true; - # Enable the ability to share a folder with a guest. - qemu.vhostUserPackages = with pkgs; [ - virtiofsd - ]; + qemu = { + swtpm.enable = true; # Emulate TPM inside of VMs. + + # Enable the ability to share a folder with a guest. + vhostUserPackages = [ + pkgs.virtiofsd + ]; + }; }; }; } \ No newline at end of file diff --git a/modules/shared/my/desktops/gnome/config/nixos.nix b/modules/shared/my/desktops/gnome/config/nixos.nix index 74b214a..da974ca 100644 --- a/modules/shared/my/desktops/gnome/config/nixos.nix +++ b/modules/shared/my/desktops/gnome/config/nixos.nix @@ -15,6 +15,11 @@ in { services = { desktopManager.gnome.enable = true; displayManager.gdm.enable = true; + + # Replace power-profiles-daemon with TuneD, which has a shim that offers + # PPD compatibility. + tuned.enable = true; + power-profiles-daemon.enable = false; }; # TODO: de-duplicate from Niri diff --git a/modules/shared/my/desktops/niri/config/nixos.nix b/modules/shared/my/desktops/niri/config/nixos.nix index 224a6f0..c2f893c 100644 --- a/modules/shared/my/desktops/niri/config/nixos.nix +++ b/modules/shared/my/desktops/niri/config/nixos.nix @@ -35,8 +35,8 @@ in { enable = true; }; - # DankMaterialShell uses these - services.power-profiles-daemon.enable = true; + # Noctalia uses these + services.tuned.enable = true; services.upower.enable = true; # This is being overriden from what Niri provides by default so that it can diff --git a/nix/nixosModules/default.nix b/nix/nixosModules/default.nix index 1a7c266..cb51bf5 100644 --- a/nix/nixosModules/default.nix +++ b/nix/nixosModules/default.nix @@ -7,6 +7,7 @@ let inherit (inputs) home-manager nixos-facter-modules + nix-index-database stylix ; @@ -35,7 +36,11 @@ in { sharedModules = [ stylix.homeModules.stylix - { config.stylix.autoEnable = false; } + nix-index-database.homeModules.default + + { + config.stylix.autoEnable = false; + } ]; }; }; diff --git a/pkgs/nix-benchmark/nix/package.nix b/pkgs/nix-benchmark/nix/package.nix index 94e513f..574d268 100644 --- a/pkgs/nix-benchmark/nix/package.nix +++ b/pkgs/nix-benchmark/nix/package.nix @@ -23,6 +23,7 @@ stdenvNoCC.mkDerivation { nixBins = lib.escapeShellArgs (map lib.getExe [ nixVersions.nix_2_31 nixVersions.nix_2_34 + nixVersions.nix_2_35 nixVersions.git lixPackageSets.lix_2_94.lix lixPackageSets.lix_2_95.lix diff --git a/users/frontear/home/desktops/niri/default.nix b/users/frontear/home/desktops/niri/default.nix index b53e2e5..412559c 100644 --- a/users/frontear/home/desktops/niri/default.nix +++ b/users/frontear/home/desktops/niri/default.nix @@ -58,7 +58,7 @@ in { } switch-events { - lid-close { spawn "dms ipc lock lock"; } + lid-close { spawn "noctalia" "msg" "session" "lock-and-suspend"; } } @@ -77,7 +77,7 @@ in { gaps 2 struts { left 2; right 2; top 2; bottom 2; } - // DankMaterialShell controls wallpaper + // Noctalia controls wallpaper background-color "transparent" focus-ring { off; } @@ -103,12 +103,12 @@ in { binds { - XF86AudioMute allow-when-locked=true repeat=false { spawn-sh "dms ipc audio mute"; } - XF86AudioLowerVolume allow-when-locked=true { spawn-sh "dms ipc audio decrement 5"; } - XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "dms ipc audio increment 5"; } + XF86AudioMute allow-when-locked=true repeat=false { spawn-sh "noctalia msg volume-mute"; } + XF86AudioLowerVolume allow-when-locked=true { spawn-sh "noctalia msg volume-down"; } + XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "noctalia msg volume-up"; } - XF86MonBrightnessDown allow-when-locked=true { spawn-sh "dms ipc brightness decrement 5 '''"; } - XF86MonBrightnessUp allow-when-locked=true { spawn-sh "dms ipc brightness increment 5 '''"; } + XF86MonBrightnessDown allow-when-locked=true { spawn-sh "noctalia msg brightness-down"; } + XF86MonBrightnessUp allow-when-locked=true { spawn-sh "noctalia msg brightness-up"; } Print repeat=false { screenshot; } @@ -118,8 +118,9 @@ in { Mod+BackSpace repeat=false { close-window; } Mod+Return repeat=false { spawn "footclient"; } - Mod+E repeat=false { spawn-sh "dms ipc spotlight toggle"; } - Mod+L repeat=false { spawn-sh "dms ipc lock lock"; } + Mod+E repeat=false { spawn-sh "noctalia msg panel-toggle launcher"; } + Mod+L repeat=false { spawn-sh "noctalia msg session lock"; } + Mod+V repeat=false { spawn-sh "noctalia msg panel-toggle clipboard"; } F11 repeat=false { fullscreen-window; } Mod+F repeat=false { maximize-column; } diff --git a/users/frontear/home/desktops/niri/my/programs/default.nix b/users/frontear/home/desktops/niri/my/programs/default.nix index 4366d14..50e434c 100644 --- a/users/frontear/home/desktops/niri/my/programs/default.nix +++ b/users/frontear/home/desktops/niri/my/programs/default.nix @@ -3,9 +3,9 @@ }: { imports = [ - ./dms ./element ./legcord ./microsoft-edge + ./noctalia ]; } \ No newline at end of file diff --git a/users/frontear/home/desktops/niri/my/programs/dms/default.nix b/users/frontear/home/desktops/niri/my/programs/dms/default.nix deleted file mode 100644 index c827ebd..0000000 --- a/users/frontear/home/desktops/niri/my/programs/dms/default.nix +++ /dev/null @@ -1,128 +0,0 @@ -{ - config, - lib, - ... -}: -let - cfg = config.my.desktops.niri; -in { - config = lib.mkIf cfg.enable { - my.programs.dms = { - enable = true; - - session = { - # Displays - # TODO: does not automatically enable on first-run - # "nightModeEnabled" = false; # is changed automatically - "nightModeTemperature" = 5000; - "nightModeHighTemperature" = 6500; - "nightModeAutoEnabled" = true; - "nightModeAutoMode" = "location"; - "nightModeUseIPLocation" = true; - }; - - settings = { - # Time & Weather - "use24HourClock" = true; - "showSeconds" = false; - "clockDateFormat" = "MMM d"; - "lockDateFormat" = ""; # value: System Default - - "weatherEnabled" = true; - "useFahrenheit" = true; - "useAutoLocation" = true; - - # Dank Bar - "dankBarPosition" = 0; # value: "Top" - "dankBarAutoHide" = false; - "dankBarOpenOnOverview" = false; - "dankBarSpacing" = 4; # should match Niri layout gaps + struts - "dankBarBottomGap" = 0; - "dankBarInnerPadding" = 0; - "popupGapsAuto" = true; - "dankBarSquareCorners" = false; - "dankBarNoBackground" = false; - "dankBarGothCornersEnabled" = false; - "dankBarBorderEnabled" = false; - - "dankBarLeftWidgets" = [ - "launcherButton" - "workspaceSwitcher" - "focusedWindow" - ]; - - "dankBarCenterWidgets" = [ - "clock" - "weather" - ]; - - "dankBarRightWidgets" = [ - "systemTray" - "clipboard" - "notificationButton" - "battery" - "controlCenterButton" - ]; - - # Widgets - "showWorkspaceIndex" = false; - "showWorkspacePadding" = false; - "showWorkspaceApps" = false; - "workspacesPerMonitor" = true; - "waveProgressEnabled" = true; - "updaterUseCustomCommand" = false; - "runningAppsCurrentWorkspace" = false; - "notificationPopupPosition" = 0; # value: Top Right - "osdAlwaysShowValue" = false; - - # Dock - "dockPosition" = 1; # value: Bottom - "showDock" = true; - "dockAutoHide" = false; - "dockOpenOnOverview" = false; - "dockGroupByApp" = false; - "dockIndicatorStyle" = "line"; - "dockIconSize" = 36; - "dockSpacing" = 2; - "dockBottomGap" = -8; - "dockMargin" = 4; - "dockTransparency" = 0.25; - - # Launcher - "launcherLogoMode" = "os"; - "launcherLogoColorOverride" = ""; # value: Default - "launcherLogoSizeOffset" = 0; - "launchPrefix" = "app2unit"; - "sortAppsAlphabetically" = false; - - # Theme & Colors - "currentThemeName" = "monochrome"; - "dankBarTransparency" = 1; - "dankBarWidgetTransparency" = 1; - "popupTransparency" = 1; - "cornerRadius" = 8; # should match Niri window-rule geometry-corner-radius - "modalDarkenBackground" = true; - # "fontWeight" = 400; # value: Default - "fontScale" = 1; - "syncModeWithPortal" = true; - # "iconTheme" = "System Default"; - - # Power & Security - "lockScreenShowPowerActions" = true; - "loginctlLockIntegration" = true; - "lockBeforeSuspend" = true; - "enableFprint" = false; # TODO: does not work? - "preventIdleForMedia" = true; - "acLockTimeout" = 2 * 60; - "acMonitorTimeout" = 5 * 60; - "acSuspendTimeout" = 0; # value: Never - "acSuspendBehavior" = 0; # value: Suspend - "batteryLockTimeout" = 2 * 60; - "batteryMonitorTimeout" = 5 * 60; - "batterySuspendTimeout" = 0; # value: Never - "batterySuspendBehavior" = 0; # value: Suspend - "powerActionConfirm" = true; - }; - }; - }; -} \ No newline at end of file diff --git a/users/frontear/home/desktops/niri/my/programs/noctalia/default.nix b/users/frontear/home/desktops/niri/my/programs/noctalia/default.nix new file mode 100644 index 0000000..25a43f2 --- /dev/null +++ b/users/frontear/home/desktops/niri/my/programs/noctalia/default.nix @@ -0,0 +1,268 @@ +{ + config, + lib, + pkgs, + ... +}: +let + cfg = config.my.desktops.niri; +in { + config = lib.mkIf cfg.enable { + my.programs.noctalia = { + enable = true; + + settings = { + ### ====== Appearance ===== + ## ===== Theme ===== + # theme.mode = "dark"; + # theme.source = "builtin"; + # theme.custom_palette = "MyPalette"; + # theme.pure_black_dark = false; + + ## ===== Interface ===== + # shell.font_family = "sans-serif"; + shell.lang = ""; # "" == auto-detect language from locale + shell.corner_radius_scale = 1.0; + shell.app_icon_colorize = false; + + ## ===== Accessibility ===== + accessibility.ui_scale = 1.0; + accessibility.high_contrast = false; + + ## ===== Motion ===== + shell.animation.enabled = true; + shell.animation.speed = 1.0; + + ## ===== Borders ===== + shell.button_borders = true; + shell.input_borders = true; + shell.popup_borders = true; + shell.card_borders = true; + + ## ===== Effects ===== + shell.shadow.direction = "down"; + shell.shadow.alpha = 0.55; + shell.popup_shadows = true; + + ### ===== Wallpaper ===== + ## ===== General ===== + wallpaper.enabled = true; + # wallpaper.fill_mode = "crop"; + # wallpaper.fill_color = "#111111"; + + ## ===== Directories ===== + wallpaper.directory = pkgs.runCommand "wallpaper-directory" {} '' + mkdir -p $out + cp ${../../../stylix/assets/bg_dark.jpg} $out + ''; + # wallpaper.directory_light = ""; + # wallpaper.directory_dark = ""; + # wallpaper.per_monitor_directories = false; + + ## ===== Transition ===== + wallpaper.transition = [ + "fade" + "wipe" + "disc" + "stripes" + "zoom" + "honeycomb" + ]; + wallpaper.transition_duration = 1500; + wallpaper.edge_smoothness = 0.3; + wallpaper.transition_on_startup = false; + + ## ===== Automation ===== + wallpaper.automation.enabled = false; + wallpaper.automation.interval_seconds = 1800; + wallpaper.automation.order = "random"; + wallpaper.automation.recursive = true; + + ### ===== Templates ===== + ## ===== Built-In ===== + theme.templates.enable_builtin_templates = false; + + ## ===== Community ===== + theme.templates.enable_community_templates = false; + + ### ===== Desktop ===== + ## ===== Widgets ===== + desktop_widgets.enabled = false; + + ## ===== Screen Corners ===== + shell.screen_corners.enabled = false; + shell.screen_corners.size = 32; + + ## ===== Hot Corners ===== + hot_corners.enabled = false; + + ### ===== Dock ===== + ## ===== General ===== + dock.enabled = false; + + ### ===== Launcher ===== + ## ===== Launcher ===== + shell.panel.launcher_placement = "floating"; + shell.panel.launcher_position = "center"; + shell.launcher.categories = false; + shell.launcher.show_icons = true; + shell.launcher.app_grid = false; + shell.launcher.compact = false; + shell.launcher.sort_by_usage = true; + shell.launcher.fetch_exchange_rates = true; + shell.launcher.auto_paste = "auto"; + + ## ===== Providers ===== + shell.launcher.provider_prefix = "/"; + shell.launcher.providers.calculator.prefix = "calc"; + shell.launcher.providers.calculator.global = true; + shell.launcher.providers.emoji.prefix = "emo"; + shell.launcher.providers.emoji.global = false; + shell.launcher.providers.session.prefix = "session"; + shell.launcher.providers.session.global = false; + shell.launcher.providers.wallpaper.prefix = "wall"; + shell.launcher.providers.wallpaper.global = false; + shell.launcher.providers.windows.prefix = "win"; + shell.launcher.providers.windows.global = false; + + ### ===== Control Center ===== + ## ===== General ===== + shell.panel.control_center_placement = "attached"; + shell.panel.open_near_click_control_center = false; + control_center.width = 700; + control_center.sidebar = "compact"; + control_center.sidebar_section = "compact"; + control_center.shortcuts = lib.map (x: { type = x; }) [ + "wifi" + "bluetooth" + "caffeine" + "nightlight" + "notification" + "power_profile" + ]; + control_center.show_shortcut_labels = true; + control_center.hidden_tabs = [ + "media" + ]; + + ### ===== Notifications ===== + ## ===== General ===== + notification.enable_daemon = true; + notification.show_app_name = true; + notification.show_actions = true; + notification.collapse_on_dismiss = true; + + ## ===== Toasts ===== + notification.layer = "top"; + notification.position = "top_right"; + notification.scale = 1.0; + notification.offset_x = 20; + notification.offset_y = 8; + notification.background_opacity = 0.97; + notification.border = true; + notification.monitors = []; + + ## ===== History ===== + notification.history_retention_hours = 0; + + ### ===== Shell ===== + ## ===== General ===== + # shell.avatar_path = ""; + shell.time_format = "{:%H:%M}"; + shell.date_format = "%A, %x"; + shell.launch_apps_as_systemd_services = true; + + ### ===== Location ===== + ## ===== Location ===== + location.auto_locate = true; + # location.custom_schedule = false; + # location.sunset = "20:30"; + # location.sunrise = "07:30"; + + ## ===== Weather ===== + weather.enabled = true; + shell.show_location = true; + weather.unit = "metric"; + weather.effects = false; + weather.refresh_minutes = 30; + + ## ===== Night Light ===== + nightlight.enabled = false; + + ### ===== Bar: default ===== + ## ===== General ===== + bar.default.enabled = true; + bar.default.position = "top"; + bar.default.auto_hide = false; + bar.default.reserve_space = true; + bar.default.layer = "top"; + + ## ===== Layout ===== + bar.default.thickness = 32; + bar.default.scale = 1.0; + bar.default.margin_ends = 4; + bar.default.margin_edge = 0; + bar.default.margin_opposite_edge = 0; + bar.default.padding = 16; + bar.default.panel_overlap = 2; + + ## ===== Shape ===== + bar.default.radius = 8; + bar.default.radius_top_left = 8; + bar.default.radius_top_right = 8; + bar.default.radius_bottom_left = 8; + bar.default.radius_bottom_right = 8; + bar.default.concave_edge_corners = true; + bar.default.border = "outline"; + bar.default.border_width = 0.0; + + ## ===== Effects ===== + bar.default.background_opacity = 0.8; + bar.default.shadow = true; + bar.default.contact_shadow = false; + + ## ===== Widgets ===== + bar.default.font_family = ""; # "" == inherit from shell.font_family + bar.default.font_weight = 500; + bar.default.widget_spacing = 8; + # bar.default.color = ""; + # bar.default.icon_color = ""; + bar.default.hover_highlight = true; + + ## ===== Capsules ===== + bar.default.capsule = false; # TODO: I like this, maybe turn it on? + + ## ===== Widget List ===== + bar.default.start = [ + "workspaces" + ]; + bar.default.center = [ + "clock" + ]; + bar.default.end = [ + "network" + "volume" + "battery" + "session" + ]; + + widget."workspaces".show_labels = false; + widget."workspaces".pill_scale = 0.7; + widget."workspaces".active_pill_size = 3.0; + widget."workspaces".focused_color = "on_surface"; + widget."workspaces".occupied_color = "on_surface_variant"; + widget."workspaces".empty_color = "on_surface_variant"; + + widget."clock".format = "{:%b %d %H:%M}"; + + widget."network".show_label = false; + + widget."volume".mute_glyph = "volume-zero"; + widget."volume".show_label = false; + widget."volume".mute_color = "on_surface"; + + widget."battery".show_label = false; + }; + }; + }; +} \ No newline at end of file