diff --git a/containers/lidarr.nix b/containers/lidarr.nix index c4bd004..0715a19 100644 --- a/containers/lidarr.nix +++ b/containers/lidarr.nix @@ -1,6 +1,7 @@ { config, lib, + pkgs, ... }: { @@ -9,58 +10,33 @@ }; config = lib.mkIf config.settings.containers.lidarr.enable { - containers.lidarr = { - autoStart = true; - forwardPorts = [ - { - containerPort = 8686; - hostPort = 8686; - } - ]; + virtualisation.arion.projects.lidarr = { + settings = { + project.name = "lidarr"; + services.lidarr = { + service.useHostStore = true; + nixos.useSystemd = true; + nixos.configuration = + { lib, ... }: + { + boot.isContainer = true; + boot.tmp.useTmpfs = true; + networking.useDHCP = false; + services.nscd.enable = false; + system.nssModules = lib.mkForce [ ]; - bindMounts = { - "/data" = { - hostPath = "/data"; - }; - "/var/lib/lidarr/.config/Lidarr" = { - hostPath = "/config/lidarr"; + services.lidarr.enable = true; + services.lidarr.openFirewall = true; + services.lidarr.dataDir = "/config"; + services.lidarr.user = "root"; + }; + service.ports = [ "8686:8686" ]; + service.volumes = [ + "/config/lidarr:/config" + "/data:/data" + ]; }; }; - config = - { ... }: - { - services.lidarr.enable = true; - services.lidarr.openFirewall = true; - }; }; - - # virtualisation.arion.projects.lidarr = { - # settings = { - # project.name = "lidarr"; - # services.lidarr = { - # service.useHostStore = true; - # nixos.useSystemd = true; - # nixos.configuration = - # { lib, ... }: - # { - # boot.isContainer = true; - # boot.tmp.useTmpfs = true; - # networking.useDHCP = false; - # services.nscd.enable = false; - # system.nssModules = lib.mkForce [ ]; - - # services.lidarr.enable = true; - # services.lidarr.openFirewall = true; - # services.lidarr.dataDir = "/config"; - # services.lidarr.user = "root"; - # }; - # service.ports = [ "8686:8686" ]; - # service.volumes = [ - # "/config/lidarr:/config" - # "/data:/data" - # ]; - # }; - # }; - # }; }; } diff --git a/flake.lock b/flake.lock index 9f386f0..c00e11a 100644 --- a/flake.lock +++ b/flake.lock @@ -9,11 +9,11 @@ ] }, "locked": { - "lastModified": 1759632323, - "narHash": "sha256-TzLTfXxhOkR/8oOoVEAYQWb81ADGHdKsQXGicC7kR+M=", + "lastModified": 1745165725, + "narHash": "sha256-OnHV8Us04vRsWM0uL1cQez8DumhRi6yE+4K4VLtH6Ws=", "owner": "hercules-ci", "repo": "arion", - "rev": "24658a03be2d1a6e1e02c01524775d960a82309c", + "rev": "4f59059633b14364b994503b179a701f5e6cfb90", "type": "github" }, "original": { @@ -27,11 +27,11 @@ "fromYaml": "fromYaml" }, "locked": { - "lastModified": 1755819240, - "narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=", + "lastModified": 1746562888, + "narHash": "sha256-YgNJQyB5dQiwavdDFBMNKk1wyS77AtdgDk/VtU6wEaI=", "owner": "SenchoPens", "repo": "base16.nix", - "rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6", + "rev": "806a1777a5db2a1ef9d5d6f493ef2381047f2b89", "type": "github" }, "original": { @@ -43,17 +43,16 @@ "base16-fish": { "flake": false, "locked": { - "lastModified": 1754405784, - "narHash": "sha256-l9xHIy+85FN+bEo6yquq2IjD1rSg9fjfjpyGP1W8YXo=", + "lastModified": 1622559957, + "narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=", "owner": "tomyun", "repo": "base16-fish", - "rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561", + "rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe", "type": "github" }, "original": { "owner": "tomyun", "repo": "base16-fish", - "rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561", "type": "github" } }, @@ -93,11 +92,11 @@ "firefox-gnome-theme": { "flake": false, "locked": { - "lastModified": 1758112371, - "narHash": "sha256-lizRM2pj6PHrR25yimjyFn04OS4wcdbc38DCdBVa2rk=", + "lastModified": 1748383148, + "narHash": "sha256-pGvD/RGuuPf/4oogsfeRaeMm6ipUIznI2QSILKjKzeA=", "owner": "rafaelmardojai", "repo": "firefox-gnome-theme", - "rev": "0909cfe4a2af8d358ad13b20246a350e14c2473d", + "rev": "4eb2714fbed2b80e234312611a947d6cb7d70caf", "type": "github" }, "original": { @@ -114,11 +113,11 @@ ] }, "locked": { - "lastModified": 1759362264, - "narHash": "sha256-wfG0S7pltlYyZTM+qqlhJ7GMw2fTF4mLKCIVhLii/4M=", + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "758cf7296bee11f1706a574c77d072b8a7baa881", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", "type": "github" }, "original": { @@ -135,11 +134,11 @@ ] }, "locked": { - "lastModified": 1756770412, - "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=", + "lastModified": 1751413152, + "narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "4524271976b625a4a605beefd893f270620fd751", + "rev": "77826244401ea9de6e3bac47c2db46005e1f30b5", "type": "github" }, "original": { @@ -148,6 +147,24 @@ "type": "github" } }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "fromYaml": { "flake": false, "locked": { @@ -167,20 +184,18 @@ "gnome-shell": { "flake": false, "locked": { - "host": "gitlab.gnome.org", - "lastModified": 1762869044, - "narHash": "sha256-nwm/GJ2Syigf7VccLAZ66mFC8mZJFqpJmIxSGKl7+Ds=", + "lastModified": 1748186689, + "narHash": "sha256-UaD7Y9f8iuLBMGHXeJlRu6U1Ggw5B9JnkFs3enZlap0=", "owner": "GNOME", "repo": "gnome-shell", - "rev": "680e3d195a92203f28d4bf8c6e8bb537cc3ed4ad", - "type": "gitlab" + "rev": "8c88f917db0f1f0d80fa55206c863d3746fa18d0", + "type": "github" }, "original": { - "host": "gitlab.gnome.org", "owner": "GNOME", - "ref": "gnome-49", + "ref": "48.2", "repo": "gnome-shell", - "type": "gitlab" + "type": "github" } }, "haskell-flake": { @@ -207,11 +222,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1762973522, - "narHash": "sha256-CFyvvZvKDkTFF7niIQp5hhks5OR1u10H3e89chURCkg=", + "lastModified": 1756305977, + "narHash": "sha256-u3HYKT9vcAKw5mNaARUzmukfS1yjHH+3tTyVgZXob30=", "owner": "helix-editor", "repo": "helix", - "rev": "948ac05aa0db64e0e5d00710db36eb244076e988", + "rev": "7e4e556f84cd657dc99e3e0acfa7442170a01a11", "type": "github" }, "original": { @@ -227,11 +242,11 @@ ] }, "locked": { - "lastModified": 1763228015, - "narHash": "sha256-1rYieMVUyZ3kK/cBIr8mOusxrOEJ1/+2MsOg0oJ7b3A=", + "lastModified": 1756261190, + "narHash": "sha256-eiy0klFK5EVJLNilutR7grsZN/7Itj9DyD75eyOf83k=", "owner": "nix-community", "repo": "home-manager", - "rev": "96156a9e86281c4bfc451236bc2ddfe4317e6f39", + "rev": "77f348da3176dc68b20a73dab94852a417daf361", "type": "github" }, "original": { @@ -252,11 +267,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1763286362, - "narHash": "sha256-KPQWFSoObIndZ2jGShk2KL9lEwIMysLwBsHJpiJz55w=", + "lastModified": 1756337322, + "narHash": "sha256-FiUw6z+ytxopB8dYc0/LVtc/8F8wnsdUvpzSHNeojb8=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "024550217d69bb1afaf3ae8d808ce767cda1f15f", + "rev": "a0a748911825656657dcffbe16eb58c9d4039a77", "type": "github" }, "original": { @@ -268,16 +283,16 @@ "niri-stable": { "flake": false, "locked": { - "lastModified": 1756556321, - "narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=", + "lastModified": 1748151941, + "narHash": "sha256-z4viQZLgC2bIJ3VrzQnR+q2F3gAOEQpU1H5xHtX/2fs=", "owner": "YaLTeR", "repo": "niri", - "rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294", + "rev": "8ba57fcf25d2fc9565131684a839d58703f1dae7", "type": "github" }, "original": { "owner": "YaLTeR", - "ref": "v25.08", + "ref": "v25.05.1", "repo": "niri", "type": "github" } @@ -285,11 +300,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1763280630, - "narHash": "sha256-2nCZp70LNGzfrx9J8D5G9uRHo8YufQ1tVVdbzRbhCIc=", + "lastModified": 1756304824, + "narHash": "sha256-XOR+SyrASQQ2DnQvK2pcPx67sPyGdG3wwmZGlgpoJu8=", "owner": "YaLTeR", "repo": "niri", - "rev": "2652efe9dbee60b9172adda37a17c59b069288cb", + "rev": "d9833fc1c3de306f500662471ae001094813dbd5", "type": "github" }, "original": { @@ -300,16 +315,17 @@ }, "nix-vscode-extensions": { "inputs": { + "flake-utils": "flake-utils", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1763258556, - "narHash": "sha256-TWgLZJWn0aBAzu8By3y+OUoFsfOvy1AmIduR5G6QpSE=", + "lastModified": 1756346196, + "narHash": "sha256-esNUIJNbG/RZcGRamMqJBIiidNB93xCmEN/hswWDHk0=", "owner": "nix-community", "repo": "nix-vscode-extensions", - "rev": "2ad9c9778431846e4d506ced079b638ad4e25806", + "rev": "730c4353591b3c507a6973b75b52e367cde90d52", "type": "github" }, "original": { @@ -320,11 +336,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1762977756, - "narHash": "sha256-4PqRErxfe+2toFJFgcRKZ0UI9NSIOJa+7RXVtBhy4KE=", + "lastModified": 1756266583, + "narHash": "sha256-cr748nSmpfvnhqSXPiCfUPxRz2FJnvf/RjJGvFfaCsM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c5ae371f1a6a7fd27823bc500d9390b38c05fa55", + "rev": "8a6d5427d99ec71c64f0b93d45778c889005d9c2", "type": "github" }, "original": { @@ -336,11 +352,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1763049705, - "narHash": "sha256-A5LS0AJZ1yDPTa2fHxufZN++n8MCmtgrJDtxFxrH4S8=", + "lastModified": 1756217674, + "narHash": "sha256-TH1SfSP523QI7kcPiNtMAEuwZR3Jdz0MCDXPs7TS8uo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3acb677ea67d4c6218f33de0db0955f116b7588c", + "rev": "4e7667a90c167f7a81d906e5a75cba4ad8bee620", "type": "github" }, "original": { @@ -362,11 +378,11 @@ ] }, "locked": { - "lastModified": 1758998580, - "narHash": "sha256-VLx0z396gDCGSiowLMFz5XRO/XuNV+4EnDYjdJhHvUk=", + "lastModified": 1751906969, + "narHash": "sha256-BSQAOdPnzdpOuCdAGSJmefSDlqmStFNScEnrWzSqKPw=", "owner": "nix-community", "repo": "NUR", - "rev": "ba8d9c98f5f4630bcb0e815ab456afd90c930728", + "rev": "ddb679f4131e819efe3bbc6457ba19d7ad116f25", "type": "github" }, "original": { @@ -395,11 +411,11 @@ ] }, "locked": { - "lastModified": 1759631821, - "narHash": "sha256-V8A1L0FaU/aSXZ1QNJScxC12uP4hANeRBgI4YdhHeRM=", + "lastModified": 1740623427, + "narHash": "sha256-3SdPQrZoa4odlScFDUHd4CUPQ/R1gtH4Mq9u8CBiK8M=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "1d7cbdaad90f8a5255a89a6eddd8af24dc89cafe", + "rev": "d342e8b5fd88421ff982f383c853f0fc78a847ab", "type": "github" }, "original": { @@ -421,7 +437,7 @@ "nixpkgs" ], "nur": "nur", - "systems": "systems", + "systems": "systems_2", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-schemes": "tinted-schemes", @@ -429,11 +445,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1763245881, - "narHash": "sha256-0q+4x1Gx3AMIRV8MIN2/WOJOAVMtfqnkY1m3k0iIDkI=", + "lastModified": 1755997543, + "narHash": "sha256-/fejmCQ7AWa655YxyPxRDbhdU7c5+wYsFSjmEMXoBCM=", "owner": "danth", "repo": "stylix", - "rev": "29dc3dd858c507bfd1038716197f84f40e41f28d", + "rev": "f47c0edcf71e802378b1b7725fa57bb44fe85ee8", "type": "github" }, "original": { @@ -457,6 +473,21 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "tinted-foot": { "flake": false, "locked": { @@ -493,11 +524,11 @@ "tinted-schemes": { "flake": false, "locked": { - "lastModified": 1757716333, - "narHash": "sha256-d4km8W7w2zCUEmPAPUoLk1NlYrGODuVa3P7St+UrqkM=", + "lastModified": 1750770351, + "narHash": "sha256-LI+BnRoFNRa2ffbe3dcuIRYAUcGklBx0+EcFxlHj0SY=", "owner": "tinted-theming", "repo": "schemes", - "rev": "317a5e10c35825a6c905d912e480dfe8e71c7559", + "rev": "5a775c6ffd6e6125947b393872cde95867d85a2a", "type": "github" }, "original": { @@ -509,11 +540,11 @@ "tinted-tmux": { "flake": false, "locked": { - "lastModified": 1757811970, - "narHash": "sha256-n5ZJgmzGZXOD9pZdAl1OnBu3PIqD+X3vEBUGbTi4JiI=", + "lastModified": 1751159871, + "narHash": "sha256-UOHBN1fgHIEzvPmdNMHaDvdRMgLmEJh2hNmDrp3d3LE=", "owner": "tinted-theming", "repo": "tinted-tmux", - "rev": "d217ba31c846006e9e0ae70775b0ee0f00aa6b1e", + "rev": "bded5e24407cec9d01bd47a317d15b9223a1546c", "type": "github" }, "original": { @@ -525,11 +556,11 @@ "tinted-zed": { "flake": false, "locked": { - "lastModified": 1757811247, - "narHash": "sha256-4EFOUyLj85NRL3OacHoLGEo0wjiRJzfsXtR4CZWAn6w=", + "lastModified": 1751158968, + "narHash": "sha256-ksOyv7D3SRRtebpXxgpG4TK8gZSKFc4TIZpR+C98jX8=", "owner": "tinted-theming", "repo": "base16-zed", - "rev": "824fe0aacf82b3c26690d14e8d2cedd56e18404e", + "rev": "86a470d94204f7652b906ab0d378e4231a5b3384", "type": "github" }, "original": { @@ -545,11 +576,11 @@ ] }, "locked": { - "lastModified": 1762938485, - "narHash": "sha256-AlEObg0syDl+Spi4LsZIBrjw+snSVU4T8MOeuZJUJjM=", + "lastModified": 1755934250, + "narHash": "sha256-CsDojnMgYsfshQw3t4zjRUkmMmUdZGthl16bXVWgRYU=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "5b4ee75aeefd1e2d5a1cc43cf6ba65eba75e83e4", + "rev": "74e1a52d5bd9430312f8d1b8b0354c92c17453e5", "type": "github" }, "original": { @@ -578,11 +609,11 @@ "xwayland-satellite-unstable": { "flake": false, "locked": { - "lastModified": 1762747449, - "narHash": "sha256-Z1TKiux8K09a93w4PFDFsj8HFugXNy3iCC3Z8MpR5Rk=", + "lastModified": 1756260173, + "narHash": "sha256-wcf04fl5ncbOqAK7OCWIgILERIbMfL/eeM3UThqgErI=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "6338574bc5c036487486acde264f38f39ea15fad", + "rev": "af33f7eb124b51ff6d9cdf9b428643e2246c8cbb", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 4e1c5eb..0605c5a 100644 --- a/flake.nix +++ b/flake.nix @@ -58,7 +58,7 @@ helix, ... }: - rec { + { nixosConfigurations = { fedfer-main-laptop-nixos = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; @@ -88,21 +88,11 @@ modules = [ arion.nixosModules.arion - { - nixpkgs.overlays = [ ((import ./overlays/soularr.nix) packages.x86_64-linux.soularr) ]; - } ./hosts/main-homelab/configuration.nix ]; }; }; - packages.x86_64-linux = rec { - slskd-api = (nixpkgs.legacyPackages.x86_64-linux.callPackage ./packages/slskd-api.nix { }); - soularr = ( - nixpkgs.legacyPackages.x86_64-linux.callPackage ./packages/soularr.nix { inherit slskd-api; } - ); - }; - formatter.x86_64-linux = (treefmt-nix.lib.evalModule nixpkgs.legacyPackages."x86_64-linux" ./treefmt.nix) .config.build.wrapper; diff --git a/hosts/main-laptop/configuration.nix b/hosts/main-laptop/configuration.nix index 5a955e9..b55e412 100644 --- a/hosts/main-laptop/configuration.nix +++ b/hosts/main-laptop/configuration.nix @@ -43,7 +43,7 @@ name = "FiraCode Nerd Font Mono"; }; emoji = { - package = pkgs.noto-fonts-color-emoji; + package = pkgs.noto-fonts-emoji; name = "Noto Color Emoji"; }; }; @@ -89,16 +89,31 @@ settings.drivers.gpu.nvidia.enable = lib.mkForce true; settings.services.switcheroo.enable = lib.mkForce true; environment.systemPackages = [ (pkgs.blender.override { cudaSupport = true; }) ]; - environment.etc."specialisation".text = "nvidia"; }; }; + #enable wayland for electron programs + environment.sessionVariables.NIXOS_OZONE_WL = "1"; + #todo look further into networking options #could be pretty interesting networking.hostName = "fedfer-main-laptop-nixos"; networking.networkmanager.enable = true; + #todo need to move this to modules + services = { + libinput = { + enable = true; + touchpad = { + tapping = true; + }; + }; + }; + + #remove various bloat + services.xserver.excludePackages = with pkgs; [ xterm ]; + hardware = { bluetooth = { enable = true; @@ -106,6 +121,9 @@ }; }; + #todo modularize! + programs.xwayland.enable = true; + environment.systemPackages = with pkgs; [ nano lshw diff --git a/hosts/main-laptop/home.nix b/hosts/main-laptop/home.nix index bb933ac..9934aef 100644 --- a/hosts/main-laptop/home.nix +++ b/hosts/main-laptop/home.nix @@ -16,6 +16,7 @@ programs = { firefox.enable = lib.mkForce true; amberol.enable = lib.mkForce true; + vscodium.enable = lib.mkForce true; kitty.enable = lib.mkForce true; ghostty.enable = true; @@ -51,7 +52,6 @@ wpaperd.enable = true; kitty.enable = false; waybar.enable = false; - niri.enable = false; }; }; @@ -85,9 +85,6 @@ bat gitui wleave - clang-tools - dolphin-emu - steam-run ]; home.stateVersion = "23.11"; # DO NOT CHANGE diff --git a/modules/home/desktopPrograms/vscodium/settings.json b/modules/home/desktopPrograms/vscodium/settings.json index 711a830..8cb5ae4 100644 --- a/modules/home/desktopPrograms/vscodium/settings.json +++ b/modules/home/desktopPrograms/vscodium/settings.json @@ -11,7 +11,12 @@ "C_Cpp.clang_format_fallbackStyle": "LLVM", "nix.enableLanguageServer": true, "nix.serverPath": "nixd", - "nix.formatterPath": ["nix", "fmt", "--", "--"], + "nix.formatterPath": [ + "nix", + "fmt", + "--", + "--" + ], "nix.serverSettings": { "nixd": { "options": { @@ -24,4 +29,4 @@ } } } -} +} \ No newline at end of file diff --git a/modules/home/niri/config.kdl b/modules/home/niri/config.kdl new file mode 100644 index 0000000..0f7b2e3 --- /dev/null +++ b/modules/home/niri/config.kdl @@ -0,0 +1,359 @@ +input { + keyboard { + xkb { + layout "it" + options "caps:capslock" + } + track-layout "global" + } + + touchpad { + tap + natural-scroll + scroll-method "two-finger" + click-method "button-areas" + } + + mouse { + accel-speed -0.8 + } + + focus-follows-mouse max-scroll-amount="5%" +} + +output "HDMI-A-1" { + variable-refresh-rate +} + +layout { + gaps 16 + center-focused-column "never" + + // You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between. + preset-column-widths { + // Proportion sets the width as a fraction of the output width, taking gaps into account. + // For example, you can perfectly fit four windows sized "proportion 0.25" on an output. + // The default preset widths are 1/3, 1/2 and 2/3 of the output. + proportion 0.33333 + proportion 0.5 + proportion 0.66667 + + // Fixed sets the width in logical pixels exactly. + // fixed 1920 + } + + // You can also customize the heights that "switch-preset-window-height" (Mod+Shift+R) toggles between. + // preset-window-heights { } + + // You can change the default width of the new windows. + default-column-width { proportion 0.5; } + // If you leave the brackets empty, the windows themselves will decide their initial width. + // default-column-width {} + + // By default focus ring and border are rendered as a solid background rectangle + // behind windows. That is, they will show up through semitransparent windows. + // This is because windows using client-side decorations can have an arbitrary shape. + // + // If you don't like that, you should uncomment `prefer-no-csd` below. + // Niri will draw focus ring and border *around* windows that agree to omit their + // client-side decorations. + // + // Alternatively, you can override it with a window rule called + // `draw-border-with-background`. + + // You can change how the focus ring looks. + focus-ring { + + // How many logical pixels the ring extends out from the windows. + width 4 + + // Colors can be set in a variety of ways: + // - CSS named colors: "red" + // - RGB hex: "#rgb", "#rgba", "#rrggbb", "#rrggbbaa" + // - CSS-like notation: "rgb(255, 127, 0)", rgba(), hsl() and a few others. + + // Color of the ring on the active monitor. + active-color "#8d4eef" + + // Color of the ring on inactive monitors. + inactive-color "#505050" + + // You can also use gradients. They take precedence over solid colors. + // Gradients are rendered the same as CSS linear-gradient(angle, from, to). + // The angle is the same as in linear-gradient, and is optional, + // defaulting to 180 (top-to-bottom gradient). + // You can use any CSS linear-gradient tool on the web to set these up. + // Changing the color space is also supported, check the wiki for more info. + // + // active-gradient from="#80c8ff" to="#bbddff" angle=45 + + // You can also color the gradient relative to the entire view + // of the workspace, rather than relative to just the window itself. + // To do that, set relative-to="workspace-view". + // + // inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view" + } + + // You can also add a border. It's similar to the focus ring, but always visible. + border { + // The settings are the same as for the focus ring. + // If you enable the border, you probably want to disable the focus ring. + off + + width 4 + active-color "#ffc87f" + inactive-color "#505050" + + // active-gradient from="#ffbb66" to="#ffc880" angle=45 relative-to="workspace-view" + // inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view" + } + + // Struts shrink the area occupied by windows, similarly to layer-shell panels. + // You can think of them as a kind of outer gaps. They are set in logical pixels. + // Left and right struts will cause the next window to the side to always be visible. + // Top and bottom struts will simply add outer gaps in addition to the area occupied by + // layer-shell panels and regular gaps. + struts { + // left 64 + // right 64 + // top 64 + // bottom 64 + } +} + +spawn-at-startup "wpaperd" + +prefer-no-csd + +screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png" + +animations { + // Uncomment to turn off all animations. + // off + + // Slow down all animations by this factor. Values below 1 speed them up instead. + // slowdown 3.0 +} + +window-rule { + // This regular expression is intentionally made as specific as possible, + // since this is the default config, and we want no false positives. + // You can get away with just app-id="wezterm" if you want. + match app-id=r#"^org\.wezfurlong\.wezterm$"# + default-column-width {} +} + +window-rule { + geometry-corner-radius 8 + clip-to-geometry true +} + +hotkey-overlay { + skip-at-startup +} + +binds { + Mod+Shift+Backslash { show-hotkey-overlay; } + + Mod+T { spawn "ghostty"; } + Mod+D { spawn "fuzzel"; } + Super+Alt+L { spawn "swaylock"; } + + XF86AudioRaiseVolume allow-when-locked=true { spawn "swayosd-client" "--output-volume=raise"; } + XF86AudioLowerVolume allow-when-locked=true { spawn "swayosd-client" "--output-volume=lower"; } + XF86AudioMute allow-when-locked=true { spawn "swayosd-client" "--output-volume=mute-toggle"; } + XF86AudioMicMute allow-when-locked=true { spawn "swayosd-client" "--input-volume=mute-toggle"; } + XF86MonBrightnessUp allow-when-locked=true { spawn "swayosd-client" "--brightness=raise"; } + XF86MonBrightnessDown allow-when-locked=true { spawn "swayosd-client" "--brightness=lower"; } + + XF86AudioPlay allow-when-locked=true { spawn "playerctl" "play-pause"; } + XF86AudioStop allow-when-locked=true { spawn "playerctl" "stop"; } + XF86AudioPrev allow-when-locked=true { spawn "playerctl" "previous"; } + XF86AudioNext allow-when-locked=true { spawn "playerctl" "next"; } + + Mod+Q { close-window; } + + Mod+Left { focus-column-left; } + Mod+Down { focus-window-down; } + Mod+Up { focus-window-up; } + Mod+Right { focus-column-right; } + Mod+H { focus-column-left; } + Mod+J { focus-window-down; } + Mod+K { focus-window-up; } + Mod+L { focus-column-right; } + + Mod+Ctrl+Left { move-column-left; } + Mod+Ctrl+Down { move-window-down; } + Mod+Ctrl+Up { move-window-up; } + Mod+Ctrl+Right { move-column-right; } + Mod+Ctrl+H { move-column-left; } + Mod+Ctrl+J { move-window-down; } + Mod+Ctrl+K { move-window-up; } + Mod+Ctrl+L { move-column-right; } + + Mod+Home { focus-column-first; } + Mod+End { focus-column-last; } + Mod+Ctrl+Home { move-column-to-first; } + Mod+Ctrl+End { move-column-to-last; } + + Mod+Shift+Left { focus-monitor-left; } + Mod+Shift+Down { focus-monitor-down; } + Mod+Shift+Up { focus-monitor-up; } + Mod+Shift+Right { focus-monitor-right; } + Mod+Shift+H { focus-monitor-left; } + Mod+Shift+J { focus-monitor-down; } + Mod+Shift+K { focus-monitor-up; } + Mod+Shift+L { focus-monitor-right; } + + Mod+Shift+Ctrl+Left { move-column-to-monitor-left; } + Mod+Shift+Ctrl+Down { move-column-to-monitor-down; } + Mod+Shift+Ctrl+Up { move-column-to-monitor-up; } + Mod+Shift+Ctrl+Right { move-column-to-monitor-right; } + Mod+Shift+Ctrl+H { move-column-to-monitor-left; } + Mod+Shift+Ctrl+J { move-column-to-monitor-down; } + Mod+Shift+Ctrl+K { move-column-to-monitor-up; } + Mod+Shift+Ctrl+L { move-column-to-monitor-right; } + + // Alternatively, there are commands to move just a single window: + // Mod+Shift+Ctrl+Left { move-window-to-monitor-left; } + // ... + + // And you can also move a whole workspace to another monitor: + // Mod+Shift+Ctrl+Left { move-workspace-to-monitor-left; } + // ... + + Mod+Page_Down { focus-workspace-down; } + Mod+Page_Up { focus-workspace-up; } + Mod+U { focus-workspace-down; } + Mod+I { focus-workspace-up; } + Mod+Ctrl+Page_Down { move-column-to-workspace-down; } + Mod+Ctrl+Page_Up { move-column-to-workspace-up; } + Mod+Ctrl+U { move-column-to-workspace-down; } + Mod+Ctrl+I { move-column-to-workspace-up; } + + // Alternatively, there are commands to move just a single window: + // Mod+Ctrl+Page_Down { move-window-to-workspace-down; } + // ... + + Mod+Shift+Page_Down { move-workspace-down; } + Mod+Shift+Page_Up { move-workspace-up; } + Mod+Shift+U { move-workspace-down; } + Mod+Shift+I { move-workspace-up; } + + // You can bind mouse wheel scroll ticks using the following syntax. + // These binds will change direction based on the natural-scroll setting. + // + // To avoid scrolling through workspaces really fast, you can use + // the cooldown-ms property. The bind will be rate-limited to this value. + // You can set a cooldown on any bind, but it's most useful for the wheel. + Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; } + Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; } + Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; } + Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; } + + Mod+WheelScrollRight { focus-column-right; } + Mod+WheelScrollLeft { focus-column-left; } + Mod+Ctrl+WheelScrollRight { move-column-right; } + Mod+Ctrl+WheelScrollLeft { move-column-left; } + + // Usually scrolling up and down with Shift in applications results in + // horizontal scrolling; these binds replicate that. + Mod+Shift+WheelScrollDown { focus-column-right; } + Mod+Shift+WheelScrollUp { focus-column-left; } + Mod+Ctrl+Shift+WheelScrollDown { move-column-right; } + Mod+Ctrl+Shift+WheelScrollUp { move-column-left; } + + // Similarly, you can bind touchpad scroll "ticks". + // Touchpad scrolling is continuous, so for these binds it is split into + // discrete intervals. + // These binds are also affected by touchpad's natural-scroll, so these + // example binds are "inverted", since we have natural-scroll enabled for + // touchpads by default. + // Mod+TouchpadScrollDown { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02+"; } + // Mod+TouchpadScrollUp { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02-"; } + + // You can refer to workspaces by index. However, keep in mind that + // niri is a dynamic workspace system, so these commands are kind of + // "best effort". Trying to refer to a workspace index bigger than + // the current workspace count will instead refer to the bottommost + // (empty) workspace. + // + // For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on + // will all refer to the 3rd workspace. + Mod+1 { focus-workspace 1; } + Mod+2 { focus-workspace 2; } + Mod+3 { focus-workspace 3; } + Mod+4 { focus-workspace 4; } + Mod+5 { focus-workspace 5; } + Mod+6 { focus-workspace 6; } + Mod+7 { focus-workspace 7; } + Mod+8 { focus-workspace 8; } + Mod+9 { focus-workspace 9; } + Mod+Ctrl+1 { move-column-to-workspace 1; } + Mod+Ctrl+2 { move-column-to-workspace 2; } + Mod+Ctrl+3 { move-column-to-workspace 3; } + Mod+Ctrl+4 { move-column-to-workspace 4; } + Mod+Ctrl+5 { move-column-to-workspace 5; } + Mod+Ctrl+6 { move-column-to-workspace 6; } + Mod+Ctrl+7 { move-column-to-workspace 7; } + Mod+Ctrl+8 { move-column-to-workspace 8; } + Mod+Ctrl+9 { move-column-to-workspace 9; } + + // Alternatively, there are commands to move just a single window: + // Mod+Ctrl+1 { move-window-to-workspace 1; } + + // Switches focus between the current and the previous workspace. + // Mod+Tab { focus-workspace-previous; } + + // Consume one window from the right into the focused column. + Mod+Comma { consume-window-into-column; } + // Expel one window from the focused column to the right. + Mod+Period { expel-window-from-column; } + + // There are also commands that consume or expel a single window to the side. + Mod+BracketLeft { consume-or-expel-window-left; } + Mod+BracketRight { consume-or-expel-window-right; } + + Mod+R { switch-preset-column-width; } + Mod+Shift+R { switch-preset-window-height; } + Mod+Ctrl+R { reset-window-height; } + Mod+F { maximize-column; } + Mod+Shift+F { fullscreen-window; } + Mod+C { center-column; } + + // Finer width adjustments. + // This command can also: + // * set width in pixels: "1000" + // * adjust width in pixels: "-5" or "+5" + // * set width as a percentage of screen width: "25%" + // * adjust width as a percentage of screen width: "-10%" or "+10%" + // Pixel sizes use logical, or scaled, pixels. I.e. on an output with scale 2.0, + // set-column-width "100" will make the column occupy 200 physical screen pixels. + Mod+Minus { set-column-width "-10%"; } + Mod+Equal { set-column-width "+10%"; } + + // Finer height adjustments when in column with other windows. + Mod+Shift+Minus { set-window-height "-10%"; } + Mod+Shift+Equal { set-window-height "+10%"; } + + // Actions to switch layouts. + // Note: if you uncomment these, make sure you do NOT have + // a matching layout switch hotkey configured in xkb options above. + // Having both at once on the same hotkey will break the switching, + // since it will switch twice upon pressing the hotkey (once by xkb, once by niri). + // Mod+Space { switch-layout "next"; } + // Mod+Shift+Space { switch-layout "prev"; } + + Print { screenshot; } + Ctrl+Print { screenshot-screen; } + Alt+Print { screenshot-window; } + + // The quit action will show a confirmation dialog to avoid accidental exits. + Mod+Shift+E { quit; } + + Mod+V { toggle-window-floating; } + + // Powers off the monitors. To turn them back on, do any input like + // moving the mouse or pressing any other key. + Mod+Shift+P { power-off-monitors; } +} diff --git a/modules/home/niri/niri.nix b/modules/home/niri/niri.nix index 0235b1f..984560e 100644 --- a/modules/home/niri/niri.nix +++ b/modules/home/niri/niri.nix @@ -15,6 +15,11 @@ pwvucontrol ]; + programs.swaylock = { + enable = true; + settings = builtins.fromJSON (builtins.readFile ./swaylock.json); + }; + programs.quickshell = { enable = true; configs = { @@ -59,15 +64,9 @@ }; programs.fuzzel.enable = true; - programs.fuzzel.settings = { - border.width = 2; - main.dpi-aware = "yes"; - }; - stylix.targets.fuzzel.colors.override = { - base0D-hex = config.lib.stylix.colors.base0E-hex; - }; services.wpaperd.enable = true; + # programs.niri.config = builtins.readFile ./config.kdl; programs.niri.settings = { cursor = lib.mkIf (config.stylix.cursor != null) { @@ -108,7 +107,6 @@ natural-scroll = true; scroll-method = "two-finger"; click-method = "button-areas"; - tap = true; }; mouse = { accel-speed = -0.8; @@ -117,8 +115,6 @@ focus-follows-mouse.max-scroll-amount = "5%"; }; - outputs."Samsung Electric Company LF24T35 HNAT902308".scale = 1.2; - layout = { preset-column-widths = [ { proportion = 1.0 / 3.0; } @@ -127,13 +123,6 @@ ]; default-column-width.proportion = 1.0 / 2.0; focus-ring = { - enable = false; - active.color = "#8d4eef"; - inactive.color = "#505050"; - }; - border = { - enable = true; - width = 3; active.color = "#8d4eef"; inactive.color = "#505050"; }; @@ -261,7 +250,7 @@ "Mod+C".action = center-column; "Mod+V".action = toggle-window-floating; - "Print".action.screenshot = [ ]; + "Print".action = screenshot; }; }; } diff --git a/modules/nixos/drivers/gpu/amd.nix b/modules/nixos/drivers/gpu/amd.nix index 59dc052..cc74410 100644 --- a/modules/nixos/drivers/gpu/amd.nix +++ b/modules/nixos/drivers/gpu/amd.nix @@ -6,6 +6,7 @@ }; config = lib.mkIf config.settings.drivers.gpu.amd.enable { + boot.initrd.kernelModules = [ "amdgpu" ]; services.xserver.videoDrivers = [ "amdgpu" ]; }; } diff --git a/modules/nixos/programs/niri.nix b/modules/nixos/programs/niri.nix index 8c9c793..47bbad0 100644 --- a/modules/nixos/programs/niri.nix +++ b/modules/nixos/programs/niri.nix @@ -14,6 +14,8 @@ programs.niri.enable = true; programs.niri.package = pkgs.niri-unstable; + security.pam.services.swaylock = { }; + gtk.iconCache.enable = true; environment.systemPackages = with pkgs; [ diff --git a/overlays/soularr.nix b/overlays/soularr.nix deleted file mode 100644 index 2914c62..0000000 --- a/overlays/soularr.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ soularr, ... }: -(final: prev: { - soularr = soularr; -}) diff --git a/packages/slskd-api.nix b/packages/slskd-api.nix deleted file mode 100644 index 4ab5c04..0000000 --- a/packages/slskd-api.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ - lib, - python3Packages, - fetchFromGitHub, -}: - -python3Packages.buildPythonPackage rec { - pname = "slskd-api"; - version = "0.1.5"; - pyproject = true; - - src = fetchFromGitHub { - owner = "bigoulours"; - repo = "slskd-python-api"; - tag = "v${version}"; - hash = "sha256-Kyzbd8y92VFzjIp9xVbhkK9rHA/6KCCJh7kNS/MtixI="; - }; - - nativeBuildInputs = with python3Packages; [ setuptools-git-versioning ]; - - dependencies = with python3Packages; [ requests ]; - - pythonImportsCheck = [ "slskd_api" ]; - - meta = { - description = "API Wrapper to interact with slskd"; - homepage = "https://slskd-api.readthedocs.io/"; - changelog = "https://github.com/bigoulours/slskd-python-api/releases/tag/${src.tag}"; - license = lib.licenses.agpl3Only; - maintainers = with lib.maintainers; [ getchoo ]; - }; -} diff --git a/packages/soularr.nix b/packages/soularr.nix deleted file mode 100644 index 5a41549..0000000 --- a/packages/soularr.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ - lib, - fetchFromGitHub, - installShellFiles, - python3Packages, - slskd-api, -}: - -python3Packages.buildPythonApplication { - pname = "soularr"; - version = "0-unstable-2025-02-05"; - pyproject = false; - - src = fetchFromGitHub { - owner = "mrusse"; - repo = "soularr"; - rev = "dc23f6d11fb2148c35168028b6b2fdfd0c502957"; - hash = "sha256-znEubXeQmEmE8swmgDSliTh/v/k3t55jzchWCAd9bGc="; - }; - - nativeBuildInputs = [ installShellFiles ]; - - dependencies = with python3Packages; [ - music-tag - pyarr - slskd-api - ]; - - dontConfigure = true; - dontBuild = true; - - installPhase = '' - runHook preInstall - - mv soularr{.py,} - installBin soularr - - runHook postInstall - ''; - - meta = { - description = "Python script that connects Lidarr with Soulseek"; - homepage = "https://soularr.net/"; - license = lib.licenses.gpl3Only; - maintainers = with lib.maintainers; [ getchoo ]; - mainProgram = "soularr"; - }; -} diff --git a/treefmt.nix b/treefmt.nix index 1c022f3..799f584 100644 --- a/treefmt.nix +++ b/treefmt.nix @@ -3,6 +3,7 @@ projectRootFile = "flake.nix"; programs.nixfmt.enable = true; + programs.biome.enable = true; programs.stylua.enable = true; programs.taplo.enable = true; programs.mdformat.enable = true;