diff options
Diffstat (limited to 'machines')
| -rw-r--r-- | machines/feneri.nix | 5 | ||||
| -rw-r--r-- | machines/iso.nix | 5 | ||||
| -rw-r--r-- | machines/natest.nix | 92 | ||||
| -rw-r--r-- | machines/radon/default.nix | 8 | ||||
| -rw-r--r-- | machines/radon/pxeboot.nix | 52 |
5 files changed, 97 insertions, 65 deletions
diff --git a/machines/feneri.nix b/machines/feneri.nix index a638642..e75738b 100644 --- a/machines/feneri.nix +++ b/machines/feneri.nix @@ -35,7 +35,10 @@ certs."4kb.net" = { dnsProvider = "porkbun"; environmentFile = "/var/secrets/porkbun"; - extraDomainNames = [ "*.4kb.net" "*.web.4kb.net" ]; + extraDomainNames = [ + "*.4kb.net" + "*.web.4kb.net" + ]; group = "nginx"; reloadServices = [ "nginx.service" ]; }; diff --git a/machines/iso.nix b/machines/iso.nix index d3ca992..5550841 100644 --- a/machines/iso.nix +++ b/machines/iso.nix @@ -6,7 +6,10 @@ nixpkgs.hostPlatform.system = "x86_64-linux"; nix.settings = { - experimental-features = [ "nix-command" "flakes" ]; + experimental-features = [ + "nix-command" + "flakes" + ]; }; environment.systemPackages = with pkgs; [ diff --git a/machines/natest.nix b/machines/natest.nix index fa8f1d5..c4937d6 100644 --- a/machines/natest.nix +++ b/machines/natest.nix @@ -1,4 +1,10 @@ -{ config, modulesPath, pkgs, lib, ... }: +{ + config, + modulesPath, + pkgs, + lib, + ... +}: { imports = [ @@ -19,7 +25,11 @@ fileSystems = { "/" = { fsType = "tmpfs"; - options = [ "defaults" "mode=755" "size=2G" ]; + options = [ + "defaults" + "mode=755" + "size=2G" + ]; }; "/boot" = { device = "/dev/disk/by-partlabel/boot"; @@ -43,54 +53,52 @@ let inherit (pkgs.stdenv.hostPlatform) efiArch; in - { - name = "image"; - partitions.esp = { - repartConfig = { - Format = "vfat"; - Label = "boot"; - SizeMinBytes = "256M"; - Type = "esp"; - }; - contents = { - "/EFI/BOOT/BOOT${lib.toUpper efiArch}.EFI".source = - "${pkgs.systemd}/lib/systemd/boot/efi/systemd-boot${efiArch}.efi"; + { + name = "image"; + partitions.esp = { + repartConfig = { + Format = "vfat"; + Label = "boot"; + SizeMinBytes = "256M"; + Type = "esp"; + }; + contents = { + "/EFI/BOOT/BOOT${lib.toUpper efiArch}.EFI".source = + "${pkgs.systemd}/lib/systemd/boot/efi/systemd-boot${efiArch}.efi"; - # "/EFI/Linux/${config.system.boot.loader.ukiFile}".source = - # "${config.system.build.uki}/${config.system.boot.loader.ukiFile}"; + # "/EFI/Linux/${config.system.boot.loader.ukiFile}".source = + # "${config.system.build.uki}/${config.system.boot.loader.ukiFile}"; - "/EFI/nixos/${config.system.boot.loader.kernelFile}.efi".source = - "${config.system.build.kernel}/${config.system.boot.loader.kernelFile}"; + "/EFI/nixos/${config.system.boot.loader.kernelFile}.efi".source = + "${config.system.build.kernel}/${config.system.boot.loader.kernelFile}"; - "/EFI/nixos/${config.system.boot.loader.initrdFile}.efi".source = - "${config.system.build.initialRamdisk}/${config.system.boot.loader.initrdFile}"; + "/EFI/nixos/${config.system.boot.loader.initrdFile}.efi".source = + "${config.system.build.initialRamdisk}/${config.system.boot.loader.initrdFile}"; - "/loader/entries/nixos.conf".source = - pkgs.writeText "default-entry.conf" '' - title Coolio - linux /EFI/nixos/${config.system.boot.loader.kernelFile}.efi - initrd /EFI/nixos/${config.system.boot.loader.initrdFile}.efi - options init=${config.system.build.toplevel}/init root=fstab loglevel=4 - ''; + "/loader/entries/nixos.conf".source = pkgs.writeText "default-entry.conf" '' + title Coolio + linux /EFI/nixos/${config.system.boot.loader.kernelFile}.efi + initrd /EFI/nixos/${config.system.boot.loader.initrdFile}.efi + options init=${config.system.build.toplevel}/init root=fstab loglevel=4 + ''; - "/loader/loader.conf".source = - pkgs.writeText "loader.conf" '' - timeout 5 - console-mode keep - ''; - }; + "/loader/loader.conf".source = pkgs.writeText "loader.conf" '' + timeout 5 + console-mode keep + ''; }; - partitions.nix-store = { - storePaths = [ config.system.build.toplevel ]; - nixStorePrefix = "/"; - repartConfig = { - Format = "ext4"; - Label = "nix-store"; - SizeMinBytes = "4G"; - Type = "linux-generic"; - }; + }; + partitions.nix-store = { + storePaths = [ config.system.build.toplevel ]; + nixStorePrefix = "/"; + repartConfig = { + Format = "ext4"; + Label = "nix-store"; + SizeMinBytes = "4G"; + Type = "linux-generic"; }; }; + }; boot.loader.systemd-boot = { enable = true; diff --git a/machines/radon/default.nix b/machines/radon/default.nix index c77db03..f3e4ff0 100644 --- a/machines/radon/default.nix +++ b/machines/radon/default.nix @@ -1,4 +1,10 @@ -{ inputs, flake, pkgs, config, ... }: +{ + inputs, + flake, + pkgs, + config, + ... +}: let interfaces = { bottom = "enp1s0"; diff --git a/machines/radon/pxeboot.nix b/machines/radon/pxeboot.nix index 4655990..0b5df13 100644 --- a/machines/radon/pxeboot.nix +++ b/machines/radon/pxeboot.nix @@ -3,30 +3,42 @@ let installer = lib.nixosSystem { system = "x86_64-linux"; modules = [ - ({ config, pkgs, lib, modulesPath, ... }: { - imports = [ - (modulesPath + "/installer/netboot/netboot-minimal.nix") - (modulesPath + "/installer/cd-dvd/channel.nix") - ]; + ( + { + config, + pkgs, + lib, + modulesPath, + ... + }: + { + imports = [ + (modulesPath + "/installer/netboot/netboot-minimal.nix") + (modulesPath + "/installer/cd-dvd/channel.nix") + ]; - services.openssh = { - enable = true; - openFirewall = true; - settings = { - PasswordAuthentication = false; - KbdInteractiveAuthentication = false; + services.openssh = { + enable = true; + openFirewall = true; + settings = { + PasswordAuthentication = false; + KbdInteractiveAuthentication = false; + }; }; - }; - nix.settings = { - experimental-features = [ "nix-command" "flakes" ]; - }; + nix.settings = { + experimental-features = [ + "nix-command" + "flakes" + ]; + }; - users.users.root.openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP7T2uWJFUu8aFZZgQusGKyEMocb2pKbHLDad2eIJus9" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEOw8YEbHsKy38JHp9W1wcxxZgWCDgnabOXccZUN5ddd" - ]; - }) + users.users.root.openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP7T2uWJFUu8aFZZgQusGKyEMocb2pKbHLDad2eIJus9" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEOw8YEbHsKy38JHp9W1wcxxZgWCDgnabOXccZUN5ddd" + ]; + } + ) ]; }; |
