From dec37af817a090fde09f8c3e9109166bcc72f75d Mon Sep 17 00:00:00 2001 From: Sky Hearn Date: Wed, 6 Mar 2024 21:33:52 +0000 Subject: [PATCH] Move arion to 23.11 version, fix docker-compose syntax errors, use openssh.authorizedKeys instead of home-manager files for my openssh key --- configuration.nix | 11 ++++++----- flake.lock | 0 hardware-configuration.nix | 23 +++++++++++++---------- services/gitea.nix | 0 users/sky.nix | 20 +++++++++++++------- users/users.nix | 3 ++- 6 files changed, 34 insertions(+), 23 deletions(-) mode change 100644 => 100755 flake.lock mode change 100644 => 100755 services/gitea.nix diff --git a/configuration.nix b/configuration.nix index d8f8fd1..4c33614 100644 --- a/configuration.nix +++ b/configuration.nix @@ -96,7 +96,7 @@ environment.systemPackages = [ pkgs.wget pkgs.vim - + pkgs.arion # Do install the docker CLI to talk to podman. # Not needed when virtualisation.docker.enable = true; @@ -122,10 +122,11 @@ services.openssh = { enable = true; settings = { - # Forbid root login through SSH. - PermitRootLogin = "no"; - # key authentication - PasswordAuthentication = false; + # Forbid root login through SSH. + PermitRootLogin = "no"; + # key authentication + PasswordAuthentication = false; + KbdInteractiveAuthentication = false; }; }; diff --git a/flake.lock b/flake.lock old mode 100644 new mode 100755 diff --git a/hardware-configuration.nix b/hardware-configuration.nix index fd8be59..ced01de 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -8,19 +8,19 @@ [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "megaraid_sas" "usb_storage" "usbhid" "sd_mod" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; + boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/4318-37A8"; - fsType = "vfat"; + fileSystems."/" = + { device = "/dev/disk/by-uuid/88bc4e4c-a29d-4e5a-9ed2-8f991c2148a2"; + fsType = "btrfs"; }; - fileSystems."/" = - { device = "/dev/disk/by-uuid/0040c110-03d5-4157-89b4-09637d80eb44"; - fsType = "btrfs"; + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/4791-0457"; + fsType = "vfat"; }; swapDevices = [ ]; @@ -30,8 +30,11 @@ # still possible to use this option, but it's recommended to use it in conjunction # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true; + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.eno2.useDHCP = lib.mkDefault true; + # networking.interfaces.eno3.useDHCP = lib.mkDefault true; + # networking.interfaces.eno4.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/services/gitea.nix b/services/gitea.nix old mode 100644 new mode 100755 diff --git a/users/sky.nix b/users/sky.nix index 163b2fa..62b8e57 100644 --- a/users/sky.nix +++ b/users/sky.nix @@ -4,14 +4,20 @@ home.homeDirectory = pkgs.lib.mkForce "/home/sky"; # use force here since vm trys to set it to /var/empty home.packages = [ pkgs.neovim ]; - programs.bash.enable = true; - home.file.".ssh/authorized_keys" = { - text = - '' - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHTT5oIuXAkJvNzsHQ/RP2OOWb7R7zMjhU0ZmZCStlOX sky@sky-laptop - ''; - }; + + programs.bash = { + enable = true; + shellAliases = { + nv = "nvim"; + } + } + programs.git = { + enable = true; + userName = "Sky Hearn"; + userEmail = "sky.hearn@pm.me"; + } + # The state version is required and should stay at the version you # originally installed. home.stateVersion = "23.11"; diff --git a/users/users.nix b/users/users.nix index 0baeae8..329df2a 100644 --- a/users/users.nix +++ b/users/users.nix @@ -12,7 +12,8 @@ users.extraUsers.sky.hashedPassword = ""; users.groups.wheel.members=["sky"]; - + users.users.sky.openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHTT5oIuXAkJvNzsHQ/RP2OOWb7R7zMjhU0ZmZCStlOX"]; + users.groups.podman = {}; users.users.podman.group = "podman"; }