summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--flake.lock80
-rw-r--r--flake.nix5
-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
-rw-r--r--mixins/emacs/default.nix50
-rw-r--r--mixins/hyprland.nix27
-rw-r--r--mixins/tailscale.nix8
11 files changed, 169 insertions, 165 deletions
diff --git a/flake.lock b/flake.lock
index cfd903e..dcdf236 100644
--- a/flake.lock
+++ b/flake.lock
@@ -6,11 +6,11 @@
         "nixpkgs": "nixpkgs"
       },
       "locked": {
-        "lastModified": 1675176355,
-        "narHash": "sha256-Qjxh5cmN56siY97mzmBLI1+cdjXSPqmfPVsKxBvHmwI=",
+        "lastModified": 1677969766,
+        "narHash": "sha256-AIp/ZYZMNLDZR/H7iiAlaGpu4lcXsVt9JQpBlf43HRY=",
         "owner": "ryantm",
         "repo": "agenix",
-        "rev": "b7ffcfe77f817d9ee992640ba1f270718d197f28",
+        "rev": "03b51fe8e459a946c4b88dcfb6446e45efb2c24e",
         "type": "github"
       },
       "original": {
@@ -49,11 +49,11 @@
         "utils": "utils"
       },
       "locked": {
-        "lastModified": 1675595366,
-        "narHash": "sha256-WoQkwaaoZqrhWpIrMxA+2j8CgxgyvjHzCyEZAQu06rQ=",
+        "lastModified": 1678571066,
+        "narHash": "sha256-MrlMr2A3tK1MY/JUGWMVzMwois8+mHWXm/1yYdwQSIc=",
         "owner": "nix-community",
         "repo": "home-manager",
-        "rev": "9621e9ab80a038cd11c7cfcae4df46a59d62b16a",
+        "rev": "bf5712c5865e543fb3f4796511d4cf51efd841b1",
         "type": "github"
       },
       "original": {
@@ -65,16 +65,18 @@
     "hyprland": {
       "inputs": {
         "hyprland-protocols": "hyprland-protocols",
-        "nixpkgs": "nixpkgs_2",
+        "nixpkgs": [
+          "nixpkgs"
+        ],
         "wlroots": "wlroots",
         "xdph": "xdph"
       },
       "locked": {
-        "lastModified": 1675606643,
-        "narHash": "sha256-kzM9G1rkP5rZCuEm4JqXmDOndBvilCA4yQJvZFqSq0w=",
+        "lastModified": 1678628798,
+        "narHash": "sha256-AQZK2/OmY+Vf+hnDkIJ/oqjCiEhCTHlTo2f1IhSYXFw=",
         "owner": "hyprwm",
         "repo": "Hyprland",
-        "rev": "53945cff3184cfdff3ed978e072b4ed65e3b2ec5",
+        "rev": "146d231ec5ea9059a64e34caeba06e790991e81a",
         "type": "github"
       },
       "original": {
@@ -121,7 +123,7 @@
     },
     "nixinate": {
       "inputs": {
-        "nixpkgs": "nixpkgs_3"
+        "nixpkgs": "nixpkgs_2"
       },
       "locked": {
         "lastModified": 1671116920,
@@ -139,11 +141,11 @@
     },
     "nixos-hardware": {
       "locked": {
-        "lastModified": 1674550793,
-        "narHash": "sha256-ljJlIFQZwtBbzWqWTmmw2O5BFmQf1A/DspwMOQtGXHk=",
+        "lastModified": 1678397099,
+        "narHash": "sha256-5xq8YJe+h19TlD+EI4AE/3H3jcCcQ2AWU6CWBVc5tRc=",
         "owner": "nixos",
         "repo": "nixos-hardware",
-        "rev": "b7ac0a56029e4f9e6743b9993037a5aaafd57103",
+        "rev": "556101ff85bd6e20900ec73ee525b935154bc8ea",
         "type": "github"
       },
       "original": {
@@ -154,11 +156,11 @@
     },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1674641431,
-        "narHash": "sha256-qfo19qVZBP4qn5M5gXc/h1MDgAtPA5VxJm9s8RUAkVk=",
+        "lastModified": 1677676435,
+        "narHash": "sha256-6FxdcmQr5JeZqsQvfinIMr0XcTyTuR7EXX0H3ANShpQ=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "9b97ad7b4330aacda9b2343396eb3df8a853b4fc",
+        "rev": "a08d6979dd7c82c4cef0dcc6ac45ab16051c1169",
         "type": "github"
       },
       "original": {
@@ -170,22 +172,6 @@
     },
     "nixpkgs_2": {
       "locked": {
-        "lastModified": 1675273418,
-        "narHash": "sha256-tpYc4TEGvDzh9uRf44QemyQ4TpVuUbxb07b2P99XDbM=",
-        "owner": "NixOS",
-        "repo": "nixpkgs",
-        "rev": "4d7c2644dbac9cf8282c0afe68fca8f0f3e7b2db",
-        "type": "github"
-      },
-      "original": {
-        "owner": "NixOS",
-        "ref": "nixos-unstable",
-        "repo": "nixpkgs",
-        "type": "github"
-      }
-    },
-    "nixpkgs_3": {
-      "locked": {
         "lastModified": 1653060744,
         "narHash": "sha256-kfRusllRumpt33J1hPV+CeCCylCXEU7e0gn2/cIM7cY=",
         "owner": "nixos",
@@ -200,13 +186,13 @@
         "type": "github"
       }
     },
-    "nixpkgs_4": {
+    "nixpkgs_3": {
       "locked": {
-        "lastModified": 1675545634,
-        "narHash": "sha256-TbQeQcM5TA/wIho6xtzG+inUfiGzUXi8ewwttiQWYJE=",
+        "lastModified": 1678470307,
+        "narHash": "sha256-OEeMUr3ueLIXyW/OaFUX5jUdimyQwMg/7e+/Q0gC/QE=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "0591d6b57bfeb55dfeec99a671843337bc2c3323",
+        "rev": "0c4800d579af4ed98ecc47d464a5e7b0870c4b1f",
         "type": "github"
       },
       "original": {
@@ -224,11 +210,11 @@
         "utils": "utils_2"
       },
       "locked": {
-        "lastModified": 1675756633,
-        "narHash": "sha256-8zFmga2fhVQmAnFimH1CtHL+hiGtapnnN6q1mUAPT2k=",
+        "lastModified": 1678614044,
+        "narHash": "sha256-J27xhKwVJGfB51tTSWT077l+URuRrLbElScvjB3HLgc=",
         "owner": "wamserma",
         "repo": "flake-programs-sqlite",
-        "rev": "621bd365e7f4fdd77994009891266214b54b8b6d",
+        "rev": "0937e66bdf1c27d331f4f418c68efc58f5228354",
         "type": "github"
       },
       "original": {
@@ -245,17 +231,17 @@
         "impermanence": "impermanence",
         "nixinate": "nixinate",
         "nixos-hardware": "nixos-hardware",
-        "nixpkgs": "nixpkgs_4",
+        "nixpkgs": "nixpkgs_3",
         "programsdb": "programsdb"
       }
     },
     "utils": {
       "locked": {
-        "lastModified": 1667395993,
-        "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
+        "lastModified": 1676283394,
+        "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
         "owner": "numtide",
         "repo": "flake-utils",
-        "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
+        "rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
         "type": "github"
       },
       "original": {
@@ -283,11 +269,11 @@
       "flake": false,
       "locked": {
         "host": "gitlab.freedesktop.org",
-        "lastModified": 1675374853,
-        "narHash": "sha256-BSrjNcddYWhFUMtjGwxiEXw67MYRaIHGvLn19Mvm1NE=",
+        "lastModified": 1677789111,
+        "narHash": "sha256-dWrk+Q3bLdtFe5rkyaAKWCQJCeE/KFNllcu1DvBC38c=",
         "owner": "wlroots",
         "repo": "wlroots",
-        "rev": "677a3f2f8847ed2de49dd60868f9d9487a546f58",
+        "rev": "5ae17de23f5fd9bb252a698f3771c840280e2c05",
         "type": "gitlab"
       },
       "original": {
diff --git a/flake.nix b/flake.nix
index c20d83c..6a8ecbd 100644
--- a/flake.nix
+++ b/flake.nix
@@ -15,7 +15,10 @@
       url = "github:wamserma/flake-programs-sqlite";
       inputs.nixpkgs.follows = "nixpkgs";
     };
-    hyprland.url = "github:hyprwm/Hyprland";
+    hyprland = {
+      url = "github:hyprwm/Hyprland";
+      inputs.nixpkgs.follows = "nixpkgs";
+    };
   };
 
   outputs = inputs @ {self, ...}: let
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
           }
         '';
diff --git a/mixins/emacs/default.nix b/mixins/emacs/default.nix
index a22523e..0290d20 100644
--- a/mixins/emacs/default.nix
+++ b/mixins/emacs/default.nix
@@ -5,29 +5,29 @@
   inputs,
   ...
 }: {
-  imports = [
-    inputs.home-manager.nixosModules."home-manager"
-  ];
-  config = {
-    home-manager.users.tzlil = {
-      pkgs,
-      config,
-      nixosConfig,
-      ...
-    } @ hm: {
-      home = {
-        packages = with pkgs; [
-          
-        ];
-      };
-      services.emacs = {
-        enable = true;
-        defaultEditor = true;
-      };
-      programs.emacs = {
-        enable = true;
-        extraConfig = builtins.readFile ./init.el
-      };
-    };
-  }
+  #   imports = [
+  #     inputs.home-manager.nixosModules."home-manager"
+  #   ];
+  #   config = {
+  #     home-manager.users.tzlil = {
+  #       pkgs,
+  #       config,
+  #       nixosConfig,
+  #       ...
+  #     } @ hm: {
+  #       home = {
+  #         packages = with pkgs; [
+
+  #         ];
+  #       };
+  #       services.emacs = {
+  #         enable = true;
+  #         defaultEditor = true;
+  #       };
+  #       programs.emacs = {
+  #         enable = true;
+  #         extraConfig = builtins.readFile ./init.el
+  #       };
+  #     };
+  #   }
 }
diff --git a/mixins/hyprland.nix b/mixins/hyprland.nix
index 3442438..3cc740c 100644
--- a/mixins/hyprland.nix
+++ b/mixins/hyprland.nix
@@ -5,16 +5,25 @@
   inputs,
   ...
 }: {
-  imports = [
-    inputs.hyprland.nixosModules.default
-  ];
   config = {
-    programs.hyprland = {
-      enable = true;
-      xwayland = {
-        enable = false;
-        hidpi = false;
-      };
+    home-manager.users.tzlil = {
+      pkgs,
+      config,
+      nixosConfig,
+      ...
+    } @ hm: {
+      imports = [
+        inputs.hyprland.homeManagerModules.default
+      ];
+
+      wayland.windowManager.hyprland.enable = true;
     };
+    # programs.hyprland = {
+    #   enable = true;
+    #   xwayland = {
+    #     enable = false;
+    #     hidpi = false;
+    #   };
+    # };
   };
 }
diff --git a/mixins/tailscale.nix b/mixins/tailscale.nix
index 0822d97..1398a1e 100644
--- a/mixins/tailscale.nix
+++ b/mixins/tailscale.nix
@@ -11,5 +11,13 @@
     };
 
     environment.persistence."/nix/persist".directories = ["/var/lib/tailscale"];
+
+    systemd.services.tailscaled = {
+      restartIfChanged = false;
+      serviceConfig.ExecStart = [
+        ""
+        "${config.services.tailscale.package}/bin/tailscaled --state=mem: --port $PORT $FLAGS"
+      ];
+    };
   };
 }