summary refs log tree commit diff
path: root/hosts
diff options
context:
space:
mode:
authortzlil <tzlils@protonmail.com>2023-03-12 16:29:17 +0200
committertzlil <tzlils@protonmail.com>2023-03-12 16:29:17 +0200
commit39eb0b807403c7745c2edc6024e0e713155662bc (patch)
tree7aca56baa092ecf5f58b6c2e4d597d613cca196b /hosts
parentf266d1b0d7c2f9c5c285af539fefe8d5ac96c479 (diff)
bunch of stuff
Diffstat (limited to 'hosts')
-rw-r--r--hosts/disko.nix56
-rw-r--r--hosts/laptop/cfg.nix8
-rw-r--r--hosts/vm/cfg.nix1
-rw-r--r--hosts/vm/disko.nix52
-rw-r--r--hosts/vps/git.nix1
-rw-r--r--hosts/vps/website.nix46
6 files changed, 81 insertions, 83 deletions
diff --git a/hosts/disko.nix b/hosts/disko.nix
deleted file mode 100644
index 26d1849..0000000
--- a/hosts/disko.nix
+++ /dev/null
@@ -1,56 +0,0 @@
-# Example to create a bios compatible gpt partition
-{
-  lib,
-  disks,
-  ...
-}: {
-  disk = lib.genAttrs disks (dev: {
-    device = dev;
-    type = "disk";
-    content = {
-      type = "table";
-      format = "gpt";
-      partitions = [
-        {
-          type = "partition";
-          name = "boot";
-          start = "1MiB";
-          end = "100MiB";
-          bootable = true;
-          content = {
-            type = "filesystem";
-            format = "vfat";
-            mountpoint = "/boot";
-          };
-        }
-        {
-          name = "nix";
-          type = "partition";
-          start = "128MiB";
-          end = "100%";
-          content = {
-            type = "btrfs";
-            extraArgs = "-f"; # Override existing partition
-            subvolumes = {
-              "/" = {
-                mountOptions = ["noatime" "compress=zstd"];
-              };
-            };
-          };
-        }
-      ];
-    };
-  });
-
-  nodev = {
-    "/" = {
-      fsType = "tmpfs";
-      mountOptions = [
-        "noexec"
-        "defaults"
-        "size=2G"
-        "mode=755"
-      ];
-    };
-  };
-}
diff --git a/hosts/laptop/cfg.nix b/hosts/laptop/cfg.nix
index 32f60fe..f4befe8 100644
--- a/hosts/laptop/cfg.nix
+++ b/hosts/laptop/cfg.nix
@@ -11,13 +11,13 @@
     ../../profiles/graphical.nix
     ../../mixins/tailscale.nix
     ../../mixins/cli.nix
-    ../../mixins/greet.nix
-    ../../mixins/sway.nix
+    # ../../mixins/greet.nix
+    ../../mixins/hyprland.nix
   ];
 
   config = {
     _module.args.nixinate = {
-      host = "192.168.1.32";
+      host = "100.121.226.3";
       sshUser = "tzlil";
       buildOn = "remote"; # valid args are "local" or "remote"
       substituteOnTarget = true; # if buildOn is "local" then it will substitute on the target, "-s"
@@ -85,5 +85,7 @@
     nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
     powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
     hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+
+    # greeter.initialSession = "env WLR_RENDERER=pixman sh -c ${pkgs.sway}/bin/sway";
   };
 }
diff --git a/hosts/vm/cfg.nix b/hosts/vm/cfg.nix
index 9fb84ee..5ceba52 100644
--- a/hosts/vm/cfg.nix
+++ b/hosts/vm/cfg.nix
@@ -16,6 +16,7 @@
     # ../../mixins/hyprland.nix
     ../../mixins/sway.nix
     (modulesPath + "/profiles/qemu-guest.nix")
+    (modulesPath + "/virtualisation/qemu-vm.nix")
   ];
 
   config = {
diff --git a/hosts/vm/disko.nix b/hosts/vm/disko.nix
new file mode 100644
index 0000000..6affd39
--- /dev/null
+++ b/hosts/vm/disko.nix
@@ -0,0 +1,52 @@
+{inputs, ...}: let
+  device = "/dev/vda";
+in {
+  imports = [
+    inputs.disko.nixosModules.disko
+  ];
+
+  disko.devices = {
+    disk.${baseNameOf device} = {
+      inherit device;
+      type = "disk";
+      content = {
+        type = "table";
+        format = "gpt";
+        partitions = [
+          {
+            type = "partition";
+            name = "ESP";
+            start = "1MiB";
+            end = "512MiB";
+            bootable = true;
+            content = {
+              type = "filesystem";
+              format = "vfat";
+              mountpoint = "/boot";
+            };
+          }
+          {
+            name = "nix";
+            type = "partition";
+            start = "512M";
+            end = "100%";
+            part-type = "primary";
+            content = {
+              type = "filesystem";
+              format = "ext4";
+              mountpoint = "/nix";
+            };
+          }
+        ];
+      };
+    };
+    nodev."/" = {
+      fsType = "tmpfs";
+      mountOptions = [
+        "size=3G"
+        "defaults"
+        "mode=755"
+      ];
+    };
+  };
+}
diff --git a/hosts/vps/git.nix b/hosts/vps/git.nix
index a8568b9..6f0904e 100644
--- a/hosts/vps/git.nix
+++ b/hosts/vps/git.nix
@@ -17,7 +17,6 @@
       ];
     };
 
-
     # for syntax highlighting
     users.groups.fcgiwrap = {};
     users.users.fcgiwrap = {
diff --git a/hosts/vps/website.nix b/hosts/vps/website.nix
index c1aad64..86b725a 100644
--- a/hosts/vps/website.nix
+++ b/hosts/vps/website.nix
@@ -42,30 +42,30 @@
           bind 0.0.0.0
           handle_path / {
             try_files ${pkgs.writeText "index.txt" ''
-~?~+=I?~~IIIII++,:   .?= .,I=O8OZ.DNNO, ZD7:::=.? ,,:,,I,,:,~+?II?I?II?=+=~+7$ZO
-?==++??==+I???7..:.   :II$77?I+ID~NND8.ZMN7~=~I7:,., :?7,.,.~+?I???????,+~7+$ZOZ
-7+===I+~===?I77:  ?   ,$7$.:.,I?=7NNNINMMMNOI=++ .~==I$7, ..++?I???I+=?.+:O+ZZOZ
-===++I+==?III??I,?,   ~I7NN,..  ??ONNNMMMD$777$7I$ZOO$7?....+=????I~=+,:+,O8DNMM
-~=~==7II=+I?II7I,I+,8Z.II8D+=~:.,7$NMMMMMN8$7~. ..  :88I. ..?=?++I:~+=.~~~NMMMNN
-~====II?I~+?I?$7I?~8D7+7$ZZNONDN8Z8NMMMMMMNNON:=. :,$.I7  .,+=??I:,=, .:,=DNNMMN
-=+?==+==?~+=I?$$I+88D:I$8NMNDDNNNDNNNMMMMMMMMM8I$77=MMDO.  :~=+?,,,   .~,?8DDD8D
-=~=+==I7I=IIIIO$=~OOD=I7ODNNNNMNNDNDNMMMMMMMMNO$O+OZ 78.,.I::++:..   .,::=888OOO
-===I=I?~=?I???$I$?OODZ=7Z8NDONNN7D88MMMMMMMMMMNNNN8DNN~..~:7,,+7?,:,:::+8=Z888OO
-~+===7?=??I????7Z7ZOD8I777$+NNN:OOZOMMMMMMMMMMMMMMNMM+..~=?=O:+?::=+~:~+IDD888OZ
-I==II??=I???=::7OI?O88Z=I~,?ZDD,Z$IDMMMMMMMMMMMMMMMM:$$?.~?+=?:,~+?I??==+++I8OOO
-==+++??+=.,~,~:7Z$?7I77$=. $I$8I$7+~8NMMMMMMMMMMMMDDMN$ ,:+?=.~==?II+++=+=?II+OZ
-==+?+I?,=:+?=~~??I++~7$$$= 777Z,$Z$$ONNMMMMMMMMMMMMMM8? .~=?:.==+?I~+?=+=??II?I8
-?=+?I:=~??II=~~, II?+ 7$7?=?77$?$Z:8NMMMNMMMMMMMMMMMD7 ,,===::~=?II.??++?++III+~
-??+.I+I=+I+??=~=~ =I+:?7$77?$$$ZI7Z8DM7NMMNMMMMMMMMOI. .,=~~.~~+I?:???==~????II?
-I??:==?I++I?~==+=~:.?I7I77$?IZ$ZODDOIDNNNNNMMMMNM8?.:. ,,+=,::~+==II=~,=?+?IIIII
-??I:?=,=+++?II+=:,:, +77777$$777ODDMMNO~DNNNDD8?..::: .,,+~.,::=??????=+?IIIII?I
-????++=~:=?IIIII=~:: ~~+II77$$7$ZO8NMMMND.+:   .=7+=~ ,,:?...~II??+??I?+??IIII?I
-??III7II+~:?II7+II?, ~,:,~7777$$$I$8DNMMNO   .~I  .Z:.,:~: ,+???+=,IIIIII??IIIII
-???I7I:,~=:,+II+=~I??:.,,,.:77777777$ODMM8 .:+ZI. ,~,..~~ :II?==~:?II??IIIIIIIII
-No matter where you go, everybody's connected
+            ~?~+=I?~~IIIII++,:   .?= .,I=O8OZ.DNNO, ZD7:::=.? ,,:,,I,,:,~+?II?I?II?=+=~+7$ZO
+            ?==++??==+I???7..:.   :II$77?I+ID~NND8.ZMN7~=~I7:,., :?7,.,.~+?I???????,+~7+$ZOZ
+            7+===I+~===?I77:  ?   ,$7$.:.,I?=7NNNINMMMNOI=++ .~==I$7, ..++?I???I+=?.+:O+ZZOZ
+            ===++I+==?III??I,?,   ~I7NN,..  ??ONNNMMMD$777$7I$ZOO$7?....+=????I~=+,:+,O8DNMM
+            ~=~==7II=+I?II7I,I+,8Z.II8D+=~:.,7$NMMMMMN8$7~. ..  :88I. ..?=?++I:~+=.~~~NMMMNN
+            ~====II?I~+?I?$7I?~8D7+7$ZZNONDN8Z8NMMMMMMNNON:=. :,$.I7  .,+=??I:,=, .:,=DNNMMN
+            =+?==+==?~+=I?$$I+88D:I$8NMNDDNNNDNNNMMMMMMMMM8I$77=MMDO.  :~=+?,,,   .~,?8DDD8D
+            =~=+==I7I=IIIIO$=~OOD=I7ODNNNNMNNDNDNMMMMMMMMNO$O+OZ 78.,.I::++:..   .,::=888OOO
+            ===I=I?~=?I???$I$?OODZ=7Z8NDONNN7D88MMMMMMMMMMNNNN8DNN~..~:7,,+7?,:,:::+8=Z888OO
+            ~+===7?=??I????7Z7ZOD8I777$+NNN:OOZOMMMMMMMMMMMMMMNMM+..~=?=O:+?::=+~:~+IDD888OZ
+            I==II??=I???=::7OI?O88Z=I~,?ZDD,Z$IDMMMMMMMMMMMMMMMM:$$?.~?+=?:,~+?I??==+++I8OOO
+            ==+++??+=.,~,~:7Z$?7I77$=. $I$8I$7+~8NMMMMMMMMMMMMDDMN$ ,:+?=.~==?II+++=+=?II+OZ
+            ==+?+I?,=:+?=~~??I++~7$$$= 777Z,$Z$$ONNMMMMMMMMMMMMMM8? .~=?:.==+?I~+?=+=??II?I8
+            ?=+?I:=~??II=~~, II?+ 7$7?=?77$?$Z:8NMMMNMMMMMMMMMMMD7 ,,===::~=?II.??++?++III+~
+            ??+.I+I=+I+??=~=~ =I+:?7$77?$$$ZI7Z8DM7NMMNMMMMMMMMOI. .,=~~.~~+I?:???==~????II?
+            I??:==?I++I?~==+=~:.?I7I77$?IZ$ZODDOIDNNNNNMMMMNM8?.:. ,,+=,::~+==II=~,=?+?IIIII
+            ??I:?=,=+++?II+=:,:, +77777$$777ODDMMNO~DNNNDD8?..::: .,,+~.,::=??????=+?IIIII?I
+            ????++=~:=?IIIII=~:: ~~+II77$$7$ZO8NMMMND.+:   .=7+=~ ,,:?...~II??+??I?+??IIII?I
+            ??III7II+~:?II7+II?, ~,:,~7777$$$I$8DNMMNO   .~I  .Z:.,:~: ,+???+=,IIIIII??IIIII
+            ???I7I:,~=:,+II+=~I??:.,,,.:77777777$ODMM8 .:+ZI. ,~,..~~ :II?==~:?II??IIIIIIIII
+            No matter where you go, everybody's connected
 
-/cgit/ for repositories
-            ''} /
+            /cgit/ for repositories
+          ''} /
             file_server
           }
         '';