From 19da93f1cca9dc56ed240ec063c59a572b79e51c Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Fri, 8 Sep 2023 16:39:30 +0530 Subject: hosts/kay: init --- common.nix | 2 ++ hosts/kay/configuration.nix | 6 ++++++ hosts/kay/hardware-configuration.nix | 1 + modules/userdata.nix | 8 ++++++++ 4 files changed, 17 insertions(+) diff --git a/common.nix b/common.nix index b57055c..3517182 100644 --- a/common.nix +++ b/common.nix @@ -3,6 +3,7 @@ let user = config.userdata.user; groups = config.userdata.groups; + pubKeys = config.userdata.pubKeys; host = config.networking.hostName; in { @@ -47,6 +48,7 @@ in brightnessctl neofetch ]; + openssh.authorizedKeys.keys = pubKeys; }; # system diff --git a/hosts/kay/configuration.nix b/hosts/kay/configuration.nix index da92a83..11b99d9 100644 --- a/hosts/kay/configuration.nix +++ b/hosts/kay/configuration.nix @@ -6,6 +6,12 @@ ../../common.nix ]; + services.openssh = { + enable = true; + settings = { PasswordAuthentication = false; }; + }; + + boot.consoleLogLevel = 3; networking.hostName = "kay"; environment.systemPackages = with pkgs; [ tmux ]; } diff --git a/hosts/kay/hardware-configuration.nix b/hosts/kay/hardware-configuration.nix index 1583736..3299f3f 100644 --- a/hosts/kay/hardware-configuration.nix +++ b/hosts/kay/hardware-configuration.nix @@ -5,6 +5,7 @@ boot = { kernelModules = [ "kvm-intel" ]; + blacklistedKernelModules = [ "nouveau" ]; initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" diff --git a/modules/userdata.nix b/modules/userdata.nix index 84a8ca1..ffb5847 100644 --- a/modules/userdata.nix +++ b/modules/userdata.nix @@ -19,5 +19,13 @@ in default = "sinanmohd.com"; description = mdDoc "Owner's domain"; }; + pubKeys = mkOption { + type = types.listOf types.str; + description = mdDoc "Owner's public ssh keys"; + default = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDCeMXhkjm9CabbA/1xdtP9bvFEm8pVXPk66NmI9/VvQ sinan@veu" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL8LnyOuPmtKRqAZeHueNN4kfYvpRQVwCivSTq+SZvDU sinan@cez" + ]; + }; }; } -- cgit v1.2.3