summaryrefslogtreecommitdiff
path: root/hosts/akashi
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/akashi')
-rw-r--r--hosts/akashi/default.nix20
-rw-r--r--hosts/akashi/hardware-configuration.nix80
2 files changed, 100 insertions, 0 deletions
diff --git a/hosts/akashi/default.nix b/hosts/akashi/default.nix
new file mode 100644
index 0000000..caa1543
--- /dev/null
+++ b/hosts/akashi/default.nix
@@ -0,0 +1,20 @@
+{
+ self,
+ ...
+}:
+{
+ imports = [
+ ./hardware-configuration.nix
+ "${self}/modules/core"
+ "${self}/modules/laptop"
+ "${self}/modules/options"
+ "${self}/modules/pc"
+ ];
+
+ config = {
+ modules.nix.extend = false;
+ system.stateVersion = "24.05";
+ networking.hostName = "akashi";
+ services.openssh.settings.PermitRootLogin = "yes";
+ };
+}
diff --git a/hosts/akashi/hardware-configuration.nix b/hosts/akashi/hardware-configuration.nix
new file mode 100644
index 0000000..a264937
--- /dev/null
+++ b/hosts/akashi/hardware-configuration.nix
@@ -0,0 +1,80 @@
+{
+ config,
+ lib,
+ modulesPath,
+ ...
+}:
+let
+ nixosDevice = "/dev/disk/by-uuid/78655110-4037-4b06-9407-f155c595c3a3";
+
+ btrfsOptions = [
+ "compress-force=zstd:1"
+ "noatime"
+ "discard=async"
+ "space_cache=v2"
+ ];
+in
+{
+ imports = [
+ (modulesPath + "/installer/scan/not-detected.nix")
+ ];
+
+ swapDevices = [ ];
+ networking.useDHCP = lib.mkDefault true;
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+
+ boot = {
+ kernelModules = [ "kvm-amd" ];
+ extraModulePackages = [ ];
+
+ initrd = {
+ kernelModules = [ ];
+
+ availableKernelModules = [
+ "nvme"
+ "xhci_pci"
+ "ahci"
+ "usb_storage"
+ "sd_mod"
+ "rtsx_usb_sdmmc"
+ ];
+ };
+ };
+
+ fileSystems = {
+ "/" = {
+ device = nixosDevice;
+ fsType = "btrfs";
+ options = btrfsOptions ++ [ "subvol=@" ];
+ };
+
+ "/home" = {
+ device = nixosDevice;
+ fsType = "btrfs";
+ options = btrfsOptions ++ [ "subvol=@home" ];
+ };
+
+ "/var" = {
+ device = nixosDevice;
+ fsType = "btrfs";
+ options = btrfsOptions ++ [ "subvol=@var" ];
+ };
+
+ "/nix" = {
+ device = nixosDevice;
+ fsType = "btrfs";
+ options = btrfsOptions ++ [ "subvol=@nix" ];
+ };
+
+ "/boot" = {
+ device = "/dev/disk/by-uuid/5B1D-BD89";
+ fsType = "vfat";
+
+ options = [
+ "fmask=0022"
+ "dmask=0022"
+ ];
+ };
+ };
+}