diff --git a/sites/tulip/configuration.nix b/sites/tulip/configuration.nix new file mode 100644 index 0000000..fe2b3dd --- /dev/null +++ b/sites/tulip/configuration.nix @@ -0,0 +1,20 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ ./hardware-configuration.nix ]; + + boot.initrd.supportedFilesystems = [ "zfs" ]; + boot.initrd.systemd.enable = true; + services.zfs.autoScrub.enable = true; + services.zfs.trim.enable = true; + + networking.hostName = "tulip"; + networking.hostId = "3c342abd"; + + system.stateVersion = "24.11"; + + security.sudo.wheelNeedsPassword = false; + + networking.firewall.allowedTCPPorts = [ 22 80 443 1337 1338 ]; + networking.firewall.allowedUDPPorts = [ 1337 1338 ]; +} diff --git a/sites/tulip/hardware-configuration.nix b/sites/tulip/hardware-configuration.nix new file mode 100644 index 0000000..abf24db --- /dev/null +++ b/sites/tulip/hardware-configuration.nix @@ -0,0 +1,52 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ "virtio_scsi" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "system/root"; + fsType = "zfs"; + }; + + fileSystems."/var" = + { device = "system/var"; + fsType = "zfs"; + }; + + fileSystems."/nix" = + { device = "system/nix"; + fsType = "zfs"; + }; + + fileSystems."/home" = + { device = "system/home"; + fsType = "zfs"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/7798-9D4F"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # 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.eth0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; +} diff --git a/sites/tulip/system b/sites/tulip/system new file mode 100644 index 0000000..291c395 --- /dev/null +++ b/sites/tulip/system @@ -0,0 +1 @@ +nixos