From 551c5e01d1fbf99184ab5e0f7901a82fc1decbe9 Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Tue, 28 Oct 2025 10:39:44 +0100 Subject: [PATCH 01/12] hydra: add hydrajobs to flake-parts --- flake.lock | 42 +++++++++++++-------------- modules/flake-parts/host-machines.nix | 10 +++++++ modules/hosts/loptland/default.nix | 11 +++++++ modules/hosts/nixberry/default.nix | 11 +++++++ modules/hosts/wsl/default.nix | 11 +++++++ 5 files changed, 64 insertions(+), 21 deletions(-) create mode 100644 modules/hosts/loptland/default.nix create mode 100644 modules/hosts/nixberry/default.nix create mode 100644 modules/hosts/wsl/default.nix diff --git a/flake.lock b/flake.lock index df93dd9..45fd507 100644 --- a/flake.lock +++ b/flake.lock @@ -110,11 +110,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1761583935, - "narHash": "sha256-vJ0ylFdPPESUCBYZvEtVmVemSp4G0WH8CbVIkboHIJs=", + "lastModified": 1761596764, + "narHash": "sha256-KTL+8Fw1qAbqubZSHRMjO4HkILJWVdWTylqHXQ4VTBE=", "owner": "cachix", "repo": "devenv", - "rev": "b7e3b2aeb90ce37517fb8da09ceff8ab587a9fcf", + "rev": "17560d064ba5e4fc946c0ea0ee7b31ec291e706f", "type": "github" }, "original": { @@ -131,11 +131,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1761547629, - "narHash": "sha256-4OH1CVm2PdjKRqEJ3RLfkQMDSBdn7VId6iyYCwKOK+U=", + "lastModified": 1761633962, + "narHash": "sha256-QTA706q3zDi9yN7bwsOnj2cQj8FVi9x147A/2lR495U=", "owner": "nix-community", "repo": "fenix", - "rev": "d82a7c64ea441e397914577c9a18f2867e5b364b", + "rev": "abecdc70faee6ef5abf8b250795042a0cbe7070f", "type": "github" }, "original": { @@ -683,11 +683,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1761572054, - "narHash": "sha256-NuDXgcyWa9EfQZXs+7mXKTimzlxEdLV0kJR6gGcFU/8=", + "lastModified": 1761601789, + "narHash": "sha256-F8HDu+xAZ2GhYRZPTMbFgXfA6VI7pN95juP3/llCKx8=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "560c53d87dedf7df8185eb370cfbf3575826e85c", + "rev": "309c3c78485781a28ad9f5bef48b09ecb3b81473", "type": "github" }, "original": { @@ -1072,11 +1072,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1761542689, - "narHash": "sha256-l4TQRcQyp6hoUVQL/R4UBHvYX9whHTntaz5NxHi0PH4=", + "lastModified": 1761623016, + "narHash": "sha256-C2+TErNmeHMCtodwVrMeA/uJg1GRdQbOntRI7DFullA=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "75768e54ca2591bb0be17fa310992628e5efce2d", + "rev": "f0bfe0aaaa51378ace7492850290f8d2db6cc7f3", "type": "github" }, "original": { @@ -1447,11 +1447,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1761500479, - "narHash": "sha256-syeBTCCU96qPJHcVpwHeCwmPCiLTDHHgYQYhpZ0iwLo=", + "lastModified": 1761606039, + "narHash": "sha256-rNsxpCKWzVNJ5FR71mpZFSEPxuvZfAQzcVpgfwgajQU=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "049767e6faa84b2d1a951d8f227e6ebd99d728a2", + "rev": "7c810e9994eff5b2b7a78ab0a656948c1e8dbf18", "type": "github" }, "original": { @@ -1661,11 +1661,11 @@ "xwayland-satellite-unstable": { "flake": false, "locked": { - "lastModified": 1761422250, - "narHash": "sha256-+pN8VAh8OVUSj8zPoI8QfC93JMIKPaAOABrbeeiO/Hk=", + "lastModified": 1761622056, + "narHash": "sha256-fBrUszJXmB4MY+wf3QsCnqWHcz7u7fLq0QMAWCltIQg=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "2dd40ecfe882c1659e0e46c761974702c7ab5fde", + "rev": "0728d59ff6463a502e001fb090f6eb92dbc04756", "type": "github" }, "original": { @@ -1726,11 +1726,11 @@ ] }, "locked": { - "lastModified": 1761562676, - "narHash": "sha256-yREsDfqZ7JIC2hxQm94DQfNCyhm/KPdxWd3IVJ6zJ2s=", + "lastModified": 1761592723, + "narHash": "sha256-7MMLpYL/EF3wqHIt7Fl3uQJZH1Vvtvgnd24WFpnBzdQ=", "owner": "zigtools", "repo": "zls", - "rev": "67177e3d64b8ab0f358303ee6ed4bac4654e2fdb", + "rev": "8b2754ad49006e70cdbd29c1d57ffb0a2889b836", "type": "github" }, "original": { diff --git a/modules/flake-parts/host-machines.nix b/modules/flake-parts/host-machines.nix index 61e80e4..30fd259 100644 --- a/modules/flake-parts/host-machines.nix +++ b/modules/flake-parts/host-machines.nix @@ -34,4 +34,14 @@ in } )) ]; + + flake.hydraJobs = + let + self = inputs.self; + in + { + # hosts = lib.mapAttrs (_: cfg: cfg.config.system.build.toplevel) self.outputs.nixosConfigurations; + packages = self.packages; + shells = lib.filterAttrs (name: shell: name == "x86_64-linux") self.devShells; + }; } diff --git a/modules/hosts/loptland/default.nix b/modules/hosts/loptland/default.nix new file mode 100644 index 0000000..1ef31a6 --- /dev/null +++ b/modules/hosts/loptland/default.nix @@ -0,0 +1,11 @@ +{ + config, + ... +}: +let +in +{ + flake.modules.nixos."hosts/loptland" = { + + }; +} diff --git a/modules/hosts/nixberry/default.nix b/modules/hosts/nixberry/default.nix new file mode 100644 index 0000000..57dc1a5 --- /dev/null +++ b/modules/hosts/nixberry/default.nix @@ -0,0 +1,11 @@ +{ + config, + ... +}: +let +in +{ + flake.modules.nixos."hosts/nixberry" = { + + }; +} diff --git a/modules/hosts/wsl/default.nix b/modules/hosts/wsl/default.nix new file mode 100644 index 0000000..1a2f54d --- /dev/null +++ b/modules/hosts/wsl/default.nix @@ -0,0 +1,11 @@ +{ + config, + ... +}: +let +in +{ + flake.modules.nixos."hosts/wsl" = { + + }; +} From ef703ecbcfc7ec3fc85ba60c15c9a1fd4f1c6302 Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Tue, 28 Oct 2025 11:02:15 +0100 Subject: [PATCH 02/12] yggdrasil: move out hardware config --- modules/hosts/yggdrasil/default.nix | 69 --------------------------- modules/hosts/yggdrasil/hardware.nix | 71 ++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 69 deletions(-) create mode 100644 modules/hosts/yggdrasil/hardware.nix diff --git a/modules/hosts/yggdrasil/default.nix b/modules/hosts/yggdrasil/default.nix index 5d2b45d..0894d92 100644 --- a/modules/hosts/yggdrasil/default.nix +++ b/modules/hosts/yggdrasil/default.nix @@ -24,18 +24,7 @@ in diebahn path-of-building - bottles - - # to be removed - kdePackages.bluez-qt - zed-editor - seahorse - font-manager - vesktop - rofi-unwrapped ]; - # to be removed - virtualisation.waydroid.enable = true; services.teamviewer.enable = true; environment.pathsToLink = [ "/libexec" ]; @@ -111,63 +100,5 @@ in ]; }; - boot = { - kernelPackages = pkgs.linuxPackages_latest; - - loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - }; - - initrd.availableKernelModules = [ - "nvme" - "ahci" - "xhci_pci" - "usbhid" - "usb_storage" - "sd_mod" - ]; - kernelModules = [ "kvm-amd" ]; - - }; - - fileSystems = { - "/" = { - device = "/dev/disk/by-uuid/b1a956f4-91d5-456e-a92b-be505bb719bd"; - fsType = "ext4"; - }; - - "/boot" = { - device = "/dev/disk/by-uuid/B4D4-8BA0"; - fsType = "vfat"; - options = [ - "fmask=0077" - "dmask=0077" - ]; - }; - - "/storage" = { - device = "/dev/disk/by-uuid/c3c1dec1-7716-4c37-a3f2-bb60f9af84fd"; - fsType = "ext4"; - }; - - "/var/lib/bluetooth" = { - device = "/persist/var/lib/bluetooth"; - options = [ - "bind" - "noauto" - "x-systemd.automount" - ]; - noCheck = true; - }; - }; - - swapDevices = [ - { device = "/dev/disk/by-uuid/4bec00ec-e9eb-4034-836a-ecf15e0bb40e"; } - ]; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.enableRedistributableFirmware = true; - hardware.cpu.amd.updateMicrocode = true; }; } diff --git a/modules/hosts/yggdrasil/hardware.nix b/modules/hosts/yggdrasil/hardware.nix new file mode 100644 index 0000000..40864db --- /dev/null +++ b/modules/hosts/yggdrasil/hardware.nix @@ -0,0 +1,71 @@ +{ + config, + ... +}: +let +in +{ + flake.modules.nixos."hosts/yggdrasil" = + { lib, pkgs, ... }: + { + + boot = { + kernelPackages = pkgs.linuxPackages_latest; + + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + + initrd.availableKernelModules = [ + "nvme" + "ahci" + "xhci_pci" + "usbhid" + "usb_storage" + "sd_mod" + ]; + kernelModules = [ "kvm-amd" ]; + + }; + + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/b1a956f4-91d5-456e-a92b-be505bb719bd"; + fsType = "ext4"; + }; + + "/boot" = { + device = "/dev/disk/by-uuid/B4D4-8BA0"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + + "/storage" = { + device = "/dev/disk/by-uuid/c3c1dec1-7716-4c37-a3f2-bb60f9af84fd"; + fsType = "ext4"; + }; + + "/var/lib/bluetooth" = { + device = "/persist/var/lib/bluetooth"; + options = [ + "bind" + "noauto" + "x-systemd.automount" + ]; + noCheck = true; + }; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/4bec00ec-e9eb-4034-836a-ecf15e0bb40e"; } + ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.enableRedistributableFirmware = true; + hardware.cpu.amd.updateMicrocode = true; + }; +} From 592faafe86ae4c780f4c3f1cef9ec5a858aa9bc0 Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Tue, 28 Oct 2025 11:26:01 +0100 Subject: [PATCH 03/12] loptland: babysteps --- modules/desktop/niri.nix | 3 +- modules/hosts/loptland/default.nix | 66 ++++++++++++++++++++++++- modules/hosts/loptland/hardware.nix | 55 +++++++++++++++++++++ modules/hosts/loptland/nginx.nix | 76 +++++++++++++++++++++++++++++ modules/server/acme.nix | 8 +-- modules/users/cholli/default.nix | 1 + 6 files changed, 202 insertions(+), 7 deletions(-) create mode 100644 modules/hosts/loptland/hardware.nix create mode 100644 modules/hosts/loptland/nginx.nix diff --git a/modules/desktop/niri.nix b/modules/desktop/niri.nix index d6efbbe..c7fec4b 100644 --- a/modules/desktop/niri.nix +++ b/modules/desktop/niri.nix @@ -28,7 +28,8 @@ ... }: { - config = lib.mkIf osConfig.programs.niri.enable { + + config = lib.mkIf (osConfig.networking.hostName == "yggdrasil") { programs.niri.settings = { input = { keyboard = { diff --git a/modules/hosts/loptland/default.nix b/modules/hosts/loptland/default.nix index 1ef31a6..48a97e8 100644 --- a/modules/hosts/loptland/default.nix +++ b/modules/hosts/loptland/default.nix @@ -5,7 +5,69 @@ let in { - flake.modules.nixos."hosts/loptland" = { + flake.modules.nixos."hosts/loptland" = + { + inputs, + lib, + pkgs, + modulesPath, + ... + }: + let + sopsFile = ../../../secrets/secrets-loptland.yaml; - }; + in + { + nixpkgs.config.allowUnfree = true; + services.qemuGuest.enable = true; + + imports = + with config.flake.modules.nixos; + [ + (modulesPath + "/profiles/qemu-guest.nix") + inputs.catppuccin.nixosModules.catppuccin + + # System modules + base + server + dev + + # apps + + # Users + cholli + ] + ++ [ + { + home-manager.users.cholli = { + imports = with config.flake.modules.homeManager; [ + inputs.catppuccin.homeModules.catppuccin + + # components + base + dev + + # Activate all user based config + cholli + ]; + }; + } + + ]; + + sops = { + secrets = { + "forgejo/db/password" = { + inherit sopsFile; + }; + "forgejo/mail/password" = { + inherit sopsFile; + }; + "forgejo/mail/passwordHash" = { + inherit sopsFile; + }; + }; + }; + + }; } diff --git a/modules/hosts/loptland/hardware.nix b/modules/hosts/loptland/hardware.nix new file mode 100644 index 0000000..fa5e7d1 --- /dev/null +++ b/modules/hosts/loptland/hardware.nix @@ -0,0 +1,55 @@ +{ + config, + ... +}: +let +in +{ + flake.modules.nixos."hosts/loptland" = + { + inputs, + lib, + pkgs, + ... + }: + { + boot = { + kernelPackages = pkgs.linuxPackages_latest; + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + }; + + boot.initrd.availableKernelModules = [ + "ata_piix" + "uhci_hcd" + "virtio_pci" + "sr_mod" + "virtio_blk" + ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/26b098dd-0a15-49c5-9998-75f43d17eb26"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/30AB-7309"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + + swapDevices = [ { device = "/dev/disk/by-uuid/b9bcb425-cb1c-40a1-89bb-d7fe6b421834"; } ]; + + networking.useDHCP = lib.mkDefault true; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + }; + +} diff --git a/modules/hosts/loptland/nginx.nix b/modules/hosts/loptland/nginx.nix new file mode 100644 index 0000000..9f374ed --- /dev/null +++ b/modules/hosts/loptland/nginx.nix @@ -0,0 +1,76 @@ +{ + flake.modules.nixos."hosts/loptland" = + { + config, + lib, + pkgs, + ... + }: + let + domainName = "christophhollizeck.dev"; + forgejoPort = 3000; + hydraPort = 2000; + in + { + services.nginx = { + enable = true; + recommendedProxySettings = true; + + virtualHosts = { + "git.${domainName}" = { + forceSSL = true; + useACMEHost = domainName; + + locations."/" = { + extraConfig = '' + client_max_body_size 200M; + ''; + proxyPass = "http://localhost:${toString forgejoPort}/"; + }; + }; + + "hydra.${domainName}" = lib.mkIf config.services.hydra.enable { + forceSSL = true; + useACMEHost = domainName; + + locations."/" = { + proxyPass = "http://localhost:${toString hydraPort}/"; + }; + }; + + "ha.${domainName}" = { + forceSSL = true; + useACMEHost = domainName; + + locations."/" = { + # tailscale ip + extraConfig = '' + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + ''; + proxyPass = "http://100.86.23.74:8123"; + }; + }; + + "nixcache.${domainName}" = lib.mkIf config.services.nix-serve.enable { + forceSSL = true; + useACMEHost = domainName; + + locations."/" = { + proxyPass = "http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}"; + }; + }; + + "_" = { + forceSSL = true; + useACMEHost = domainName; + + locations."/" = { + proxyPass = "https://${domainName}"; + }; + }; + }; + }; + + }; +} diff --git a/modules/server/acme.nix b/modules/server/acme.nix index 23b47fa..2c63600 100644 --- a/modules/server/acme.nix +++ b/modules/server/acme.nix @@ -1,4 +1,4 @@ -{ +topLevel: { flake.modules.nixos.server = { config, @@ -41,10 +41,10 @@ security.acme = { acceptTerms = true; defaults = { - inherit (config.flake.meta.users.cholli) email; + inherit (topLevel.config.flake.meta.users.cholli) email; - group = lib.optional config.services.nginx.enable "nginx"; - reloadServices = lib.optional config.services.nginx.enable "nginx.service"; + group = lib.mkIf config.services.nginx.enable "nginx"; + reloadServices = lib.mkIf config.services.nginx.enable "nginx.service"; dnsProvider = "netcup"; environmentFile = config.sops.templates."netcup.env".path; diff --git a/modules/users/cholli/default.nix b/modules/users/cholli/default.nix index 5e3a14d..2299d9e 100644 --- a/modules/users/cholli/default.nix +++ b/modules/users/cholli/default.nix @@ -14,6 +14,7 @@ authorizedKeys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHFrDiO5+vMfD5MimkzN32iw3MnSMLZ0mHvOrHVVmLD0" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII4Pr7p0jizrvIl0UhcvrmL5SHRQQQWIcHLAnRFyUZS6" ]; }; From ceabb5261ac3d6ebc0143f3391af976d9e1c2acf Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Wed, 29 Oct 2025 11:09:22 +0100 Subject: [PATCH 04/12] nix: add caches to new config --- modules/base/system/nixdaemon.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/modules/base/system/nixdaemon.nix b/modules/base/system/nixdaemon.nix index 826c6e5..ed765e9 100644 --- a/modules/base/system/nixdaemon.nix +++ b/modules/base/system/nixdaemon.nix @@ -44,6 +44,7 @@ ++ lib.optional config.services.hydra.enable "hydra hydra-www hydra-evaluator hydra-queue-runner"; in { + nix-path = "nixpkgs=flake:nixpkgs"; experimental-features = "nix-command flakes"; http-connections = 50; warn-dirty = false; @@ -53,6 +54,18 @@ trusted-users = users; allowed-users = users; allowed-uris = "github: https://github.com/ git+https://github.com/ gitlab: https://gitlab.com/ git+https://gitlab.com/"; + substituters = [ + "https://cache.lix.systems" + "https://nix-community.cachix.org" + "https://nixcache.christophhollizeck.dev" + "https://hyprland.cachix.org" + ]; + trusted-public-keys = [ + "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "christophhollizeck.dev:7pPAvm9xqFQB8FDApVNL6Tii1Jsv+Sj/LjEIkdeGhbA=" + "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" + ]; } // (lib.optionalAttrs config.programs.direnv.enable { keep-outputs = true; From 5f86d0ec998ed52689bef07aa5a1a219dc24b5fd Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Wed, 29 Oct 2025 11:18:05 +0100 Subject: [PATCH 05/12] fmt: cleanup --- .forgejo/workflows/nightly-update.yaml | 6 ++---- flake.nix | 5 +---- modules/base/git.nix | 1 - modules/desktop/default.nix | 10 +++++++++- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.forgejo/workflows/nightly-update.yaml b/.forgejo/workflows/nightly-update.yaml index c834441..135df61 100644 --- a/.forgejo/workflows/nightly-update.yaml +++ b/.forgejo/workflows/nightly-update.yaml @@ -1,16 +1,14 @@ -on: +on: schedule: - cron: 0 */6 * * * - jobs: UpdateFlake: runs-on: native - steps: - name: Check out repository code uses: actions/checkout@v4 - name: Update flake - run: | + run: | cd ${{ env.FORGEJO_WORKSPACE }} nix flake update - name: Commit new Flake.lock diff --git a/flake.nix b/flake.nix index ffbe81b..edbe3c9 100644 --- a/flake.nix +++ b/flake.nix @@ -1,10 +1,6 @@ { description = "All encompassing flake"; - nixConfig = { - allow-import-from-derivation = true; - }; - outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./modules); inputs = { @@ -75,6 +71,7 @@ niri-flake = { url = "github:sodiboo/niri-flake"; + # url = "github:Daholli/niri-flake/1067d35dd18f6a55f79873c944f1427a9eb7caa7"; inputs = { niri-stable.follows = "niri"; nixpkgs.follows = "nixpkgs"; diff --git a/modules/base/git.nix b/modules/base/git.nix index 4917fce..c1561dc 100644 --- a/modules/base/git.nix +++ b/modules/base/git.nix @@ -6,7 +6,6 @@ topLevel: { environment.systemPackages = with pkgs; [ git ]; - }; homeManager.cholli = diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index 7e053f0..81a9868 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -13,9 +13,17 @@ in { + security.pam.services.gdm.enableGnomeKeyring = true; + services.displayManager.gdm = { + enable = true; + wayland = true; + }; + environment = { - systemPackages = [ + systemPackages = with pkgs; [ zenbrowser + + sourcegit ]; sessionVariables = { From 05f480acf5c5622d0680cc7404bf8c8b71c1c9cf Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Wed, 29 Oct 2025 11:18:49 +0100 Subject: [PATCH 06/12] niri: switch from hyprland --- modules/desktop/niri.nix | 232 +++++++++++++++++++++++++++- modules/hosts/yggdrasil/default.nix | 4 +- 2 files changed, 228 insertions(+), 8 deletions(-) diff --git a/modules/desktop/niri.nix b/modules/desktop/niri.nix index c7fec4b..5870e07 100644 --- a/modules/desktop/niri.nix +++ b/modules/desktop/niri.nix @@ -12,10 +12,57 @@ package = inputs.niri-flake.packages.${pkgs.system}.niri-unstable; }; - environment.systemPackages = [ - pkgs.alacritty - pkgs.fuzzel + environment.systemPackages = with pkgs; [ + kitty + fuzzel + + inputs.niri-flake.packages.${pkgs.system}.xwayland-satellite-unstable + + wl-clipboard + xsel + + mako + waybar ]; + + xdg = { + autostart.enable = true; + portal = { + enable = true; + extraPortals = [ + pkgs.xdg-desktop-portal-gnome + pkgs.xdg-desktop-portal-gtk + ]; + xdgOpenUsePortal = true; + + config = { + common = { + default = [ "*" ]; + "org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ]; + }; + niri = { + default = [ + "gnome" + "gtk" + ]; + "org.freedesktop.impl.portal.FileChooser" = [ "gtk" ]; + "org.freedesktop.impl.portal.OpenURI" = [ "gtk" ]; + }; + }; + }; + }; + + environment.sessionVariables = { + NIXOS_OZONE_WL = "1"; # Hint electron apps to use wayland + ELECTRON_OZONE_PLATFORM_HINT = "auto"; + + XDG_SESSION_TYPE = "wayland"; + + QT_AUTO_SCREEN_SCALE_FACTOR = "1"; + QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; + QT_QPA_PLATFORM = "wayland;xcb"; + }; + }; homeManager.cholli = @@ -28,13 +75,23 @@ ... }: { + config = lib.mkIf (osConfig.networking.hostName == "yggdrasil" && osConfig.programs.niri.enable) { - config = lib.mkIf (osConfig.networking.hostName == "yggdrasil") { programs.niri.settings = { + prefer-no-csd = true; + input = { keyboard = { + xkb = { + layout = "us"; + rules = "escape:nocaps"; + }; numlock = true; }; + + touchpad = { + enable = false; + }; }; outputs."DP-1" = { @@ -49,6 +106,9 @@ height = 1080; }; transform.rotation = 90; + # layout = { + # default-column-width.proportion = 1.0; + # }; }; layout = { @@ -63,7 +123,6 @@ { proportion = 1. / 3.; } { proportion = 1. / 2.; } { proportion = 2. / 3.; } - ]; focus-ring = { @@ -81,8 +140,56 @@ screenshot-path = "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"; - # block 1pass from screenshots and window capture + # TODO: block 1pass from screenshots and window capture + # TODO: move windows to workspaces where I expect them window-rules = [ + { + excludes = [ ]; + clip-to-geometry = true; + geometry-corner-radius = { + top-left = 15.0; + top-right = 15.0; + bottom-left = 15.0; + bottom-right = 15.0; + }; + } + { + matches = [ { is-window-cast-target = true; } ]; + + focus-ring = { + active.color = "#f38ba8"; + inactive.color = "#7d0d2d"; + }; + + border = { + inactive.color = "#7d0d2d"; + }; + + shadow = { + color = "#7d0d2d70"; + }; + + tab-indicator = { + active.color = "#f38ba8"; + inactive.color = "#7d0d2d"; + }; + } + { + matches = [ + { + app-id = "discord"; + } + { + app-id = "1Password"; + } + { + app-id = "steam"; + title = "Friends List.*"; + } + ]; + open-on-output = "HDMI-A-1"; + default-column-width.proportion = 1.0; + } ]; binds = @@ -98,11 +205,21 @@ }; }) workspaces ); + move-to-workspaces = builtins.listToAttrs ( + map (num: { + name = "Mod+Ctrl+${toString num}"; + value = { + action.move-window-to-workspace = num; + }; + }) workspaces + ); in lib.mkMerge [ { "Mod+Shift+Slash".action = actions.show-hotkey-overlay; + "Mod+Shift+E".action = actions.quit; + "Ctrl+Alt+Delete".action = actions.quit; "Mod+Return".action.spawn = "${lib.getExe pkgs.kitty}"; "Mod+D".action.spawn = "${lib.getExe pkgs.fuzzel}"; @@ -118,6 +235,99 @@ repeat = false; }; + "Mod+J" = { + action = actions.focus-window-or-workspace-down; + }; + "Mod+K" = { + action = actions.focus-window-or-workspace-up; + }; + "Mod+Ctrl+J" = { + action = actions.move-window-down-or-to-workspace-down; + }; + "Mod+Ctrl+K" = { + action = actions.move-window-up-or-to-workspace-up; + }; + "Mod+Down" = { + action = actions.focus-window-or-workspace-down; + }; + "Mod+Up" = { + action = actions.focus-window-or-workspace-up; + }; + "Mod+Ctrl+Down" = { + action = actions.move-window-down-or-to-workspace-down; + }; + "Mod+Ctrl+Up" = { + action = actions.move-window-up-or-to-workspace-up; + }; + + "Mod+H" = { + action = actions.focus-column-or-monitor-left; + }; + "Mod+L" = { + action = actions.focus-column-or-monitor-right; + }; + "Mod+Ctrl+H" = { + action = actions.move-column-left-or-to-monitor-left; + }; + "Mod+Ctrl+L" = { + action = actions.move-column-right-or-to-monitor-right; + }; + "Mod+Left" = { + action = actions.focus-column-or-monitor-left; + }; + "Mod+Right" = { + action = actions.focus-column-or-monitor-right; + }; + "Mod+Ctrl+Left" = { + action = actions.move-column-left-or-to-monitor-left; + }; + "Mod+Ctrl+Right" = { + action = actions.move-column-right-or-to-monitor-right; + }; + + "Mod+WheelScrollDown" = { + action = actions.focus-column-right; + }; + "Mod+WheelScrollUp" = { + action = actions.focus-column-left; + }; + "Mod+Shift+WheelScrollDown" = { + action = actions.focus-workspace-down; + cooldown-ms = 150; + }; + "Mod+Shift+WheelScrollUp" = { + action = actions.focus-workspace-up; + cooldown-ms = 150; + }; + + # Window Sizes + "Mod+BracketLeft".action = actions.consume-or-expel-window-left; + "Mod+BracketRight".action = actions.consume-or-expel-window-right; + "Mod+Comma".action = actions.consume-window-into-column; + "Mod+Period".action = actions.expel-window-from-column; + + "Mod+R".action = actions.switch-preset-column-width; + "Mod+Shift+R".action = actions.switch-preset-window-height; + "Mod+Ctrl+R".action = actions.reset-window-height; + "Mod+F".action = actions.fullscreen-window; + "Mod+Shift+F".action = actions.maximize-column; + "Mod+Ctrl+F".action = actions.expand-column-to-available-width; + + "Mod+C".action = actions.center-column; + "Mod+V".action = actions.toggle-window-floating; + + # Xwayland keyboard stuff + "Mod+Shift+C".action = actions.spawn [ + "sh" + "-c" + "env DISPLAY=:0 xsel -ob | wl-copy" + ]; + "Mod+Shift+V".action = actions.spawn [ + "sh" + "-c" + "wl-paste -n | env DISPLAY=:0 xsel -ib" + ]; + "XF86AudioRaiseVolume" = { action.spawn = [ "wpctl" @@ -156,8 +366,18 @@ }; } focus-workspaces + move-to-workspaces ]; + spawn-at-startup = [ + { argv = [ "waybar" ]; } + { argv = [ "zen-beta" ]; } + { argv = [ "steam" ]; } + { argv = [ "obsidian" ]; } + { argv = [ "discord" ]; } + { argv = [ "1password" ]; } + ]; + }; }; diff --git a/modules/hosts/yggdrasil/default.nix b/modules/hosts/yggdrasil/default.nix index 0894d92..51fcb24 100644 --- a/modules/hosts/yggdrasil/default.nix +++ b/modules/hosts/yggdrasil/default.nix @@ -24,6 +24,7 @@ in diebahn path-of-building + termscp ]; services.teamviewer.enable = true; @@ -53,7 +54,7 @@ in amdgpu # dektops - hyprland + # hyprland niri # apps @@ -99,6 +100,5 @@ in } ]; }; - }; } From 0239e6316507be177f514102a4653fcbc48959e3 Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Wed, 29 Oct 2025 11:19:28 +0100 Subject: [PATCH 07/12] WIP: try to fix issues with bluetooth --- modules/base/system/fonts.nix | 1 + modules/systems/audio.nix | 1 + modules/systems/bluetooth.nix | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/base/system/fonts.nix b/modules/base/system/fonts.nix index 2ac798c..6f5d840 100644 --- a/modules/base/system/fonts.nix +++ b/modules/base/system/fonts.nix @@ -15,6 +15,7 @@ nerd-fonts.code-new-roman nerd-fonts.fira-code nerd-fonts.symbols-only + nerd-fonts.jetbrains-mono fira ]; diff --git a/modules/systems/audio.nix b/modules/systems/audio.nix index 3712a11..4e6f9b5 100644 --- a/modules/systems/audio.nix +++ b/modules/systems/audio.nix @@ -17,6 +17,7 @@ alsa.support32Bit = true; pulse.enable = true; + # TODO: make sure that `wpctl settings --save bluetooth.autoswitch-to-headset-profile false` is set since the things below are not working wireplumber.configPackages = [ (pkgs.writeTextDir "share/wireplumber/wireplumber.conf.d/11-bluetooth-policy.conf" '' wireplumber.settings = { diff --git a/modules/systems/bluetooth.nix b/modules/systems/bluetooth.nix index 223a5ca..917ca3a 100644 --- a/modules/systems/bluetooth.nix +++ b/modules/systems/bluetooth.nix @@ -9,10 +9,10 @@ General = { Experimental = true; KernelExperimental = true; - Enable = "Source,Sink,Media,Socket"; + Enable = "Sink,Media,Socket"; + Disable = "Handsfree,Headset,Source"; }; }; }; - }; } From 3508a2b3d01d499f591fceb51510fab5a4d3fd5b Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Wed, 29 Oct 2025 11:22:09 +0100 Subject: [PATCH 08/12] chore: update flake --- flake.lock | 98 +++++++++++++++++++++++++++--------------------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/flake.lock b/flake.lock index 45fd507..47dded3 100644 --- a/flake.lock +++ b/flake.lock @@ -110,11 +110,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1761596764, - "narHash": "sha256-KTL+8Fw1qAbqubZSHRMjO4HkILJWVdWTylqHXQ4VTBE=", + "lastModified": 1761686631, + "narHash": "sha256-OzyQkqtH4kenusXEquQvTHnAr/6lGVS2DqErIPlzCUs=", "owner": "cachix", "repo": "devenv", - "rev": "17560d064ba5e4fc946c0ea0ee7b31ec291e706f", + "rev": "b59500b629c08829825d4f4eca68169ea3a8821f", "type": "github" }, "original": { @@ -131,11 +131,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1761633962, - "narHash": "sha256-QTA706q3zDi9yN7bwsOnj2cQj8FVi9x147A/2lR495U=", + "lastModified": 1761720242, + "narHash": "sha256-Zi9nWw68oUDMVOhf/+Z97wVbNV2K7eEAGZugQKqU7xw=", "owner": "nix-community", "repo": "fenix", - "rev": "abecdc70faee6ef5abf8b250795042a0cbe7070f", + "rev": "8e4d32f4cc12b3f106af6e4515b36ac046a1ec91", "type": "github" }, "original": { @@ -147,11 +147,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1747046372, - "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", + "lastModified": 1761588595, + "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", "owner": "edolstra", "repo": "flake-compat", - "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", + "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", "type": "github" }, "original": { @@ -503,11 +503,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1761440613, - "narHash": "sha256-eQTH5iTkEQptZqVGyTPgpMYL7zj6QkI/uGo+1/PkAQY=", + "lastModified": 1761663476, + "narHash": "sha256-rMapt12HqMDVo91bqojbiOh+l7UuqJ738rk1iu980qs=", "owner": "helix-editor", "repo": "helix", - "rev": "7c4ff9c39dbd3dd7d6e2cb3e26cb34212202bb1b", + "rev": "de0518d0e631f1984dc7229b76c2bdadf2bffe5d", "type": "github" }, "original": { @@ -523,11 +523,11 @@ ] }, "locked": { - "lastModified": 1761584077, - "narHash": "sha256-dISPEZahlfs5K6d58zR4akRRyogfE9P4WSyPPNT7HiE=", + "lastModified": 1761666354, + "narHash": "sha256-fHr+tIYBJccNF8QWqgowfRmEAtAMSt1deZIRNKL8A7c=", "owner": "nix-community", "repo": "home-manager", - "rev": "e82585308aef3d4cc2c36c7b6946051c8cdf24ef", + "rev": "ca2ab1d877a24d5a437dad62f56b8b2c02e964e9", "type": "github" }, "original": { @@ -683,11 +683,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1761601789, - "narHash": "sha256-F8HDu+xAZ2GhYRZPTMbFgXfA6VI7pN95juP3/llCKx8=", + "lastModified": 1761733109, + "narHash": "sha256-sgZlcW1W6ioNFaMz+r4O52SLNywzRJiqRwBKRenvL6c=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "309c3c78485781a28ad9f5bef48b09ecb3b81473", + "rev": "9eb82774e53dc02e4fa204a911cb4256cd21f429", "type": "github" }, "original": { @@ -713,11 +713,11 @@ ] }, "locked": { - "lastModified": 1761249285, - "narHash": "sha256-70dEwL5p3CB/00ODs2RHWUKTyafB+PF4Ld7IEMuO+no=", + "lastModified": 1761653710, + "narHash": "sha256-MhHSU9m/9HSckJ61OXcom/6F92NQf3s1QfLbRUApalc=", "owner": "hyprwm", "repo": "hyprland-plugins", - "rev": "81f6d1426537981fcbb921f8b5e470b1280ef8f3", + "rev": "e689220b1740aa99ca67fa06055792f82fa9ed85", "type": "github" }, "original": { @@ -889,11 +889,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1760023949, - "narHash": "sha256-fu0B4duamVdbkPio/czu1XhsPLRXUJpZLDrSk3nih4U=", + "lastModified": 1761675634, + "narHash": "sha256-Et1jNDB2d3e0b4okIKuyAMktECS+5hk+vMAA7X598ao=", "owner": "hyprwm", "repo": "hyprlock", - "rev": "36ec73f166d9434a3f27c96c575198906f77644a", + "rev": "98b86752fe4867bd14ef96a92ea788229af93130", "type": "github" }, "original": { @@ -1024,11 +1024,11 @@ ] }, "locked": { - "lastModified": 1760961269, - "narHash": "sha256-Udg6DnM6scJj+imbttJR7GQpG2WWeDZ1JOtySTY99M0=", + "lastModified": 1761728397, + "narHash": "sha256-PyRcsly7w12wg6Vjzkn5eLvRQgX+nzHU80xBVnwE7Eg=", "owner": "nix-community", "repo": "nh", - "rev": "e27508e06f74c7f03616150c1ac1431eaef7f443", + "rev": "149022d8973798f5ebb819fb2977b0260f049816", "type": "github" }, "original": { @@ -1045,11 +1045,11 @@ "rust-overlay": [] }, "locked": { - "lastModified": 1761460429, - "narHash": "sha256-pJeM23DGMD5AK4gdNaDM1qsIv87NYQJgEh2E8tRd7es=", + "lastModified": 1761721311, + "narHash": "sha256-fXBALdA4CKAYslcuamjzQZLUTCNBIKWybj+/2rwe3Z0=", "owner": "YaLTeR", "repo": "niri", - "rev": "e6f3c538da0c646bda43fcde7ef7dc3b771e0c8b", + "rev": "6e8fd153395036c2daa7c214695ed9baf2409a2e", "type": "github" }, "original": { @@ -1072,11 +1072,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1761623016, - "narHash": "sha256-C2+TErNmeHMCtodwVrMeA/uJg1GRdQbOntRI7DFullA=", + "lastModified": 1761724527, + "narHash": "sha256-nB500dSUaNBtOsu5JI1PDNmjuFD6Kdbkh648q0FoaIY=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "f0bfe0aaaa51378ace7492850290f8d2db6cc7f3", + "rev": "1ff74954f559bb2da63e28b3fcffd3b09ec32842", "type": "github" }, "original": { @@ -1088,11 +1088,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1761460429, - "narHash": "sha256-pJeM23DGMD5AK4gdNaDM1qsIv87NYQJgEh2E8tRd7es=", + "lastModified": 1761721311, + "narHash": "sha256-fXBALdA4CKAYslcuamjzQZLUTCNBIKWybj+/2rwe3Z0=", "owner": "YaLTeR", "repo": "niri", - "rev": "e6f3c538da0c646bda43fcde7ef7dc3b771e0c8b", + "rev": "6e8fd153395036c2daa7c214695ed9baf2409a2e", "type": "github" }, "original": { @@ -1127,16 +1127,16 @@ ] }, "locked": { - "lastModified": 1758763079, - "narHash": "sha256-Bx1A+lShhOWwMuy3uDzZQvYiBKBFcKwy6G6NEohhv6A=", + "lastModified": 1761648602, + "narHash": "sha256-H97KSB/luq/aGobKRuHahOvT1r7C03BgB6D5HBZsbN8=", "owner": "cachix", "repo": "nix", - "rev": "6f0140527c2b0346df4afad7497baa08decb929f", + "rev": "3e5644da6830ef65f0a2f7ec22830c46285bfff6", "type": "github" }, "original": { "owner": "cachix", - "ref": "devenv-2.30.5", + "ref": "devenv-2.30.6", "repo": "nix", "type": "github" } @@ -1163,11 +1163,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1760958188, - "narHash": "sha256-2m1S4jl+GEDtlt2QqeHil8Ny456dcGSKJAM7q3j/BFU=", + "lastModified": 1761669189, + "narHash": "sha256-INBZnPA9JzyDn+Fnni2250PbRzKx7Eafz0T2c7NhXiQ=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "d6645c340ef7d821602fd2cd199e8d1eed10afbc", + "rev": "9c0ee5dfa186e10efe9b53505b65d22c81860fde", "type": "github" }, "original": { @@ -1447,11 +1447,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1761606039, - "narHash": "sha256-rNsxpCKWzVNJ5FR71mpZFSEPxuvZfAQzcVpgfwgajQU=", + "lastModified": 1761686505, + "narHash": "sha256-jX6UrGS/hABDaM4jdx3+xgH3KCHP2zKHeTa8CD5myEo=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "7c810e9994eff5b2b7a78ab0a656948c1e8dbf18", + "rev": "d08d54f3c10dfa41033eb780c3bddb50e09d30fc", "type": "github" }, "original": { @@ -1680,11 +1680,11 @@ "nixpkgs": "nixpkgs_7" }, "locked": { - "lastModified": 1761535208, - "narHash": "sha256-E1PobJMiFmVUX2YdqYk/MpKb0LXavOYvlg8DCBBzlHc=", + "lastModified": 1761712008, + "narHash": "sha256-Nf2s59dLg6KDUV0omZqIlOGNUxw/Rl/KKXEXQGFCAlo=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "79a94872a3e6993a051c4e22a2dcb02c1d088acf", + "rev": "1383ed38745d12f3896c996848d24c451643db58", "type": "github" }, "original": { From 371a430031933dde58a03de8a3c7c2dfcda3ada0 Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Wed, 29 Oct 2025 12:37:52 +0100 Subject: [PATCH 09/12] niri: try to get rid of hyprland-ideas --- modules/desktop/niri.nix | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/modules/desktop/niri.nix b/modules/desktop/niri.nix index 5870e07..0bec2b7 100644 --- a/modules/desktop/niri.nix +++ b/modules/desktop/niri.nix @@ -194,27 +194,6 @@ binds = with config.lib.niri; - let - workspaces = (builtins.genList (x: x + 1) 9); - - focus-workspaces = builtins.listToAttrs ( - map (num: { - name = "Mod+${toString num}"; - value = { - action.focus-workspace = num; - }; - }) workspaces - ); - move-to-workspaces = builtins.listToAttrs ( - map (num: { - name = "Mod+Ctrl+${toString num}"; - value = { - action.move-window-to-workspace = num; - }; - }) workspaces - ); - in - lib.mkMerge [ { "Mod+Shift+Slash".action = actions.show-hotkey-overlay; @@ -235,6 +214,11 @@ repeat = false; }; + "Mod+1".action = actions.focus-workspace "zen"; + "Mod+2".action = actions.focus-workspace "steam"; + "Mod+3".action = actions.focus-workspace "communication"; + "Mod+4".action = actions.focus-workspace "work"; + "Mod+J" = { action = actions.focus-window-or-workspace-down; }; @@ -365,8 +349,6 @@ allow-when-locked = true; }; } - focus-workspaces - move-to-workspaces ]; spawn-at-startup = [ From 2129b9cedf9f2fc620d90813cfb7cbf212036998 Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Wed, 29 Oct 2025 16:46:31 +0100 Subject: [PATCH 10/12] niri: add screenshots sodiboo/niri-flake#1380 --- modules/desktop/niri.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/desktop/niri.nix b/modules/desktop/niri.nix index 0bec2b7..0f8cd12 100644 --- a/modules/desktop/niri.nix +++ b/modules/desktop/niri.nix @@ -204,6 +204,15 @@ "Mod+D".action.spawn = "${lib.getExe pkgs.fuzzel}"; "Mod+Alt+L".action.spawn = "hyprlock-blur"; + "Mod+Escape" = { + allow-inhibiting = false; + action = actions.toggle-keyboard-shortcuts-inhibit; + }; + + "Print".action.screenshot = [ ]; + "Ctrl+Print".action.screenshot-screen = [ ]; + "Alt+Print".action.screenshot-window = [ ]; + "Mod+Shift+Q" = { action = actions.close-window; repeat = false; From 4456200bd84ff09dc27e5f62a7ff91e5512a3bdc Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Wed, 29 Oct 2025 16:47:10 +0100 Subject: [PATCH 11/12] niri: setup named workspaces --- modules/desktop/niri.nix | 131 ++++++++++++++++++++++++++++++++------- 1 file changed, 110 insertions(+), 21 deletions(-) diff --git a/modules/desktop/niri.nix b/modules/desktop/niri.nix index 0f8cd12..0ffa107 100644 --- a/modules/desktop/niri.nix +++ b/modules/desktop/niri.nix @@ -140,8 +140,34 @@ screenshot-path = "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"; - # TODO: block 1pass from screenshots and window capture - # TODO: move windows to workspaces where I expect them + workspaces = { + "01-zen" = { + open-on-output = "DP-1"; + }; + "02-steam" = { + open-on-output = "DP-1"; + }; + "03-work" = { + open-on-output = "DP-1"; + }; + "04-games" = { + open-on-output = "DP-1"; + }; + "01-communication" = { + open-on-output = "HDMI-A-1"; + }; + "02-1password" = { + open-on-output = "HDMI-A-1"; + }; + }; + + layer-rules = [ + { + matches = [ { namespace = "^notifications$"; } ]; + block-out-from = "screencast"; + } + ]; + window-rules = [ { excludes = [ ]; @@ -152,43 +178,104 @@ bottom-left = 15.0; bottom-right = 15.0; }; + + # + open-fullscreen = false; } { matches = [ { is-window-cast-target = true; } ]; - focus-ring = { - active.color = "#f38ba8"; - inactive.color = "#7d0d2d"; - }; - border = { - inactive.color = "#7d0d2d"; + enable = true; + width = 2; + active.color = "#f38ba8"; + inactive.color = "#f38ba8"; }; shadow = { - color = "#7d0d2d70"; + color = "#f38ba870"; }; + } + { + matches = [ + { + app-id = "1password"; + is-floating = true; + is-focused = false; + } + ]; - tab-indicator = { - active.color = "#f38ba8"; - inactive.color = "#7d0d2d"; - }; + } + { + matches = [ + { + app-id = "steam"; + title = "Steam"; + } + ]; + + open-on-workspace = "02-steam"; + open-maximized = true; + } + { + matches = [ + { + app-id = "steam_app_.*"; + } + { + app-id = "factorio"; + } + ]; + + open-on-workspace = "04-games"; + default-column-width.proportion = 1.0; + default-window-height.proportion = 1.0; + min-width = 3440; + min-height = 1440; } { matches = [ { app-id = "discord"; } + { + app-id = "steam"; + title = "Friends List.*"; + } + ]; + open-on-workspace = "01-communication"; + default-column-width.proportion = 1.0; + open-fullscreen = false; + } + { + matches = [ { app-id = "1Password"; } + ]; + + open-on-workspace = "02-1password"; + default-column-width.proportion = 1.0; + open-fullscreen = false; + } + { + matches = [ + { + app-id = "1Password"; + } + { + app-id = "discord"; + } { app-id = "steam"; title = "Friends List.*"; } + { + app-id = "teams-for-linux"; + } ]; - open-on-output = "HDMI-A-1"; - default-column-width.proportion = 1.0; + + block-out-from = "screencast"; } ]; @@ -223,10 +310,12 @@ repeat = false; }; - "Mod+1".action = actions.focus-workspace "zen"; - "Mod+2".action = actions.focus-workspace "steam"; - "Mod+3".action = actions.focus-workspace "communication"; - "Mod+4".action = actions.focus-workspace "work"; + "Mod+1".action = actions.focus-workspace "01-zen"; + "Mod+2".action = actions.focus-workspace "02-steam"; + "Mod+3".action = actions.focus-workspace "03-work"; + "Mod+4".action = actions.focus-workspace "04-games"; + "Mod+5".action = actions.focus-workspace "01-communication"; + "Mod+9".action = actions.focus-workspace "02-1password"; "Mod+J" = { action = actions.focus-window-or-workspace-down; @@ -302,8 +391,8 @@ "Mod+R".action = actions.switch-preset-column-width; "Mod+Shift+R".action = actions.switch-preset-window-height; "Mod+Ctrl+R".action = actions.reset-window-height; - "Mod+F".action = actions.fullscreen-window; - "Mod+Shift+F".action = actions.maximize-column; + "Mod+F".action = actions.maximize-column; + "Mod+Shift+F".action = actions.fullscreen-window; "Mod+Ctrl+F".action = actions.expand-column-to-available-width; "Mod+C".action = actions.center-column; From 890fcfc6ce6cd44eefec6f8176d026d1ddd9e7ed Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Wed, 29 Oct 2025 16:47:25 +0100 Subject: [PATCH 12/12] niri: add mako service --- modules/desktop/niri.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/desktop/niri.nix b/modules/desktop/niri.nix index 0ffa107..aff7673 100644 --- a/modules/desktop/niri.nix +++ b/modules/desktop/niri.nix @@ -21,8 +21,8 @@ wl-clipboard xsel - mako waybar + libnotify ]; xdg = { @@ -76,6 +76,14 @@ }: { config = lib.mkIf (osConfig.networking.hostName == "yggdrasil" && osConfig.programs.niri.enable) { + services.mako = { + enable = true; + settings = { + border-radius = 15; + border-color = "#505050"; + background-color = "#00000070"; + }; + }; programs.niri.settings = { prefer-no-csd = true;