diff --git a/flake.nix b/flake.nix index 45ea756..ef7587f 100644 --- a/flake.nix +++ b/flake.nix @@ -15,20 +15,40 @@ specialArgs = { inherit inputs self; }; modules = [ - ./configuration.nix - ./hardware-configuration.nix + ./modules + ./hosts/virtmsi/configuration.nix + ./hosts/virtmsi/hardware-configuration.nix + ]; + }; + permafrost = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs self; }; + + modules = [ + ./modules + ./hosts/permafrost/configuration.nix + ./hosts/permafrost/hardware-configuration.nix ]; }; }; - deploy.nodes.virtmsi = { + deploy = { sshUser = "ravenshade"; user = "root"; - hostname = "virtmsi"; sshOpts = [ "-A" ]; - profiles.system.path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.virtmsi; - fastConnection = true; - interactiveSudo = true; + nodes = { + virtmsi = { + hostname = "virtmsi"; + profiles.system.path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.virtmsi; + fastConnection = true; + interactiveSudo = true; + }; + + permafrost = { + hostname = "permafrost"; + profiles.system.path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.permafrost; + interactiveSudo = true; + }; + }; }; checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib; diff --git a/hosts/permafrost/configuration.nix b/hosts/permafrost/configuration.nix new file mode 100644 index 0000000..33ede5a --- /dev/null +++ b/hosts/permafrost/configuration.nix @@ -0,0 +1,42 @@ +{ pkgs, ... }: + +{ + permafrost.nyazoom.enable = true; + + networking.hostName = "permafrost"; # Define your hostname. + + # Allowing ssh auth + security.pam.sshAgentAuth.enable = true; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + nix.settings = { + auto-optimise-store = true; + experimental-features = [ "nix-command" "flakes" ]; + + trusted-users = [ + "ravenshade" + ]; + }; + + # Enable networking + networking.networkmanager.enable = true; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.ravenshade = { + isNormalUser = true; + description = "Zynh Ludwig"; + extraGroups = [ "networkmanager" "wheel" ]; + }; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + neovim + git + curl + ]; + + system.stateVersion = "24.05"; + +} diff --git a/hosts/permafrost/hardware-configuration.nix b/hosts/permafrost/hardware-configuration.nix new file mode 100644 index 0000000..31d67f3 --- /dev/null +++ b/hosts/permafrost/hardware-configuration.nix @@ -0,0 +1,48 @@ +# 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 = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "sr_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { + device = "/dev/disk/by-uuid/11b049bc-378b-44e6-9d2e-ce5fc897f15a"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { + device = "/dev/disk/by-uuid/A4DA-34BD"; + fsType = "vfat"; + }; + + swapDevices = [ ]; + + boot.loader.efi.canTouchEfiVariables = true; + boot.loader.grub = { + enable = true; + efiSupport = true; + device = "nodev"; + }; + + # 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.enp3s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/configuration.nix b/hosts/virtmsi/configuration.nix similarity index 97% rename from configuration.nix rename to hosts/virtmsi/configuration.nix index ec26ed5..387fb2c 100644 --- a/configuration.nix +++ b/hosts/virtmsi/configuration.nix @@ -1,8 +1,6 @@ { pkgs, ... }: { - imports = [ ./modules ]; - # Bootloader. boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/vda"; diff --git a/hardware-configuration.nix b/hosts/virtmsi/hardware-configuration.nix similarity index 100% rename from hardware-configuration.nix rename to hosts/virtmsi/hardware-configuration.nix