diff options
Diffstat (limited to 'hosts')
-rw-r--r-- | hosts/disko.nix | 10 | ||||
-rw-r--r-- | hosts/vm/cfg.nix | 8 | ||||
-rw-r--r-- | hosts/vps/cfg.nix | 39 |
3 files changed, 29 insertions, 28 deletions
diff --git a/hosts/disko.nix b/hosts/disko.nix index 0a0710e..4808edd 100644 --- a/hosts/disko.nix +++ b/hosts/disko.nix @@ -28,13 +28,13 @@ type = "btrfs"; extraArgs = "-f"; # Override existing partition subvolumes = { - "/nix" = { - mountOptions = ["noatime" "compress=zstd"] - } + "/" = { + mountOptions = ["noatime" "compress=zstd"]; + }; }; }; } - ] + ]; }; }); @@ -42,7 +42,7 @@ "/" = { fsType = "tmpfs"; mountOptions = [ - "size=200M" + "noexec" "defaults" "size=2G" "mode=755" ]; }; }; diff --git a/hosts/vm/cfg.nix b/hosts/vm/cfg.nix index d6f33d9..4042ea0 100644 --- a/hosts/vm/cfg.nix +++ b/hosts/vm/cfg.nix @@ -6,14 +6,14 @@ # ../../profiles/graphical.nix ../../mixins/tailscale.nix ../../mixins/cli.nix - # ../../mixins/greet.nix + ../../mixins/greet.nix + ../../mixins/hyprland.nix # ../../mixins/sway.nix - (modulesPath + "/profiles/qemu-guest.nix") ]; config = { _module.args.nixinate = { - host = "100.109.155.123"; + host = "vm"; sshUser = "tzlil"; buildOn = "remote"; # valid args are "local" or "remote" substituteOnTarget = true; # if buildOn is "local" then it will substitute on the target, "-s" @@ -71,5 +71,7 @@ enable = true; algorithm = "zstd"; }; + + greeter.initialSession = "sh -c hyprland"; }; } \ No newline at end of file diff --git a/hosts/vps/cfg.nix b/hosts/vps/cfg.nix index f32afea..25da42b 100644 --- a/hosts/vps/cfg.nix +++ b/hosts/vps/cfg.nix @@ -5,30 +5,22 @@ ../../profiles/ssh.nix ../../mixins/tailscale.nix ../../mixins/cli.nix - (modulesPath + "/profiles/qemu-guest.nix") ]; config = { _module.args.nixinate = { - host = "95.179.249.76"; + host = "100.67.217.90"; sshUser = "nixos"; buildOn = "remote"; # valid args are "local" or "remote" substituteOnTarget = true; # if buildOn is "local" then it will substitute on the target, "-s" hermetic = false; }; - disko.devices = import ../disko.nix { - lib = pkgs.lib; - }; networking.hostName = "vps"; boot = { - initrd = { - supportedFilesystems = ["btrfs"]; - }; kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; kernelParams = [ - "console=ttyS0" "init_on_free=1" "page_poison=1" "page_alloc.shuffle=1" @@ -36,17 +28,21 @@ "vsyscall=none" ]; cleanTmpDir = true; - loader = { - systemd-boot = { - enable = true; - }; - efi = { - canTouchEfiVariables = true; - efiSysMountPoint = "/boot"; - }; + loader.grub.device = "/dev/vda"; + initrd = { + availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ]; + kernelModules = []; }; + kernelModules = []; + extraModulePackages = []; }; + 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 = { @@ -56,14 +52,17 @@ options = ["noexec" "defaults" "size=2G" "mode=755"]; }; "/nix" = { - device = "/dev/disk/by-partlabel/nix"; - options = ["noatime" "compress=zstd"]; + device = "/dev/disk/by-uuid/e4c4735d-bfdd-477f-bc43-d07510cb6a9a"; + fsType = "btrfs"; }; "/boot" = { - device = "/dev/disk/by-partlabel/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"; |