summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--hosts/default.nix22
-rw-r--r--hosts/navi/default.nix24
-rw-r--r--hosts/vps/default.nix50
-rw-r--r--hosts/vps/hardware-configuration.nix36
-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
-rw-r--r--mixins/cli.nix1
-rw-r--r--profiles/core.nix43
-rw-r--r--profiles/impermanence.nix7
-rw-r--r--profiles/stdenv.nix (renamed from profiles/gentoo.nix)0
-rw-r--r--profiles/tzlil.nix7
14 files changed, 72 insertions, 118 deletions
diff --git a/hosts/default.nix b/hosts/default.nix
index 164030c..1367391 100644
--- a/hosts/default.nix
+++ b/hosts/default.nix
@@ -7,7 +7,7 @@ inputs: let
         ../profiles/security.nix
         ../profiles/ssh.nix
         ../profiles/network.nix
-	../profiles/impermanence.nix
+        ../profiles/impermanence.nix
       ];
     }
     inputs.agenix.nixosModules.age
@@ -32,6 +32,11 @@ inputs: let
       hermetic = false;
     };
   };
+
+  stateVersion = v: {
+    home-manager.users.tzlil.home.stateVersion = v;
+    system.stateVersion = v;
+  };
 in {
   navi = inputs.nixpkgs.lib.nixosSystem {
     system = "x86_64-linux";
@@ -41,6 +46,21 @@ in {
         "${inputs.self}/hosts/navi"
         {networking.hostName = "navi";}
         (nixinate "navi")
+        (stateVersion "23.11")
+      ]
+      ++ commonProfiles
+      ++ commonHome;
+  };
+
+  vps = inputs.nixpkgs.lib.nixosSystem {
+    system = "x86_64-linux";
+    specialArgs = {inherit inputs;};
+    modules =
+      [
+        "${inputs.self}/hosts/vps"
+        {networking.hostName = "vps";}
+        (nixinate "vps")
+        (stateVersion "22.05")
       ]
       ++ commonProfiles
       ++ commonHome;
diff --git a/hosts/navi/default.nix b/hosts/navi/default.nix
index 497f5f7..e689bc3 100644
--- a/hosts/navi/default.nix
+++ b/hosts/navi/default.nix
@@ -7,26 +7,22 @@
 }: {
   imports = [
     ./hardware-configuration.nix
-    # ../../profiles/core.nix
     ../../profiles/graphical.nix
     ../../mixins/tailscale.nix
     ../../mixins/cli.nix
     ../../mixins/greet.nix
-    # ../../mixins/hyprland.nix
     ../../mixins/sway.nix
     ../../mixins/pipewire.nix
     ../../mixins/multimedia.nix
-    # ../../mixins/emacs
     ../../mixins/syncthing.nix
   ];
 
   config = {
-    system.stateVersion = "23.11";
     boot = {
       tmp.cleanOnBoot = true;
       initrd = {
         supportedFilesystems = ["btrfs"];
-        availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "usbhid" "snd_usb_audio"];
+        availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "usbhid" "snd_usb_audio" "hid_logitech_dj" "hid_logitech_hidpp"];
       };
       supportedFilesystems = ["ntfs"];
       kernelModules = ["kvm-intel" "snd-seq" "snd-rawmidi" "bridge"];
@@ -45,24 +41,6 @@
 
     time.timeZone = lib.mkDefault "Israel";
 
-    /*
-    fileSystems."/" = {
-      device = "none";
-      fsType = "tmpfs";
-      # hyprland doesnt compile with noexec root
-      options = ["defaults" "size=8G" "mode=755"];
-    };
-
-    fileSystems."/boot" = {
-      device = "/dev/disk/by-uuid/34CB-F158";
-      fsType = "vfat";
-    };
-
-    fileSystems."/nix" = {
-      device = "/dev/disk/by-uuid/8a8cc550-034e-4545-a958-564779f51061";
-      fsType = "btrfs";
-    };
-    */
     zramSwap = {
       enable = true;
       algorithm = "zstd";
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
diff --git a/mixins/cli.nix b/mixins/cli.nix
index 6fd5ce6..936098d 100644
--- a/mixins/cli.nix
+++ b/mixins/cli.nix
@@ -15,6 +15,7 @@
       imports = [
         inputs.viper-nix-common.homeModules.xdg
       ];
+      programs.command-not-found.dbPath = inputs.programsdb.packages.${pkgs.system}.programs-sqlite;
       home = {
         packages = with pkgs; [
           rsync
diff --git a/profiles/core.nix b/profiles/core.nix
deleted file mode 100644
index 4fefbdd..0000000
--- a/profiles/core.nix
+++ /dev/null
@@ -1,43 +0,0 @@
-{
-  pkgs,
-  lib,
-  config,
-  inputs,
-  ...
-}: {
-  # imports = [
-  #   ../profiles/security.nix
-  #   ../profiles/network.nix
-  # ];
-  config = {
-    # system.stateVersion = "22.5";
-    # nix = {
-    #   registry.nixpkgs.flake = inputs.nixpkgs;
-    #   gc.automatic = true;
-    #   optimise.automatic = true;
-    #   settings = {
-    #     allowed-users = ["root"];
-    #     trusted-users = ["root"];
-    #     sandbox = true;
-    #   };
-    #   extraOptions = ''
-    #     experimental-features = nix-command flakes
-    #   '';
-    # };
-    # users.mutableUsers = false;
-    # environment.defaultPackages = lib.mkForce [];
-
-    programs.command-not-found.dbPath = inputs.programsdb.packages.${pkgs.system}.programs-sqlite;
-
-    # boot = {
-    #   tmp.cleanOnBoot = true;
-    #   kernelParams = [
-    #     "init_on_free=1"
-    #     "page_poison=1"
-    #     "page_alloc.shuffle=1"
-    #     "slab_nomerge"
-    #     "vsyscall=none"
-    #   ];
-    # };
-  };
-}
diff --git a/profiles/impermanence.nix b/profiles/impermanence.nix
index 5fdd9eb..c222a43 100644
--- a/profiles/impermanence.nix
+++ b/profiles/impermanence.nix
@@ -1,4 +1,5 @@
-{inputs,
+{
+  inputs,
   config,
   lib,
   options,
@@ -20,8 +21,8 @@ in {
         [
         ]
         ++ sshHostKeys
-	++ (map (x: x + ".pub") sshHostKeys);
+        ++ (map (x: x + ".pub") sshHostKeys);
     };
-    age.identityPaths = (map (x: "/nix/persist" + x) sshHostKeys);
+    age.identityPaths = map (x: "/nix/persist" + x) sshHostKeys;
   };
 }
diff --git a/profiles/gentoo.nix b/profiles/stdenv.nix
index 337a306..337a306 100644
--- a/profiles/gentoo.nix
+++ b/profiles/stdenv.nix
diff --git a/profiles/tzlil.nix b/profiles/tzlil.nix
index 5e85f35..f2e2505 100644
--- a/profiles/tzlil.nix
+++ b/profiles/tzlil.nix
@@ -40,7 +40,6 @@
 
     home-manager.users.tzlil = {pkgs, ...} @ hm: {
       home = {
-        stateVersion = "22.05";
         username = "tzlil";
         homeDirectory = "/home/tzlil";
         sessionVariables.SSH_AUTH_SOCK = "/run/user/1000/ssh-agent";
@@ -60,9 +59,9 @@
         Unit = {
           Description = "SSH Agent";
         };
-	Install = {
-	  WantedBy = ["default.target"];
-	};
+        Install = {
+          WantedBy = ["default.target"];
+        };
         Service = {
           ExecStartPre = "${pkgs.coreutils}/bin/rm -f %t/ssh-agent";
           ExecStart =