diff options
| author | Linnea Gräf <nea@nea.moe> | 2024-12-12 23:41:57 +0100 |
|---|---|---|
| committer | Linnea Gräf <nea@nea.moe> | 2024-12-12 23:41:57 +0100 |
| commit | 7b62b079859c9f84a14cc4fb73e7cd8e6bf4ce21 (patch) | |
| tree | a57e4ff654e48f7dfeb5571f0fac49c93ea518a0 /srv | |
| download | nix-infra-7b62b079859c9f84a14cc4fb73e7cd8e6bf4ce21.tar.gz nix-infra-7b62b079859c9f84a14cc4fb73e7cd8e6bf4ce21.tar.bz2 nix-infra-7b62b079859c9f84a14cc4fb73e7cd8e6bf4ce21.zip | |
Init
Diffstat (limited to 'srv')
| -rw-r--r-- | srv/h-alpha/configuration.nix | 35 | ||||
| -rw-r--r-- | srv/h-alpha/disko-config.nix | 37 | ||||
| -rw-r--r-- | srv/h-alpha/hardware-configuration.nix | 27 |
3 files changed, 99 insertions, 0 deletions
diff --git a/srv/h-alpha/configuration.nix b/srv/h-alpha/configuration.nix new file mode 100644 index 0000000..4f9eb44 --- /dev/null +++ b/srv/h-alpha/configuration.nix @@ -0,0 +1,35 @@ +{ + config, + lib, + pkgs, + ... +}: +{ + imports = [ + ./hardware-configuration.nix + ./disko-config.nix + ]; + boot.loader.systemd-boot.enable = true; + # boot.loader.grub.device = "/dev/sda"; + + users.users.nea = { + isNormalUser = true; + extraGroups = [ "wheel" ]; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINg2WYMRKINwbH5UCqqK2qq/qW0gG1NnaALHqEyU4NzM" + ]; + }; + + security.sudo.wheelNeedsPassword = false; + nix.settings.trusted-users = [ "@wheel" ]; + services.openssh = { + enable = true; + settings = { + PermitRootLogin = "no"; + PasswordAuthentication = false; + KbdInteractiveAuthentication = false; + }; + }; + + system.stateVersion = "24.11"; +} diff --git a/srv/h-alpha/disko-config.nix b/srv/h-alpha/disko-config.nix new file mode 100644 index 0000000..d439fcc --- /dev/null +++ b/srv/h-alpha/disko-config.nix @@ -0,0 +1,37 @@ +{ + disko.devices = { + disk = { + main = { + type = "disk"; + device = "/dev/sda"; + content = { + type = "gpt"; + partitions = { + boot = { + size = "1M"; + type = "EF02"; + priority = 1; + }; + ESP = { + size = "512M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + }; + root = { + size = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/srv/h-alpha/hardware-configuration.nix b/srv/h-alpha/hardware-configuration.nix new file mode 100644 index 0000000..1003394 --- /dev/null +++ b/srv/h-alpha/hardware-configuration.nix @@ -0,0 +1,27 @@ +{ + config, + lib, + pkgs, + modulesPath, + ... +}: + +{ + imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; + boot.initrd.availableKernelModules = [ + "ahci" + "xhci_pci" + "virtio_pci" + "virtio_scsi" + "sd_mod" + "sr_mod" + "virtio_gpu" + "ext4" + ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + swapDevices = [ ]; + networking.useDHCP = lib.mkDefault true; + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; +} |
