diff options
| author | Mark Nipper <nipsy@bitgnome.net> | 2024-11-12 00:03:55 -0800 | 
|---|---|---|
| committer | Mark Nipper <nipsy@bitgnome.net> | 2024-11-12 00:03:55 -0800 | 
| commit | 7968deab695be4d5eaadfc81d2413f61d82ee777 (patch) | |
| tree | 5912519fdc4eb07d26d48ee0e69c05d271c17347 | |
| parent | 796fcbfd3b9c2de166ada6d317c6f041914e66ec (diff) | |
| download | nix-7968deab695be4d5eaadfc81d2413f61d82ee777.tar nix-7968deab695be4d5eaadfc81d2413f61d82ee777.tar.gz nix-7968deab695be4d5eaadfc81d2413f61d82ee777.tar.bz2 nix-7968deab695be4d5eaadfc81d2413f61d82ee777.tar.lz nix-7968deab695be4d5eaadfc81d2413f61d82ee777.tar.xz nix-7968deab695be4d5eaadfc81d2413f61d82ee777.tar.zst nix-7968deab695be4d5eaadfc81d2413f61d82ee777.zip  | |
Add @neptune @saturn
Diffstat (limited to '')
| -rw-r--r-- | flake.nix | 28 | ||||
| -rw-r--r-- | home/nipsy/neptune.nix | 6 | ||||
| -rw-r--r-- | home/nipsy/saturn.nix | 6 | ||||
| -rw-r--r-- | home/root/neptune.nix | 6 | ||||
| -rw-r--r-- | home/root/saturn.nix | 6 | ||||
| -rw-r--r-- | hosts/neptune/default.nix | 67 | ||||
| -rw-r--r-- | hosts/neptune/disks.nix | 96 | ||||
| -rw-r--r-- | hosts/neptune/hardware-configuration.nix | 18 | ||||
| -rw-r--r-- | hosts/saturn/default.nix | 67 | ||||
| -rw-r--r-- | hosts/saturn/disks.nix | 96 | ||||
| -rw-r--r-- | hosts/saturn/hardware-configuration.nix | 18 | 
11 files changed, 414 insertions, 0 deletions
@@ -132,6 +132,20 @@          ];        }; +      neptune = nixpkgs.lib.nixosSystem rec { +        specialArgs = { inherit inputs outputs; }; +        modules = [ +          disko.nixosModules.disko +          ./hosts/neptune +          home-manager.nixosModules.home-manager { +            #home-manager.sharedModules = [ sops-nix.homeManagerModules.sops ]; +            home-manager.users.root = import ./home/root/neptune.nix; +            home-manager.users.nipsy = import ./home/nipsy/neptune.nix; +          } +          #sops-nix.nixosModules.sops +        ]; +      }; +        netboot = nixpkgs.lib.nixosSystem {          modules = [            "${nixpkgs}/nixos/modules/installer/netboot/netboot-minimal.nix" @@ -158,6 +172,20 @@          ];        }; +      saturn = nixpkgs.lib.nixosSystem rec { +        specialArgs = { inherit inputs outputs; }; +        modules = [ +          disko.nixosModules.disko +          ./hosts/saturn +          home-manager.nixosModules.home-manager { +            #home-manager.sharedModules = [ sops-nix.homeManagerModules.sops ]; +            home-manager.users.root = import ./home/root/saturn.nix; +            home-manager.users.nipsy = import ./home/nipsy/saturn.nix; +          } +          #sops-nix.nixosModules.sops +        ]; +      }; +        uranus = nixpkgs.lib.nixosSystem rec {          specialArgs = { inherit inputs outputs; };          modules = [ diff --git a/home/nipsy/neptune.nix b/home/nipsy/neptune.nix new file mode 100644 index 0000000..83c92cd --- /dev/null +++ b/home/nipsy/neptune.nix @@ -0,0 +1,6 @@ +{ inputs, lib, pkgs, config, outputs, ... }: +{ +  imports = [ +    common/core +  ]; +} diff --git a/home/nipsy/saturn.nix b/home/nipsy/saturn.nix new file mode 100644 index 0000000..83c92cd --- /dev/null +++ b/home/nipsy/saturn.nix @@ -0,0 +1,6 @@ +{ inputs, lib, pkgs, config, outputs, ... }: +{ +  imports = [ +    common/core +  ]; +} diff --git a/home/root/neptune.nix b/home/root/neptune.nix new file mode 100644 index 0000000..83c92cd --- /dev/null +++ b/home/root/neptune.nix @@ -0,0 +1,6 @@ +{ inputs, lib, pkgs, config, outputs, ... }: +{ +  imports = [ +    common/core +  ]; +} diff --git a/home/root/saturn.nix b/home/root/saturn.nix new file mode 100644 index 0000000..83c92cd --- /dev/null +++ b/home/root/saturn.nix @@ -0,0 +1,6 @@ +{ inputs, lib, pkgs, config, outputs, ... }: +{ +  imports = [ +    common/core +  ]; +} diff --git a/hosts/neptune/default.nix b/hosts/neptune/default.nix new file mode 100644 index 0000000..0e8d85a --- /dev/null +++ b/hosts/neptune/default.nix @@ -0,0 +1,67 @@ +{ config, inputs, outputs, pkgs, ... }: { +  boot = { +    initrd.kernelModules = [ "amdgpu" "zfs" ]; +    #kernel.sysctl = { +    #  "net.ipv4.ip_forward" = true; +    #}; +    loader = { +      efi.canTouchEfiVariables = true; +      systemd-boot.enable = true; +      timeout = 3; +    }; +    supportedFilesystems = [ "zfs" ]; +    zfs.devNodes = "/dev/disk/by-label"; +  }; + +  environment.systemPackages = with pkgs; [ +    wpa_supplicant +  ]; + +  imports = [ +    ./disks.nix +    ./hardware-configuration.nix +    ../common/core +    ../common/optional/misc.nix +    ../common/optional/services/fwupd.nix +    ../common/optional/services/openssh.nix +    ../common/optional/zfs.nix +    ../common/users/nipsy +    ../common/users/root +  ]; + +  networking = { +    hostId = "6c1b830a"; +    hostName = "neptune"; +    domain = "bitgnome.net"; +    nftables.enable = true; +    wireless = { +      enable = true; +      userControlled.enable = true; +    }; +  }; + +  nixpkgs = { +    config.allowUnfree = true; +    hostPlatform = "x86_64-linux"; +    overlays = [ +      outputs.overlays.additions +      outputs.overlays.modifications +      outputs.overlays.master-packages +      outputs.overlays.stable-packages +    ]; +  }; + +  #sops = { +  #  age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; +  #  defaultSopsFile = ../secrets/neptune.yaml; + +  #  secrets = { +  #    "kea-dhcp4_conf" = {}; +  #    "nftables/forward" = {}; +  #    "nftables/ssh" = {}; +  #    "nix-access-token-github" = {}; +  #  }; +  #}; + +  system.stateVersion = "24.11"; +} diff --git a/hosts/neptune/disks.nix b/hosts/neptune/disks.nix new file mode 100644 index 0000000..52e8926 --- /dev/null +++ b/hosts/neptune/disks.nix @@ -0,0 +1,96 @@ +{ +  disko.devices = { +    disk = { +      nvme0n1 = { +        type = "disk"; +        device = "/dev/nvme0n1"; +        content = { +          type = "gpt"; +          partitions = { +            ESP = { +              size = "1G"; +              type = "EF00"; +              content = { +                type = "filesystem"; +                format = "vfat"; +                mountpoint = "/boot"; +                mountOptions = [ "defaults" ]; +                extraArgs = [ "-nboot" ]; +              }; +            }; +            swap = { +              size = "16G"; +              type = "8200"; +              content = { +                type = "swap"; +                extraArgs = [ "-L swap" ]; +              }; +            }; +            rpool = { +              size = "100%"; +              content = { +                type = "zfs"; +                pool = "rpool"; +              }; +            }; +          }; +        }; +      }; +    }; +    zpool = { +      rpool = { +        type = "zpool"; +        rootFsOptions = { +          acltype = "posixacl"; +          canmount = "off"; +          compression = "on"; +          dnodesize = "auto"; +          relatime = "on"; +          xattr = "sa"; +        }; +        options = { +          ashift = "12"; +          autotrim = "on"; +        }; +        datasets = { +          "local" = { +            type = "zfs_fs"; +            options.mountpoint = "none"; +          }; +          "local/root" = { +            type = "zfs_fs"; +            options.mountpoint = "legacy"; +            mountpoint = "/"; +          }; +          "local/nix" = { +            type = "zfs_fs"; +            options = { +              atime = "off"; +              mountpoint = "legacy"; +            }; +            mountpoint = "/nix"; +          }; +          "user" = { +            type = "zfs_fs"; +            options.mountpoint = "none"; +          }; +          "user/home" = { +            type = "zfs_fs"; +            options.mountpoint = "legacy"; +            mountpoint = "/home"; +          }; +          "user/home/root" = { +            type = "zfs_fs"; +            options.mountpoint = "legacy"; +            mountpoint = "/root"; +          }; +          "user/home/nipsy" = { +            type = "zfs_fs"; +            options.mountpoint = "legacy"; +            mountpoint = "/home/nipsy"; +          }; +        }; +      }; +    }; +  }; +} diff --git a/hosts/neptune/hardware-configuration.nix b/hosts/neptune/hardware-configuration.nix new file mode 100644 index 0000000..051169d --- /dev/null +++ b/hosts/neptune/hardware-configuration.nix @@ -0,0 +1,18 @@ +# 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" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; +  boot.initrd.kernelModules = [ ]; +  boot.kernelModules = [ "kvm-amd" ]; +  boot.extraModulePackages = [ ]; + +  #nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +  #hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/saturn/default.nix b/hosts/saturn/default.nix new file mode 100644 index 0000000..bca97f0 --- /dev/null +++ b/hosts/saturn/default.nix @@ -0,0 +1,67 @@ +{ config, inputs, outputs, pkgs, ... }: { +  boot = { +    initrd.kernelModules = [ "amdgpu" "zfs" ]; +    #kernel.sysctl = { +    #  "net.ipv4.ip_forward" = true; +    #}; +    loader = { +      efi.canTouchEfiVariables = true; +      systemd-boot.enable = true; +      timeout = 3; +    }; +    supportedFilesystems = [ "zfs" ]; +    zfs.devNodes = "/dev/disk/by-label"; +  }; + +  environment.systemPackages = with pkgs; [ +    wpa_supplicant +  ]; + +  imports = [ +    ./disks.nix +    ./hardware-configuration.nix +    ../common/core +    ../common/optional/misc.nix +    ../common/optional/services/fwupd.nix +    ../common/optional/services/openssh.nix +    ../common/optional/zfs.nix +    ../common/users/nipsy +    ../common/users/root +  ]; + +  networking = { +    hostId = "4ae5eb4d"; +    hostName = "saturn"; +    domain = "bitgnome.net"; +    nftables.enable = true; +    wireless = { +      enable = true; +      userControlled.enable = true; +    }; +  }; + +  nixpkgs = { +    config.allowUnfree = true; +    hostPlatform = "x86_64-linux"; +    overlays = [ +      outputs.overlays.additions +      outputs.overlays.modifications +      outputs.overlays.master-packages +      outputs.overlays.stable-packages +    ]; +  }; + +  #sops = { +  #  age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; +  #  defaultSopsFile = ../secrets/saturn.yaml; + +  #  secrets = { +  #    "kea-dhcp4_conf" = {}; +  #    "nftables/forward" = {}; +  #    "nftables/ssh" = {}; +  #    "nix-access-token-github" = {}; +  #  }; +  #}; + +  system.stateVersion = "24.11"; +} diff --git a/hosts/saturn/disks.nix b/hosts/saturn/disks.nix new file mode 100644 index 0000000..52e8926 --- /dev/null +++ b/hosts/saturn/disks.nix @@ -0,0 +1,96 @@ +{ +  disko.devices = { +    disk = { +      nvme0n1 = { +        type = "disk"; +        device = "/dev/nvme0n1"; +        content = { +          type = "gpt"; +          partitions = { +            ESP = { +              size = "1G"; +              type = "EF00"; +              content = { +                type = "filesystem"; +                format = "vfat"; +                mountpoint = "/boot"; +                mountOptions = [ "defaults" ]; +                extraArgs = [ "-nboot" ]; +              }; +            }; +            swap = { +              size = "16G"; +              type = "8200"; +              content = { +                type = "swap"; +                extraArgs = [ "-L swap" ]; +              }; +            }; +            rpool = { +              size = "100%"; +              content = { +                type = "zfs"; +                pool = "rpool"; +              }; +            }; +          }; +        }; +      }; +    }; +    zpool = { +      rpool = { +        type = "zpool"; +        rootFsOptions = { +          acltype = "posixacl"; +          canmount = "off"; +          compression = "on"; +          dnodesize = "auto"; +          relatime = "on"; +          xattr = "sa"; +        }; +        options = { +          ashift = "12"; +          autotrim = "on"; +        }; +        datasets = { +          "local" = { +            type = "zfs_fs"; +            options.mountpoint = "none"; +          }; +          "local/root" = { +            type = "zfs_fs"; +            options.mountpoint = "legacy"; +            mountpoint = "/"; +          }; +          "local/nix" = { +            type = "zfs_fs"; +            options = { +              atime = "off"; +              mountpoint = "legacy"; +            }; +            mountpoint = "/nix"; +          }; +          "user" = { +            type = "zfs_fs"; +            options.mountpoint = "none"; +          }; +          "user/home" = { +            type = "zfs_fs"; +            options.mountpoint = "legacy"; +            mountpoint = "/home"; +          }; +          "user/home/root" = { +            type = "zfs_fs"; +            options.mountpoint = "legacy"; +            mountpoint = "/root"; +          }; +          "user/home/nipsy" = { +            type = "zfs_fs"; +            options.mountpoint = "legacy"; +            mountpoint = "/home/nipsy"; +          }; +        }; +      }; +    }; +  }; +} diff --git a/hosts/saturn/hardware-configuration.nix b/hosts/saturn/hardware-configuration.nix new file mode 100644 index 0000000..051169d --- /dev/null +++ b/hosts/saturn/hardware-configuration.nix @@ -0,0 +1,18 @@ +# 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" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; +  boot.initrd.kernelModules = [ ]; +  boot.kernelModules = [ "kvm-amd" ]; +  boot.extraModulePackages = [ ]; + +  #nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +  #hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}  | 
