diff --git a/checks/xremap-multiple-devices.nix b/checks/xremap-multiple-devices.nix index c2d77cf..6b84d8f 100644 --- a/checks/xremap-multiple-devices.nix +++ b/checks/xremap-multiple-devices.nix @@ -7,7 +7,7 @@ { name = "xremap-single-device"; nodes.machine1 = - { config, pkgs, ... }: + { config, ... }: { services.getty.autologinUser = "root"; imports = [ diff --git a/checks/xremap-no-features-root-test.nix b/checks/xremap-no-features-root-test.nix index 39297cd..766f02c 100644 --- a/checks/xremap-no-features-root-test.nix +++ b/checks/xremap-no-features-root-test.nix @@ -2,7 +2,7 @@ { name = "xremap-no-features-root-test"; nodes.machine1 = - { config, pkgs, ... }: + { config, ... }: { services.getty.autologinUser = "root"; imports = [ diff --git a/checks/xremap-single-device.nix b/checks/xremap-single-device.nix index 9285e1a..dbd3658 100644 --- a/checks/xremap-single-device.nix +++ b/checks/xremap-single-device.nix @@ -7,7 +7,7 @@ { name = "xremap-single-device"; nodes.machine1 = - { config, pkgs, ... }: + { config, ... }: { services.getty.autologinUser = "root"; imports = [ diff --git a/flake.nix b/flake.nix index 71a91e3..35e1f44 100644 --- a/flake.nix +++ b/flake.nix @@ -56,8 +56,6 @@ perSystem = { config, - self', - inputs', pkgs, system, ... diff --git a/lib/default.nix b/lib/default.nix index 08953ab..1ec1fdd 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -42,7 +42,7 @@ in # Check that 0 or 1 features are enabled, since upstream throws an error otherwise assert ( - lib.lists.count (x: x == true) ( + lib.lists.count (x: x) ( builtins.attrValues { inherit (cfg) withSway @@ -163,7 +163,7 @@ in mkExecStart = configFile: let - mkDeviceString = (x: "--device '${x}'"); + mkDeviceString = x: "--device '${x}'"; in builtins.concatStringsSep " " ( lib.flatten ( @@ -195,7 +195,7 @@ in ++ lib.optional cfg.watch "--watch" ++ lib.optional cfg.mouse "--mouse" ++ cfg.extraArgs - ++ lib.lists.singleton (configFile) + ++ lib.lists.singleton configFile ) ); } diff --git a/modules/system-service.nix b/modules/system-service.nix index 5ff7c66..c881ee5 100644 --- a/modules/system-service.nix +++ b/modules/system-service.nix @@ -1,10 +1,5 @@ { mkExecStart, configFile }: -{ - pkgs, - lib, - config, - ... -}: +{ lib, config, ... }: let cfg = config.services.xremap; @@ -76,11 +71,11 @@ in # Need 'tmpfs' here so that the socket may be actually bind-mounted through Bind*Paths ProtectHome = "tmpfs"; # This is needed, otherwise xremap cannot read from sway socket - BindReadOnlyPaths = lib.mkIf (cfg.withSway) [ userPath ]; + BindReadOnlyPaths = lib.mkIf cfg.withSway [ userPath ]; # Sway socket gets generated as $XDG_RUNTIME_DIR/sway-ipc.$UID.$SWAY_PID # Hacky way to allow sway socket # Systemd does not support wildcards :( - InaccessiblePaths = lib.mkIf (cfg.withSway) ( + InaccessiblePaths = lib.mkIf cfg.withSway ( map (x: "-${userPath}/${x}") [ "app" "bus" diff --git a/modules/user-service.nix b/modules/user-service.nix index 06b0df3..3ad2e13 100644 --- a/modules/user-service.nix +++ b/modules/user-service.nix @@ -1,10 +1,5 @@ { mkExecStart, configFile }: -{ - pkgs, - lib, - config, - ... -}: +{ lib, config, ... }: let inherit (lib) mkIf optionalString; @@ -26,7 +21,7 @@ in path = [ cfg.package ]; # NOTE: xremap needs DISPLAY:, WAYLAND_DISPLAY: and a bunch of other stuff in the environment to launch graphical applications (launch:) # On Gnome after gnome-session.target is up - those variables are populated - after = lib.mkIf (cfg.withGnome == true) [ "gnome-session.target" ]; + after = lib.mkIf cfg.withGnome [ "gnome-session.target" ]; wantedBy = [ "graphical-session.target" ]; serviceConfig = { KeyringMode = "private"; diff --git a/nixosConfigurations/hypr-common.nix b/nixosConfigurations/hypr-common.nix index 57261fd..ae09acf 100644 --- a/nixosConfigurations/hypr-common.nix +++ b/nixosConfigurations/hypr-common.nix @@ -8,19 +8,17 @@ home-manager = { useGlobalPkgs = true; useUserPackages = true; - users.alice = - { ... }: - { - home.stateVersion = "23.05"; - wayland.windowManager.hyprland = { - enable = true; - # Makes xremap auto-start with hyprland - systemdIntegration = true; - extraConfig = '' - bind = SUPER CTRL, k, exec, ${lib.getExe pkgs.kitty} - bind = SUPER CTRL, f, exec, ${lib.getExe pkgs.foot} - ''; - }; + users.alice = _: { + home.stateVersion = "23.05"; + wayland.windowManager.hyprland = { + enable = true; + # Makes xremap auto-start with hyprland + systemdIntegration = true; + extraConfig = '' + bind = SUPER CTRL, k, exec, ${lib.getExe pkgs.kitty} + bind = SUPER CTRL, f, exec, ${lib.getExe pkgs.foot} + ''; }; + }; }; } diff --git a/nixosConfigurations/kde-common.nix b/nixosConfigurations/kde-common.nix index 8a4b146..f703819 100644 --- a/nixosConfigurations/kde-common.nix +++ b/nixosConfigurations/kde-common.nix @@ -1,5 +1,4 @@ -{ ... }: -{ +_: { services.xserver = { enable = true; desktopManager.plasma5.enable = true; diff --git a/nixosConfigurations/sway-common.nix b/nixosConfigurations/sway-common.nix index dca44b1..276c192 100644 --- a/nixosConfigurations/sway-common.nix +++ b/nixosConfigurations/sway-common.nix @@ -1,9 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: +{ pkgs, ... }: { environment.etc."sway/config.d/test".text = '' diff --git a/nixosConfigurations/vm-config.nix b/nixosConfigurations/vm-config.nix index 6532db5..a1bd174 100644 --- a/nixosConfigurations/vm-config.nix +++ b/nixosConfigurations/vm-config.nix @@ -1,11 +1,6 @@ # NOTE: modulesPath and imports are taken from nixpkgs#59219 # Most of this file is very specific to running a dev VM for this project -{ - modulesPath, - pkgs, - lib, - ... -}: +{ modulesPath, pkgs, ... }: { imports = [ (modulesPath + "/virtualisation/qemu-vm.nix") ]; users.users.root.password = "root"; diff --git a/overlay/default.nix b/overlay/default.nix index ed54b76..91254e9 100644 --- a/overlay/default.nix +++ b/overlay/default.nix @@ -1,9 +1,5 @@ # Overlay file that contains the definition of building a package -{ - xremap, - craneLib, - pkgs, -}: +{ xremap, craneLib, ... }: let commonArgs = { src = xremap;