integrate gsf via flake input and hardware.gsf module

This commit is contained in:
2026-03-25 12:41:52 +00:00
parent ead8ff2afd
commit 4551e5134e
3 changed files with 78 additions and 13 deletions
+7 -12
View File
@@ -14,10 +14,13 @@ in {
}: let
smbSecretFile = ../../secrets/smb-credentials.age;
hasSmbSecret = builtins.pathExists smbSecretFile;
gsfDevice = "/dev/input/by-id/usb-Ploopy_Corporation_Ploopy_Adept_Trackball_E6626067D39C532A0000000000000000-if02-event-mouse";
in {
imports = [
inputs.agenix.nixosModules.default
inputs.maccel.nixosModules.default
inputs.gsf.nixosModules.default
../../hardware-configuration.nix
];
@@ -102,18 +105,10 @@ in {
enableCli = true;
};
# Dotfile-managed maccel settings: place an executable script at
# ~/.config/maccel/apply.sh with your preferred `maccel set ...` commands.
systemd.user.services.maccel-apply-dotfiles = {
description = "apply maccel params from ~/.config/maccel/apply.sh";
wantedBy = ["default.target"];
after = ["default.target"];
serviceConfig = {
Type = "oneshot";
ExecStart = ''
${pkgs.bash}/bin/bash -lc 'PATH=/run/current-system/sw/bin:$PATH; if [ -x "$HOME/.config/maccel/apply.sh" ]; then "$HOME/.config/maccel/apply.sh"; fi'
'';
};
hardware.gsf = {
enable = true;
device = gsfDevice;
inputGroupUsers = [flakeConfig.username];
};
# Programs