feat: the stuff of nightmares

This commit is contained in:
Kat Inskip 2023-02-15 15:53:38 -08:00
parent b589fdda9f
commit 3a29446c96
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
51 changed files with 679 additions and 1094 deletions

View file

@ -4,7 +4,7 @@
... ...
}: { }: {
nixpkgs = { nixpkgs = {
overlays = import tree.overlays {inherit inputs;}; overlays = import tree.overlays {inherit inputs tree;};
config.allowUnfree = true; config.allowUnfree = true;
}; };
} }

73
flake.lock generated
View file

@ -24,11 +24,11 @@
"arcexprs": { "arcexprs": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1675450557, "lastModified": 1676227420,
"narHash": "sha256-0Syp+pnuTCjAM9aJAX3DIt6qbAvp/wNeoaGeBn5zmEM=", "narHash": "sha256-7l3pbbRRYZAhj5/g8pmtaRg37299KDkyni5YykQn+fw=",
"owner": "arcnmx", "owner": "arcnmx",
"repo": "nixexprs", "repo": "nixexprs",
"rev": "4d4f3a24770be3e60b69cfc191b67f7a1ecbd6a8", "rev": "3e12ce19adbe3c5e1d87d07bc05abad46877a84e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -126,11 +126,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1675462931, "lastModified": 1675935446,
"narHash": "sha256-JiOUSERBtA1lN/s9YTKGZoZ3XUicHDwr+C8swaPSh3M=", "narHash": "sha256-WajulTn7QdwC7QuXRBavrANuIXE5z+08EdxdRw1qsNs=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "e2c1756e3ae001ca8696912016dd31cb1503ccf3", "rev": "2dce7f1a55e785a22d61668516df62899278c9e4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -173,11 +173,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1674962474, "lastModified": 1676172252,
"narHash": "sha256-qEXdgW5fnMSdQwP1zQYa0fVtI0f3G1f2qNRjUEherCs=", "narHash": "sha256-Q5yJPpgbvOTgB0NQTJmlx3di1Sj5QQhSrjv38u6MzsQ=",
"owner": "Mic92", "owner": "Mic92",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "a385f6192f5471c4cebeeb0d2e966b5ccf123df5", "rev": "89e3b689e0ae9bac4c6cdc24d1085d81baeebde4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -186,13 +186,28 @@
"type": "github" "type": "github"
} }
}, },
"nixos-hardware": {
"locked": {
"lastModified": 1675933606,
"narHash": "sha256-y427VhPQHOKkYvkc9MMsL/2R7M11rQxzsRdRLM3htx8=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "44ae00e02e8036a66c08f4decdece7e3bbbefee2",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixos-hardware",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1675454231, "lastModified": 1676300157,
"narHash": "sha256-5rgcWq1nFWlbR3NsLqY7i/7358uhkSeMQJ/LEHk3BWA=", "narHash": "sha256-1HjRzfp6LOLfcj/HJHdVKWAkX9QRAouoh6AjzJiIerU=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "06999209d7a0043d4372e38f57cffae00223d592", "rev": "545c7a31e5dedea4a6d372712a18e00ce097d462",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -205,11 +220,11 @@
"pypi-deps-db": { "pypi-deps-db": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1675544670, "lastModified": 1676367706,
"narHash": "sha256-CV3qfT4CdMR9CbyPmbJXMHNgLK0p+62nwM2/yF8QHS0=", "narHash": "sha256-FY7MKi/Q6IO4hlYiGqVCrXAg+/VJ/pIVS+ZfqeonOx8=",
"owner": "DavHau", "owner": "DavHau",
"repo": "pypi-deps-db", "repo": "pypi-deps-db",
"rev": "f822ecb6e8e27ac4e1c34218536658d6be0da51f", "rev": "1974e03fe3ee9d7246e9af3bedbea72e3ea0535c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -253,6 +268,7 @@
"home-manager": "home-manager", "home-manager": "home-manager",
"mach-nix": "mach-nix", "mach-nix": "mach-nix",
"nix-index-database": "nix-index-database", "nix-index-database": "nix-index-database",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"pypi-deps-db": "pypi-deps-db", "pypi-deps-db": "pypi-deps-db",
"ragenix": "ragenix", "ragenix": "ragenix",
@ -336,26 +352,23 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1674066361, "lastModified": 1676402381,
"narHash": "sha256-1f7L1be7u3x0jNDJ+W641kM9pZfd2ZLkjziRvKIZMvw=", "narHash": "sha256-G/0xP+XfTWK5GbY1qme7gD1E82eAQUuUGUdy+YZ/CQQ=",
"owner": "kittywitch", "path": "/home/kat/projects/tree",
"repo": "tree", "type": "path"
"rev": "638ad6549febe360b0120375cae2bc3bb3b477f3",
"type": "github"
}, },
"original": { "original": {
"owner": "kittywitch", "path": "/home/kat/projects/tree",
"repo": "tree", "type": "path"
"type": "github"
} }
}, },
"utils": { "utils": {
"locked": { "locked": {
"lastModified": 1667395993, "lastModified": 1676283394,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", "rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -377,11 +390,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1675351082, "lastModified": 1676381420,
"narHash": "sha256-4Oi4k4Qp1vOvKoACHDcz0xiVj7DuMaCL57fP3W77eA0=", "narHash": "sha256-aDRnfGrk/xi7zkuterN78p8/wdM5Iy6vz74uqd/JFWw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NixOS-WSL", "repo": "NixOS-WSL",
"rev": "52cadf92e1bfdef235d5cd77b9a4b2ab848baa8a", "rev": "4640199aeafcbb63cfbe8318bdf06f4402134f66",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -49,10 +49,13 @@
utils.url = "github:numtide/flake-utils"; utils.url = "github:numtide/flake-utils";
# file structure -> attrset # file structure -> attrset
tree = { tree = {
url = "github:kittywitch/tree"; #url = "github:kittywitch/tree";
url = "path:/home/kat/projects/tree";
inputs.std.follows = "std"; inputs.std.follows = "std";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# hardware quirks
nixos-hardware.url = "github:NixOS/nixos-hardware";
# secrets # secrets
ragenix = { ragenix = {
url = "github:yaxitech/ragenix"; url = "github:yaxitech/ragenix";

View file

@ -2,6 +2,7 @@ package iac
import ( import (
"github.com/pulumi/pulumi-command/sdk/go/command/remote" "github.com/pulumi/pulumi-command/sdk/go/command/remote"
"github.com/pulumi/pulumi-command/sdk/go/command/local"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
) )
@ -18,13 +19,39 @@ func CreatePulumiFile(ctx *pulumi.Context, name string, fqdn string, value pulum
Host: pulumi.String(fqdn), Host: pulumi.String(fqdn),
Port: pulumi.Float64Ptr(float64(port)), Port: pulumi.Float64Ptr(float64(port)),
User: pulumi.String(user), User: pulumi.String(user),
AgentSocketPath: pulumi.String("/Users/kat/.gnupg/S.gpg-agent.ssh"), // TODO: note to self, write platform support code here. or just expect env var $SSH_AUTH_SOCK?
AgentSocketPath: pulumi.String("/run/user/1000/gnupg/S.gpg-agent.ssh"),
}, },
Triggers: pulumi.All(resources), Triggers: pulumi.All(resources),
Create: pulumi.Sprintf("sudo mkdir -p /var/lib/secrets && echo \"%s\" | sudo tee \"/var/lib/secrets/%s\"", value, name), Create: pulumi.Sprintf("echo \"%s\" > \"/tmp/%s\" && sudo mkdir -p /var/lib/secrets && sudo install --owner=kat --group=users --mode=0600 \"/tmp/%s\" \"/var/lib/secrets/%s\"", value, name, name, name),
Delete: pulumi.Sprintf("cd /var/lib/secrets && rm %s", name), Delete: pulumi.Sprintf("cd /var/lib/secrets && rm \"%s\"", name),
Environment: pulumi.StringMap{ Environment: pulumi.StringMap{
"PULUMI_SKIP_UPDATE_CHECK": pulumi.String("true"), "PULUMI_SKIP_UPDATE_CHECK": pulumi.String("true"),
}, },
}, pulumi.DependsOn(resources), pulumi.IgnoreChanges([]string{"create"})) }, pulumi.DependsOn(resources), pulumi.IgnoreChanges([]string{})) // within {} put e.g. "create"
}
func CreatePulumiLocalFile(ctx *pulumi.Context, name string, fqdn string, value pulumi.StringOutput, resources []pulumi.Resource) (*remote.Command, error) {
port := 22
user := "deploy"
if fqdn == "tewi.inskip.me" {
port = 62954
user = "root"
}
ctx.Export(name, value)
return remote.NewCommand(ctx, name, &remote.CommandArgs{
Connection: &remote.ConnectionArgs{
Host: pulumi.String(fqdn),
Port: pulumi.Float64Ptr(float64(port)),
User: pulumi.String(user),
// TODO: note to self, write platform support code here. or just expect env var $SSH_AUTH_SOCK?
AgentSocketPath: pulumi.String("/run/user/1000/gnupg/S.gpg-agent.ssh"),
},
Triggers: pulumi.All(resources),
Create: pulumi.Sprintf("echo \"%s\" > \"/tmp/%s\" && sudo mkdir -p /var/lib/secrets && sudo install --owner=kat --group=users --mode=0600 \"/tmp/%s\" \"/var/lib/secrets/%s\"", value, name, name, name),
Delete: pulumi.Sprintf("cd /var/lib/secrets && rm \"%s\"", name),
Environment: pulumi.StringMap{
"PULUMI_SKIP_UPDATE_CHECK": pulumi.String("true"),
},
}, pulumi.DependsOn(resources), pulumi.IgnoreChanges([]string{})) // within {} put e.g. "create"
} }

View file

@ -1,8 +0,0 @@
_: {
xsession.preferStatusNotifierItems = true;
services = {
network-manager-applet.enable = true;
blueman-applet.enable = true;
};
}

View file

@ -10,7 +10,8 @@
# Mail # Mail
thunderbird thunderbird
# Music # Music
spotify # spotify
playerctl
# Chat # Chat
discord discord
nheko # Matrix nheko # Matrix
@ -19,6 +20,11 @@
signal-desktop signal-desktop
element-desktop element-desktop
mumble-develop mumble-develop
# IDEs
jetbrains.idea-community
jetbrains.pycharm-community
# Exocortex
obsidian
# Archivery # Archivery
unzip unzip
zip zip

View file

@ -2,10 +2,12 @@
config, config,
pkgs, pkgs,
lib, lib,
std,
... ...
}: let }: let
inherit (std) list;
inherit (lib.modules) mkMerge;
# TODO: fix use of lib # TODO: fix use of lib
lockCommand = config.programs.swaylock.script;
in { in {
programs.zsh.profileExtra = '' programs.zsh.profileExtra = ''
# If running from tty1 start sway # If running from tty1 start sway
@ -50,96 +52,55 @@ in {
wayland.windowManager.sway = let wayland.windowManager.sway = let
cfg = config.wayland.windowManager.sway.config; cfg = config.wayland.windowManager.sway.config;
bindsym = k: v: "bindsym ${k} ${v}";
bindWorkspace = key: workspace: {
"${cfg.modifier}+${key}" = "workspace number ${workspace}";
"${cfg.modifier}+shift+${key}" = "move container to workspace number ${workspace}";
};
workspaceBindings = map (v: bindWorkspace v "${v}:${v}") [
"1"
"2"
"3"
"4"
"5"
"6"
"7"
"8"
"9"
] ++ [(
bindWorkspace "0" "10:10")
] ++ lib.imap1 (i: v: bindWorkspace v "${toString (10 + i)}:${v}") [
"F1"
"F2"
"F3"
"F4"
"F5"
"F6"
"F7"
"F8"
"F9"
"F10"
"F11"
"F12"
];
workspaceBindings' = map (lib.mapAttrsToList bindsym) workspaceBindings;
workspaceBindingsStr = lib.concatStringsSep "\n" (lib.flatten workspaceBindings');
in { in {
enable = true; enable = true;
config = let config = let
pactl = "${config.home.nixosConfig.hardware.pulseaudio.package or pkgs.pulseaudio}/bin/pactl"; super = "Mod4";
dmenu = "${pkgs.wofi}/bin/wofi -idbt ${pkgs.wezterm}/bin/wezterm -s ~/.config/wofi/wofi.css -p '' -W 25%"; alt = "Mod1";
actionMode = "(l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown";
gapsMode = "Gaps: (o) outer, (i) inner";
gapsOuterMode = "Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)";
gapsInnerMode = "Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)";
lockCommand = config.programs.swaylock.script;
in { in {
modes = { bars = [];
"System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown" = {
modes = let
defaultPath = {
"Return" = "mode default";
"Escape" = "mode default";
"${cfg.modifier}+z" = "mode default";
};
in {
${gapsOuterMode} = defaultPath // {
"equal" = "gaps outer current plus 5";
"minus" = "gaps outer current minus 5";
"0" = "gaps outer current set 0";
"plus" = "gaps outer all plus 5";
"Shift+minus" = "gaps outer all minus 5";
"Shift+0" = "gaps outer all set 0";
};
${gapsInnerMode} = defaultPath // {
"equal" = "gaps inner current plus 5";
"minus" = "gaps inner current minus 5";
"0" = "gaps inner current set 0";
"plus" = "gaps inner all plus 5";
"Shift+minus" = "gaps inner all minus 5";
"Shift+0" = "gaps inner all set 0";
};
${gapsMode} = defaultPath // {
"o" = "mode ${gapsOuterMode}";
"i" = "mode ${gapsInnerMode}";
};
${actionMode} = defaultPath // {
"l" = "exec ${lockCommand}, mode default"; "l" = "exec ${lockCommand}, mode default";
"e" = "exec swaymsg exit, mode default"; "e" = "exec swaymsg exit, mode default";
"s" = "exec systemctl suspend, mode default"; "s" = "exec systemctl suspend, mode default";
"h" = "exec systemctl hibernate, mode default"; "h" = "exec systemctl hibernate, mode default";
"r" = "exec systemctl reboot, mode default"; "r" = "exec systemctl reboot, mode default";
"Shift+s" = "exec systemctl shutdown, mode default"; "Shift+s" = "exec systemctl shutdown, mode default";
"Return" = "mode default";
"Escape" = "mode default";
}; };
}; resize = defaultPath // {
bars = [];
input = {
"*" = {
xkb_layout = "us_gbp_map";
xkb_options = "compose:rctrl,ctrl:nocaps";
};
};
fonts = {
names = [ "Iosevka"];
style = "Regular";
size = 12.0;
};
terminal = "${pkgs.wezterm}/bin/wezterm";
menu = "${pkgs.j4-dmenu-desktop}/bin/j4-dmenu-desktop --no-generic --dmenu=\"${dmenu}\" --term='${pkgs.wezterm}/bin/wezterm'";
modifier = "Mod4";
startup = [
{ command = "gsettings set org.gnome.desktop.interface cursor-theme 'Quintom_Snow'"; }
{
command = "systemctl --user restart mako";
always = true;
}
{
command = "systemctl --user restart konawall.service";
always = true;
}
];
modes.resize = {
"a" = "resize shrink width 4 px or 4 ppt"; "a" = "resize shrink width 4 px or 4 ppt";
"s" = "resize shrink height 4 px or 4 ppt"; "s" = "resize shrink height 4 px or 4 ppt";
"w" = "resize grow height 4 px or 4 ppt"; "w" = "resize grow height 4 px or 4 ppt";
@ -148,66 +109,163 @@ in {
"Down" = "resize shrink height 4 px or 4 ppt"; "Down" = "resize shrink height 4 px or 4 ppt";
"Up" = "resize grow height 4 px or 4 ppt"; "Up" = "resize grow height 4 px or 4 ppt";
"Right" = "resize grow width 4 px or 4 ppt"; "Right" = "resize grow width 4 px or 4 ppt";
Return = ''mode "default"'';
Escape = ''mode "default"'';
"${cfg.modifier}+z" = ''mode "default"'';
}; };
};
input = {
"*" = {
xkb_layout = "us_gbp_map";
xkb_options = "compose:rctrl,ctrl:nocaps";
};
};
gaps = {
smartBorders = "no_gaps";
};
fonts = {
names = [ "Iosevka"];
style = "Regular";
size = 10.0;
};
terminal = "${pkgs.wezterm}/bin/wezterm";
modifier = super;
startup = [
{
command = "systemctl --user restart konawall.service";
always = true;
}
];
window = { window = {
border = 1; border = 1;
titlebar = false; titlebar = false;
hideEdgeBorders = "smart";
}; };
workspaceAutoBackAndForth = true;
floating = { floating = {
border = 1; border = 1;
titlebar = false; titlebar = false;
}; };
keybindings = { keybindings = let
"${cfg.modifier}+Return" = "exec ${cfg.terminal}"; pactl = "${config.home.nixosConfig.hardware.pulseaudio.package or pkgs.pulseaudio}/bin/pactl";
"${cfg.modifier}+x" = "exec ${lockCommand}"; bindWorkspace = key: workspace: {
"${cfg.modifier}+${key}" = "workspace number ${workspace}";
"${cfg.modifier}+shift+${key}" = "move container to workspace number ${workspace}";
};
workspaceBindings = map (v: bindWorkspace v "${v}") (list.map builtins.toString (list.range 1 9)) ++ [(
bindWorkspace "0" "10")
] ++ lib.imap1 (i: v: bindWorkspace v "${toString (10 + i)}") (list.map (n: "F${builtins.toString n}") (std.list.range 1 12));
in mkMerge ([ {
# modes
"${cfg.modifier}+Shift+g" = ''mode "${gapsMode}"'';
"${cfg.modifier}+Delete" = ''mode "${actionMode}"'';
# focus windows - regular # focus windows - ESDF
"${cfg.modifier}+s" = "focus left";
"${cfg.modifier}+d" = "focus down";
"${cfg.modifier}+e" = "focus up";
"${cfg.modifier}+f" = "focus right";
# focus windows - arrows
"${cfg.modifier}+Left" = "focus left"; "${cfg.modifier}+Left" = "focus left";
"${cfg.modifier}+Down" = "focus down"; "${cfg.modifier}+Down" = "focus down";
"${cfg.modifier}+Up" = "focus up"; "${cfg.modifier}+Up" = "focus up";
"${cfg.modifier}+Right" = "focus right"; "${cfg.modifier}+Right" = "focus right";
# move window / container - regular # move window / container - ESDF
"${cfg.modifier}+Shift+s" = "move left";
"${cfg.modifier}+Shift+d" = "move down";
"${cfg.modifier}+Shift+e" = "move up";
"${cfg.modifier}+Shift+f" = "move right";
# move window / container - arrows
"${cfg.modifier}+Shift+Left" = "move left"; "${cfg.modifier}+Shift+Left" = "move left";
"${cfg.modifier}+Shift+Down" = "move down"; "${cfg.modifier}+Shift+Down" = "move down";
"${cfg.modifier}+Shift+Up" = "move up"; "${cfg.modifier}+Shift+Up" = "move up";
"${cfg.modifier}+Shift+Right" = "move right"; "${cfg.modifier}+Shift+Right" = "move right";
# focus output - regular # focus output - ESDF
"${cfg.modifier}+control+s" = "focus output left";
"${cfg.modifier}+control+d" = "focus output down";
"${cfg.modifier}+control+e" = "focus output up";
"${cfg.modifier}+control+f" = "focus output right";
# focus output - arrows
"${cfg.modifier}+control+Left" = "focus output left"; "${cfg.modifier}+control+Left" = "focus output left";
"${cfg.modifier}+control+Down" = "focus output down"; "${cfg.modifier}+control+Down" = "focus output down";
"${cfg.modifier}+control+Up" = "focus output up"; "${cfg.modifier}+control+Up" = "focus output up";
"${cfg.modifier}+control+Right" = "focus output right"; "${cfg.modifier}+control+Right" = "focus output right";
# move container to output - regular # move container to output - ESDF
"${cfg.modifier}+control+Shift+s" = "move container to output left";
"${cfg.modifier}+control+Shift+d" = "move container to output down";
"${cfg.modifier}+control+Shift+e" = "move container to output up";
"${cfg.modifier}+control+Shift+f" = "move container to output right";
# move container to output - arrows
"${cfg.modifier}+control+Shift+Left" = "move container to output left"; "${cfg.modifier}+control+Shift+Left" = "move container to output left";
"${cfg.modifier}+control+Shift+Down" = "move container to output down"; "${cfg.modifier}+control+Shift+Down" = "move container to output down";
"${cfg.modifier}+control+Shift+Up" = "move container to output up"; "${cfg.modifier}+control+Shift+Up" = "move container to output up";
"${cfg.modifier}+control+Shift+Right" = "move container to output right"; "${cfg.modifier}+control+Shift+Right" = "move container to output right";
# move workspace to output - regular # move workspace to output - ESDF
"${cfg.modifier}+control+Shift+Mod1+s" = "move workspace to output left";
"${cfg.modifier}+control+Shift+Mod1+d" = "move workspace to output down";
"${cfg.modifier}+control+Shift+Mod1+e" = "move workspace to output up";
"${cfg.modifier}+control+Shift+Mod1+f" = "move workspace to output right";
# move workspace to output - arrows
"${cfg.modifier}+control+Shift+Mod1+Left" = "move workspace to output left"; "${cfg.modifier}+control+Shift+Mod1+Left" = "move workspace to output left";
"${cfg.modifier}+control+Shift+Mod1+Down" = "move workspace to output down"; "${cfg.modifier}+control+Shift+Mod1+Down" = "move workspace to output down";
"${cfg.modifier}+control+Shift+Mod1+Up" = "move workspace to output up"; "${cfg.modifier}+control+Shift+Mod1+Up" = "move workspace to output up";
"${cfg.modifier}+control+Shift+Mod1+Right" = "move workspace to output right"; "${cfg.modifier}+control+Shift+Mod1+Right" = "move workspace to output right";
# focus parent/child # process management - q
"${cfg.modifier}+q" = "focus parent"; "${cfg.modifier}+q" = "exec ${cfg.menu}";
"${cfg.modifier}+e" = "focus child"; "${cfg.modifier}+Shift+q" = "kill";
"${cfg.modifier}+control+q" = "exec ${cfg.terminal}";
# floating # focus parent/child - w
"${cfg.modifier}+Shift+space" = "floating toggle"; "${cfg.modifier}+w" = "focus parent";
"${cfg.modifier}+space" = "focus mode_toggle"; "${cfg.modifier}+Shift+w" = "focus child";
# unused control
# workspace history switching # split management - a
"${cfg.modifier}+a" = "splith";
"${cfg.modifier}+Shift+a" = "splitv";
"${cfg.modifier}+control+A" = "layout toggle split";
# resizing, reloading - r
# unused base
"${cfg.modifier}+Shift+r" = "mode resize";
"${cfg.modifier}+control+r" = "reload";
# layout handling - t
"${cfg.modifier}+t" = "layout tabbed";
"${cfg.modifier}+Shift+t" = "layout stacking";
"${cfg.modifier}+control+t" = "fullscreen toggle";
# locking - l
"${cfg.modifier}+l" = "exec ${lockCommand}";
# unused shift
# unused control
"control+${alt}+Delete" = "exec ${lockCommand}";
# floating - p
"${cfg.modifier}+p" = "focus mode_toggle";
"${cfg.modifier}+Shift+p" = "floating toggle";
# unused control
# workspace history switching - tab
"${cfg.modifier}+Tab" = "workspace back_and_forth"; "${cfg.modifier}+Tab" = "workspace back_and_forth";
"${cfg.modifier}+Shift+Tab" = "exec ${config.services.i3gopher.focus-last}"; "${cfg.modifier}+Shift+Tab" = "exec ${config.services.i3gopher.focus-last}";
# unused control
# multimedia / laptop # multimedia / laptop
"XF86AudioPlay" = "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl play-pause"; "XF86AudioPlay" = "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl play-pause";
@ -218,26 +276,8 @@ in {
"XF86AudioMicMute" = "exec --no-startup-id ${pactl} set-source-mute @DEFAULT_SOURCE@ toggle"; "XF86AudioMicMute" = "exec --no-startup-id ${pactl} set-source-mute @DEFAULT_SOURCE@ toggle";
"XF86MonBrightnessDown" = "exec ${pkgs.light}/bin/light -U 5"; "XF86MonBrightnessDown" = "exec ${pkgs.light}/bin/light -U 5";
"XF86MonBrightnessUp" = "exec ${pkgs.light}/bin/light -A 5"; "XF86MonBrightnessUp" = "exec ${pkgs.light}/bin/light -A 5";
}
# dmenu ] ++ workspaceBindings);
"${cfg.modifier}+r" = "exec ${cfg.menu}";
# layout handling
"${cfg.modifier}+b" = "splith";
"${cfg.modifier}+v" = "splitv";
"${cfg.modifier}+o" = "layout stacking";
"${cfg.modifier}+i" = "layout tabbed";
"${cfg.modifier}+h" = "layout toggle split";
"${cfg.modifier}+f" = "fullscreen";
# sway specific
"${cfg.modifier}+Shift+q" = "kill";
"${cfg.modifier}+Shift+c" = "reload";
# mode triggers
"${cfg.modifier}+Shift+r" = "mode resize";
"${cfg.modifier}+Delete" = ''mode "System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown"'';
};
colors = let colors = let
inherit (config.base16) palette; inherit (config.base16) palette;
@ -271,55 +311,14 @@ in {
childBorder = palette.base08; childBorder = palette.base08;
}; };
}; };
seat.seat0.xcursor_theme = ''"Quintom Snow" 20'';
}; };
wrapperFeatures.gtk = true; wrapperFeatures.gtk = true;
extraConfig = '' extraConfig = ''
hide_edge_borders smart_no_gaps
smart_borders no_gaps
title_align center title_align center
seat seat0 xcursor_theme Quintom_Snow 20
workspace_auto_back_and_forth yes
set $mode_gaps Gaps: (o) outer, (i) inner
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
bindsym ${cfg.modifier}+Shift+g mode "$mode_gaps"
mode "$mode_gaps" {
bindsym o mode "$mode_gaps_outer"
bindsym i mode "$mode_gaps_inner"
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_inner" {
bindsym equal gaps inner current plus 5
bindsym minus gaps inner current minus 5
bindsym 0 gaps inner current set 0
bindsym plus gaps inner all plus 5
bindsym Shift+minus gaps inner all minus 5
bindsym Shift+0 gaps inner all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_outer" {
bindsym equal gaps outer current plus 5
bindsym minus gaps outer current minus 5
bindsym 0 gaps outer current set 0
bindsym plus gaps outer all plus 5
bindsym Shift+minus gaps outer all minus 5
bindsym Shift+0 gaps outer all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
${workspaceBindingsStr}
''; '';
}; };
} }

View file

@ -1,138 +1,88 @@
{ kittywitch, pkgs, ... }: { kittywitch, pkgs, ... }:
{ {
xdg.configFile."waybar/style.css" = { inherit (kittywitch.sassTemplate { name = "waybar-style"; src = ./waybar.sass; }) source; };
programs.waybar = { programs.waybar = {
enable = true; enable = true;
style = let
template = kittywitch.sassTemplate { name = "waybar-style"; src = ./waybar.sass; };
in template.source;
systemd.enable = true; systemd.enable = true;
settings = [{ settings.main = {
height = 10; layer = "top";
position = "top";
height = 18;
# Modules Placement
modules-left = [ modules-left = [
"sway/workspaces" "sway/workspaces"
"sway/mode" "sway/mode"
"sway/window" "sway/window"
]; ];
modules-center = [ modules-center = [
"custom/clock"
"mpris"
]; ];
modules-right = [ modules-right = [
"pulseaudio#icon"
"pulseaudio"
"cpu"
"custom/memory-icon"
"memory"
"temperature#icon"
"temperature"
"battery#icon"
"battery"
"backlight#icon"
"backlight"
"network#icon"
"network" "network"
"temperature"
"idle_inhibitor" "idle_inhibitor"
"custom/clock"
"tray" "tray"
]; ];
# Modules Definition
"sway/workspaces" = { "sway/workspaces" = {
format = "{icon}"; format = "{icon}";
format-icons = { format-icons = {
"1" = "1:"; "1" = "";
"2" = "2:"; "2" = "";
"3" = "3:"; "3" = "";
"4" = "";
"5" = "";
}; };
}; };
"sway/window" = { "sway/window" = {
icon = true;
icon-size = 12;
format = "{}"; format = "{}";
}; };
tray = { tray = {
show-passive-items = true;
icon-size = 12; icon-size = 12;
spacing = 2; spacing = 2;
}; };
"backlight#icon" = { mpris = {
format = "{icon}"; format = "{player_icon} {dynamic}";
format-icons = ["" ""]; format-paused = "{status_icon} {dynamic}";
player-icons = {
default = "";
brave = "";
mpv = "";
spotify = "";
}; };
backlight = { status-icons = {
format = "{percent}%"; paused = "";
}; };
"custom/cpu-icon".format = "";
cpu.format = "{usage}%";
"custom/memory-icon".format = "";
memory.format = "{percentage}%";
"temperature#icon" = {
format = "{icon}";
format-icons = ["" "" ""];
critical-threshold = 80;
}; };
temperature = { temperature = {
format = "{temperatureC}°C"; format = " {temperatureC}°C";
critical-threshold = 80; critical-threshold = 80;
}; };
idle_inhibitor = { idle_inhibitor = {
format = "{icon}"; format = "{icon}";
format-icons = { format-icons = {
activated = ""; activated = "";
deactivated = ""; deactivated = "";
}; };
}; };
"battery#icon" = {
states = {
good = 90;
warning = 30;
critical = 15;
};
format = "{icon}";
format-charging = "";
format-plugged = "";
format-icons = [ "" "" "" "" "" ];
};
battery = {
states = {
good = 90;
warning = 30;
critical = 15;
};
format = "{capacity}%";
format-charging = "{capacity}%";
format-plugged = "{capacity}%";
format-alt = "{time}";
};
"pulseaudio#icon" = {
format = "{icon}";
format-muted = "";
on-click = "wezterm start pulsemixer";
format-icons = {
default = [
""
""
""
];
};
};
pulseaudio = {
format = "{volume}%";
on-click = "${pkgs.wezterm}/bin/wezterm start ${pkgs.pulsemixer}/bin/pulsemixer";
};
"network#icon" = {
format-wifi = "";
format-ethernet = "";
format-linked = " ";
format-disconnected = "";
};
network = { network = {
format-wifi = "{essid} ({signalStrength}%)"; format-wifi = " {essid} ({signalStrength}%)";
format-ethernet = "{ipaddr}/{cidr}"; format-ethernet = " {ipaddr}/{cidr}";
format-linked = "No IP"; format-linked = " No IP";
format-disconnected = "Disconnected"; format-disconnected = " Disconnected";
format-alt = "{ifname}: {ipaddr}/{cidr}"; format-alt = "{ifname}: {ipaddr}/{cidr}";
}; };
"custom/clock" = { "custom/clock" = {
exec = ''${pkgs.coreutils}/bin/date +"%a, %F %T %Z"''; exec = ''${pkgs.coreutils}/bin/date +"%a, %F %T %Z"'';
interval = 1; interval = 1;
}; };
}]; };
}; };
} }

View file

@ -1,154 +1,31 @@
%extend_1
padding: 0 8px
transition: none
color: $base00
* *
padding: 0
margin: 0
border: none border: none
border-radius: 0 border-radius: 0
background: none background: none
font-family: "Iosevka", "Font Awesome 6 Free", "Font Awesome 6 Brands" font-family: "Iosevka", "Font Awesome 6 Free", "Font Awesome 6 Brands"
font-size: $font_size font-size: $font_size
min-height: 8px
text-shadow: none text-shadow: none
box-shadow: none box-shadow: none
window#waybar %widget_unpadded
background: $base00t transition: none
tooltip
background: $base00t
label
color: $base07
#mode
background: $base01 background: $base01
color: $base06 color: $base07
margin: 0 4px
%widget
@extend %widget_unpadded
padding: 0 4px padding: 0 4px
#clock, #custom-clock window#waybar
@extend %extend_1 background: color.change($base00, $alpha: 0.9)
background: $base01 border-bottom: 2px solid transparent
color: $base07
#cpu, #memory, #temperature, #pulseaudio, #backlight, #battery, #custom-mail, #custom-headset, #clock.arc, #clock.hex, #clock.miku, #network
background: $base01
color: $base07
padding: 0 6px
margin-right: 4px
#custom-gpg-status, #custom-konawall, #idle_inhibitor
margin: 0 4px
#temperature.icon, #pulseaudio.icon, #battery.icon, #backlight.icon, #custom-cpu-icon, #custom-memory-icon, #custom-mail-icon, #custom-headset-icon, #custom-arc-h, #custom-hex-h, #custom-miku-h, #clock.original, #tray, #network.icon
margin-left: 4px
margin-right: 0px
#custom-headset-icon
@extend %extend_1
background: $base06
#custom-memory-icon
@extend %extend_1
background: $base09
#custom-cpu-icon
@extend %extend_1
background: $base08
#temperature.icon
@extend %extend_1
background: $base0B
#pulseaudio.icon
@extend %extend_1
background: $base06
&.muted
background: $base03
#network.icon
@extend %extend_1
background: $base0C
#mpd
@extend %extend_1
#backlight.icon
@extend %extend_1
background: $base0D
#battery.icon
@extend %extend_1
background: $base0C
#custom-mail-icon
@extend %extend_1
background: $base0F
#custom-konawall
@extend %extend_1
&.enabled
background: $base0E
&.disabled
background: $base0D
#custom-gpg-status
@extend %extend_1
&.enabled
background: $base0B
&.disabled
background: $base08
#idle_inhibitor
@extend %extend_1
&.activated
background: $base0E
&.deactivated
background: $base0D
#tray
@extend %extend_1
background: $base01
padding: 0 10px 0 8px
menu
background: $base00t
color: $base07
.modules-left
margin: 0 4px
image
padding-left: 6px
padding-right: 6px
margin-left: 4px
margin-right: 0px
background: $base01
#window
margin-left: 0px
margin-right: 0px
widget
label
margin: 0
&:first-child
margin-left: 0
&:last-child
margin-right: 0
.modules-center
margin: 0 4px
.modules-right
margin: 0 4px
// sway/workspaces
#workspaces #workspaces
background: $base01 @extend %widget_unpadded
padding: 0
margin-right: 8px
button button
color: $base06 color: $base06
&.focused &.focused
@ -162,11 +39,46 @@ tooltip
background: $base06 background: $base06
color: $base0C color: $base0C
#window
background: $base01
padding: 0 4px
color: $base06
border-bottom: 2px solid transparent
// widgets
#mode, window#waybar #window,
#custom-clock, #mpris,
#pulseaudio, #backlight, #network, #temperature, #battery, #idle_inhibitor, #tray, #tray menu
@extend %widget
// hide when empty
window#waybar.empty #window window#waybar.empty #window
opacity: 0 opacity: 0
// tooltips
tooltip
background: color.change($base00, $alpha: 0.9)
label
color: $base07
// mpris player and state
#mpris
&.spotify
background: #191414
color: #1DB954
&.paused
background: $base01
color: $base03
/*.modules-left
#window
widget
label
margin: 0
&:first-child
margin-left: 0
&:last-child
margin-right: 0*/
.modules-center
.modules-right

View file

@ -1,3 +1,16 @@
{ kittywitch, ... }: { { kittywitch, ... }: {
xdg.configFile."wofi/wofi.css" = { inherit (kittywitch.sassTemplate { name = "wofi-style"; src = ./wofi.sass; }) source; }; programs.wofi = {
enable = true;
settings = {
style = let
template = kittywitch.sassTemplate { name = "wofi-style"; src = ./wofi.sass; };
in template.source;
insensitive = true;
allow_images = true;
hide_scroll = true;
width = "25%";
mode = "dmenu";
prompt = "";
};
};
} }

View file

@ -101,7 +101,8 @@ opt.listchars = {
-- Memory, CPU -- Memory, CPU
----------------------------------------------------------- -----------------------------------------------------------
opt.hidden = true -- Enable background buffers opt.hidden = true -- Enable background buffers
opt.history = 100 -- Remember N lines in history opt.history = 1000 -- Remember N lines in history
opt.shada = "'1000,f1,<500,@500,/500"
opt.lazyredraw = true -- Faster scrolling opt.lazyredraw = true -- Faster scrolling
opt.synmaxcol = 240 -- Max column for syntax highlight opt.synmaxcol = 240 -- Max column for syntax highlight
opt.updatetime = 700 -- ms to wait for trigger an event opt.updatetime = 700 -- ms to wait for trigger an event

View file

@ -11,6 +11,9 @@ in {
home.packages = with pkgs; [ home.packages = with pkgs; [
# programs.zsh.enableAutosuggestions only includes nix-zsh-autocompletions # programs.zsh.enableAutosuggestions only includes nix-zsh-autocompletions
zsh-completions zsh-completions
fortune
neofetch
ponysay
]; ];
xdg.configFile."kattheme_immutable.json".text = serde.toJSON rec { xdg.configFile."kattheme_immutable.json".text = serde.toJSON rec {
@ -86,7 +89,6 @@ in {
'' ''
else "" else ""
} }
${pkgs.fortune}/bin/fortune | ${pkgs.ponysay}/bin/ponysay
''; '';
shellAliases = mkMerge [ shellAliases = mkMerge [
{ {

View file

@ -4,6 +4,8 @@ _: {
extraConfig = '' extraConfig = ''
local wezterm = require 'wezterm'; local wezterm = require 'wezterm';
return { return {
font = wezterm.font "Iosevka",
font_size = 9.0,
check_for_updates = false, check_for_updates = false,
show_update_window = false, show_update_window = false,
enable_tab_bar = true enable_tab_bar = true

View file

@ -1,30 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIFIDCCAwigAwIBAgIQG9WOE1qLWgtuL6Q2y3y2MDANBgkqhkiG9w0BAQsFADAp
MRMwEQYDVQQKEwpLYXQgSW5za2lwMRIwEAYDVQQDEwlpbnNraXAubWUwIBcNMjMw
MjAzMjI0NzIzWhgPMjMxNTA1MTYyMTQ3MjNaMCkxEzARBgNVBAoTCkthdCBJbnNr
aXAxEjAQBgNVBAMTCWluc2tpcC5tZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCC
AgoCggIBAM7I9jWXlaK9li4mhDcQfuAk8R6mfJvFj5X/Lih+Icq/+9dHEsbTy06G
1KkksRRs2dYbp2/WKtaWJpeLlTgN1J3xkwtqMkXdiXsEEF6DXvowlnS5RLIh5+TW
WFjBqVJQ6F0CR0UtMGMRhS31s7LV95HHA2QetdL1BoMIxDNPh3idfiJfRItooRHG
xa+4z/WQv37xFolUQ3032pbrBWEbYBbZxc3Bd/nW0VKof0QVbf392h3HiGx0kegr
I3VfNW8OPy+FeYpqYpzjOQrBxC+viPm2To5BHqySzx/X7kp0auAFSnEQ0etruGeQ
aAr59HE/m0kdWr2MuQIRMj+E1ZkZT9oZ7w2pyO7KTmA3oNS3sFiw0v+zlB21zqqu
R8J3r9utxfSAlfRh8kx+X2qcOZKvpxsha3DYtaDUWGAftoB8rM3Mqnh+3Yx8hlW/
omhgCbsiVD8QmX0ylz0d9a2KrpFTcCNtrjizUXM4YTZf7PlZNHiznhg9s1OsoyeL
JgoK1DWb8wNmSlQmM521Y8U/mOGRMCkkgzpkjSz1BVwLSSt5eWW8G0gYShWI/muV
IyUxynQ4hjQDdAkp8RXuPdngfURJv9mak2+A5twYkYYJsjs+ybGK+nW11oSQHRZZ
rgTtNuuAvsRNH4LMEckTnl4EXDdBW45qviSlRbS6uUYMXBhYULObAgMBAAGjQjBA
MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBStOuqq
aSal/ZDjfDd/5woNkfZbWDANBgkqhkiG9w0BAQsFAAOCAgEAXfjvG57cmZI9H9uS
CymF5uyoDM80D9fTf1jzNpCMf+K0YcS4VztKVn752CRCMAQzhzt/pl8zg1UC7fbN
VgXEe2V7bXAf/Jimy+39eBEZBBXXcUjZMWpYqHceHXkL+qpasOvYZUPTTzAXnEo+
wafSUr07G7P68vO4xIM1JQ+GOvsn85/VvLU8FnKges5PaINOPEcSGfaf9r0fzHs+
JXbXu+PgYBnJus85Q6yDpgJe63xkvUaDGmZDQ1OgEqH8a20xTj1JF6QnDo6h6ZI7
7PZGta6WroxBzmaV5+WqBgQeU/X4CqmdaItYN8V9toTpn4P15ixZD7Wf9B+wwjkb
ISGWIALq0G/+UNO7tz1YYVV4vMc2ihwOly8PALIjtEkXcwKwDW4hcvEdUwoEpR2x
9+VQjtkLAFYc22UixurMRtTqqIEGbr3vDzK9g6T0ybqkihVY+2V46fV1hkOV7x4c
BKfjMQu0KOT+i3DGUzwGlGftTQZra7EXVeregwKCQ1+ir7oOjOj/3a5dyRvueEBV
OXBmCdbQqNxEb9AufzetdDEQ7P7jcxCD0hEk0IMZ+jG/I5etZAP67LeuGkSI6Mtd
M3zZ1XVewnSYMBojKdM8bAN/r8qs6vlk4s+/WhOhH8/BgP1GsxSml0vk466SqufA
14acmvYZwS3osOl7wz0Y6XANkD8=
-----END CERTIFICATE-----

View file

@ -7,13 +7,10 @@ in with lib; {
palette = mkOption { palette = mkOption {
type = attrsOf str; type = attrsOf str;
}; };
palette' = mkOption {
type = attrsOf str;
};
sass = { sass = {
variables = mkOption { variables = mkOption {
type = attrsOf str; type = attrsOf str;
default = cfg.palette // cfg.palette' // { default = cfg.palette // {
term_font = "Iosevka"; term_font = "Iosevka";
font = "Iosevka"; font = "Iosevka";
font_size = "12px"; font_size = "12px";
@ -34,12 +31,6 @@ in with lib; {
"#${v.hex}") "#${v.hex}")
(lib.filterAttrs (n: _: lib.hasInfix "base" n) (lib.filterAttrs (n: _: lib.hasInfix "base" n)
cfg.defaultScheme); cfg.defaultScheme);
palette' = lib.mapAttrs' (k: v:
lib.nameValuePair
"${k}t"
"rgba(${toString v.red.byte}, ${toString v.green.byte}, ${toString v.blue.byte}, ${toString 0.7})")
(lib.filterAttrs (n: _: lib.hasInfix "base" n)
cfg.defaultScheme);
}; };
lib.kittywitch.sassTemplate = { name, src }: lib.kittywitch.sassTemplate = { name, src }:
@ -50,7 +41,7 @@ in with lib; {
source = pkgs.callPackage source = pkgs.callPackage
({ sass, stdenv }: stdenv.mkDerivation { ({ sass, stdenv }: stdenv.mkDerivation {
inherit name src variables; inherit name src variables;
nativeBuildInputs = lib.singleton sass; nativeBuildInputs = lib.singleton pkgs.sass;
phases = [ "buildPhase" ]; phases = [ "buildPhase" ];
buildPhase = '' buildPhase = ''
cat $variables $src > src-mut.sass cat $variables $src > src-mut.sass

5
modules/home/waybar.nix Normal file
View file

@ -0,0 +1,5 @@
{ config, ... }: {
systemd.user.services.waybar.Unit.X-Restart-Triggers = [
(builtins.toString config.programs.waybar.style)
];
}

34
modules/home/wofi.nix Normal file
View file

@ -0,0 +1,34 @@
{ config, lib, pkgs, ... }: let
inherit (lib.modules) mkIf mkMerge;
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) attrsOf unspecified;
inherit (lib.generators) toKeyValue;
cfg = config.programs.wofi;
in {
options.programs.wofi = {
enable = mkEnableOption "wofi, an unmaintained launcher program for wlroots";
package = mkOption {
type = unspecified;
default = pkgs.wofi;
};
exec = mkOption {
internal = true;
type = unspecified;
default = "${cfg.package}/bin/wofi";
};
settings = mkOption {
type = attrsOf unspecified;
};
};
config = mkMerge [
{
programs.wofi.settings.term = config.wayland.windowManager.sway.config.terminal;
}
(mkIf cfg.enable {
xdg.configFile."wofi/config" = {
text = toKeyValue {} cfg.settings;
};
wayland.windowManager.sway.config.menu = "${pkgs.j4-dmenu-desktop}/bin/j4-dmenu-desktop --no-generic --dmenu=\"${cfg.exec}\" --term='${cfg.settings.term}'";
})
];
}

View file

@ -1,5 +1,3 @@
{ ... }: {
imports = [
({ config, pkgs, ... }: ({ config, pkgs, ... }:
{ {
@ -13,5 +11,3 @@
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
}) })
];
}

View file

@ -9,10 +9,10 @@ in {
services.openssh = { services.openssh = {
enable = true; enable = true;
knownHosts.katca = { /* knownHosts.katca = {
certAuthority = true; certAuthority = true;
publicKey = builtins.readFile ../../kat_pubkey_ssh.pub; publicKey = builtins.readFile ./ca-pubkey.pem;
}; }; */
kexAlgorithms = [ "curve25519-sha256@libssh.org" ]; kexAlgorithms = [ "curve25519-sha256@libssh.org" ];
settings = { settings = {
PasswordAuthentication = false; PasswordAuthentication = false;

View file

@ -1,429 +0,0 @@
{ config, lib, tf, ... }: let
inherit (lib.attrsets) attrNames filterAttrs mapAttrs' nameValuePair;
inherit (lib.strings) hasPrefix;
in {
# MDNS
services.avahi.enable = true;
networking.firewall = {
allowedTCPPorts = [
8123 # Home Assistant
21036 # HomeKit
];
allowedUDPPorts = [
5353 # MDNS
];
allowedUDPPortRanges = [
{ from = 32768; to = 60999; } # Chromecast
];
};
networks.gensokyo = {
tcp = [
# Home Assistant
8123
# Tewi Homekit
21063
];
udp = [
# Chromecast
[ 32768 60999 ]
# MDNS
5353
];
};
secrets.variables.ha-integration = {
path = "gensokyo/home-assistant";
field = "notes";
};
secrets.files.ha-integration = {
text = tf.variables.ha-integration.ref;
owner = "hass";
group = "hass";
};
secrets.variables.latitude = {
path = "gensokyo/home-assistant";
field = "latitude";
};
secrets.variables.longitude = {
path = "gensokyo/home-assistant";
field = "longitude";
};
secrets.variables.elevation = {
path = "gensokyo/home-assistant";
field = "elevation";
};
secrets.variables.iphone-se-irk = {
path = "gensokyo/home-assistant";
field = "iphone-se-irk";
};
secrets.variables.companion-pixel6 = {
path = "gensokyo/home-assistant";
field = "companion-pixel6";
};
secrets.variables.tile-bee = {
path = "gensokyo/home-assistant";
field = "tile-bee";
};
secrets.variables.tile-kat-wallet = {
path = "gensokyo/home-assistant";
field = "tile-kat-wallet";
};
secrets.variables.tile-kat-keys = {
path = "gensokyo/home-assistant";
field = "tile-kat-keys";
};
secrets.variables.mpd-shanghai-password = {
path = "gensokyo/abby";
field = "mpd";
};
secrets.files.home-assistant-secrets = {
text = let
espresenceDevices = {
iphone-se-irk = tf.variables.iphone-se-irk.ref;
companion-pixel6 = tf.variables.companion-pixel6.ref;
tile-kat-wallet = tf.variables.tile-kat-wallet.ref;
tile-kat-keys = tf.variables.tile-kat-keys.ref;
tile-bee = tf.variables.tile-bee.ref;
};
in builtins.toJSON ({
latitude = tf.variables.latitude.ref;
longitude = tf.variables.longitude.ref;
elevation = tf.variables.elevation.ref;
mpd-shanghai-password = tf.variables.mpd-shanghai-password.ref;
} // espresenceDevices // mapAttrs' (key: device_id:
nameValuePair "${key}-topic" "espresense/devices/${device_id}"
) espresenceDevices);
owner = "hass";
group = "hass";
};
systemd.services.home-assistant = {
preStart = lib.mkBefore ''
cp --no-preserve=mode ${config.secrets.files.home-assistant-secrets.path} ${config.services.home-assistant.configDir}/secrets.yaml
cp --no-preserve=mode ${config.secrets.files.ha-integration.path} ${config.services.home-assistant.configDir}/integration.yaml
# UI-editable config files
touch ${config.services.home-assistant.configDir}/{automations,scenes,scripts,manual}.yaml
'';
};
services.home-assistant = {
enable = true;
config = {
homeassistant = {
name = "Gensokyo";
unit_system = "metric";
latitude = "!secret latitude";
longitude = "!secret longitude";
elevation = "!secret elevation";
currency = "CAD";
time_zone = "America/Vancouver";
external_url = "https://home.gensokyo.zone";
packages = {
manual = "!include manual.yaml";
};
};
frontend = {
themes = "!include_dir_merge_named themes";
};
powercalc = {
};
utility_meter = {
};
withings = {
use_webhook = true;
};
logger = {
default = "info";
};
http = {
cors_allowed_origins = [
"https://google.com"
"https://www.home-assistant.io"
];
use_x_forwarded_for = "true";
trusted_proxies = [
"127.0.0.0/24"
"200::/7"
"100.64.0.0/10"
"fd7a:115c:a1e0:ab12::/64"
];
};
recorder = {
db_url = "postgresql://@/hass";
auto_purge = true;
purge_keep_days = 14;
commit_interval = 1;
exclude = {
domains = [
"automation"
"updater"
];
entity_globs = [
"sensor.weather_*"
"sensor.date_*"
];
entities = [
"sun.sun"
"sensor.last_boot"
"sensor.date"
"sensor.time"
];
event_types = [
"call_service"
];
};
};
google_assistant = {
project_id = "gensokyo-5cfaf";
service_account = "!include integration.yaml";
report_state = true;
exposed_domains = [
"scene"
"script"
"climate"
#"sensor"
];
entity_config = let
hidden = "XYZ";
in {
# bedroom entities
"light.bedside_lamp".expose = true;
"light.bedroom_strip".expose = true;
"light.bedroom_overhead".expose = true;
"light.bed_side_overhead".room = hidden;
"light.closet_side_overhead".room = hidden;
"light.pc_side_overhead".room = hidden;
"light.closet_overhead".expose = true;
"light.closet_overhead_left".room = hidden;
"light.closet_overhead_right".room = hidden;
"fan.bedroom_purifier" = {
expose = true;
aliases = [
"FÖRNUFTIG"
"Bedroom Air Purifier"
];
};
"fan.bedroom_floor".expose = true;
"switch.swb1_relay_3".expose = true;
"switch.swb1_relay_4".expose = true;
# living room entities
"light.dining_overhead".expose = true;
"light.living_cluster".expose = true;
"light.living_overhead".room = hidden;
"light.tv_overhead".room = hidden;
"light.couch_overhead_left".room = hidden;
"light.couch_overhead_right".room = hidden;
"light.tv_bias" = {
room = hidden;
aliases = [
"Bias Lighting"
"TV Backlight"
];
};
"light.living_bookshelf".room = hidden;
# midea
"climate.living_ac".aliases = [
"AC"
"Midea"
];
"sensor.living_ac_outdoor_temperature".expose = false;
# kitchen
"light.kitchen_overhead".expose = true;
"light.kitchen_overhead_inner".room = hidden;
"light.kitchen_overhead_middle".room = hidden;
"light.kitchen_overhead_outer".room = hidden;
# balcony
"light.outdoor_strip".expose = true;
"light.lantern".expose = true;
# foyer
"light.entry_overhead".expose = true;
"light.entry_overhead_left".room = hidden;
"light.entry_overhead_right".room = hidden;
# shanghai systemd
"switch.shanghai_graphical".expose = true;
"switch.shanghai_mradio".expose = true;
"switch.shanghai_vm_goliath1650".expose = true;
"switch.shanghai_vm_goliath3080".expose = true;
"switch.shanghai_vm_hourai1650".expose = true;
"switch.shanghai_vm_hourai3080".expose = true;
"cover.shanghai_dpms" = {
expose = true;
aliases = [
"DPMS"
];
};
};
};
homekit = {
name = "Tewi";
port = 21063;
ip_address = "10.1.1.38";
filter = let
inherit (config.services.home-assistant.config) google_assistant;
entities = filterAttrs (_: entity: entity.expose or true) google_assistant.entity_config;
in {
include_domains = google_assistant.exposed_domains;
include_entities = attrNames (removeAttrs entities [
# HomeKit is able to group lights together, no need to use the google hack here
"light.living_cluster"
"light.bedroom_overhead"
"light.closet_overhead"
"light.kitchen_overhead"
"light.entry_overhead"
]);
};
entity_config = {
"switch.swb1_relay_3".type = "outlet";
"switch.swb1_relay_4".type = "outlet";
};
};
tts = [{
platform = "google_translate";
service_name = "google_say";
}];
# https://nixos.wiki/wiki/Home_Assistant#Combine_declarative_and_UI_defined_automations
"automation manual" = [ ];
"automation ui" = "!include automations.yaml";
# https://nixos.wiki/wiki/Home_Assistant#Combine_declarative_and_UI_defined_scenes
"scene manual" = [];
"scene ui" = "!include scenes.yaml";
"script manual" = [];
"script ui" = "!include scripts.yaml";
counter = {};
device_tracker = {};
energy = {};
group = {};
history = {};
image = {};
input_boolean = {};
input_button = {};
input_datetime = {};
input_number = {};
input_select = {};
input_text = {};
logbook = {};
schedule = {};
map = {};
media_source = {};
media_player = [
{
platform = "mpd";
name = "Shanghai MPD";
host = "10.1.1.32";
password = "!secret mpd-shanghai-password";
}
];
mobile_app = {};
my = {};
person = {};
ssdp = {};
switch = {};
stream = {};
sun = {};
system_health = {};
tag = {};
template = {};
tile = {};
timer = {};
webhook = {};
wake_on_lan = {};
zeroconf = {};
zone = {};
sensor = let
mkESPresenceBeacon = { device_id, ... }@args: {
platform = "mqtt_room";
state_topic = if hasPrefix "!secret" device_id
then "${device_id}-topic"
else "espresense/devices/${device_id}";
} // args;
in [
(mkESPresenceBeacon {
device_id = "!secret iphone-se-irk";
name = "iPhone SE";
timeout = 2;
away_timeout = 120;
})
(mkESPresenceBeacon {
device_id = "!secret companion-pixel6";
name = "Kat's Pixel 6";
timeout = 5;
away_timeout = 120;
})
(mkESPresenceBeacon {
device_id = "name:galaxy-watch-active";
name = "Galaxy Watch Active";
})
(mkESPresenceBeacon {
device_id = "3003c8383b6c";
name = "MT7922 BT";
})
(mkESPresenceBeacon {
device_id = "d8f8833681ba";
name = "AX210 BT";
})
(mkESPresenceBeacon {
device_id = "md:03ff:6";
name = "Kat's Smartwatch";
})
(mkESPresenceBeacon {
device_id = "!secret tile-bee";
name = "Bee";
})
(mkESPresenceBeacon {
device_id = "!secret tile-kat-wallet";
name = "Kat's Wallet";
})
(mkESPresenceBeacon {
device_id = "!secret tile-kat-keys";
name = "Girlwife";
})
];
};
extraPackages = python3Packages: with python3Packages; [
psycopg2
aiohomekit
securetar
getmac # for upnp integration
(aiogithubapi.overrideAttrs (_: { doInstallCheck = false; }))
];
extraComponents = [
"automation"
"scene"
"script"
"zha"
"esphome"
"apple_tv"
"spotify"
"default_config"
"brother"
"ipp"
"cast"
"plex"
"met"
"google"
"google_assistant"
"google_cloud"
"google_translate"
"homekit"
"mpd"
"mqtt"
"tile"
"wake_on_lan"
"withings"
"zeroconf"
];
};
}

View file

@ -1,49 +0,0 @@
{ lib, pkgs, ... }: let
inherit (lib.modules) mkForce;
in {
systemd.services.NetworkManager-wait-online = {
serviceConfig.ExecStart = [ "" "${pkgs.networkmanager}/bin/nm-online -q" ];
};
hardware.bluetooth = {
enable = true;
package = pkgs.bluez5-experimental;
settings = {
General = {
Enable = "Source,Sink,Media,Socket";
};
};
};
services.blueman.enable = true;
services.pipewire.media-session.config.bluez-monitor = {
properties = { };
rules = [
{
actions = {
update-props = {
"bluez5.a2dp-source-role" = "input";
"bluez5.auto-connect" = [ "hfp_hf" "hsp_hs" "a2dp_sink" "a2dp_source" "hsp_ag" "hfp_ag" ];
};
};
matches = [ { "device.name" = "~bluez_card.*"; } ];
}
{
actions = {
update-props = { "node.pause-on-idle" = false; };
};
matches = [ { "node.name" = "~bluez_input.*"; } { "node.name" = "~bluez_output.*"; } ];
}
];
};
networking = {
firewall = {
allowedUDPPorts = [ 5353 ];
allowedUDPPortRanges = [ { from = 32768; to=60999; } ];
};
networkmanager = {
enable = true;
connectionConfig = {
"ipv6.ip6-privacy" = mkForce 0;
};
};
};
}

0
nixos/hardware/.keep Normal file
View file

View file

@ -0,0 +1,55 @@
{ pkgs, ... }: {
environment.systemPackages = with pkgs; [ bluez5-experimental ];
environment.etc = {
"wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
bluez_monitor.properties = {
["bluez5.enable-sbc-xq"] = true,
["bluez5.enable-msbc"] = true,
["bluez5.enable-hw-volume"] = true,
["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
}
'';
};
hardware.bluetooth = {
enable = true;
package = pkgs.bluez5-experimental;
settings = {
General = {
Enable = "Source,Sink,Media,Socket";
};
};
};
services = {
blueman.enable = true;
pipewire.media-session.config.bluez-monitor = {
properties = { };
rules = [
{
actions = {
update-props = {
"bluez5.a2dp-source-role" = "input";
"bluez5.auto-connect" = [ "hfp_hf" "hsp_hs" "a2dp_sink" "a2dp_source" "hsp_ag" "hfp_ag" ];
};
};
matches = [ { "device.name" = "~bluez_card.*"; } ];
}
{
actions = {
update-props = { "node.pause-on-idle" = false; };
};
matches = [ { "node.name" = "~bluez_input.*"; } { "node.name" = "~bluez_output.*"; } ];
}
];
};
};
home-manager.sharedModules = [
{
xsession.preferStatusNotifierItems = true;
services.blueman-applet.enable = true;
}
];
}

View file

@ -0,0 +1,26 @@
{ lib, tree, ... }: with lib; let
profiles = tree.prev;
appendedProfiles = {
common-wifi-bt = {
imports = with profiles; [
wifi
bluetooth
];
};
laptop = {
imports = with profiles; [
laptop
sound
];
};
lenovo-thinkpad-x260 = {
imports = with profiles; [
lenovo-thinkpad-x260
lenovo-thinkpad-x260-local
appendedProfiles.laptop
appendedProfiles.common-wifi-bt
];
};
};
in
profiles // appendedProfiles

33
nixos/hardware/laptop.nix Normal file
View file

@ -0,0 +1,33 @@
{lib, pkgs, ...}: let
inherit (lib.modules) mkDefault mkOrder;
in {
powerManagement.cpuFreqGovernor = mkDefault "powersave";
programs.light.enable = true;
home-manager.sharedModules = [
{
programs.waybar.settings.main = {
modules-right = [
"backlight"
"battery"
];
backlight = {
format = " {percent}%";
on-scroll-up = "${pkgs.light}/bin/light -A 1";
on-scroll-down = "${pkgs.light}/bin/light -U 1";
};
battery = {
states = {
good = 90;
warning = 30;
critical = 15;
};
format = "{icon} {capacity}%";
format-charging = " {capacity}%";
format-plugged = " {capacity}%";
format-alt = "{icon} {time}";
format-icons = [ "" "" "" "" "" ];
};
};
}
];
}

View file

@ -0,0 +1,19 @@
{lib, ...}: let
in {
boot = {
initrd.availableKernelModules =
[ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sr_mod" "rtsx_usb_sdmmc" ];
kernelModules = [ "kvm-intel" ];
};
home-manager.sharedModules = [
{
wayland.windowManager.sway.config.input."2:7:SynPS/2_Synaptics_TouchPad" = {
dwt = "enabled";
tap = "enabled";
natural_scroll = "enabled";
middle_emulation = "enabled";
click_method = "clickfinger";
};
}
];
}

View file

@ -1,4 +1,8 @@
{ pkgs, ... }: { {lib, pkgs, ...}: let
inherit (lib.modules) mkDefault mkOrder;
in {
environment.systemPackages = with pkgs; [ pulsemixer ];
sound = { sound = {
enable = true; enable = true;
extraConfig = '' extraConfig = ''
@ -6,21 +10,8 @@
''; '';
}; };
environment.systemPackages = with pkgs; [ pulsemixer bluez5-experimental ];
security.rtkit.enable = true; security.rtkit.enable = true;
environment.etc = {
"wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
bluez_monitor.properties = {
["bluez5.enable-sbc-xq"] = true,
["bluez5.enable-msbc"] = true,
["bluez5.enable-hw-volume"] = true,
["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
}
'';
};
services.pipewire = { services.pipewire = {
enable = true; enable = true;
config = { config = {
@ -49,4 +40,28 @@
jack.enable = true; jack.enable = true;
alsa.enable = true; alsa.enable = true;
}; };
home-manager.sharedModules = [
{
programs.waybar.settings.main = {
modules-right = [
"pulseaudio"
];
pulseaudio = {
format = "{icon} {volume}%";
format-muted = "";
on-click = "${pkgs.wezterm}/bin/wezterm start ${pkgs.pulsemixer}/bin/pulsemixer";
format-icons = {
headphone = "";
headset = "";
default = [
""
""
""
];
};
};
};
}
];
} }

26
nixos/hardware/wifi.nix Normal file
View file

@ -0,0 +1,26 @@
{ lib, pkgs, ... }: let
inherit (lib.modules) mkForce;
in {
systemd.services.NetworkManager-wait-online = {
serviceConfig.ExecStart = [ "" "${pkgs.networkmanager}/bin/nm-online -q" ];
};
networking = {
firewall = {
allowedUDPPorts = [ 5353 ]; # MDNS
allowedUDPPortRanges = [ { from = 32768; to=60999; } ]; # Ephemeral / Chromecast
};
networkmanager = {
enable = true;
connectionConfig = {
"ipv6.ip6-privacy" = mkForce 0;
};
};
};
home-manager.sharedModules = [
{
xsession.preferStatusNotifierItems = true;
services.network-manager-applet.enable = true;
}
];
}

View file

@ -1,14 +0,0 @@
_: let
super = "Mod4";
in {
xsession.windowManager.i3 = {
enable = true;
config = {
modifier = super;
fonts = [ ];
};
bars = [
];
};
}

View file

@ -1,6 +0,0 @@
{lib, ...}: let
inherit (lib.modules) mkDefault;
in {
powerManagement.cpuFreqGovernor = mkDefault "powersave";
programs.light.enable = true;
}

View file

@ -1,5 +0,0 @@
_: {
programs.rust-motd = {
enable = true;
};
}

View file

@ -1,3 +0,0 @@
_: {
services.fstrim.enable = true;
}

View file

@ -1,6 +1,7 @@
{ pkgs, ... }: { { pkgs, ... }: {
fonts = { fonts = {
fonts = with pkgs; [ fonts = with pkgs; [
font-awesome
twitter-color-emoji twitter-color-emoji
iosevka-bin iosevka-bin
]; ];

View file

@ -0,0 +1,3 @@
_: {
hardware.enableAllFirmware = true;
}

View file

@ -1,12 +0,0 @@
_: {
services.tzupdate.enable = true;
systemd.timers.tzupdate = {
description = "Attempt to update timezone every hour";
timerConfig = {
OnBootSec="1m";
OnUnitInactiveSec="1h";
Unit = "tzupdate.service";
};
wantedBy = [ "timers.target" ];
};
}

View file

@ -1,12 +1,16 @@
{inputs}: let {inputs}: let
std = import ./std.nix {inherit inputs;}; std = import ./std.nix {inherit inputs;};
tree = import ./tree.nix {inherit inputs;}; tree = import ./tree.nix {inherit inputs pkgs;};
inherit (inputs.nixpkgs) lib; inherit (inputs.nixpkgs) lib;
overlay = import ./packages {inherit inputs tree lib std;};
systems = import ./systems {inherit inputs tree lib std;}; systems = import ./systems {inherit inputs tree lib std;};
shells = import ./shells {inherit inputs tree lib std pkgs;}; shells = import ./shells {inherit inputs tree lib std pkgs;};
inherit (import ./pkgs.nix {inherit inputs tree;}) pkgs; inherit (import ./pkgs.nix {inherit inputs tree overlay;}) pkgs;
formatter = import ./formatter.nix {inherit inputs pkgs;}; formatter = import ./formatter.nix {inherit inputs pkgs;};
inherit (std) set; inherit (std) set;
checks = set.map (_: deployLib: deployLib.deployChecks inputs.self.deploy) inputs.deploy-rs.lib; checks = set.map (_: deployLib: deployLib.deployChecks inputs.self.deploy) inputs.deploy-rs.lib;
in in
{inherit inputs tree std pkgs checks formatter lib;} // systems // shells {
inherit inputs tree std pkgs checks formatter lib;
legacyPackages = pkgs;
} // systems // shells

View file

@ -1,7 +1,6 @@
{inputs, ...}: {inputs, tree, ...}: [
[
inputs.deploy-rs.overlay inputs.deploy-rs.overlay
] (import tree.packages.default { inherit inputs tree; })
++ map (path: import "${path}/overlay.nix") [ ] ++ map (path: import "${path}/overlay.nix") [
inputs.arcexprs inputs.arcexprs
] ]

19
packages/dart-sass.nix Normal file
View file

@ -0,0 +1,19 @@
{ stdenv, fetchurl, autoPatchelfHook }:
stdenv.mkDerivation rec {
pname = "dart-sass";
version = "1.58.1";
src = fetchurl {
url =
"https://github.com/sass/${pname}/releases/download/${version}/${pname}-${version}-linux-x64.tar.gz";
sha256 = "sha256-5/mEeshCakp/eju9MhFZ8VXvHEuXGiDVtUI2UhI0XPU=";
};
nativeBuildInputs = [ autoPatchelfHook ];
installPhase = ''
mkdir -p $out/bin
mv sass $out/bin
'';
}

3
packages/default.nix Normal file
View file

@ -0,0 +1,3 @@
{ inputs, tree, ... }: final: prev: let
inherit (inputs.std.lib) set list;
in set.map (_: package: prev.callPackage package {} ) (removeAttrs tree.packages ["default"])

View file

@ -3,6 +3,6 @@
inputs, inputs,
... ...
}: let }: let
overlays = import tree.overlays {inherit inputs;}; overlays = import tree.overlays {inherit inputs tree;};
in in
inputs.utils.lib.eachDefaultSystem (system: {pkgs = import inputs.nixpkgs { inherit system overlays; config.allowUnfree = true; };}) inputs.utils.lib.eachDefaultSystem (system: {pkgs = import inputs.nixpkgs { inherit system overlays; config.allowUnfree = true; };})

View file

@ -1,10 +1,15 @@
_: let _: let
hostConfig = {config, tree, pkgs, ...}: { hostConfig = {config, tree, pkgs, ...}: {
imports = with tree; [ imports = with tree.nixos.hardware; [
nixos.gui lenovo-thinkpad-x260
nixos.bootable common-pc-laptop-ssd
] ++ (with tree.nixos.roles; [
graphical
laptop
bootable
]) ++ (with tree; [
kat.gui kat.gui
]; ]);
fileSystems = { fileSystems = {
"/" = { "/" = {
@ -31,7 +36,7 @@ _: let
]; ];
extraConfig = '' extraConfig = ''
HostCertificate /var/lib/secrets/${config.networking.hostName}-osh-cert HostCertificate /var/lib/secrets/${config.networking.hostName}-osh-cert
HostCertificate /var/lib/secrets/${config.networking.hostName}-ed25519-osh-cert HostCertificate /var/lib/secrets/${config.networking.hostName}-osh-ed25519-cert
''; '';
}; };
@ -39,35 +44,7 @@ _: let
{device = "/dev/disk/by-uuid/0d846453-95b4-46e1-8eaf-b910b4321ef0";} {device = "/dev/disk/by-uuid/0d846453-95b4-46e1-8eaf-b910b4321ef0";}
]; ];
home-manager.sharedModules = [
{
wayland.windowManager.sway.config.input."2:7:SynPS/2_Synaptics_TouchPad" = {
dwt = "enabled";
tap = "enabled";
natural_scroll = "enabled";
middle_emulation = "enabled";
click_method = "clickfinger";
};
}
];
hardware = {
cpu.intel.updateMicrocode = true;
opengl = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver
vaapiIntel
vaapiVdpau
libvdpau-va-gl
];
};
};
boot = { boot = {
initrd.availableKernelModules =
[ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sr_mod" "rtsx_usb_sdmmc" ];
kernelModules = [ "kvm-intel" ];
supportedFilesystems = ["xfs"]; supportedFilesystems = ["xfs"];
initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/f0ea08b4-6af7-4d90-a2ad-edd5672a2105"; initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/f0ea08b4-6af7-4d90-a2ad-edd5672a2105";
loader = { loader = {

View file

@ -1,4 +1,4 @@
{inputs, ...}: {inputs, pkgs, ...}:
(inputs.tree.tree { (inputs.tree.tree {
inherit inputs; inherit inputs;
folder = ./.; folder = ./.;
@ -11,6 +11,7 @@
"tree" "tree"
"inputs" "inputs"
"outputs" "outputs"
"pkgs"
]; ];
}; };
# Ignore the default.nix we actually use # Ignore the default.nix we actually use
@ -32,6 +33,9 @@
"kat/user/data".evaluate = true; "kat/user/data".evaluate = true;
# Allow profile importing # Allow profile importing
"nixos/*".functor.enable = true; "nixos/*".functor.enable = true;
"nixos/roles/*".functor.enable = true;
"nixos/hardware".evaluateDefault = true;
"nixos/hardware/*".functor.enable = true;
"darwin/*".functor.enable = true; "darwin/*".functor.enable = true;
"kat/*".functor.enable = true; "kat/*".functor.enable = true;
# Various modules # Various modules
@ -40,6 +44,9 @@
enable = true; enable = true;
}; };
}; };
"nixos/hardware" = {
external = inputs.nixos-hardware.outputs.nixosModules;
};
"modules/nixos" = { "modules/nixos" = {
functor = { functor = {
enable = true; enable = true;