diff --git a/flake.nix b/flake.nix index c92ef41..5021819 100644 --- a/flake.nix +++ b/flake.nix @@ -133,6 +133,8 @@ faf = buildSys "x86_64-linux" stable [ ] "faf"; hass = buildSys "x86_64-linux" stable [ "${nixos-hardware}/common/cpu/intel" ] "hass"; + luna = buildSys "x86_64-linux" stable + [ "${nixos-hardware}/common/cpu/intel" ] "luna"; h = buildSys "x86_64-linux" unstableSmall [ ] "h"; stan = buildSys "x86_64-linux" unstable [ nixos-hardware.nixosModules.framework ] "stan"; diff --git a/hosts/luna/alias b/hosts/luna/alias new file mode 100644 index 0000000..22e6c7d --- /dev/null +++ b/hosts/luna/alias @@ -0,0 +1 @@ +10.6.0.114 diff --git a/hosts/luna/default.nix b/hosts/luna/default.nix new file mode 100644 index 0000000..ab8f9fa --- /dev/null +++ b/hosts/luna/default.nix @@ -0,0 +1,41 @@ +{ config, pkgs, ... }: +let + pubKeys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIPMaAm4rDxyU975Z54YiNw3itC2fGc3SaE2VaS1fai8 root@box" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILnaC1v+VoVNnK04D32H+euiCyWPXU8nX6w+4UoFfjA3 qbit@plq" + ]; + userBase = { openssh.authorizedKeys.keys = pubKeys; }; +in { + _module.args.isUnstable = false; + imports = + [ + ./hardware-configuration.nix + ]; + + boot.loader.grub.enable = true; + boot.loader.grub.device = "/dev/sdb"; + boot.loader.grub.useOSProber = true; + + # The moon based shipyard + networking.hostName = "luna"; + + networking.networkmanager.enable = true; + networking.firewall.allowedTCPPorts = [ 22 ]; + + environment.systemPackages = with pkgs; [ + ]; + + users.users.root = userBase; + users.users.qbit = userBase; + + services = { + fwupd = { + enable = true; + enableTestRemote = true; + }; + }; + + preDNS.enable = true; + + system.stateVersion = "22.05"; +} diff --git a/hosts/luna/hardware-configuration.nix b/hosts/luna/hardware-configuration.nix new file mode 100644 index 0000000..2cdb25c --- /dev/null +++ b/hosts/luna/hardware-configuration.nix @@ -0,0 +1,33 @@ +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ata_piix" "megaraid_sas" "usb_storage" "usbhid" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/caa1051c-f7c3-4809-9a63-b3908de9c27c"; + fsType = "ext4"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/53f8fb0f-1fd8-4785-9278-343b525a23be"; } + ]; + + # 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.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.eno2.useDHCP = lib.mkDefault true; + # networking.interfaces.eno3.useDHCP = lib.mkDefault true; + # networking.interfaces.eno4.useDHCP = lib.mkDefault true; + + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}