From 9049d3f85baa3e5b7493b54cc83fdd072388bb70 Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Thu, 12 Jan 2023 09:11:56 +0100 Subject: [PATCH 1/3] Update flake.lock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Updated input 'emacs-overlay': 'github:nix-community/emacs-overlay/070389cdd38008ad49d8097e18817db7cd6ddc2b' (2023-01-09) → 'github:nix-community/emacs-overlay/9066f92a2f6334de8977240e221278aba8037d7a' (2023-01-12) • Updated input 'home-manager': 'github:nix-community/home-manager/69806e937881c75269e058daecf49d9c39bd034e' (2023-01-09) → 'github:nix-community/home-manager/176e455371a8371586e8a3ff0d56ee9f3ca2324e' (2023-01-10) • Updated input 'hyprland': 'github:Hyprwm/Hyprland/ff118834829dd0db37e3622480756776b368bd4a' (2023-01-09) → 'github:Hyprwm/Hyprland/11afb660102198abb1e74fffdffd00f8c1a11cd9' (2023-01-11) • Updated input 'nixos-hardware': 'github:NixOS/nixos-hardware/ca29e25c39b8e117d4d76a81f1e229824a9b3a26' (2023-01-02) → 'github:NixOS/nixos-hardware/88016c96c3c338aa801695cdd9f186820bcfe4d6' (2023-01-11) • Updated input 'nixpkgs': 'github:nixos/nixpkgs/f6f44561884c3470e2b783683d5dbac42dfc833b' (2023-01-07) → 'github:nixos/nixpkgs/c07552f6f7d4eead7806645ec03f7f1eb71ba6bd' (2023-01-10) • Updated input 'pre-commit-hooks': 'github:cachix/pre-commit-hooks.nix/f3b402838c49b0989c07494f6f5db77dfce0ce97' (2023-01-09) → 'github:cachix/pre-commit-hooks.nix/f8992fb404c7e79638192a10905b7ea985818050' (2023-01-09) • Updated input 'rust-overlay': 'github:oxalica/rust-overlay/3488cec01351c2f1086b02a3a61808be7a25103e' (2023-01-09) → 'github:oxalica/rust-overlay/0833f4d063a2bb75aa31680f703ba594a384ffe6' (2023-01-12) • Updated input 'sops': 'github:Mic92/sops-nix/2253120d2a6147e57bafb5c689e086221df8032f' (2023-01-08) → 'github:Mic92/sops-nix/32187b33ac6ec9b628dcd08dd941a715e6241dda' (2023-01-12) --- flake.lock | 69 +++++++++++++++++++----------------------------------- 1 file changed, 24 insertions(+), 45 deletions(-) diff --git a/flake.lock b/flake.lock index bc421d4..7c78ee3 100644 --- a/flake.lock +++ b/flake.lock @@ -24,26 +24,6 @@ "type": "github" } }, - "disko": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1672841174, - "narHash": "sha256-E4t0BnQdbvfbpd9uJnQen5Gsu3LreHoZff7c9Z0wr+Y=", - "owner": "nix-community", - "repo": "disko", - "rev": "dd025155fb0f5d36afd6719e358e7cf99a47644e", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "disko", - "type": "github" - } - }, "emacs-overlay": { "inputs": { "flake-utils": [ @@ -54,11 +34,11 @@ ] }, "locked": { - "lastModified": 1673256023, - "narHash": "sha256-bU/SNZYv1q3QfuaR9Hyh0hhOxxP3Y3p+/D5hJEpMDJY=", + "lastModified": 1673494149, + "narHash": "sha256-TitnT29bxDzckQfePsHMARtPS2TLHbLlf4FTgy9JdXw=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "070389cdd38008ad49d8097e18817db7cd6ddc2b", + "rev": "9066f92a2f6334de8977240e221278aba8037d7a", "type": "github" }, "original": { @@ -176,11 +156,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1673265621, - "narHash": "sha256-4F5fbx2HvIWqYhEFfiI4WOMs79Ah9jH4PohI66vhOBY=", + "lastModified": 1673343300, + "narHash": "sha256-5Xdj6kpXYMie0MlnGwqK5FaMdsedxvyuakWtyKB3zaQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "69806e937881c75269e058daecf49d9c39bd034e", + "rev": "176e455371a8371586e8a3ff0d56ee9f3ca2324e", "type": "github" }, "original": { @@ -199,11 +179,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1673271358, - "narHash": "sha256-7aUBr6Ga/6mcrdp53X43CRnO7Dx1p0GFNB4UFlVHIoE=", + "lastModified": 1673460918, + "narHash": "sha256-vL9AhYPCMP1/8va2pdmLn0vmCdsxbgYSSQHm4kaQjHs=", "owner": "Hyprwm", "repo": "Hyprland", - "rev": "ff118834829dd0db37e3622480756776b368bd4a", + "rev": "11afb660102198abb1e74fffdffd00f8c1a11cd9", "type": "github" }, "original": { @@ -281,11 +261,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1672644464, - "narHash": "sha256-RYlvRMcQNT7FDoDkViijQBHg9g+blsB+U6AvL/gAsPI=", + "lastModified": 1673440569, + "narHash": "sha256-FQ5o0yI+MH9MgfseeGDsVIIpIqv3BCgq+0NzncuZ9Zo=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "ca29e25c39b8e117d4d76a81f1e229824a9b3a26", + "rev": "88016c96c3c338aa801695cdd9f186820bcfe4d6", "type": "github" }, "original": { @@ -296,11 +276,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1673134516, - "narHash": "sha256-mAZQKqkNQbBmJnmUU0blOfkKlgMSSVyPHdeWeuKad8U=", + "lastModified": 1673315479, + "narHash": "sha256-GNCFRtDHjTygXGJp/H+f2XQPMGxpYSmNiibIqYzihtM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "f6f44561884c3470e2b783683d5dbac42dfc833b", + "rev": "c07552f6f7d4eead7806645ec03f7f1eb71ba6bd", "type": "github" }, "original": { @@ -398,11 +378,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1673240110, - "narHash": "sha256-Em7Eg/qv1QBx1XpIldJz9E9aQohSBtwwxffYS02FPdQ=", + "lastModified": 1673281605, + "narHash": "sha256-v6U0G3pJe0YaIuD1Ijhz86EhTgbXZ4f/2By8sLqFk4c=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "f3b402838c49b0989c07494f6f5db77dfce0ce97", + "rev": "f8992fb404c7e79638192a10905b7ea985818050", "type": "github" }, "original": { @@ -414,7 +394,6 @@ "root": { "inputs": { "deploy-rs": "deploy-rs", - "disko": "disko", "emacs-overlay": "emacs-overlay", "flake-utils": "flake-utils", "ha-now-playing": "ha-now-playing", @@ -442,11 +421,11 @@ ] }, "locked": { - "lastModified": 1673231106, - "narHash": "sha256-Tbw4N/TL+nHmxF8RBoOJbl/6DRRzado/9/ttPEzkGr8=", + "lastModified": 1673490397, + "narHash": "sha256-VCSmIYJy/ZzTvEGjdfITmTYfybXBgZpMjyjDndbou+8=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "3488cec01351c2f1086b02a3a61808be7a25103e", + "rev": "0833f4d063a2bb75aa31680f703ba594a384ffe6", "type": "github" }, "original": { @@ -463,11 +442,11 @@ "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1673147300, - "narHash": "sha256-gR9OEfTzWfL6vG0qkbn1TlBAOlg4LuW8xK/u0V41Ihc=", + "lastModified": 1673481602, + "narHash": "sha256-P80X38fOM2MtoYdgkyuksGOQPDhIhNJW2W2jMeMIZzE=", "owner": "Mic92", "repo": "sops-nix", - "rev": "2253120d2a6147e57bafb5c689e086221df8032f", + "rev": "32187b33ac6ec9b628dcd08dd941a715e6241dda", "type": "github" }, "original": { From ca4b1f353e67dedbaeaf173e96610d6931362733 Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Thu, 12 Jan 2023 11:19:54 +0100 Subject: [PATCH 2/3] Add user 'erwin' to input group --- users/erwin/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/erwin/default.nix b/users/erwin/default.nix index af409e6..c6a0a32 100644 --- a/users/erwin/default.nix +++ b/users/erwin/default.nix @@ -25,7 +25,7 @@ in users.users.erwin = { isNormalUser = true; home = "/home/erwin"; - extraGroups = [ "wheel" "adm" "audio" "video" "dialout" ]; + extraGroups = [ "wheel" "adm" "audio" "video" "dialout" "input" ]; shell = pkgs.fish; openssh.authorizedKeys.keyFiles = [ (pkgs.fetchurl { From 88154d34abdf7efdde97bd0b8aaee924a1c9cd60 Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Thu, 12 Jan 2023 15:30:40 +0100 Subject: [PATCH 3/3] Headsetcontrol tweaks - Add headsetcontrol to services.udev.packages - Set battery check interval to 1 second --- home-manager/modules/polybar/default.nix | 2 +- users/erwin/work.nix | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/home-manager/modules/polybar/default.nix b/home-manager/modules/polybar/default.nix index 3d0e66f..815dcfc 100644 --- a/home-manager/modules/polybar/default.nix +++ b/home-manager/modules/polybar/default.nix @@ -249,7 +249,7 @@ in "module/headset-battery" = { type = "custom/script"; exec = "${headset-battery}"; - interval = 5; + interval = 1; format.prefix = " "; format.padding = 2; diff --git a/users/erwin/work.nix b/users/erwin/work.nix index d17270a..77f5bb7 100644 --- a/users/erwin/work.nix +++ b/users/erwin/work.nix @@ -96,7 +96,6 @@ in ffmpeg_5-full git gnome.nautilus - headsetcontrol icemon imagemagick iotop @@ -201,6 +200,14 @@ in services.teamviewer.enable = true; + environment.systemPackages = with pkgs; [ + headsetcontrol + ]; + + services.udev.packages = with pkgs; [ + headsetcontrol + ]; + services.xserver = { layout = "us,us"; xkbVariant = "colemak,";