diff --git a/hosts/tachibana/default.nix b/hosts/tachibana/default.nix new file mode 100644 index 0000000..bf69da5 --- /dev/null +++ b/hosts/tachibana/default.nix @@ -0,0 +1,15 @@ +{inputs, ...}: { + imports = [ + ../../system + ./hardware-configuration.nix + ./disk.nix + inputs.disko.nixosModules.disko + ]; + + networking.hostName = "tachibana"; + time.timeZone = "America/Chicago"; + users.users.ahnwuoa = { + isNormalUser = true; + extraGroups = ["wheel"]; + }; +} diff --git a/hosts/tachibana/disk.nix b/hosts/tachibana/disk.nix new file mode 100644 index 0000000..295e6c3 --- /dev/null +++ b/hosts/tachibana/disk.nix @@ -0,0 +1,52 @@ +{pkgs, ...}: { + disko.devices.disk = { + main = { + device = "/dev/disk/by-id/nvme-Samsung_SSD_9100_PRO_4TB_S7YANJ0Y613585N"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + ESP = { + type = "EF00"; + size = "1G"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + }; + swap = { + size = "32G"; + content = { + type = "swap"; + discardPolicy = "both"; + resumeDevice = true; + }; + }; + root = { + size = "2T"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + home = { + size = "100%"; + content = { + type = "luks"; + name = "home"; + settings.allowDiscards = true; + passwordFile = "/tmp/secret.key"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/home"; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/hosts/tachibana/hardware-configuration.nix b/hosts/tachibana/hardware-configuration.nix new file mode 100644 index 0000000..f6666c7 --- /dev/null +++ b/hosts/tachibana/hardware-configuration.nix @@ -0,0 +1,26 @@ +# 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 + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "thunderbolt" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + # 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.enp13s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp12s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/tachibana/users/ahnwuoa/default.nix b/hosts/tachibana/users/ahnwuoa/default.nix new file mode 100644 index 0000000..d182891 --- /dev/null +++ b/hosts/tachibana/users/ahnwuoa/default.nix @@ -0,0 +1,7 @@ +{...}: { + imports = [ + ../../../../user + ]; + + home.username = "ahnwuoa"; +}