diff options
Diffstat (limited to 'machines')
| -rw-r--r-- | machines/ettves/default.nix | 111 | ||||
| -rw-r--r-- | machines/ettves/fs.nix | 17 | ||||
| -rw-r--r-- | machines/nixos-test.nix | 5 | ||||
| -rw-r--r-- | machines/nixos-test/default.nix | 16 | ||||
| -rw-r--r-- | machines/nixos-test/hardware-configuration.nix | 9 | ||||
| -rw-r--r-- | machines/phaenn/default.nix | 47 | ||||
| -rw-r--r-- | machines/phaenn/fs.nix | 29 |
7 files changed, 234 insertions, 0 deletions
diff --git a/machines/ettves/default.nix b/machines/ettves/default.nix new file mode 100644 index 0000000..b02155d --- /dev/null +++ b/machines/ettves/default.nix @@ -0,0 +1,111 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ ./fs.nix ]; + + boot.initrd.availableKernelModules = [ "ahci" "nvme" ]; + boot.kernelModules = [ "kvm-amd" ]; + + boot.loader.grub = { + mirroredBoots = [ + { + devices = [ "/dev/nvme0n1" ]; + path = "/boot"; + } + { + devices = [ "/dev/nvme1n1" ]; + path = "/boot2"; + } + ]; + }; + + networking = { + domain = "vapor.systems"; + hostId = "14e28906"; + dhcpcd.enable = false; + usePredictableInterfaceNames = false; + enableIPv6 = true; + interfaces.eth0.ipv4.addresses = [ + { + address = "195.201.245.25"; + prefixLength = 26; + } + { + address = "178.63.224.8"; + prefixLength = 29; + } + { + address = "178.63.224.9"; + prefixLength = 29; + } + { + address = "178.63.224.10"; + prefixLength = 29; + } + { + address = "178.63.224.11"; + prefixLength = 29; + } + { + address = "178.63.224.12"; + prefixLength = 29; + } + { + address = "178.63.224.13"; + prefixLength = 29; + } + { + address = "178.63.224.14"; + prefixLength = 29; + } + { + address = "178.63.224.15"; + prefixLength = 29; + } + ]; + interfaces.eth0.ipv6.addresses = [ + { + address = "2a01:4f8:231:56a::1"; + prefixLength = 64; + } + { + address = "2a01:4f8:231:56a::8"; + prefixLength = 64; + } + { + address = "2a01:4f8:231:56a::9"; + prefixLength = 64; + } + { + address = "2a01:4f8:231:56a::10"; + prefixLength = 64; + } + { + address = "2a01:4f8:231:56a::11"; + prefixLength = 64; + } + { + address = "2a01:4f8:231:56a::12"; + prefixLength = 64; + } + { + address = "2a01:4f8:231:56a::13"; + prefixLength = 64; + } + { + address = "2a01:4f8:231:56a::14"; + prefixLength = 64; + } + { + address = "2a01:4f8:231:56a::15"; + prefixLength = 64; + } + ]; + defaultGateway = "195.201.245.1"; + defaultGateway6 = { + address = "fe80::1"; + interface = "eth0"; + }; + nameservers = [ "1.1.1.1" "8.8.8.8" ]; + }; +} diff --git a/machines/ettves/fs.nix b/machines/ettves/fs.nix new file mode 100644 index 0000000..ac24573 --- /dev/null +++ b/machines/ettves/fs.nix @@ -0,0 +1,17 @@ +{ config, lib, pkgs, ... }: + +{ + fileSystems = { + "/boot" = { + device = "/dev/disk/by-uuid/4BF2-2DF8"; + fsType = "vfat"; + options = [ "X-mount.mkdir" ]; + }; + + "/boot2" = { + device = "/dev/disk/by-uuid/4C84-B5F5"; + fsType = "vfat"; + options = [ "X-mount.mkdir" ]; + }; + }; +} diff --git a/machines/nixos-test.nix b/machines/nixos-test.nix new file mode 100644 index 0000000..865d469 --- /dev/null +++ b/machines/nixos-test.nix @@ -0,0 +1,5 @@ +{ config, lib, pkgs, ... }: + +{ + +} diff --git a/machines/nixos-test/default.nix b/machines/nixos-test/default.nix new file mode 100644 index 0000000..6a83e9a --- /dev/null +++ b/machines/nixos-test/default.nix @@ -0,0 +1,16 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ./hardware-configuration.nix + ]; + + boot.cleanTmpDir = true; + zramSwap.enable = true; + networking.hostName = "default"; + networking.domain = ""; + services.openssh.enable = true; + users.users.root.openssh.authorizedKeys.keys = [ + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO2eIUtbt7RM75ThjKfUjm24QkzkzCSj7hs+GLaaxMeH cardno:12_767_512'' + ]; +} diff --git a/machines/nixos-test/hardware-configuration.nix b/machines/nixos-test/hardware-configuration.nix new file mode 100644 index 0000000..850f51f --- /dev/null +++ b/machines/nixos-test/hardware-configuration.nix @@ -0,0 +1,9 @@ +{ modulesPath, ... }: +{ + imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; + boot.loader.grub.device = "/dev/sda"; + boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ]; + boot.initrd.kernelModules = [ "nvme" ]; + fileSystems."/" = { device = "/dev/sda2"; fsType = "ext4"; }; + +} diff --git a/machines/phaenn/default.nix b/machines/phaenn/default.nix new file mode 100644 index 0000000..8fbbfab --- /dev/null +++ b/machines/phaenn/default.nix @@ -0,0 +1,47 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ./fs.nix + ]; + + boot.initrd.availableKernelModules = [ "ahci" "nvme" ]; + boot.initrd.kernelModules = [ "zfs" ]; + boot.kernelModules = [ "kvm-amd" "zfs" ]; + boot.extraModulePackages = [ ]; + + boot.loader.grub = { + zfsSupport = true; + mirroredBoots = [ + { devices = [ "/dev/sdd" ]; path = "/boot"; } + { devices = [ "/dev/sdc" ]; path = "/boot2"; } + { devices = [ "/dev/sda" ]; path = "/boot3"; } + { devices = [ "/dev/sdb" ]; path = "/boot4"; } + ]; + }; + + networking = { + domain = "vapor.systems"; + hostId = "f9274217"; + dhcpcd.enable = false; + usePredictableInterfaceNames = false; + enableIPv6 = true; + interfaces.eth0.ipv4.addresses = [{ + address = "142.132.159.202"; + prefixLength = 26; + }]; + interfaces.eth0.ipv6.addresses = [{ + address = "2a01:4f8:261:3a04::1"; + prefixLength = 64; + }]; + defaultGateway = "142.132.159.193"; + defaultGateway6 = { + address = "fe80::1"; + interface = "eth0"; + }; + nameservers = [ "1.1.1.1" "8.8.8.8" ]; + }; + + powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/machines/phaenn/fs.nix b/machines/phaenn/fs.nix new file mode 100644 index 0000000..07b9c2c --- /dev/null +++ b/machines/phaenn/fs.nix @@ -0,0 +1,29 @@ +{ config, lib, pkgs, ... }: + +{ + fileSystems = { + "/boot" = { + device = "/dev/disk/by-uuid/7C4E-4618"; + fsType = "vfat"; + options = [ "X-mount.mkdir" ]; + }; + + "/boot2" = { + device = "/dev/disk/by-uuid/7B70-901B"; + fsType = "vfat"; + options = [ "X-mount.mkdir" ]; + }; + + "/boot3" = { + device = "/dev/disk/by-uuid/7A8E-8568"; + fsType = "vfat"; + options = [ "X-mount.mkdir" ]; + }; + + "/boot4" = { + device = "/dev/disk/by-uuid/7A04-6958"; + fsType = "vfat"; + options = [ "X-mount.mkdir" ]; + }; + }; +} |
