greenhouse

kore

my public infrastructure monorepo

git clone [email protected]:kore.git

feat(nixos/hosts): add peony host

commit5f9198b1f24c227056b86a75b531f83819cb26d3
parent9f6319a2de7e8468dbd081e19677101cdbd83f9b
authorlostduk <[email protected]>
date2026-10-14 19:44 +0000
home/features/misc/firefox.nix3+
home/features/wayland/dwl.nix11++++
home/features/wayland/foot.nix11++++
home/profiles/peony.nix16++++++
kore.json7+++
nixos/hosts/peony.nix76++++++++++++++++++++++++++
nixos/roles/desktop.nix2+
overlays/default.nix4++
overlays/dwl_config.h121++++++++++++++++++++++++++++++++++++++++

9 files changed, -1/+250

home/features/misc/firefox.nix

@@ -0,0 +1,3 @@+{+  programs.firefox.enable = true;+}

home/features/wayland/dwl.nix

@@ -0,0 +1,11 @@+{ pkgs, ... }:++{+  home.packages = with pkgs; [ wmenu wl-clipboard xdg-utils ];++  programs.bash.profileExtra = ''+    if [ -z "$WAYLAND_DISPLAY" ] && [ "$(tty)" = /dev/tty1 ]; then+      exec /etc/xdg/dwl-session+    fi+  '';+}

home/features/wayland/foot.nix

@@ -0,0 +1,11 @@+{+  programs.foot = {+    enable = true;+    settings = {+      main = {+        font = "ComicShannsMono Nerd Font:size=11";+        line-height = "16px";+      };+    };+  };+}

home/profiles/peony.nix

@@ -0,0 +1,16 @@+{+  imports = [+    ../features/cli/gpg.nix+    ../features/cli/ssh.nix+    ../features/cli/git.nix+    ../features/cli/nvim.nix+    ../features/cli/bash.nix+    ../features/cli/tmux.nix++    ../features/misc/xdg.nix+    ../features/misc/firefox.nix++    ../features/wayland/dwl.nix+    ../features/wayland/foot.nix+  ];+}

kore.json

@@ -20,6 +20,13 @@       "users": ["lostduk"],       "aliases": ["git"],       "ipv4": "82.153.138.53"+    },+    "peony": {+      "system": "x86_64-linux",+      "stateVersion": "26.11",+      "roles": ["home", "desktop"],+      "users": ["lostduk"],+      "ipv4": null     }   },   "repos": {

nixos/hosts/peony.nix

@@ -0,0 +1,76 @@+{ inputs, modulesPath, ... }:++{+  imports = [+    inputs.disko.nixosModules.disko++    ( modulesPath + "/installer/scan/not-detected.nix" )+  ];++  boot = {+    kernelModules = [ "kvm-intel" ];++    loader = {+      systemd-boot.enable = true;+      efi.canTouchEfiVariables = true;+    };++    initrd = {+      systemd.enable = true;+      availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];+    };+  };++  hardware = {+    graphics.enable = true;+    cpu.intel.updateMicrocode = true;+  };++  disko.devices.disk.main = {+    type = "disk";+    device = "/dev/disk/by-id/ata-OCPC_SSD_2.5__SATA_III_240GB_LITE_2507220200324";+    content = {+      type = "gpt";+      partitions = {+        ESP = {+          size = "1G";+          type = "EF00";+          content = {+            type = "filesystem";+            format = "vfat";+            mountpoint = "/boot";+            mountOptions = [ "umask=0077" ];+          };+        };+        luks = {+          size = "100%";+          content = {+            type = "luks";+            name = "crypted";+            settings.allowDiscards = true;+            content = {+              type = "btrfs";+              extraArgs = [ "-f" ];+              subvolumes = let+                options = [ "compress=zstd" "noatime" "ssd" "discard=async" ];+              in {+                "/@" = {+                  mountpoint = "/";+                  mountOptions = options;+                };+                "/@nix" = {+                  mountpoint = "/nix";+                  mountOptions = options;+                };+                "/@persist" = {+                  mountpoint = "/persist";+                  mountOptions = options;+                };+              };+            };+          };+        };+      };+    };+  };+}

nixos/roles/desktop.nix

@@ -1,6 +1,8 @@ { pkgs, ... }:  {+  programs.dwl.enable = true;+   xdg = {     autostart.enable = true;     icons.enable = true;

overlays/default.nix

@@ -15,5 +15,7 @@       inputs;   }; -  modifications = final: prev: { };+  modifications = final: prev: {+    dwl = prev.dwl.override { configH = ./dwl_config.h; };+  }; }

overlays/dwl_config.h

@@ -0,0 +1,121 @@+/* general */+#define TAGCOUNT (6)++static int log_level                       = WLR_ERROR;+static const int sloppyfocus               = 1;+static const int bypass_surface_visibility = 0;++/* appearance */+static const unsigned int borderpx         = 1;+static const unsigned int snap             = 32;+static const float rootcolor[]             = {0.1f, 0.1f, 0.1f, 1.0f};+static const float bordercolor[]           = {0.2f, 0.2f, 0.2f, 1.0f};+static const float focuscolor[]            = {0.0f, 0.3f, 0.4f, 1.0f};+static const float urgentcolor[]           = {0.1f, 0.0f, 0.0f, 1.0f};+static const float fullscreen_bg[]         = {0.1f, 0.1f, 0.1f, 1.0f};++/* rules */+static const Rule rules[] = {+	{ "Gimp_EXAMPLE", NULL, 0, 1, -1 },+};++/* layouts */+static const Layout layouts[] = {+	{ "[T]", tile },+	{ "[F]", NULL },+	{ "[M]", monocle },+};++/* monitors */+static const MonitorRule monrules[] = {+	{ NULL, 0.55f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },+};++/* keyboard */+static const int repeat_rate = 25;+static const int repeat_delay = 600;++static const struct xkb_rule_names xkb_rules = {+	.layout = "us,th",+	.options = "grp:alt_shift_toggle",+};+++/* trackpad */+static const int tap_to_click = 1;+static const int tap_and_drag = 1;+static const int drag_lock = 1;+static const int natural_scrolling = 0;+static const int disable_while_typing = 1;+static const int left_handed = 0;+static const int middle_button_emulation = 0;++static const enum libinput_config_scroll_method scroll_method = LIBINPUT_CONFIG_SCROLL_2FG;+static const enum libinput_config_click_method click_method = LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS;+static const uint32_t send_events_mode = LIBINPUT_CONFIG_SEND_EVENTS_ENABLED;+static const enum libinput_config_accel_profile accel_profile = LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE;+static const double accel_speed = 0.0;+static const enum libinput_config_tap_button_map button_map = LIBINPUT_CONFIG_TAP_MAP_LRM;++/* commands */+#define MODKEY WLR_MODIFIER_LOGO+#define MODALT WLR_MODIFIER_ALT+#define MODCTRL WLR_MODIFIER_CTRL+#define MODSHIFT WLR_MODIFIER_SHIFT++#define TAGKEYS(KEY, TAG) \+	{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \+	{ MODKEY|MODCTRL, KEY, toggleview, {.ui = 1 << TAG} }, \+	{ MODKEY|MODSHIFT, KEY, tag, {.ui = 1 << TAG} }, \+	{ MODKEY|MODCTRL|MODSHIFT, KEY, toggletag, {.ui = 1 << TAG} }++#define CHVT(n) { MODCTRL|MODALT, XKB_KEY_F##n, chvt, {.ui = (n)} }++static const char *termcmd[] = { "foot", NULL };+static const char *menucmd[] = { "wmenu-run", NULL };++static const Key keys[] = {+	{ MODKEY, XKB_KEY_d, spawn, {.v = menucmd} },+	{ MODKEY, XKB_KEY_Return, spawn, {.v = termcmd} },+	{ MODKEY, XKB_KEY_j, focusstack, {.i = +1} },+	{ MODKEY, XKB_KEY_h, setmfact, {.f = -0.05f} },+	{ MODKEY, XKB_KEY_l, setmfact, {.f = +0.05f} },+	{ MODKEY, XKB_KEY_i, incnmaster, {.i = +1} },+	{ MODKEY, XKB_KEY_o, incnmaster, {.i = -1} },+	{ MODKEY, XKB_KEY_k, focusstack, {.i = -1} },+	{ MODKEY, XKB_KEY_q, killclient, {0} },+	{ MODKEY|MODSHIFT, XKB_KEY_Tab, view, {0} },+	{ MODKEY|MODSHIFT, XKB_KEY_Return, zoom, {0} },+	{ MODKEY|MODSHIFT, XKB_KEY_t, setlayout, {.v = &layouts[0]} },+	{ MODKEY|MODSHIFT, XKB_KEY_f, setlayout, {.v = &layouts[1]} },+	{ MODKEY|MODSHIFT, XKB_KEY_m, setlayout, {.v = &layouts[2]} },+	{ MODKEY, XKB_KEY_space, togglefloating, {0} },+	{ MODKEY, XKB_KEY_f, togglefullscreen, {0} },+	{ MODKEY, XKB_KEY_comma, focusmon, {.i = WLR_DIRECTION_LEFT} },+	{ MODKEY, XKB_KEY_period, focusmon, {.i = WLR_DIRECTION_RIGHT} },+	{ MODKEY|MODSHIFT, XKB_KEY_comma, tagmon, {.i = WLR_DIRECTION_LEFT} },+	{ MODKEY|MODSHIFT, XKB_KEY_period, tagmon, {.i = WLR_DIRECTION_RIGHT} },+	{ MODKEY|MODSHIFT, XKB_KEY_p, quit, {0} },++	/* Ctrl-Alt-Backspace and Ctrl-Alt-Fx used to be handled by X server */+	{ MODCTRL|MODALT, XKB_KEY_BackSpace, quit, {0} },++	TAGKEYS(XKB_KEY_1, 0),+	TAGKEYS(XKB_KEY_2, 1),+	TAGKEYS(XKB_KEY_3, 2),+	TAGKEYS(XKB_KEY_4, 3),+	TAGKEYS(XKB_KEY_5, 4),+	TAGKEYS(XKB_KEY_6, 5),++	/* Ctrl-Alt-Fx is used to switch to another VT */+	CHVT(1), CHVT(2), CHVT(3), CHVT(4), CHVT(5), CHVT(6),+	CHVT(7), CHVT(8), CHVT(9), CHVT(10), CHVT(11), CHVT(12),+};++static const Button buttons[] = {+	{ MODKEY, BTN_LEFT, moveresize, {.ui = CurMove} },+	{ MODKEY, BTN_RIGHT, moveresize, {.ui = CurResize} },+	{ MODKEY, BTN_MIDDLE, togglefloating, {0} },+};++static const Axis axes[] = {};