diff options
Diffstat (limited to 'hosts/vps')
-rw-r--r-- | hosts/vps/default.nix | 50 | ||||
-rw-r--r-- | hosts/vps/hardware-configuration.nix | 36 | ||||
-rw-r--r-- | hosts/vps/services/git.nix (renamed from hosts/vps/git.nix) | 0 | ||||
-rw-r--r-- | hosts/vps/services/hydrus.nix (renamed from hosts/vps/hydrus.nix) | 0 | ||||
-rw-r--r-- | hosts/vps/services/maloja.nix (renamed from hosts/vps/maloja.nix) | 0 | ||||
-rw-r--r-- | hosts/vps/services/matrix.nix (renamed from hosts/vps/matrix.nix) | 0 | ||||
-rw-r--r-- | hosts/vps/services/website.nix (renamed from hosts/vps/website.nix) | 0 |
7 files changed, 42 insertions, 44 deletions
diff --git a/hosts/vps/default.nix b/hosts/vps/default.nix index 3597c5c..4741374 100644 --- a/hosts/vps/default.nix +++ b/hosts/vps/default.nix @@ -5,29 +5,17 @@ ... }: { imports = [ - ../../profiles/core.nix - ../../profiles/user.nix - ../../profiles/ssh.nix + ./hardware-configuration.nix ../../mixins/tailscale.nix ../../mixins/cli.nix - ./website.nix - ./git.nix - ./hydrus.nix - ./matrix.nix - ./maloja.nix + ./services/website.nix + ./services/git.nix + ./services/hydrus.nix + ./services/matrix.nix + ./services/maloja.nix ]; config = { - _module.args.nixinate = { - host = "vps"; - sshUser = "tzlil"; - buildOn = "remote"; # valid args are "local" or "remote" - substituteOnTarget = true; # if buildOn is "local" then it will substitute on the target, "-s" - hermetic = false; - }; - - networking.hostName = "vps"; - boot = { kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; loader.grub.device = "/dev/vda"; @@ -41,34 +29,8 @@ networking.interfaces.ens3.useDHCP = lib.mkDefault true; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - virtualisation.hypervGuest.enable = true; - time.timeZone = lib.mkDefault "Frankfurt"; - fileSystems = { - "/" = { - device = "none"; - fsType = "tmpfs"; - options = ["noexec" "defaults" "size=2G" "mode=755"]; - }; - "/nix" = { - device = "/dev/disk/by-uuid/e4c4735d-bfdd-477f-bc43-d07510cb6a9a"; - fsType = "btrfs"; - }; - "/boot" = { - device = "/dev/disk/by-uuid/7ea63707-099d-4c21-90eb-a51bfa6d8ba5"; - fsType = "ext4"; - }; - }; - - swapDevices = [{device = "/dev/disk/by-uuid/00eb2d2e-4d7c-4e95-804d-e9ecb22679d4";}]; - - zramSwap = { - enable = true; - algorithm = "zstd"; - }; networking.networkmanager.enable = lib.mkForce false; diff --git a/hosts/vps/hardware-configuration.nix b/hosts/vps/hardware-configuration.nix new file mode 100644 index 0000000..2d9a5fa --- /dev/null +++ b/hosts/vps/hardware-configuration.nix @@ -0,0 +1,36 @@ +{ + inputs, + pkgs, + lib, + config, + ... +}: { + fileSystems = { + "/" = { + device = "none"; + fsType = "tmpfs"; + options = ["noexec" "defaults" "size=2G" "mode=755"]; + }; + "/nix" = { + device = "/dev/disk/by-uuid/e4c4735d-bfdd-477f-bc43-d07510cb6a9a"; + fsType = "btrfs"; + }; + "/boot" = { + device = "/dev/disk/by-uuid/7ea63707-099d-4c21-90eb-a51bfa6d8ba5"; + fsType = "ext4"; + }; + }; + + swapDevices = [{device = "/dev/disk/by-uuid/00eb2d2e-4d7c-4e95-804d-e9ecb22679d4";}]; + + zramSwap = { + enable = true; + algorithm = "zstd"; + }; + + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + virtualisation.hypervGuest.enable = true; + +} diff --git a/hosts/vps/git.nix b/hosts/vps/services/git.nix index 8bd4653..8bd4653 100644 --- a/hosts/vps/git.nix +++ b/hosts/vps/services/git.nix diff --git a/hosts/vps/hydrus.nix b/hosts/vps/services/hydrus.nix index c967fbc..c967fbc 100644 --- a/hosts/vps/hydrus.nix +++ b/hosts/vps/services/hydrus.nix diff --git a/hosts/vps/maloja.nix b/hosts/vps/services/maloja.nix index 3d4530d..3d4530d 100644 --- a/hosts/vps/maloja.nix +++ b/hosts/vps/services/maloja.nix diff --git a/hosts/vps/matrix.nix b/hosts/vps/services/matrix.nix index e2aa1a5..e2aa1a5 100644 --- a/hosts/vps/matrix.nix +++ b/hosts/vps/services/matrix.nix diff --git a/hosts/vps/website.nix b/hosts/vps/services/website.nix index 5d1d48a..5d1d48a 100644 --- a/hosts/vps/website.nix +++ b/hosts/vps/services/website.nix |