From 4983d51640d621a793ba99cb146733002674fc1b Mon Sep 17 00:00:00 2001 From: Dustin Lyons Date: Fri, 20 Sep 2024 15:46:32 -0400 Subject: [PATCH] Fix lint errors --- hosts/darwin/default.nix | 10 +++++---- hosts/nixos/default.nix | 11 +++++----- .../hosts/darwin/default.nix | 9 ++++---- .../hosts/nixos/default.nix | 13 ++++++------ templates/starter/hosts/darwin/default.nix | 21 +++++++------------ templates/starter/hosts/nixos/default.nix | 10 +++++---- 6 files changed, 37 insertions(+), 37 deletions(-) diff --git a/hosts/darwin/default.nix b/hosts/darwin/default.nix index de3d791d..1eff3ce0 100644 --- a/hosts/darwin/default.nix +++ b/hosts/darwin/default.nix @@ -18,10 +18,12 @@ let user = "dustin"; in package = pkgs.nix; configureBuildUsers = true; - settings.trusted-users = [ "@admin" "${user}" ]; - settings.substituters = [ "https://nix-community.cachix.org" "https://cache.nixos.org" ]; - settings.trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ]; - + settings = { + trusted-users = [ "@admin" "${user}" ]; + substituters = [ "https://nix-community.cachix.org" "https://cache.nixos.org" ]; + trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ]; + }; + gc = { user = "root"; automatic = true; diff --git a/hosts/nixos/default.nix b/hosts/nixos/default.nix index ce443be6..f0185dc7 100644 --- a/hosts/nixos/default.nix +++ b/hosts/nixos/default.nix @@ -39,11 +39,12 @@ let user = "dustin"; # Turn on flag for proprietary software nix = { nixPath = [ "nixos-config=/home/${user}/.local/share/src/nixos-config:/etc/nixos" ]; - settings.allowed-users = [ "${user}" ]; - settings.trusted-users = [ "@admin" "${user}" ]; - settings.substituters = [ "https://nix-community.cachix.org" "https://cache.nixos.org" ]; - settings.trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ]; - + settings = { + allowed-users = [ "${user}" ]; + trusted-users = [ "@admin" "${user}" ]; + substituters = [ "https://nix-community.cachix.org" "https://cache.nixos.org" ]; + trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ]; + }; package = pkgs.nix; extraOptions = '' experimental-features = nix-command flakes diff --git a/templates/starter-with-secrets/hosts/darwin/default.nix b/templates/starter-with-secrets/hosts/darwin/default.nix index 0908b8b3..6c9ecfce 100644 --- a/templates/starter-with-secrets/hosts/darwin/default.nix +++ b/templates/starter-with-secrets/hosts/darwin/default.nix @@ -17,9 +17,11 @@ let user = "%USER%"; in # Setup user, packages, programs nix = { package = pkgs.nix; - settings.trusted-users = [ "@admin" "${user}" ]; - settings.substituters = [ "https://nix-community.cachix.org" "https://cache.nixos.org" ]; - settings.trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ]; + settings = { + trusted-users = [ "@admin" "${user}" ]; + substituters = [ "https://nix-community.cachix.org" "https://cache.nixos.org" ]; + trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ]; + }; gc = { user = "root"; @@ -28,7 +30,6 @@ let user = "%USER%"; in options = "--delete-older-than 30d"; }; - # Turn this on to make command line easier extraOptions = '' experimental-features = nix-command flakes ''; diff --git a/templates/starter-with-secrets/hosts/nixos/default.nix b/templates/starter-with-secrets/hosts/nixos/default.nix index 2bb58bb5..1f8102a0 100644 --- a/templates/starter-with-secrets/hosts/nixos/default.nix +++ b/templates/starter-with-secrets/hosts/nixos/default.nix @@ -38,19 +38,20 @@ let user = "%USER%"; interfaces."%INTERFACE%".useDHCP = true; }; - # Turn on flag for proprietary software nix = { nixPath = [ "nixos-config=/home/${user}/.local/share/src/nixos-config:/etc/nixos" ]; - settings.allowed-users = [ "${user}" ]; - settings.trusted-users = [ "@admin" "${user}" ]; - settings.substituters = [ "https://nix-community.cachix.org" "https://cache.nixos.org" ]; - settings.trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ]; + settings = { + allowed-users = [ "${user}" ]; + trusted-users = [ "@admin" "${user}" ]; + substituters = [ "https://nix-community.cachix.org" "https://cache.nixos.org" ]; + trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ]; + }; package = pkgs.nix; extraOptions = '' experimental-features = nix-command flakes ''; - }; + }; # Manages keys and such programs = { diff --git a/templates/starter/hosts/darwin/default.nix b/templates/starter/hosts/darwin/default.nix index 4bd518f1..531595e2 100644 --- a/templates/starter/hosts/darwin/default.nix +++ b/templates/starter/hosts/darwin/default.nix @@ -3,21 +3,20 @@ let user = "%USER%"; in { - imports = [ ../../modules/darwin/home-manager.nix ../../modules/shared ]; - # Auto upgrade nix package and the daemon service. services.nix-daemon.enable = true; - # Setup user, packages, programs nix = { package = pkgs.nix; - settings.trusted-users = [ "@admin" "${user}" ]; - settings.substituters = [ "https://nix-community.cachix.org" "https://cache.nixos.org" ]; - settings.trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ]; + settings = { + trusted-users = [ "@admin" "${user}" ]; + substituters = [ "https://nix-community.cachix.org" "https://cache.nixos.org" ]; + trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ]; + }; gc = { user = "root"; @@ -26,16 +25,13 @@ let user = "%USER%"; in options = "--delete-older-than 30d"; }; - # Turn this on to make command line easier extraOptions = '' experimental-features = nix-command flakes ''; }; - # Turn off NIX_PATH warnings now that we're using flakes system.checks.verifyNixPath = false; - # Load configuration that is shared across systems environment.systemPackages = with pkgs; [ emacs-unstable ] ++ (import ../../modules/shared/packages.nix { inherit pkgs; }); @@ -60,11 +56,8 @@ let user = "%USER%"; in AppleShowAllExtensions = true; ApplePressAndHoldEnabled = false; - # 120, 90, 60, 30, 12, 6, 2 - KeyRepeat = 2; - - # 120, 94, 68, 35, 25, 15 - InitialKeyRepeat = 15; + KeyRepeat = 2; # Values: 120, 90, 60, 30, 12, 6, 2 + InitialKeyRepeat = 15; # Values: 120, 94, 68, 35, 25, 15 "com.apple.mouse.tapBehavior" = 1; "com.apple.sound.beep.volume" = 0.0; diff --git a/templates/starter/hosts/nixos/default.nix b/templates/starter/hosts/nixos/default.nix index 8f92ab4a..3283930f 100644 --- a/templates/starter/hosts/nixos/default.nix +++ b/templates/starter/hosts/nixos/default.nix @@ -39,10 +39,12 @@ let user = "%USER%"; # Turn on flag for proprietary software nix = { nixPath = [ "nixos-config=/home/${user}/.local/share/src/nixos-config:/etc/nixos" ]; - settings.allowed-users = [ "${user}" ]; - settings.trusted-users = [ "@admin" "${user}" ]; - settings.substituters = [ "https://nix-community.cachix.org" "https://cache.nixos.org" ]; - settings.trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ]; + settings = { + allowed-users = [ "${user}" ]; + trusted-users = [ "@admin" "${user}" ]; + substituters = [ "https://nix-community.cachix.org" "https://cache.nixos.org" ]; + trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ]; + }; package = pkgs.nix; extraOptions = ''