summaryrefslogtreecommitdiffstats
path: root/systems/hu
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-23 11:44:10 +0000
committertv <tv@krebsco.de>2026-11-23 11:44:37 +0000
commitcb9e5517b5aced743716615ff94cb87ce77c9f91 (patch)
tree4411470f0be1b3c44ef0e938fc0f572b657bada0 /systems/hu
parent17ca984afdd59f50c7ab1f6fa16c790995def8e1 (diff)
hu: init
Diffstat (limited to 'systems/hu')
-rw-r--r--systems/hu/config.nix165
-rw-r--r--systems/hu/spec.nix3
2 files changed, 168 insertions, 0 deletions
diff --git a/systems/hu/config.nix b/systems/hu/config.nix
new file mode 100644
index 00000000..058a5ac5
--- /dev/null
+++ b/systems/hu/config.nix
@@ -0,0 +1,165 @@
+{ config, lib, mylib, pkgs, ... }: {
+ imports = [
+ ../../configs/binary-cache/client.nix
+ ../../configs/initrd/sshd.nix
+ ../../configs/retiolum.nix
+ ../../configs/wiregrill.nix
+
+ ../../configs/hw/tiny5.nix
+ ../../configs/networkd.nix
+ ];
+
+ boot.initrd.luks.devices.dona2.device = "/dev/sda2";
+ fileSystems."/" = {
+ device = "dona2/root";
+ fsType = "zfs";
+ };
+ fileSystems."/home" = {
+ device = "dona2/home";
+ fsType = "zfs";
+ };
+ fileSystems."/boot" = {
+ device = "/dev/sda1";
+ fsType = "vfat";
+ };
+
+ boot.loader.systemd-boot.enable = lib.mkForce false;
+ boot.loader.grub.enable = true;
+ boot.loader.grub.splashImage = null;
+ boot.loader.grub.device = "/dev/sda";
+
+ krebs.build.host = config.krebs.hosts.hu;
+ krebs.shadow.overridesFile =
+ "${config.krebs.secret.directory}/shadow-overrides";
+
+ services.pipewire.enable = true;
+
+ system.stateVersion = "20.09";
+
+ fonts.packages = [
+ pkgs.fontschumachermisc
+ ];
+
+ services.displayManager.autoLogin.enable = true;
+ services.displayManager.autoLogin.user = "guest";
+ services.displayManager.logToJournal = true;
+ services.libinput.enable = true;
+ services.xserver.enable = true;
+ services.xserver.xkb.layout = "de";
+ services.xserver.xkb.options = "eurosign:e";
+ services.xserver.windowManager.xmonad.enable = true;
+ services.xserver.windowManager.xmonad.extraPackages = haskellPackages: [
+ haskellPackages.xmonad-contrib
+ ];
+ services.xserver.windowManager.xmonad.config = /* haskell */ ''
+ import System.Posix.Process (executeFile)
+ import XMonad
+ import XMonad.Actions.CycleWS
+ import XMonad.Actions.DynamicWorkspaces
+ import XMonad.Hooks.EwmhDesktops (ewmh)
+ import XMonad.Hooks.ManageHelpers (doCenterFloat)
+ import XMonad.Hooks.Place (placeHook, smart)
+ import XMonad.Layout.NoBorders
+ import XMonad.Layout.ResizableTile
+ import XMonad.Prompt
+ import XMonad.Util.EZConfig
+ import qualified Data.Map as M
+ import qualified Data.Maybe
+ import qualified XMonad.StackSet as W
+
+ myTermFontWidth = 6
+ myTermPadding = 2
+ myScreenWidth = 1366
+
+ main = do
+ directories <- getDirectories
+ let
+ config =
+ ewmh $
+ def
+ { keys = myKeys
+ , modMask = mod4Mask
+ , layoutHook = smartBorders $
+ ResizableTall
+ 1
+ (fromIntegral (10 * myTermFontWidth) / fromIntegral myScreenWidth)
+ (fromIntegral (80 * myTermFontWidth + 2 * (myTermPadding + borderWidth def)) / fromIntegral myScreenWidth)
+ []
+ |||
+ Full
+ , manageHook =
+ composeAll
+ [ appName =? "DesktopPager" --> doCenterFloat
+ , placeHook (smart (1,0))
+ ]
+ , focusedBorderColor = "#f000b0"
+ , normalBorderColor = "#1c1c1c"
+ , workspaces = ["1", "2", "3"]
+ }
+ launch config directories
+
+ myKeys conf = mkKeymap conf
+ [ ("M4-<Esc>", spawn "slock")
+ , ("M4-<F5>", spawn "${pkgs.pavucontrol}/bin/pavucontrol")
+
+ , ("M4-<F10>", spawn "${pkgs.systemd}/bin/systemctl suspend -i")
+
+ , ("<XF86Sleep>", spawn "${pkgs.systemd}/bin/systemctl suspend -i")
+
+ , ("M4-S-c", kill)
+ , ("M4-x", spawn "${pkgs.rxvt-unicode-unwrapped}/bin/urxvt")
+
+ , ("M4-<Space>", sendMessage NextLayout)
+ , ("M4-M1-<Space>", setLayout $ XMonad.layoutHook conf) -- resetLayout
+ , ("M4-m", windows W.focusMaster)
+ , ("M4-j", windows W.focusDown)
+ , ("M4-k", windows W.focusUp)
+ , ("M4-S-m", windows W.swapMaster)
+ , ("M4-S-j", windows W.swapDown)
+ , ("M4-S-k", windows W.swapUp)
+
+ , ("M4-M1-h", sendMessage Shrink)
+ , ("M4-M1-l", sendMessage Expand)
+ , ("M4-M1-j", sendMessage MirrorShrink)
+ , ("M4-M1-k", sendMessage MirrorExpand)
+ , ("M4-t", withFocused $ windows . W.sink)
+
+ , ("M4-<AudioMute>", spawn "${pkgs.pavucontrol}/bin/pavucontrol")
+
+ , ("<XF86AudioLowerVolume>", spawn "${pkgs.alsa-utils}/bin/amixer -q sset Master 5%-")
+ , ("<XF86AudioRaiseVolume>", spawn "${pkgs.alsa-utils}/bin/amixer -q sset Master 5%+")
+ , ("<XF86AudioMute>", spawn "${pkgs.alsa-utils}/bin/amixer -q sset Master toggle")
+
+ , ("M4-a", addWorkspacePrompt myPromptConfig)
+ , ("M4-r", renameWorkspace myPromptConfig)
+ , ("M4-<Delete>", removeEmptyWorkspace)
+ ]
+ <> M.fromList
+ [ ((controlMask, xK_Menu), toggleWS)
+ ]
+
+ forkFile :: FilePath -> [String] -> Maybe [(String, String)] -> X ()
+ forkFile path args env =
+ xfork (executeFile path True args env) >> return ()
+
+ myPromptConfig = def
+ { font = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-*"
+ }
+ '';
+
+ system.userActivationScripts.graphical-session = lib.mkBefore /* sh */ ''
+ if ${pkgs.systemd}/bin/systemctl --user is-active --quiet graphical-session.target; then
+ ${pkgs.systemd}/bin/systemctl --user start graphical-session.target
+ fi
+ '';
+
+ users.users.guest = {
+ uid = mylib.genid_uint31 "guest";
+ isNormalUser = true;
+ extraGroups = [
+ "audio"
+ "video"
+ "pipewire"
+ ];
+ };
+}
diff --git a/systems/hu/spec.nix b/systems/hu/spec.nix
new file mode 100644
index 00000000..efab0596
--- /dev/null
+++ b/systems/hu/spec.nix
@@ -0,0 +1,3 @@
+{
+ system = "x86_64-linux";
+}