My NixOS and Home Manager configurations
10
fork

Configure Feed

Select the types of activity you want to include in your feed.

falcond setup and udev rule fixes

quasigod e143980b a2c90840

+146 -28
+42
flake.lock
··· 666 666 "type": "github" 667 667 } 668 668 }, 669 + "nixpkgs-patch-falcond": { 670 + "flake": false, 671 + "locked": { 672 + "narHash": "sha256-lkj13UFtv2Bc5FZsjJTVa+usZ7G1Yy3fEi7cJD+jxy0=", 673 + "type": "file", 674 + "url": "https://github.com/NixOS/nixpkgs/compare/master...michaelBelsanti:nixpkgs:falcond.diff" 675 + }, 676 + "original": { 677 + "type": "file", 678 + "url": "https://github.com/NixOS/nixpkgs/compare/master...michaelBelsanti:nixpkgs:falcond.diff" 679 + } 680 + }, 681 + "nixpkgs-patch-scx-loader": { 682 + "flake": false, 683 + "locked": { 684 + "narHash": "sha256-X4dZmMro+GHbbuLR3bQStXTh2N6KSfpU4clcGiUTexY=", 685 + "type": "file", 686 + "url": "https://github.com/NixOS/nixpkgs/pull/483360.diff" 687 + }, 688 + "original": { 689 + "type": "file", 690 + "url": "https://github.com/NixOS/nixpkgs/pull/483360.diff" 691 + } 692 + }, 693 + "nixpkgs-patcher": { 694 + "locked": { 695 + "lastModified": 1769207991, 696 + "narHash": "sha256-SwGLSB3H/Lq2gPa2/yCtmcUn8E/fVuPtZ5qnjrDj62s=", 697 + "owner": "gepbird", 698 + "repo": "nixpkgs-patcher", 699 + "rev": "2e59a7b94478f67e3ac2b221f737fe75c2175edc", 700 + "type": "github" 701 + }, 702 + "original": { 703 + "owner": "gepbird", 704 + "repo": "nixpkgs-patcher", 705 + "type": "github" 706 + } 707 + }, 669 708 "nixpkgs-stable": { 670 709 "locked": { 671 710 "lastModified": 1769900590, ··· 806 845 "nixos-facter-modules": "nixos-facter-modules", 807 846 "nixos-hardware": "nixos-hardware", 808 847 "nixpkgs": "nixpkgs", 848 + "nixpkgs-patch-falcond": "nixpkgs-patch-falcond", 849 + "nixpkgs-patch-scx-loader": "nixpkgs-patch-scx-loader", 850 + "nixpkgs-patcher": "nixpkgs-patcher", 809 851 "nur": "nur", 810 852 "scx_cake": "scx_cake", 811 853 "sops-nix": "sops-nix",
+10
flake.nix
··· 10 10 flake-aspects.url = "git+https://tangled.org/oeiuwq.com/flake-aspects"; 11 11 12 12 nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"; 13 + nixpkgs-patcher.url = "github:gepbird/nixpkgs-patcher"; 14 + nixpkgs-patch-scx-loader = { 15 + url = "https://github.com/NixOS/nixpkgs/pull/483360.diff"; 16 + flake = false; 17 + }; 18 + nixpkgs-patch-falcond = { 19 + url = "https://github.com/NixOS/nixpkgs/compare/master...michaelBelsanti:nixpkgs:falcond.diff"; 20 + flake = false; 21 + }; 22 + 13 23 home-manager = { 14 24 url = "github:nix-community/home-manager"; 15 25 inputs.nixpkgs.follows = "nixpkgs";
+1 -1
modules/gaming.nix
··· 66 66 input-remapper.enable = true; 67 67 pipewire.lowLatency = { 68 68 enable = true; 69 - quantum = 32; 69 + quantum = 512; # apparently my cpu cant handle any lower 70 70 }; 71 71 }; 72 72 programs = {
+65 -20
modules/hosts/hades/default.nix
··· 26 26 }; 27 27 }; 28 28 29 - den.hosts.x86_64-linux.hades = { inherit (config.hostConfig.hades) displays primaryDisplay; }; 29 + den.hosts.x86_64-linux.hades = { 30 + inherit (config.hostConfig.hades) displays primaryDisplay; 31 + instantiate = 32 + args: inputs.nixpkgs-patcher.lib.nixosSystem ({ nixpkgsPatcher.inputs = inputs; } // args); 33 + }; 30 34 den.aspects.hades = { 31 35 includes = with styx; [ 32 36 desktop ··· 54 58 services = { 55 59 fwupd.enable = true; 56 60 # firewalld.enable = true; 61 + falcond = { 62 + enable = true; 63 + settings = { 64 + scx_sched = "cake"; 65 + # start_script = toString ( 66 + # pkgs.writeScript "falcond_start" '' 67 + # #!${lib.getExe pkgs.nushell} 68 + # if not (dms ipc call notifications getDoNotDisturb | into bool) then { 69 + # dms ipc call notifications toggleDoNotDisturb 70 + # } 71 + # '' 72 + # ); 73 + # stop_script = toString ( 74 + # pkgs.writeScript "falcond_stop" '' 75 + # #!${lib.getExe pkgs.nushell} 76 + # if (dms ipc call notifications getDoNotDisturb | into bool) then { 77 + # dms ipc call notifications toggleDoNotDisturb 78 + # } 79 + # '' 80 + # ); 81 + }; 82 + profiles.deadlock = { 83 + name = "deadlock.exe"; 84 + scx_sched_props = "lowlatency"; 85 + }; 86 + }; 87 + scx-loader = { 88 + enable = true; 89 + schedsPackages = [ inputs.scx_cake.packages.${pkgs.stdenv.hostPlatform.system}.scx_cake ]; 90 + settings = { }; 91 + package = pkgs.scx.loader.overrideAttrs ( 92 + final: prev: { 93 + src = pkgs.fetchFromGitHub { 94 + owner = "michaelBelsanti"; 95 + repo = "scx-loader"; 96 + rev = "70064e94d51ea56a6f2fed0368cf787b03c60e96"; 97 + hash = "sha256-LQCfM7z57kVxRBY3GJJFUbopefoyRvQLt+MLJjuWmMY="; 98 + }; 99 + } 100 + ); 101 + }; 57 102 }; 58 103 59 104 security.rtkit.enable = true; ··· 86 131 }; 87 132 88 133 # services.scx.scheduler uses an enum with the upstream schedulers hardcoded 89 - systemd.services.scx = 90 - let 91 - scx_cake = inputs.scx_cake.packages.${pkgs.stdenv.hostPlatform.system}.scx_cake; 92 - in 93 - { 94 - description = "SCX scheduler daemon"; 95 - # SCX service should be started only if the kernel supports sched-ext 96 - unitConfig.ConditionPathIsDirectory = "/sys/kernel/sched_ext"; 97 - startLimitIntervalSec = 30; 98 - startLimitBurst = 2; 99 - serviceConfig = { 100 - Type = "simple"; 101 - ExecStart = '' 102 - ${pkgs.runtimeShell} -c 'exec ${scx_cake}/bin/scx_cake' 103 - ''; 104 - Restart = "on-failure"; 105 - }; 106 - wantedBy = [ "multi-user.target" ]; 107 - }; 134 + # systemd.services.scx = 135 + # let 136 + # scx_cake = inputs.scx_cake.packages.${pkgs.stdenv.hostPlatform.system}.scx_cake; 137 + # in 138 + # { 139 + # description = "SCX scheduler daemon"; 140 + # # SCX service should be started only if the kernel supports sched-ext 141 + # unitConfig.ConditionPathIsDirectory = "/sys/kernel/sched_ext"; 142 + # startLimitIntervalSec = 30; 143 + # startLimitBurst = 2; 144 + # serviceConfig = { 145 + # Type = "simple"; 146 + # ExecStart = '' 147 + # ${pkgs.runtimeShell} -c 'exec ${scx_cake}/bin/scx_cake' 148 + # ''; 149 + # Restart = "on-failure"; 150 + # }; 151 + # wantedBy = [ "multi-user.target" ]; 152 + # }; 108 153 109 154 boot.kernelPackages = 110 155 inputs.nix-cachyos-kernel.legacyPackages.${pkgs.stdenv.hostPlatform.system}.linuxPackages-cachyos-latest;
+10 -2
modules/niri/default.nix
··· 31 31 celluloid 32 32 loupe 33 33 dsearch 34 + pwvucontrol 34 35 ]; 35 36 }; 36 37 programs = { ··· 50 51 ] 51 52 ) config.home-manager.users.quasi.programs.niri.config 52 53 ); 54 + }; 55 + kdeconnect = { 56 + enable = true; 57 + package = pkgs.valent; 53 58 }; 54 59 }; 55 60 services = { ··· 85 90 systemd.enable = true; 86 91 }; 87 92 dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark"; 88 - xdg.configFile."gtk-4.0/gtk.css".enable = lib.mkForce false; 93 + xdg = { 94 + autostart.enable = true; 95 + configFile."gtk-4.0/gtk.css".enable = lib.mkForce false; 96 + }; 89 97 gtk.theme = { 90 98 package = pkgs.colloid-gtk-theme; 91 99 name = "Colloid"; ··· 174 182 175 183 "Mod+Escape".action = dms "lock lock"; 176 184 177 - "Mod+V".action= dms "clipboard toggle"; 185 + "Mod+V".action = dms "clipboard toggle"; 178 186 179 187 "Mod+Shift+S".action.screenshot = [ ]; 180 188 "Mod+S".action.screenshot-window = [ ];
+18 -5
modules/udev.nix
··· 1 1 { 2 - # lowest DPI of vertical mouse is 1200 for some reason 3 - styx.udev.nixos.services.udev.extraRules = '' 4 - ENV{ID_VENDOR_ID}=="248a", ENV{ID_MODEL_ID}=="8589", ENV{LIBINPUT_CALIBRATION_MATRIX}="0.5 0 0 0 0.5 0 0 0 1" 5 - SUBSYSTEM=="hidraw", ATTRS{idVendor}=="36a7", TAG+="uaccess" 6 - ''; 2 + styx.udev.nixos = 3 + { pkgs, ... }: 4 + { 5 + services.udev = { 6 + packages = [ 7 + (pkgs.writeTextFile { 8 + name = "my-rules"; 9 + text = '' 10 + SUBSYSTEM=="hidraw", ATTRS{idVendor}=="36a7", TAG+="uaccess" 11 + ''; 12 + destination = "/etc/udev/rules.d/50-beast-miao.rules"; 13 + }) 14 + ]; 15 + extraRules = '' 16 + ENV{ID_VENDOR_ID}=="248a", ENV{ID_MODEL_ID}=="8589", ENV{LIBINPUT_CALIBRATION_MATRIX}="0.5 0 0 0 0.5 0 0 0 1" 17 + ''; 18 + }; 19 + }; 7 20 }