From 00ab80d1b82e59554e8a1d6e2d4d926a3858a1fd Mon Sep 17 00:00:00 2001 From: Jimbo Date: Tue, 15 Oct 2024 22:41:19 -0400 Subject: [PATCH] Move the public keys out of secrets --- flake.nix | 3 +- hosts/cyberspark/id_ed25519.pub | 1 + hosts/cyberspark/system/default.nix | 3 ++ hosts/firefly/home/default.nix | 4 +- hosts/firefly/id_ed25519.pub | 1 + hosts/firefly/system/default.nix | 7 +++- hosts/firefly/system/hardware/default.nix | 2 +- hosts/shuttleworth/id_ed25519.pub | 1 + .../system/accounts/users/jimbo/default.nix | 8 +++- .../system/desktop/sway/greetd/default.nix | 36 +++++++++--------- .../system/devices/video/nvidia/default.nix | 2 +- .../services/server/minecraft/default.nix | 2 - overlays/default.nix | 3 +- variables/secrets/default.nix | Bin 2829 -> 2395 bytes 14 files changed, 45 insertions(+), 28 deletions(-) create mode 100644 hosts/cyberspark/id_ed25519.pub create mode 100644 hosts/firefly/id_ed25519.pub create mode 100644 hosts/shuttleworth/id_ed25519.pub diff --git a/flake.nix b/flake.nix index 9037679..7664fee 100644 --- a/flake.nix +++ b/flake.nix @@ -31,7 +31,7 @@ let mkNixos = modules: nixpkgs.lib.nixosSystem { inherit modules; - specialArgs = { inherit nixpkgs unstable hardware lanzaboote mailserver minecraft; }; + specialArgs = { inherit nixpkgs unstable hardware lanzaboote agenix mailserver minecraft; }; }; mkHome = modules: pkgs: home-manager.lib.homeManagerConfiguration { @@ -51,7 +51,6 @@ "jimbo@firefly" = mkHome [ ./hosts/firefly/home ] nixpkgs.legacyPackages.x86_64-linux; "jimbo@cyberspark" = mkHome [ ./hosts/cyberspark/home ] nixpkgs.legacyPackages.x86_64-linux; "jimbo@shuttleworth" = mkHome [ ./hosts/shuttleworth/home ] nixpkgs.legacyPackages.aarch64-linux; - "jimbo@guest" = mkHome [ ./hosts/guest/home ] nixpkgs.legacyPackages.x86_64-linux; }; }; } diff --git a/hosts/cyberspark/id_ed25519.pub b/hosts/cyberspark/id_ed25519.pub new file mode 100644 index 0000000..1c06662 --- /dev/null +++ b/hosts/cyberspark/id_ed25519.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIKC8Uqxb09V3msBgDv6lD/nETMYr/X0OgtpDo8ldcMK diff --git a/hosts/cyberspark/system/default.nix b/hosts/cyberspark/system/default.nix index d3e5778..30ce1f6 100644 --- a/hosts/cyberspark/system/default.nix +++ b/hosts/cyberspark/system/default.nix @@ -3,6 +3,7 @@ imports = [ ./hardware + # Apps and programs ../../../modules/system ../../../modules/system/accounts ../../../modules/system/devices/filesystems @@ -15,9 +16,11 @@ ../../../modules/system/services/common ../../../modules/system/services/server + # Misc ../../../overlays ../../../variables + # Imports mailserver.nixosModule ]; diff --git a/hosts/firefly/home/default.nix b/hosts/firefly/home/default.nix index e0982e3..ae119d8 100644 --- a/hosts/firefly/home/default.nix +++ b/hosts/firefly/home/default.nix @@ -12,8 +12,10 @@ ../../../modules/home/utils # Misc - nur.nixosModules.nur ../../../overlays ../../../variables + + # Imports + nur.nixosModules.nur ]; } diff --git a/hosts/firefly/id_ed25519.pub b/hosts/firefly/id_ed25519.pub new file mode 100644 index 0000000..e36a85d --- /dev/null +++ b/hosts/firefly/id_ed25519.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC2lMkUd+BbXITE5LTg94hEzmA6UKsIIbaf5YOjGoLzl diff --git a/hosts/firefly/system/default.nix b/hosts/firefly/system/default.nix index 5e601b6..aefb376 100644 --- a/hosts/firefly/system/default.nix +++ b/hosts/firefly/system/default.nix @@ -1,4 +1,4 @@ -{ lanzaboote, ... }: +{ agenix, lanzaboote, ... }: { imports = [ ./hardware @@ -13,11 +13,14 @@ ../../../variables # Devices and hardware - lanzaboote.nixosModules.lanzaboote ../../../modules/system/devices ../../../modules/system/devices/boot/lanzaboote ../../../modules/system/devices/video/nvidia ../../../modules/system/devices/networking/firewall/pc + + # Imports + agenix.nixosModules.default + lanzaboote.nixosModules.lanzaboote ]; networking.hostName = "firefly"; diff --git a/hosts/firefly/system/hardware/default.nix b/hosts/firefly/system/hardware/default.nix index 434c77d..9c3b823 100644 --- a/hosts/firefly/system/hardware/default.nix +++ b/hosts/firefly/system/hardware/default.nix @@ -24,7 +24,7 @@ in { ]; boot = { - kernelPackages = pkgs.unstable.linuxPackages_latest; + kernelPackages = pkgs.unstable.linuxPackages_zen; blacklistedKernelModules = [ "pcspkr" ]; diff --git a/hosts/shuttleworth/id_ed25519.pub b/hosts/shuttleworth/id_ed25519.pub new file mode 100644 index 0000000..3d0e0ec --- /dev/null +++ b/hosts/shuttleworth/id_ed25519.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK+L723mCLy9/9UAXwkY3+06Oq22dOj+lDnA0lMLbrsR diff --git a/modules/system/accounts/users/jimbo/default.nix b/modules/system/accounts/users/jimbo/default.nix index 68e448a..c1f5ae9 100644 --- a/modules/system/accounts/users/jimbo/default.nix +++ b/modules/system/accounts/users/jimbo/default.nix @@ -5,7 +5,13 @@ description = "Jimbo"; hashedPassword = config.secrets.jimboAccPass; isNormalUser = true; - openssh.authorizedKeys.keys = config.secrets.jimKeys; + openssh.authorizedKeys.keys = [ + (builtins.readFile ../../../../../hosts/firefly/id_ed25519.pub) + (builtins.readFile ../../../../../hosts/cyberspark/id_ed25519.pub) + (builtins.readFile ../../../../../hosts/shuttleworth/id_ed25519.pub) + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJahAoF74BY6GCTsFkt1ADKaraFgJJozW1Y1aBTLK0j9 pixel9" + ]; + extraGroups = [ "wheel" "audio" diff --git a/modules/system/desktop/sway/greetd/default.nix b/modules/system/desktop/sway/greetd/default.nix index a1a56e1..85a18a4 100644 --- a/modules/system/desktop/sway/greetd/default.nix +++ b/modules/system/desktop/sway/greetd/default.nix @@ -2,7 +2,24 @@ { services = { # Configure greetd for "auto" login (single user only) - greetd = { + greetd = let + startSway = pkgs.writeScript "startsway" '' + if lspci -k | grep "Kernel driver in use: nvidia" &> /dev/null; then + export LIBVA_DRIVER_NAME=nvidia + export GBM_BACKEND=nvidia-drm + export __GLX_VENDOR_LIBRARY_NAME=nvidia + export WLR_NO_HARDWARE_CURSORS=1 + else + : + fi + + export WLR_RENDERER=vulkan + export XDG_CURRENT_DESKTOP=sway + export QT_QPA_PLATFORM="wayland;xcb" + + sway --unsupported-gpu + ''; + in { enable = true; restart = true; settings = { @@ -11,22 +28,7 @@ switch = true; }; default_session = { - command = '' - if lspci -k | grep "Kernel driver in use: nvidia" &> /dev/null; then - export LIBVA_DRIVER_NAME=nvidia - export GBM_BACKEND=nvidia-drm - export __GLX_VENDOR_LIBRARY_NAME=nvidia - export WLR_NO_HARDWARE_CURSORS=1 - else - : - fi - - export WLR_RENDERER=vulkan - export XDG_CURRENT_DESKTOP=sway - export QT_QPA_PLATFORM="wayland;xcb" - - sway --unsupported-gpu - ''; + command = "${startSway}"; user = "jimbo"; }; }; diff --git a/modules/system/devices/video/nvidia/default.nix b/modules/system/devices/video/nvidia/default.nix index b50af2d..03ceb16 100644 --- a/modules/system/devices/video/nvidia/default.nix +++ b/modules/system/devices/video/nvidia/default.nix @@ -4,7 +4,7 @@ hardware.nvidia = { modesetting.enable = true; nvidiaSettings = false; - package = config.boot.kernelPackages.nvidiaPackages.beta; + package = config.boot.kernelPackages.nvidiaPackages.latest; open = false; }; } diff --git a/modules/system/services/server/minecraft/default.nix b/modules/system/services/server/minecraft/default.nix index fb7912d..6bb2b93 100644 --- a/modules/system/services/server/minecraft/default.nix +++ b/modules/system/services/server/minecraft/default.nix @@ -10,8 +10,6 @@ ./servers/uberbeta ]; - nixpkgs.overlays = [ minecraft.overlay ]; - services.minecraft-servers = { enable = true; eula = true; diff --git a/overlays/default.nix b/overlays/default.nix index 425a195..0b7a7fa 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,8 +1,9 @@ -{ unstable, ... }: +{ unstable, minecraft, ... }: { nixpkgs.overlays = [ (import ./unstable { inherit unstable; }) (final: _prev: import ./packages { pkgs = final; }) (import ./mpv) + minecraft.overlay ]; } diff --git a/variables/secrets/default.nix b/variables/secrets/default.nix index b79ffeba4fc31be796d449f4dcc21e412d0cd58b..38b50a76672facba1208f7fbdf18fa7ebfc8b26d 100644 GIT binary patch literal 2395 zcmV-h38eM_M@dveQdv+`0C1|rkX3eNQWxJ@nN8I#zGKW}up}fuC=GM9S`L^xCeC8lGo3i%9Ex7v_XjbD}!`q(FVqn3#fN%;CS+ zg-Ip^zrZxq>Tryf`z9IiwJ`Z?J<|U&YMM;QExj4Qi!8_zr4V*HAyBvCy};#Z=B_b< zWy`K9kM&U^Vopr7&sY58{W1hTQ%?%@tRNm5qQIz9p2q@3RF;kbW~n}}AG?Sxlgur8 zP52Lf5k@M|fdamOojjaIuDEg=4yenN->`Ox{zi}v44_w*v*2^>99cT#;m&``j0jvR zi~>ZV@sOHBi?Z%u60lAPs7y?S3|zm?npbhIpKM);ydaHd6=afBYV9bq*y30*#Znh( zFo0_Z^fI0)farhT%Dt|7mbjG5_sW{xUjH(=;@T=adAB!_6W+lT{udo>bTsd^z#V0< zd*`vnI=;h;6!`!U+wiv3+6}bww5>QDc~6Xn!>=dJALGREG}n3QG1X|O@Q$obx1J1g z_$cu|f0co`js!$5lOa*k8-ZkGT4DBag%L}GRbWk=F;D5CnC3H-KOW5Fy*!tOakftZ z)K0BW2EtYUlK0q-Vq3$N{Dv*~E$T>7$D5h(Y&Im!VS8o(38XJ$2(&SbnXUnUMb~~f zVr){rIhE3~^}zBqpWW@$Sq*IX$cX>&infJkk*4HrWE7pJUT2N?XE&Mc9?Qa$L6+z| ztWa`CGXGE#R{rOo(|`m0n2%1aMWf6}JGSGrQb)hp(zCUtbWz2K!daaBxyi0+%8<*s z?d&U2#O^9yK1(D0Oonzj7k@g#{&ngp1o1*#K#a|}a9Vvw>poTtE>r)*TvQZWVcw1F z4H=z7nir2o5DXfZD`V|Rfz|OB0h`INQjf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