summary refs log tree commit diff
path: root/hosts
diff options
context:
space:
mode:
authortzlil <tzlils@protonmail.com>2023-02-05 22:29:24 +0200
committertzlil <tzlils@protonmail.com>2023-02-05 22:29:24 +0200
commitb0422f1bc1ffdfc32f621c26ff8091d6817e4e67 (patch)
treebd1e2c66651407796a1f104b63fbb2fb0717906c /hosts
parentc2efa603990a9a01501b6df1aa38bb8c5d3d01f7 (diff)
remove password age, add disko config, add vps, trying to get hyprland working
Diffstat (limited to 'hosts')
-rw-r--r--hosts/disko.nix10
-rw-r--r--hosts/vm/cfg.nix8
-rw-r--r--hosts/vps/cfg.nix39
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";