From f3b14a0357ab06e559c4b78cfe1168f8eee9407d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vili=20Sinerv=C3=A4?= Date: Thu, 2 Jan 2025 15:46:08 +0200 Subject: [PATCH] Clean up unnecessary arguments from files. Minor re-org --- base.nix | 3 +-- hardware-specific/amd-laptop.nix | 2 ++ hardware-specific/laptop.nix | 32 +++++++++++++++-------------- hardware-specific/trackball.nix | 2 +- hardware-specific/usb-automount.nix | 2 +- machine-confs/dhcp2.nix | 9 -------- machine-confs/generic.nix | 2 +- machine-confs/helium.nix | 2 +- machine-confs/lithium.nix | 2 +- machine-confs/nat64.nix | 2 +- machine-confs/nextcloud.nix | 2 +- machine-confs/ntfy.nix | 2 +- machine-confs/syncthing.nix | 2 +- machine-confs/vaultwarden.nix | 2 +- machine-confs/wg-rpi.nix | 2 +- misc/custom-gnome-iso.nix | 2 +- misc/custom-iso-base.nix | 2 +- misc/custom-minimal-iso.nix | 2 +- misc/custom-plasma-iso.nix | 2 +- misc/template-configuration.nix | 2 +- program-config-files/alacritty.nix | 2 +- program-config-files/firefox.nix | 2 +- services/nat64.nix | 2 +- services/redshift.nix | 2 +- services/vaultwarden.nix | 2 +- users/vili.nix | 2 +- 26 files changed, 42 insertions(+), 48 deletions(-) delete mode 100644 machine-confs/dhcp2.nix diff --git a/base.nix b/base.nix index 98542b0..ca59e3b 100644 --- a/base.nix +++ b/base.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ pkgs, ... }: { ######################################## Packages ############################################### environment.systemPackages = with pkgs; [ @@ -172,5 +172,4 @@ efi.canTouchEfiVariables = true; timeout = pkgs.lib.mkDefault 0; }; - services.logind.lidSwitch = if config.boot.resumeDevice != "" then "hibernate" else "suspend"; } diff --git a/hardware-specific/amd-laptop.nix b/hardware-specific/amd-laptop.nix index 53c24fb..ab51886 100644 --- a/hardware-specific/amd-laptop.nix +++ b/hardware-specific/amd-laptop.nix @@ -38,5 +38,7 @@ }; }; + + logind.lidSwitch = if config.boot.resumeDevice != "" then "hibernate" else "suspend"; }; } diff --git a/hardware-specific/laptop.nix b/hardware-specific/laptop.nix index 00963e8..7abca4a 100644 --- a/hardware-specific/laptop.nix +++ b/hardware-specific/laptop.nix @@ -8,26 +8,28 @@ Option "TearFree" "true" ''; }; - }; - services.tlp = { - enable = true; - settings = { - CPU_SCALING_GOVERNOR_ON_AC = "performance"; - CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + tlp = { + enable = true; + settings = { + CPU_SCALING_GOVERNOR_ON_AC = "performance"; + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; - CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; - CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; + CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; + CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; - CPU_MIN_PERF_ON_AC = 0; - CPU_MAX_PERF_ON_AC = 100; - CPU_MIN_PERF_ON_BAT = 0; - CPU_MAX_PERF_ON_BAT = 40; + CPU_MIN_PERF_ON_AC = 0; + CPU_MAX_PERF_ON_AC = 100; + CPU_MIN_PERF_ON_BAT = 0; + CPU_MAX_PERF_ON_BAT = 40; - #Optional helps save long term battery health - START_CHARGE_THRESH_BAT0 = 60; # 60 and bellow it starts to charge - STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging + #Optional helps save long term battery health + START_CHARGE_THRESH_BAT0 = 60; # 60 and bellow it starts to charge + STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging + }; }; + + logind.lidSwitch = if config.boot.resumeDevice != "" then "hibernate" else "suspend"; }; } diff --git a/hardware-specific/trackball.nix b/hardware-specific/trackball.nix index b1344c0..19f42ff 100644 --- a/hardware-specific/trackball.nix +++ b/hardware-specific/trackball.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, ... }: { assertions = [ { diff --git a/hardware-specific/usb-automount.nix b/hardware-specific/usb-automount.nix index dd8d185..fa6d0d1 100644 --- a/hardware-specific/usb-automount.nix +++ b/hardware-specific/usb-automount.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ ... }: { services = { devmon.enable = true; diff --git a/machine-confs/dhcp2.nix b/machine-confs/dhcp2.nix deleted file mode 100644 index 8257b39..0000000 --- a/machine-confs/dhcp2.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ config, pkgs, ... }: -{ - networking.hostName = pkgs.lib.mkForce "dhcp2"; - - imports = [ - ../base.nix - ./dhcp1.nix - ]; -} diff --git a/machine-confs/generic.nix b/machine-confs/generic.nix index a15923f..32e9ec8 100644 --- a/machine-confs/generic.nix +++ b/machine-confs/generic.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ pkgs, ... }: { networking.hostName = "nixos"; diff --git a/machine-confs/helium.nix b/machine-confs/helium.nix index 9966dab..ce245fc 100644 --- a/machine-confs/helium.nix +++ b/machine-confs/helium.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ pkgs, ... }: { networking = { hostName = "helium"; diff --git a/machine-confs/lithium.nix b/machine-confs/lithium.nix index 0e637f5..0465388 100644 --- a/machine-confs/lithium.nix +++ b/machine-confs/lithium.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ pkgs, ... }: { networking = { hostName = "lithium"; diff --git a/machine-confs/nat64.nix b/machine-confs/nat64.nix index 6d0183c..b68b8e8 100644 --- a/machine-confs/nat64.nix +++ b/machine-confs/nat64.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ ... }: { networking.hostName = "nat64"; diff --git a/machine-confs/nextcloud.nix b/machine-confs/nextcloud.nix index 559b559..39c3fcc 100644 --- a/machine-confs/nextcloud.nix +++ b/machine-confs/nextcloud.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ ... }: { networking.hostName = "nextcloud"; diff --git a/machine-confs/ntfy.nix b/machine-confs/ntfy.nix index 2c90de9..238f1c0 100644 --- a/machine-confs/ntfy.nix +++ b/machine-confs/ntfy.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ pkgs, ... }: { networking.hostName = "ntfy"; diff --git a/machine-confs/syncthing.nix b/machine-confs/syncthing.nix index a582cba..e54391d 100644 --- a/machine-confs/syncthing.nix +++ b/machine-confs/syncthing.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ pkgs, ... }: { networking.hostName = "syncthing"; diff --git a/machine-confs/vaultwarden.nix b/machine-confs/vaultwarden.nix index 2095634..3371c84 100644 --- a/machine-confs/vaultwarden.nix +++ b/machine-confs/vaultwarden.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ ... }: { networking.hostName = "vaultwarden"; diff --git a/machine-confs/wg-rpi.nix b/machine-confs/wg-rpi.nix index 8eebbf6..e3e368e 100644 --- a/machine-confs/wg-rpi.nix +++ b/machine-confs/wg-rpi.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ pkgs, ... }: let # SSID = "ENTER_SSID"; # SSIDpassword = "ENTER_PASSWORD"; diff --git a/misc/custom-gnome-iso.nix b/misc/custom-gnome-iso.nix index 2aeba13..d76c90b 100644 --- a/misc/custom-gnome-iso.nix +++ b/misc/custom-gnome-iso.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ ... }: { imports = [ diff --git a/misc/custom-iso-base.nix b/misc/custom-iso-base.nix index 0a51f14..5375882 100644 --- a/misc/custom-iso-base.nix +++ b/misc/custom-iso-base.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ pkgs, ... }: let create-partitions = pkgs.writeScriptBin "create-partitions" '' if [[ $# -ne 3 ]] diff --git a/misc/custom-minimal-iso.nix b/misc/custom-minimal-iso.nix index b7eb0c5..14508c5 100644 --- a/misc/custom-minimal-iso.nix +++ b/misc/custom-minimal-iso.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ pkgs, ... }: { imports = [ diff --git a/misc/custom-plasma-iso.nix b/misc/custom-plasma-iso.nix index a0acf68..19666e7 100644 --- a/misc/custom-plasma-iso.nix +++ b/misc/custom-plasma-iso.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ ... }: { imports = [ diff --git a/misc/template-configuration.nix b/misc/template-configuration.nix index 0661fe8..eb022b1 100644 --- a/misc/template-configuration.nix +++ b/misc/template-configuration.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ ... }: let host = "generic"; stateVersion = "24.11"; diff --git a/program-config-files/alacritty.nix b/program-config-files/alacritty.nix index c3af686..68e92e2 100644 --- a/program-config-files/alacritty.nix +++ b/program-config-files/alacritty.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ pkgs, ... }: pkgs.writeText "alacritty-conf" '' [font] size = 13 diff --git a/program-config-files/firefox.nix b/program-config-files/firefox.nix index e4593dd..f2813ae 100644 --- a/program-config-files/firefox.nix +++ b/program-config-files/firefox.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ ... }: let lock-false = { Value = false; diff --git a/services/nat64.nix b/services/nat64.nix index 4a5c5d5..c720949 100644 --- a/services/nat64.nix +++ b/services/nat64.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ ... }: { networking.jool = { enable = true; diff --git a/services/redshift.nix b/services/redshift.nix index 2110d12..2d4a392 100644 --- a/services/redshift.nix +++ b/services/redshift.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, ... }: { assertions = [ { diff --git a/services/vaultwarden.nix b/services/vaultwarden.nix index c762139..de116fd 100644 --- a/services/vaultwarden.nix +++ b/services/vaultwarden.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ ... }: { networking.firewall.allowedTCPPorts = [ 80 diff --git a/users/vili.nix b/users/vili.nix index 0288694..e336e89 100644 --- a/users/vili.nix +++ b/users/vili.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, ... }: { users.users.vili = { isNormalUser = true;