From 789b0435f0dcb21ef5582377f7d0358d2bf69fc0 Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Thu, 1 Dec 2022 10:17:03 +0100 Subject: [PATCH 1/3] Tweak i3-lock to work properly --- home-manager/modules/i3/default.nix | 2 +- home-manager/modules/i3/powermenu.sh | 2 +- users/erwin/work.nix | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/home-manager/modules/i3/default.nix b/home-manager/modules/i3/default.nix index d4c2515..5b9b062 100644 --- a/home-manager/modules/i3/default.nix +++ b/home-manager/modules/i3/default.nix @@ -6,7 +6,7 @@ with lib; let cfg = config.eboskma.programs.i3; mod = "Mod4"; - i3lockcmd = "i3lock --image ${toString ./wallpapers/jwst-southern-ring-nircam-miri-side-by-side-3840.png} --color=333333ff --tiling --ignore-empty-password --show-failed-attempts --screen=0 --clock --pass-volume-keys"; + i3lockcmd = "${pkgs.i3lock-color}/bin/i3lock-color --image ${toString ./wallpapers/river-3840.png} --color=333333ff --tiling --ignore-empty-password --show-failed-attempts --screen=0 --clock --pass-volume-keys"; rofiPower = pkgs.writeShellScriptBin "rofi-power" (builtins.readFile ./powermenu.sh); left = "n"; down = "e"; diff --git a/home-manager/modules/i3/powermenu.sh b/home-manager/modules/i3/powermenu.sh index 9299d4e..30f2789 100755 --- a/home-manager/modules/i3/powermenu.sh +++ b/home-manager/modules/i3/powermenu.sh @@ -18,7 +18,7 @@ exit_wm="" # Variable passed to rofi options="${shutdown}\n${reboot}\n${lock}\n${hibernate}\n${exit_wm}" uptime=$(uptime | awk '{print $1}' || true) -lockcmd="i3lock --ignore-empty-password --show-failed-attempts --clock --color=333333ff --screen=0 --pass-volume-keys --image /home/erwin/.wallpapers/river-3840.png --tiling" +lockcmd="i3lock-color --image /home/erwin/.wallpapers/river-3840.png --color=333333ff --tiling --ignore-empty-password --show-failed-attempts --screen=0 --clock --pass-volume-keys" chosen="$(echo -e "${options}" | rofi -theme power -p "Uptime: ${uptime}" -dmenu -selected-row 2)" diff --git a/users/erwin/work.nix b/users/erwin/work.nix index 7a65490..541ec95 100644 --- a/users/erwin/work.nix +++ b/users/erwin/work.nix @@ -88,6 +88,7 @@ in bitwarden blink1-tool bottom + cider fd ffmpeg_5-full git @@ -197,7 +198,7 @@ in windowManager.i3 = { enable = true; package = pkgs.i3-gaps; - extraPackages = with pkgs; [ i3lock-fancy ]; + extraPackages = with pkgs; [ i3lock-color ]; }; }; From 2cbf8a918bd2590212f2b752259c3ce30b84cd30 Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Thu, 1 Dec 2022 10:17:56 +0100 Subject: [PATCH 2/3] Enable full composition pipeline to reduce screen tearing --- machines/mimir/hardware-configuration.nix | 25 ++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/machines/mimir/hardware-configuration.nix b/machines/mimir/hardware-configuration.nix index 3adc75e..157b30e 100644 --- a/machines/mimir/hardware-configuration.nix +++ b/machines/mimir/hardware-configuration.nix @@ -50,5 +50,28 @@ }; }; - services.xserver.videoDrivers = [ "nvidia" ]; + services.xserver = { + videoDrivers = [ "nvidia" ]; + + # Section "Screen" + # Identifier "Screen0" + # Device "Device0" + # Monitor "Monitor0" + # DefaultDepth 24 + # Option "Stereo" "0" + # Option "nvidiaXineramaInfoOrder" "DFP-2" + # Option "metamodes" "DP-4: nvidia-auto-select +3840+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On, AllowGSYNCCompatible=On}, DP-0: nvidia-auto-select +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On, AllowGSYNCCompatible=On}" + # Option "SLI" "Off" + # Option "MultiGPU" "Off" + # Option "BaseMosaic" "off" + # SubSection "Display" + # Depth 24 + # EndSubSection + # EndSection + + screenSection = '' + Option "metamodes" "DP-0: nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On, AllowGSYNCCompatible=On}, DP-4: nvidia-auto-select +3840+0 {ForceFullCompositionPipeline=On, AllowGSYNCCompatible=On}" + Option "TripleBuffer" "On" + ''; + }; } From 7f3830b55c0d77f3da725fb0b90a2ef8adca8dfe Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Thu, 1 Dec 2022 10:18:12 +0100 Subject: [PATCH 3/3] Update flake.lock --- flake.lock | 68 +++++++++++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/flake.lock b/flake.lock index 16af4ac..9f6046e 100644 --- a/flake.lock +++ b/flake.lock @@ -10,11 +10,11 @@ ] }, "locked": { - "lastModified": 1669353837, - "narHash": "sha256-IaeB7ED6kxbOb7H/FzujPlSXNErbWPfyMV+tslFpBmo=", + "lastModified": 1669874436, + "narHash": "sha256-HYvJU6SROcNwcwow5xrG2Is69UJ+GaVrFSSX7QjG/6c=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "aa7098087716090efaa89a3966f3c3cdcfe9a9c3", + "rev": "6530a233351a806e88e83d10312d7dd9e8bc6cd3", "type": "github" }, "original": { @@ -94,11 +94,11 @@ ] }, "locked": { - "lastModified": 1668761963, - "narHash": "sha256-EQmTnDsvtQ2tsNoHZaPJijjOShyg9N3htU+krSkoArI=", + "lastModified": 1669648641, + "narHash": "sha256-0YkNdOBrQUDYR5ibRfbJdKCf+x9QxHm9V44RX9IQML8=", "ref": "main", - "rev": "66be98a0181a4cdc6bfbb45440412422c316c0e0", - "revCount": 62, + "rev": "b9b074836408e4c8ce15e157630d8e8098fc05cc", + "revCount": 80, "type": "git", "url": "https://git.datarift.nl/erwin/ha-now-playing.git" }, @@ -116,11 +116,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1669328018, - "narHash": "sha256-aJRMobnNDEXKwoSZFS4hGjGU1WDNxkQ82BVKAEohOfY=", + "lastModified": 1669825171, + "narHash": "sha256-HxlZHSiRGXnWAFbIJMeujqBe2KgACYx5XDRY0EA9P+4=", "owner": "nix-community", "repo": "home-manager", - "rev": "62cb5bcf93896e4dd6b4507dac7ba2e2e3abc9d7", + "rev": "478610aa37c8339eacabfa03f07dacf5574edd47", "type": "github" }, "original": { @@ -137,11 +137,11 @@ "wlroots": "wlroots" }, "locked": { - "lastModified": 1669358063, - "narHash": "sha256-RbYkhehDQSsiP2PSWBAiV4uaYdcfXzQLNegSCePIpdw=", + "lastModified": 1669848587, + "narHash": "sha256-N1tQXZmmzVXxCAgWBIWmWOgcViMvN5dPMkS58eoSF9c=", "owner": "Hyprwm", "repo": "Hyprland", - "rev": "141456dd89b231aa05dfff9c184f103515cca3b4", + "rev": "b8ccf3dc3a03352bccae4cd01dcdd5bc3438c49f", "type": "github" }, "original": { @@ -183,11 +183,11 @@ ] }, "locked": { - "lastModified": 1669310613, - "narHash": "sha256-P1OiIdV9BvIwYnRoOd2yI8InMwEbOZuBSZSEFMEJzS0=", + "lastModified": 1669857315, + "narHash": "sha256-E/QGmoL7Q3GDR2/I5o2CAMHMcmPQEJAySke1s+nOaho=", "owner": "oxalica", "repo": "nil", - "rev": "9794a2eb977d872e5eee19187e74d8bf7c48e400", + "rev": "c549d6fbb2befa4afa12911413d7f494c278555c", "type": "github" }, "original": { @@ -234,11 +234,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1669146234, - "narHash": "sha256-HEby7EG1yaq1oT2Ze6Cvok9CFju1XHkSvVHmkptLW9U=", + "lastModified": 1669650994, + "narHash": "sha256-uwASLUfedIQ5q01TtMwZDEV2HCZr5nVPZjzVgCG+D5I=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "0099253ad0b5283f06ffe31cf010af3f9ad7837d", + "rev": "7883883d135ce5b7eae5dce4bfa12262b85c1c46", "type": "github" }, "original": { @@ -249,11 +249,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1669320964, - "narHash": "sha256-EBFw+ge12Pcr3qCk8If3/eMBAoQLR7ytndXZoRevUtM=", + "lastModified": 1669542132, + "narHash": "sha256-DRlg++NJAwPh8io3ExBJdNW7Djs3plVI5jgYQ+iXAZQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "27ccd29078f974ddbdd7edc8e38c8c8ae003c877", + "rev": "a115bb9bd56831941be3776c8a94005867f316a7", "type": "github" }, "original": { @@ -265,11 +265,11 @@ }, "nixpkgs-22_05": { "locked": { - "lastModified": 1668908668, - "narHash": "sha256-oimCE4rY7Btuo/VYmA8khIyTHSMV7qUWTpz9w8yc9LQ=", + "lastModified": 1669513802, + "narHash": "sha256-AmTRNi8bHgJlmaNe3r5k+IMFbbXERM/KarqveMAZmsY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b68a6a27adb452879ab66c0eaac0c133e32823b2", + "rev": "6649e08812f579581bfb4cada3ba01e30485c891", "type": "github" }, "original": { @@ -351,11 +351,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1669152228, - "narHash": "sha256-FEDReoTLWJHXcNso7aaAlAUU7uOqIR6Hc/C/nqlfooE=", + "lastModified": 1669829516, + "narHash": "sha256-laWMD/TZzyrulu8xLNoSPertXOxjRD7BrcAVwKl+NyQ=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "078b0dee35e2da01334af682ec347463b70a9986", + "rev": "471c7f1ecace25e39099206431300322632d25c4", "type": "github" }, "original": { @@ -394,11 +394,11 @@ ] }, "locked": { - "lastModified": 1669343666, - "narHash": "sha256-PvNbZvkgVmwDG3uDsG0rFbRBcXiPSxdbpHC7mgwcc6s=", + "lastModified": 1669862269, + "narHash": "sha256-/ar+cbAKAxd2Ng9b7EhrIMz9CP353RbmLecvyOidyUM=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "87fee4b5b0ed4bc7f6db2e878a8c93db8d631e01", + "rev": "bfdf688742cf984c4837dbbe1c6cbca550365613", "type": "github" }, "original": { @@ -415,11 +415,11 @@ "nixpkgs-22_05": "nixpkgs-22_05" }, "locked": { - "lastModified": 1668915833, - "narHash": "sha256-7VYPiDJZdGct8Nl3kKhg580XZfoRcViO+zUGPkfBsqM=", + "lastModified": 1669714206, + "narHash": "sha256-9aiMbzRL8REsyi9U0eZ+lT4s7HaILA1gh9n2apKzLxU=", "owner": "Mic92", "repo": "sops-nix", - "rev": "f72e050c3ef148b1131a0d2df55385c045e4166b", + "rev": "8295b8139ef7baadeb90c5cad7a40c4c9297ebf7", "type": "github" }, "original": {