Initial commit

- Create a basic bootable system with Hyprland, a browser and some
  basic utilities

Change-Id: I4178e1185de319c45c6a4f2711fe035f50777e08
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..0e2b511
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+.DS_Store
+.idea
+*.log
+tmp/
+
+result/
diff --git a/flake.lock b/flake.lock
new file mode 100644
index 0000000..ebf239a
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,369 @@
+{
+  "nodes": {
+    "anyrun": {
+      "inputs": {
+        "flake-parts": "flake-parts",
+        "nixpkgs": [
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1701453400,
+        "narHash": "sha256-hI9+KBShsSfvWX7bmRa/1VI20WGat3lDXmbceMZzMS4=",
+        "owner": "Kirottu",
+        "repo": "anyrun",
+        "rev": "e14da6c37337ffa3ee1bc66965d58ef64c1590e5",
+        "type": "github"
+      },
+      "original": {
+        "owner": "Kirottu",
+        "repo": "anyrun",
+        "type": "github"
+      }
+    },
+    "ewwsalmoomedits--eww-widgets": {
+      "flake": false,
+      "locked": {
+        "lastModified": 1645129485,
+        "narHash": "sha256-yPSUdLgkwJyAX0rMjBGOuUIDvUKGPcVA5CSaCNcq0e8=",
+        "owner": "saimoomedits",
+        "repo": "eww-widgets",
+        "rev": "cfb2523a4e37ed2979e964998d9a4c37232b2975",
+        "type": "github"
+      },
+      "original": {
+        "owner": "saimoomedits",
+        "repo": "eww-widgets",
+        "type": "github"
+      }
+    },
+    "flake-compat": {
+      "flake": false,
+      "locked": {
+        "lastModified": 1650374568,
+        "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
+        "owner": "edolstra",
+        "repo": "flake-compat",
+        "rev": "b4a34015c698c7793d592d66adbab377907a2be8",
+        "type": "github"
+      },
+      "original": {
+        "owner": "edolstra",
+        "repo": "flake-compat",
+        "type": "github"
+      }
+    },
+    "flake-parts": {
+      "inputs": {
+        "nixpkgs-lib": [
+          "anyrun",
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1696343447,
+        "narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=",
+        "owner": "hercules-ci",
+        "repo": "flake-parts",
+        "rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4",
+        "type": "github"
+      },
+      "original": {
+        "owner": "hercules-ci",
+        "repo": "flake-parts",
+        "type": "github"
+      }
+    },
+    "flake-utils": {
+      "inputs": {
+        "systems": "systems_2"
+      },
+      "locked": {
+        "lastModified": 1694529238,
+        "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
+        "type": "github"
+      },
+      "original": {
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "type": "github"
+      }
+    },
+    "flake-utils-plus": {
+      "inputs": {
+        "flake-utils": "flake-utils"
+      },
+      "locked": {
+        "lastModified": 1696331477,
+        "narHash": "sha256-YkbRa/1wQWdWkVJ01JvV+75KIdM37UErqKgTf0L54Fk=",
+        "owner": "gytis-ivaskevicius",
+        "repo": "flake-utils-plus",
+        "rev": "bfc53579db89de750b25b0c5e7af299e0c06d7d3",
+        "type": "github"
+      },
+      "original": {
+        "owner": "gytis-ivaskevicius",
+        "repo": "flake-utils-plus",
+        "type": "github"
+      }
+    },
+    "home-manager": {
+      "inputs": {
+        "nixpkgs": [
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1707607386,
+        "narHash": "sha256-hj/RgQMTvCWQVInkZwiMMieumkfOjHXhtWhfuXHop/8=",
+        "owner": "nix-community",
+        "repo": "home-manager",
+        "rev": "bfd0ae29a86eff4603098683b516c67e22184511",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-community",
+        "repo": "home-manager",
+        "type": "github"
+      }
+    },
+    "hyprland": {
+      "inputs": {
+        "hyprland-protocols": "hyprland-protocols",
+        "nixpkgs": "nixpkgs",
+        "systems": "systems",
+        "wlroots": "wlroots",
+        "xdph": "xdph"
+      },
+      "locked": {
+        "lastModified": 1707586793,
+        "narHash": "sha256-Vdf5QGzkZe6UUdVZ80YT78id7Yw5ww9Fku0rEyPAkCg=",
+        "owner": "hyprwm",
+        "repo": "Hyprland",
+        "rev": "e4bb5fa4af1a6c36aab1c28651b5403dc4952f93",
+        "type": "github"
+      },
+      "original": {
+        "owner": "hyprwm",
+        "repo": "Hyprland",
+        "type": "github"
+      }
+    },
+    "hyprland-protocols": {
+      "inputs": {
+        "nixpkgs": [
+          "hyprland",
+          "nixpkgs"
+        ],
+        "systems": [
+          "hyprland",
+          "systems"
+        ]
+      },
+      "locked": {
+        "lastModified": 1691753796,
+        "narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=",
+        "owner": "hyprwm",
+        "repo": "hyprland-protocols",
+        "rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03",
+        "type": "github"
+      },
+      "original": {
+        "owner": "hyprwm",
+        "repo": "hyprland-protocols",
+        "type": "github"
+      }
+    },
+    "hyprlang": {
+      "inputs": {
+        "nixpkgs": [
+          "hyprland",
+          "xdph",
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1704287638,
+        "narHash": "sha256-TuRXJGwtK440AXQNl5eiqmQqY4LZ/9+z/R7xC0ie3iA=",
+        "owner": "hyprwm",
+        "repo": "hyprlang",
+        "rev": "6624f2bb66d4d27975766e81f77174adbe58ec97",
+        "type": "github"
+      },
+      "original": {
+        "owner": "hyprwm",
+        "repo": "hyprlang",
+        "type": "github"
+      }
+    },
+    "nix-index-database": {
+      "inputs": {
+        "nixpkgs": [
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1707620986,
+        "narHash": "sha256-XE0tCSkSVBeJDWhjFwusNInwAhrnp+TloUNUpvnTiLw=",
+        "owner": "nix-community",
+        "repo": "nix-index-database",
+        "rev": "0cb4345704123492e6d1f1068629069413c80de0",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-community",
+        "repo": "nix-index-database",
+        "type": "github"
+      }
+    },
+    "nixpkgs": {
+      "locked": {
+        "lastModified": 1706191920,
+        "narHash": "sha256-eLihrZAPZX0R6RyM5fYAWeKVNuQPYjAkCUBr+JNvtdE=",
+        "owner": "NixOS",
+        "repo": "nixpkgs",
+        "rev": "ae5c332cbb5827f6b1f02572496b141021de335f",
+        "type": "github"
+      },
+      "original": {
+        "owner": "NixOS",
+        "ref": "nixos-unstable",
+        "repo": "nixpkgs",
+        "type": "github"
+      }
+    },
+    "nixpkgs_2": {
+      "locked": {
+        "lastModified": 1707546158,
+        "narHash": "sha256-nYYJTpzfPMDxI8mzhQsYjIUX+grorqjKEU9Np6Xwy/0=",
+        "owner": "nixos",
+        "repo": "nixpkgs",
+        "rev": "d934204a0f8d9198e1e4515dd6fec76a139c87f0",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nixos",
+        "ref": "nixos-unstable",
+        "repo": "nixpkgs",
+        "type": "github"
+      }
+    },
+    "root": {
+      "inputs": {
+        "anyrun": "anyrun",
+        "ewwsalmoomedits--eww-widgets": "ewwsalmoomedits--eww-widgets",
+        "home-manager": "home-manager",
+        "hyprland": "hyprland",
+        "nix-index-database": "nix-index-database",
+        "nixpkgs": "nixpkgs_2",
+        "snowfall-lib": "snowfall-lib"
+      }
+    },
+    "snowfall-lib": {
+      "inputs": {
+        "flake-compat": "flake-compat",
+        "flake-utils-plus": "flake-utils-plus",
+        "nixpkgs": [
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1696432959,
+        "narHash": "sha256-oJQZv2MYyJaVyVJY5IeevzqpGvMGKu5pZcCCJvb+xjc=",
+        "owner": "snowfallorg",
+        "repo": "lib",
+        "rev": "92803a029b5314d4436a8d9311d8707b71d9f0b6",
+        "type": "github"
+      },
+      "original": {
+        "owner": "snowfallorg",
+        "repo": "lib",
+        "type": "github"
+      }
+    },
+    "systems": {
+      "locked": {
+        "lastModified": 1689347949,
+        "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
+        "owner": "nix-systems",
+        "repo": "default-linux",
+        "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-systems",
+        "repo": "default-linux",
+        "type": "github"
+      }
+    },
+    "systems_2": {
+      "locked": {
+        "lastModified": 1681028828,
+        "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+        "owner": "nix-systems",
+        "repo": "default",
+        "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-systems",
+        "repo": "default",
+        "type": "github"
+      }
+    },
+    "wlroots": {
+      "flake": false,
+      "locked": {
+        "host": "gitlab.freedesktop.org",
+        "lastModified": 1706359063,
+        "narHash": "sha256-5HUTG0p+nCJv3cn73AmFHRZdfRV5AD5N43g8xAePSKM=",
+        "owner": "wlroots",
+        "repo": "wlroots",
+        "rev": "00b869c1a96f300a8f25da95d624524895e0ddf2",
+        "type": "gitlab"
+      },
+      "original": {
+        "host": "gitlab.freedesktop.org",
+        "owner": "wlroots",
+        "repo": "wlroots",
+        "rev": "00b869c1a96f300a8f25da95d624524895e0ddf2",
+        "type": "gitlab"
+      }
+    },
+    "xdph": {
+      "inputs": {
+        "hyprland-protocols": [
+          "hyprland",
+          "hyprland-protocols"
+        ],
+        "hyprlang": "hyprlang",
+        "nixpkgs": [
+          "hyprland",
+          "nixpkgs"
+        ],
+        "systems": [
+          "hyprland",
+          "systems"
+        ]
+      },
+      "locked": {
+        "lastModified": 1706145785,
+        "narHash": "sha256-j9MP4fv2U/vdRKAXXc2gyMTmYwVnHP6kHx1/y6jprrU=",
+        "owner": "hyprwm",
+        "repo": "xdg-desktop-portal-hyprland",
+        "rev": "5a592647587cd20b9692a347df6939b6d371b3bb",
+        "type": "github"
+      },
+      "original": {
+        "owner": "hyprwm",
+        "repo": "xdg-desktop-portal-hyprland",
+        "type": "github"
+      }
+    }
+  },
+  "root": "root",
+  "version": 7
+}
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..afc5748
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,68 @@
+{
+  description = "All my Nix configurations";
+
+  inputs = {
+    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
+
+    snowfall-lib = {
+      url = "github:snowfallorg/lib";
+      inputs.nixpkgs.follows = "nixpkgs";
+    };
+
+    home-manager = {
+      url = "github:nix-community/home-manager";
+      inputs.nixpkgs.follows = "nixpkgs";
+    };
+
+    nix-index-database = {
+      url = "github:nix-community/nix-index-database";
+      inputs.nixpkgs.follows = "nixpkgs";
+    };
+
+    hyprland.url = "github:hyprwm/Hyprland";
+
+    anyrun = {
+      url = "github:Kirottu/anyrun";
+      inputs.nixpkgs.follows = "nixpkgs";
+    };
+
+    ewwsalmoomedits--eww-widgets = {
+      url = "github:saimoomedits/eww-widgets";
+      flake = false;
+    };
+  };
+
+  outputs = { self, nixpkgs, ... }@inputs:
+    inputs.snowfall-lib.mkFlake {
+      inherit inputs;
+      src = ./.;
+
+      homes.modules = [
+        # TODO: inputs.nix-index-database.hmModules.nix-index
+      ];
+
+      homes.users."minion@greylag".modules = [
+        inputs.hyprland.homeManagerModules.default
+        inputs.anyrun.homeManagerModules.default
+      ];
+
+      system.modules.nixos = [
+        inputs.hyprland.nixosModules.default
+      ];
+
+      snowfall = {
+        namespace = "minion";
+
+        meta.name = "minion";
+        meta.title = "Minion's Nix Configurations";
+      };
+
+      outputs-builder = channels: {
+        formatter = nixpkgs.legacyPackages.${channels.nixpkgs.system}.nixfmt;
+      };
+
+      channels-config = {
+        allowUnfree = true;
+      };
+    };
+}
diff --git a/homes/x86_64-linux/minion@greylag/default.nix b/homes/x86_64-linux/minion@greylag/default.nix
new file mode 100644
index 0000000..6632942
--- /dev/null
+++ b/homes/x86_64-linux/minion@greylag/default.nix
@@ -0,0 +1,25 @@
+{
+    # Snowfall Lib provides a customized `lib` instance with access to your flake's library
+    # as well as the libraries available from your flake's inputs.
+    lib,
+    # An instance of `pkgs` with your overlays and packages applied is also available.
+    pkgs,
+    # You also have access to your flake's inputs.
+    inputs,
+
+    # Additional metadata is provided by Snowfall Lib.
+    home, # The home architecture for this host (eg. `x86_64-linux`).
+    target, # The Snowfall Lib target for this home (eg. `x86_64-home`).
+    format, # A normalized name for the home target (eg. `home`).
+    virtual, # A boolean to determine whether this home is a virtual target using nixos-generators.
+    host, # The host name for this home.
+
+    # All other arguments come from the home home.
+    config,
+    ...
+}:
+{
+    home.file.".snowfall.systemname".text = ''
+      greylag
+    '';
+}
diff --git a/homes/x86_64-linux/skyler@canvasback/default.nix b/homes/x86_64-linux/skyler@canvasback/default.nix
new file mode 100644
index 0000000..35277ab
--- /dev/null
+++ b/homes/x86_64-linux/skyler@canvasback/default.nix
@@ -0,0 +1,25 @@
+{
+    # Snowfall Lib provides a customized `lib` instance with access to your flake's library
+    # as well as the libraries available from your flake's inputs.
+    lib,
+    # An instance of `pkgs` with your overlays and packages applied is also available.
+    pkgs,
+    # You also have access to your flake's inputs.
+    inputs,
+
+    # Additional metadata is provided by Snowfall Lib.
+    home, # The home architecture for this host (eg. `x86_64-linux`).
+    target, # The Snowfall Lib target for this home (eg. `x86_64-home`).
+    format, # A normalized name for the home target (eg. `home`).
+    virtual, # A boolean to determine whether this home is a virtual target using nixos-generators.
+    host, # The host name for this home.
+
+    # All other arguments come from the home home.
+    config,
+    ...
+}:
+{
+    home.file.".snowfall.systemname".text = ''
+      canvasback
+    '';
+}
diff --git a/modules/home/anyrun/default.nix b/modules/home/anyrun/default.nix
new file mode 100644
index 0000000..2edf952
--- /dev/null
+++ b/modules/home/anyrun/default.nix
@@ -0,0 +1,15 @@
+{ inputs, pkgs, system, ...}: {
+  programs.anyrun = {
+    enable = true;
+    config = {
+      plugins = [
+        inputs.anyrun.packages.${system}.applications
+        inputs.anyrun.packages.${system}.rink
+        inputs.anyrun.packages.${system}.shell
+        inputs.anyrun.packages.${system}.translate
+        inputs.anyrun.packages.${system}.kidex
+        inputs.anyrun.packages.${system}.symbols
+      ];
+    };
+  };
+}
\ No newline at end of file
diff --git a/modules/home/eww/config/eww.scss b/modules/home/eww/config/eww.scss
new file mode 100644
index 0000000..eae0b3c
--- /dev/null
+++ b/modules/home/eww/config/eww.scss
@@ -0,0 +1,61 @@
+* {
+    all: unset; //Unsets everything so you can style everything from scratch
+}
+
+.bar {
+    background-color: #ccd0da;
+    color: #4c4f69;
+    border-radius: 10px;
+    padding: 10px 15px;
+    margin: 0 20px;
+    margin-top: 20px;
+}
+
+// Styles on classes (see eww.yuck for more information)
+
+.sidestuff slider {
+    all: unset;
+    color: #ffd5cd;
+}
+
+.metric scale trough highlight {
+    all: unset;
+    background-color: #D35D6E;
+    color: #000000;
+    border-radius: 10px;
+}
+
+.metric scale trough {
+    all: unset;
+    background-color: #4e4e4e;
+    border-radius: 50px;
+    min-height: 3px;
+    min-width: 50px;
+    margin-left: 10px;
+    margin-right: 20px;
+}
+
+.metric scale trough highlight {
+    all: unset;
+    background-color: #D35D6E;
+    color: #000000;
+    border-radius: 10px;
+}
+
+.metric scale trough {
+    all: unset;
+    background-color: #4e4e4e;
+    border-radius: 50px;
+    min-height: 3px;
+    min-width: 50px;
+    margin-left: 10px;
+    margin-right: 20px;
+}
+
+.label-ram {
+    font-size: large;
+}
+
+.workspaces button:hover {
+    color: #D35D6E;
+}
\ No newline at end of file
diff --git a/modules/home/eww/config/eww.yuck b/modules/home/eww/config/eww.yuck
new file mode 100644
index 0000000..598646e
--- /dev/null
+++ b/modules/home/eww/config/eww.yuck
@@ -0,0 +1,98 @@
+(defwidget bar []
+  (centerbox :orientation "h"
+             :class "bar"
+    (workspaces)
+    (music)
+    (sidestuff)))
+
+(defwidget sidestuff []
+  (box :class "sidestuff" :orientation "h" :space-evenly false :halign "end"
+    (metric :label "🔊"
+      :value volume
+    :onchange "amixer -D pulse sset Master {}%")
+    (metric :label "ï¡š"
+      :value {EWW_RAM.used_mem_perc}
+    :onchange "")
+    (metric :label "💾"
+      :value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}
+    :onchange "")
+  time))
+
+(defwidget workspaces []
+  (box :class "workspaces"
+    :orientation "h"
+    :space-evenly true
+    :halign "start"
+    :spacing 10
+    (button :onclick "wmctrl -s 0" 1)
+    (button :onclick "wmctrl -s 1" 2)
+    (button :onclick "wmctrl -s 2" 3)
+    (button :onclick "wmctrl -s 3" 4)
+    (button :onclick "wmctrl -s 4" 5)
+    (button :onclick "wmctrl -s 5" 6)
+    (button :onclick "wmctrl -s 6" 7)
+    (button :onclick "wmctrl -s 7" 8)
+    (button :onclick "wmctrl -s 8" 9)))
+
+(defwidget music []
+  (box :class "music"
+    :orientation "h"
+    :space-evenly false
+    :halign "center"
+  {music != "" ? "🎵${music}" : ""}))
+
+
+(defwidget metric [label value onchange]
+  (box :orientation "h"
+    :class "metric"
+    :space-evenly false
+    (box :class "label" label)
+    (scale :min 0
+      :max 101
+      :active {onchange != ""}
+      :value value
+    :onchange onchange)))
+
+
+
+(deflisten music :initial ""
+"playerctl --follow metadata --format '{{ artist }} - {{ title }}' || true")
+
+(defpoll volume :interval "1s"
+"scripts/getvol")
+
+(defpoll time :interval "10s"
+"date '+%H:%M %b %d, %Y'")
+
+(defwindow bar-eDP1
+  :monitor 0
+  :windowtype "dock"
+  :geometry (geometry :x "0%"
+    :y "0%"
+    :width "100%"
+    :height "10px"
+  :anchor "top center")
+  :exclusive true
+  (bar))
+
+(defwindow bar-HDMI-A-1
+  :monitor 0
+  :windowtype "dock"
+  :geometry (geometry :x "0%"
+    :y "0%"
+    :width "100%"
+    :height "10px"
+  :anchor "top center")
+  :exclusive true
+  (bar))
+
+(defwindow bar-DP7
+  :monitor 0
+  :windowtype "dock"
+  :geometry (geometry :x "0%"
+    :y "0%"
+    :width "100%"
+    :height "10px"
+  :anchor "top center")
+  :exclusive true
+  (bar))
\ No newline at end of file
diff --git a/modules/home/eww/default.nix b/modules/home/eww/default.nix
new file mode 100644
index 0000000..2159bfe
--- /dev/null
+++ b/modules/home/eww/default.nix
@@ -0,0 +1,7 @@
+{ inputs, pkgs, ... }: {
+  programs.eww = {
+    enable = true;
+    package = pkgs.eww-wayland;
+    configDir = ./config;
+  };
+}
\ No newline at end of file
diff --git a/modules/home/gestures/default.nix b/modules/home/gestures/default.nix
new file mode 100644
index 0000000..6abbbe4
--- /dev/null
+++ b/modules/home/gestures/default.nix
@@ -0,0 +1,11 @@
+{ lib, config, ... }: {
+  options.minion.touchpadGestures.enable = lib.mkEnableOption "Enable touchpad gestures";
+
+  config = lib.mkIf config.minion.touchpadGestures.enable {
+    services.fusuma.enable = true;
+
+    systemd.user.startServices = "sd-switch";
+
+    systemd.user.services.fusuma.Unit.X-Restart-Triggers = [ config.xdg.configFile."fusuma/config.yaml".source ];
+  };
+}
\ No newline at end of file
diff --git a/modules/home/hyprland/default.nix b/modules/home/hyprland/default.nix
new file mode 100644
index 0000000..a2f8b88
--- /dev/null
+++ b/modules/home/hyprland/default.nix
@@ -0,0 +1,93 @@
+{ pkgs, config, inputs, system, ... }: let
+  lock = "${pkgs.waylock}/bin/waylock";
+in {
+
+  # TODO: Eww, SwayNC, hyprland-per-window-layout, waylock, hy3, anyrun, hypr-empty
+
+  home.packages = [ pkgs.hyprpicker ];
+
+  minion.touchpadGestures.enable = true;
+
+  services.fusuma.settings.swipe = let 
+    hyprctl = "${config.wayland.windowManager.hyprland.package}/bin/hyprctl";
+    jq = "${pkgs.jq}/bin/jq";
+    awk = "${pkgs.gawk}/bin/awk";
+  in {
+    "3".up.command = "${hyprctl} dispatch fullscreen 0";
+    "3".down.command = "${hyprctl} dispatch fullscreen 0";
+    "4".down.command = lock;
+    "3".left.command = "${hyprctl} dispatch workspace $(${hyprctl} activeworkspace -j | ${jq} .id | ${awk} '{print $1+1}')";
+    "3".right.command = "${hyprctl} dispatch workspace $(${hyprctl} activeworkspace -j | ${jq} .id | ${awk} '{print $1-1}')";
+  };
+
+  wayland.windowManager.hyprland = {
+    enable = true;
+
+    xwayland.enable = true;
+    systemd.enable = true;
+
+    settings = let
+      mod = "SUPER";
+      terminal = "${pkgs.kitty}/bin/kitty";
+      menu = "${inputs.anyrun.packages.${system}.anyrun}/bin/anyrun";
+    in {
+      misc = {
+        disable_hyprland_logo = true;
+        disable_splash_rendering = true;
+      };
+
+      exec-once = "${pkgs.hyprpaper}/bin/hyprpaper";
+
+      monitor = [
+        "eDP-1,preferred,0x0,1"
+        "desc:Dell Inc. DELL P2715Q V7WP95AV914L,preferred,2256x-1956,1,transform,1"
+        "desc:AOC 2460G5 0x00023C3F,preferred,336x-1080,1"
+        ",preferred,auto,1" # https://wiki.hyprland.org/Configuring/Monitors/
+      ];
+
+      input = {
+        kb_layout = "us";
+        kb_variant = "dvorak";
+        natural_scroll = true;
+
+        touchpad = {
+          natural_scroll = true;
+        };
+      };
+
+      xwayland = {
+        force_zero_scaling = true;
+      };
+
+      bind = [
+        "${mod}, Q, killactive"
+        "${mod}, SPACE, togglefloating"
+        "${mod}, RETURN, exec, ${terminal}"
+        "${mod}, down, movefocus, d"
+        "${mod}, up, movefocus, u"
+        "${mod}, right, movefocus, r"
+        "${mod}, left, movefocus, l"
+        "${mod}, L, exec, ${lock}"
+        "${mod}, D, exec, ${menu}"
+      ] ++ (
+        builtins.concatLists (builtins.genList (
+            x: let
+              ws = let
+                c = (x + 1) / 10;
+              in
+                builtins.toString (x + 1 - (c * 10));
+            in [
+              "${mod}, ${ws}, workspace, ${toString (x + 1)}"
+              "${mod} SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
+            ]
+          )
+          10)
+      );
+
+      bindm = [
+        "${mod}, mouse:272, movewindow"
+        "${mod}, mouse:273, resizewindow"
+      ];
+    };
+  };
+}
\ No newline at end of file
diff --git a/modules/home/hyprpaper/default.nix b/modules/home/hyprpaper/default.nix
new file mode 100644
index 0000000..c378a21
--- /dev/null
+++ b/modules/home/hyprpaper/default.nix
@@ -0,0 +1,9 @@
+{ ... }: {
+  config.xdg.configFile."hypr/hyprpaper.conf".source = builtins.toFile "hyprpaper.conf" ''
+    preload = ${./wallpaper.png}
+
+    wallpaper=,${./wallpaper.png}
+
+    splash = true
+  '';
+}
diff --git a/modules/home/hyprpaper/wallpaper.png b/modules/home/hyprpaper/wallpaper.png
new file mode 100644
index 0000000..409ae38
--- /dev/null
+++ b/modules/home/hyprpaper/wallpaper.png
Binary files differ
diff --git a/modules/home/manual/default.nix b/modules/home/manual/default.nix
new file mode 100644
index 0000000..8709a09
--- /dev/null
+++ b/modules/home/manual/default.nix
@@ -0,0 +1,5 @@
+{ config, lib, pkgs, ... }:
+
+{
+  manual.manpages.enable = true;
+}
diff --git a/modules/home/nix-index/default.nix b/modules/home/nix-index/default.nix
new file mode 100644
index 0000000..1345dc7
--- /dev/null
+++ b/modules/home/nix-index/default.nix
@@ -0,0 +1,7 @@
+{ config, lib, pkgs, ... }:
+
+{
+  xdg.enable = true;
+
+  home.packages = [ pkgs.nix-index ];
+}
diff --git a/modules/home/stateVersion/default.nix b/modules/home/stateVersion/default.nix
new file mode 100644
index 0000000..2e40de6
--- /dev/null
+++ b/modules/home/stateVersion/default.nix
@@ -0,0 +1,5 @@
+{ config, lib, pkgs, ... }:
+
+{
+  home.stateVersion = "24.05";
+}
diff --git a/modules/nixos/audio/default.nix b/modules/nixos/audio/default.nix
new file mode 100644
index 0000000..7ded3fb
--- /dev/null
+++ b/modules/nixos/audio/default.nix
@@ -0,0 +1,10 @@
+{ ... }: {
+  services.pipewire = {
+    enable = true;
+    alsa = {
+      enable = true;
+      support32Bit = true;
+    };
+    pulse.enable = true;
+  };
+}
diff --git a/modules/nixos/browsers/default.nix b/modules/nixos/browsers/default.nix
new file mode 100644
index 0000000..33078e1
--- /dev/null
+++ b/modules/nixos/browsers/default.nix
@@ -0,0 +1,3 @@
+{ pkgs, ... }: {
+  environment.systemPackages = [ pkgs.firefox ];
+}
\ No newline at end of file
diff --git a/modules/nixos/editors/default.nix b/modules/nixos/editors/default.nix
new file mode 100644
index 0000000..df773e6
--- /dev/null
+++ b/modules/nixos/editors/default.nix
@@ -0,0 +1,7 @@
+{ pkgs, ... }: {
+  environment.systemPackages = [
+    pkgs.emacs
+    pkgs.neovim
+    pkgs.vscode-fhs
+  ];
+}
diff --git a/modules/nixos/git/default.nix b/modules/nixos/git/default.nix
new file mode 100644
index 0000000..9366bdf
--- /dev/null
+++ b/modules/nixos/git/default.nix
@@ -0,0 +1,3 @@
+{ pkgs, ... }: {
+  environment.systemPackages = [ pkgs.git ];
+}
\ No newline at end of file
diff --git a/modules/nixos/graphics/default.nix b/modules/nixos/graphics/default.nix
new file mode 100644
index 0000000..55a5ea4
--- /dev/null
+++ b/modules/nixos/graphics/default.nix
@@ -0,0 +1,10 @@
+{ pkgs, ... }: {
+  hardware.opengl = {
+    enable = true;
+    driSupport = true;
+    driSupport32Bit = true;
+    extraPackages = [
+      pkgs.vaapiVdpau
+    ];
+  };
+}
diff --git a/modules/nixos/home-manager/default.nix b/modules/nixos/home-manager/default.nix
new file mode 100644
index 0000000..9c96dd3
--- /dev/null
+++ b/modules/nixos/home-manager/default.nix
@@ -0,0 +1,5 @@
+{ inputs, system, ... }: {
+  environment.systemPackages = [
+    inputs.home-manager.defaultPackage.${system}
+  ];
+}
\ No newline at end of file
diff --git a/modules/nixos/hyprland/default.nix b/modules/nixos/hyprland/default.nix
new file mode 100644
index 0000000..90e38ce
--- /dev/null
+++ b/modules/nixos/hyprland/default.nix
@@ -0,0 +1,5 @@
+{ ... }: {
+  programs.hyprland.enable = true;
+
+  users.users.minion.extraGroups = [ "input" ];
+}
\ No newline at end of file
diff --git a/modules/nixos/nix/default.nix b/modules/nixos/nix/default.nix
new file mode 100644
index 0000000..307d6ea
--- /dev/null
+++ b/modules/nixos/nix/default.nix
@@ -0,0 +1,20 @@
+{ ... }: {
+  system.stateVersion = "24.05";
+  console.keyMap = "dvorak";
+
+  nix.settings = {
+    builders-use-substitutes = true;
+
+    substituters = [
+      "https://cache.nixos.org"
+      "https://anyrun.cachix.org"
+    ];
+
+    trusted-public-keys = [
+      "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
+      "anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s="
+    ];
+
+    experimental-features = [ "nix-command" "flakes" ];
+  };
+}
diff --git a/modules/nixos/terminals/default.nix b/modules/nixos/terminals/default.nix
new file mode 100644
index 0000000..3b44e0b
--- /dev/null
+++ b/modules/nixos/terminals/default.nix
@@ -0,0 +1,5 @@
+{ pkgs, ... }: {
+  environment.systemPackages = [
+    pkgs.kitty
+  ];
+}
\ No newline at end of file
diff --git a/modules/nixos/users/default.nix b/modules/nixos/users/default.nix
new file mode 100644
index 0000000..5e4b0c1
--- /dev/null
+++ b/modules/nixos/users/default.nix
@@ -0,0 +1,13 @@
+{ pkgs, ... }: {
+  users.users.minion = {
+    isNormalUser = true;
+    extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
+    packages = [
+      pkgs.firefox
+      pkgs.tree
+    ];
+    initialPassword = "nixos";
+  };
+
+  security.pam.services.waylock = {};
+}
diff --git a/modules/nixos/wifi/default.nix b/modules/nixos/wifi/default.nix
new file mode 100644
index 0000000..fcd6ccf
--- /dev/null
+++ b/modules/nixos/wifi/default.nix
@@ -0,0 +1,7 @@
+{ ... }: {
+  networking.wireless = {
+    enable = true;
+    userControlled.enable = true;
+  };
+  hardware.enableRedistributableFirmware = true;
+}
diff --git a/systems/x86_64-linux/greylag/default.nix b/systems/x86_64-linux/greylag/default.nix
new file mode 100644
index 0000000..3b4b618
--- /dev/null
+++ b/systems/x86_64-linux/greylag/default.nix
@@ -0,0 +1,85 @@
+{ lib, pkgs, inputs, system, target, format, virtual, systems, config, ... }: {
+  networking.hostName = "greylag";
+  boot.loader.systemd-boot.enable = true;
+  boot.loader.efi.canTouchEfiVariables = true;
+
+  boot.initrd.availableKernelModules =
+    [ "xhci_pci" "thunderbolt" "nvme" "uas" "usbhid" "sd_mod" "ext4" ];
+  boot.initrd.kernelModules = [ ];
+  boot.kernelModules = [ "kvm-intel" ];
+  boot.extraModulePackages = [ ];
+
+  boot.initrd.systemd.enable = true; # needed for the way we do our YubiKey
+  boot.initrd.luks.devices."key".device = "/dev/disk/by-label/KEY";
+
+  boot.initrd.luks.devices."luks-expansion0" = {
+    device = "/dev/disk/by-label/EXPANSION0";
+    keyFile = "/key:/dev/mapper/key";
+  };
+  boot.initrd.luks.devices."luks-ssd0" = {
+    device = "/dev/disk/by-label/SSD0";
+    keyFile = "/key:/dev/mapper/key";
+  };
+
+  fileSystems = (lib.mapAttrs (_: share_name: {
+    device = "/dev/disk/by-label/BTRFS0";
+    fsType = "btrfs";
+    options = [ "subvol=shared/${share_name}" "compress=zstd:1" ];
+  }) {
+    "/home/minion/Code" = "@Code";
+    "/var/lib/containers" = "@containers";
+    "/etc/NetworkManager" = "@NetworkManager";
+    "/home/minion/.local/share/containers/storage" = "@personal-containers";
+    "/home/minion/.gtimelog" = "@gtimelog";
+    "/home/minion/Documents" = "@documents";
+  }) // {
+    "/mnt" = {
+      device = "/dev/mapper/key";
+      fsType = "ext4";
+    };
+
+    "/" = {
+      device = "/dev/disk/by-label/BTRFS0";
+      fsType = "btrfs";
+      options = [ "subvol=@nixos" "compress=zstd:1" ];
+    };
+
+    "/var" = {
+      device = "/dev/disk/by-label/BTRFS0";
+      fsType = "btrfs";
+      options = [ "subvol=@nixos-var" "compress=zstd:1" ];
+    };
+
+    "/home" = {
+      device = "/dev/disk/by-label/BTRFS0";
+      fsType = "btrfs";
+      options = [ "subvol=@nixos-home" "compress=zstd:1" ];
+    };
+
+    "/nix" = {
+      device = "/dev/disk/by-label/BTRFS0";
+      fsType = "btrfs";
+      options = [ "subvol=@nixos-nix" "compress=zstd:1" ];
+    };
+
+    "/boot" = {
+      device = "/dev/disk/by-label/ESP";
+      fsType = "vfat";
+    };
+  };
+
+  swapDevices = [ ];
+
+  # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
+  # (the default) this is the recommended approach. When using systemd-networkd it's
+  # still possible to use this option, but it's recommended to use it in conjunction
+  # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
+  networking.useDHCP = lib.mkDefault true;
+  # networking.interfaces.enp0s13f0u4u4u4.useDHCP = lib.mkDefault true;
+  # networking.interfaces.wlp166s0.useDHCP = lib.mkDefault true;
+
+  nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+  powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
+  hardware.cpu.intel.updateMicrocode =
+    lib.mkDefault config.hardware.enableRedistributableFirmware;
+}