diff options
| -rw-r--r-- | flake.nix | 12 | ||||
| -rw-r--r-- | hosts/vps/configuration.nix | 15 | ||||
| -rw-r--r-- | hosts/vps/hardware-configuration.nix | 14 |
3 files changed, 35 insertions, 6 deletions
@@ -50,6 +50,18 @@ } ]; }; + nixosConfigurations.vps = nixpkgs.lib.nixosSystem { + system = linux-system; + specialArgs = { inherit inputs; }; + modules = [ + .hosts/vps/configuration + + home-manager.nixosModules.home-manager { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + } + ]; + }; darwinConfigurations."MacBook-Air" = nix-darwin.lib.darwinSystem { system = darwin-system; specialArgs = { inherit inputs username; }; diff --git a/hosts/vps/configuration.nix b/hosts/vps/configuration.nix index 7955650..1b341e1 100644 --- a/hosts/vps/configuration.nix +++ b/hosts/vps/configuration.nix @@ -1,6 +1,15 @@ { ... }: { + imports = [ + ./hardware-configuration.nix + ]; + + boot.tmp.cleanOnBoot = true; + zramSwap.enable = true; + networking.hostName = "my-vps"; + networking.domain = ""; + users.users.administrator = { isNormalUser = true; password = "admin"; @@ -9,12 +18,6 @@ services.openssh = { enable = true; - ports = [ 345687 ]; - settings = { - PasswordAuthentication = false; - X11Forwarding = false; - PermitRootLogin = "yes"; - }; }; services.nginx = { diff --git a/hosts/vps/hardware-configuration.nix b/hosts/vps/hardware-configuration.nix new file mode 100644 index 0000000..68ab0a2 --- /dev/null +++ b/hosts/vps/hardware-configuration.nix @@ -0,0 +1,14 @@ +{ modulesPath, ... }: +{ + imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; + boot.loader.grub = { + efiSupport = true; + efiInstallAsRemovable = true; + device = "nodev"; + }; + fileSystems."/boot" = { device = "/dev/disk/by-uuid/4E07-7ABB"; fsType = "vfat"; }; + boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ]; + boot.initrd.kernelModules = [ "nvme" ]; + fileSystems."/" = { device = "/dev/vda1"; fsType = "ext4"; }; + +} |
