diff --git a/.sops.yaml b/.sops.yaml index 9fb79c2..652186e 100644 --- a/.sops.yaml +++ b/.sops.yaml @@ -7,6 +7,7 @@ keys: - &cap_nr200p age1g45zy9m5g4e20cjejgd3x40722rlddgkmhtddrl8wyf63kt5kg7s9ke390 - &apollo: - &cap_apollo_n01 age1ljcy90uwlfngc7vqwlf2x2ckgsdfg90c0r9yvjzpl90jkwf9g48q2leudt + - &cap_apollo_n02 age1vl9q7u0jkzjpdqrmg4flvz2f7gyn05luv4ka60hu5l8yn4m6rujquhyc2p - &cluster: - &cap_clust_01 age1649y4antwgfe4fu02eppnx5gr0yc3g4lj4kwd6v9guxgxgj06y9qk7l4wl - &cap_clust_02 age1k085uuy4fv9rfpy0ne6zl9fq0j05a4fykqe26psx2ngxqrcxcu5sksxa9u @@ -31,6 +32,7 @@ creation_rules: - *cap_slim7 - *cap_nr200p - *cap_apollo_n01 + - *cap_apollo_n02 - *cap_clust_01 - *cap_clust_02 - *cap_clust_03 diff --git a/README.md b/README.md index 0e29aa5..c2ffb6f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ # nixos-configs +## Miscellaneous Notes +- To generate the sops age key for a new host + - `nix-shell -p ssh-to-age --run 'cat /etc/ssh/ssh_host_ed25519_key.pub | ssh-to-age'` + ## Misc references used -* https://github.com/XNM1/linux-nixos-hyprland-config-dotfiles/tree/main \ No newline at end of file +* https://github.com/XNM1/linux-nixos-hyprland-config-dotfiles/tree/main diff --git a/flake.nix b/flake.nix index eecac96..e311bf1 100644 --- a/flake.nix +++ b/flake.nix @@ -117,6 +117,15 @@ inputs.home-manager.nixosModules.default ]; }; + nixosConfigurations.cap-apollo-n02 = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit inputs; }; + modules = [ + ./hosts/cap-apollo-n02/configuration.nix + sops-nix.nixosModules.sops + inputs.home-manager.nixosModules.default + ]; + }; nixosConfigurations.cap-slim7 = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; diff --git a/hosts/cap-apollo-n02/configuration.nix b/hosts/cap-apollo-n02/configuration.nix new file mode 100644 index 0000000..9dc8152 --- /dev/null +++ b/hosts/cap-apollo-n02/configuration.nix @@ -0,0 +1,34 @@ +{ config, pkgs, ... }: +{ + imports = [ + # Hardware Scan + ./hardware-configuration.nix + + # Users + ../../users/apollo-admin/apollo-admin.nix + + # System Configuration + ../../modules/system/cpu-intel.nix + ../../modules/system/fonts.nix + ../../modules/system/home-manager-settings.nix + ../../modules/system/internationalization.nix + ../../modules/system/networking.nix + ../../modules/system/nix-settings.nix + ../../modules/system/security.nix + ../../modules/system/systemd-boot.nix + + # Application Groups + ../../modules/application-groups/system-utilities-cluster.nix + ../../modules/application-groups/virtualization.nix + ]; + + networking.hostName = "cap-apollo-n02"; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "25.11"; # Did you read the comment? +} diff --git a/hosts/cap-apollo-n02/hardware-configuration.nix b/hosts/cap-apollo-n02/hardware-configuration.nix new file mode 100644 index 0000000..d875fab --- /dev/null +++ b/hosts/cap-apollo-n02/hardware-configuration.nix @@ -0,0 +1,31 @@ +# 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 = [ "ahci" "xhci_pci" "ehci_pci" "uhci_hcd" "hpsa" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/71e4a38f-1e1e-4ebb-8e7a-a9489aa61f55"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/4A99-55C6"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = [ ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}