Compare commits

..

No commits in common. "main" and "booting" have entirely different histories.

38 changed files with 832 additions and 4701 deletions

View file

@ -1,7 +1,6 @@
keys:
# list any public keys here
# if you need the private key, refer to the readme
# pass age-key | rg '# pub'
- &daniel age1stdue5q5teskee057ced6rh9pzzr93xsy66w4sc3zu49rgxl7cjshztt45
@ -9,7 +8,7 @@ keys:
# ssh host "nix shell nixpkgs#ssh-to-age -c $SHELL -c 'cat /etc/ssh/ssh_host_ed25519_key.pub | ssh-to-age'"
- &sshd-at-beefcake age1etv56f7kf78a55lxqtydrdd32dpmsjnxndf4u28qezxn6p7xt9esqvqdq7
- &sshd-at-router age1zd7c3g5d20shdftq8ghqm0r92488dg4pdp4gulur7ex3zx2yq35ssxawpn
- &sshd-at-dragon age14ewl97x5g52ajf269cmmwzrgf22m9dsr7mw7czfa356qugvf4gvq5dttfv
- &sshd-at-dragon age12x49p3mwf27r9gdkfmfqu7lr6gwcwznlhcvcgmv8dz3gac2mkdgsp36y9p
- &ssh-foxtrot age1njnet9ltjuxasqv3ckn67r5natke6xgd8wlx8psf64pyc4duvurqhedw80
# after updating this file, you may need to update the keys for any associated files like so:

View file

@ -29,8 +29,6 @@ in rec {
size = "4G";
name = "ESP";
},
rootfsName ? "/rootfs",
homeName ? "/home",
disk,
swapSize,
...
@ -73,11 +71,11 @@ in rec {
type = "btrfs";
extraArgs = ["-f"];
subvolumes = {
${rootfsName} = {
"/rootfs" = {
mountpoint = "/";
mountOptions = ["compress=zstd"];
};
${homeName} = {
"/home" = {
mountpoint = "/home";
mountOptions = ["compress=zstd"];
};
@ -99,23 +97,13 @@ in rec {
foxtrot = standardWithHibernateSwap {
disk = "nvme0n1";
swapSize = "32G";
rootfsName = "/nixos-rootfs";
homeName = "/nixos-home";
esp = {
label = "disk-primary-ESP";
name = "disk-primary-ESP";
label = "EFI";
name = "EFI";
};
};
standard = {
esp ? {
label = "ESP";
size = "4G";
name = "ESP";
},
disk,
...
}: {
standard = {disk, ...}: {
# this is my standard partitioning scheme for my machines: an LUKS-encrypted
# btrfs volume
disko.devices = {
@ -126,7 +114,7 @@ in rec {
content = {
type = "gpt";
partitions = {
ESP = ESP esp;
ESP = ESP {size = "4G";};
luks = {
size = "100%";
content = {
@ -164,15 +152,6 @@ in rec {
};
};
thablet = standard {
disk = "nvme0n1";
esp = {
label = "EFI";
size = "4G";
name = "EFI";
};
};
unencrypted = {disk, ...}: {
disko.devices = {
disk = {

View file

@ -20,11 +20,11 @@
]
},
"locked": {
"lastModified": 1738183445,
"narHash": "sha256-C1He3N1SA8D2u+TSlldbA9wiYwDvXI4GxX3zKaeD7qU=",
"lastModified": 1731959031,
"narHash": "sha256-TGcvIjftziC1CjuiHCzrYDwmOoSFYIhdiKmLetzB5L0=",
"owner": "hyprwm",
"repo": "aquamarine",
"rev": "48a000cf35dd10bfeb231152735aebbe875f4b74",
"rev": "4468981c1c50999f315baa1508f0e53c4ee70c52",
"type": "github"
},
"original": {
@ -35,11 +35,11 @@
},
"crane": {
"locked": {
"lastModified": 1737563566,
"narHash": "sha256-GLJvkOG29XCynQm8XWPyykMRqIhxKcBARVu7Ydrz02M=",
"lastModified": 1727974419,
"narHash": "sha256-WD0//20h+2/yPGkO88d2nYbb23WMWYvnRyDQ9Dx4UHg=",
"owner": "ipetkov",
"repo": "crane",
"rev": "849376434956794ebc7a6b487d31aace395392ba",
"rev": "37e4f9f0976cb9281cd3f0c70081e5e0ecaee93f",
"type": "github"
},
"original": {
@ -55,11 +55,11 @@
]
},
"locked": {
"lastModified": 1736165297,
"narHash": "sha256-OT+sF4eNDFN/OdyUfIQwyp28+CFQL7PAdWn0wGU7F0U=",
"lastModified": 1732988076,
"narHash": "sha256-2uMaVAZn7fiyTUGhKgleuLYe5+EAAYB/diKxrM7g3as=",
"owner": "nix-community",
"repo": "disko",
"rev": "76816af65d5294761636a838917e335992a52e0c",
"rev": "2814a5224a47ca19e858e027f7e8bff74a8ea9f1",
"type": "github"
},
"original": {
@ -156,11 +156,11 @@
"systems": "systems_2"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github"
},
"original": {
@ -171,14 +171,14 @@
},
"flake-utils_3": {
"inputs": {
"systems": "systems_5"
"systems": "systems_4"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github"
},
"original": {
@ -190,17 +190,17 @@
"freetype2": {
"flake": false,
"locked": {
"lastModified": 1723459814,
"narHash": "sha256-4l90lDtpgm5xlh2m7ifrqNy373DTRTULRkAzicrM93c=",
"owner": "freetype",
"repo": "freetype",
"rev": "42608f77f20749dd6ddc9e0536788eaad70ea4b5",
"lastModified": 1687587065,
"narHash": "sha256-+Fh+/k+NWL5Ow9sDLtp8Cv/8rLNA1oByQQCIQS/bysY=",
"owner": "wez",
"repo": "freetype2",
"rev": "e4586d960f339cf75e2e0b34aee30a0ed8353c0d",
"type": "github"
},
"original": {
"owner": "freetype",
"ref": "VER-2-13-3",
"repo": "freetype",
"owner": "wez",
"repo": "freetype2",
"rev": "e4586d960f339cf75e2e0b34aee30a0ed8353c0d",
"type": "github"
}
},
@ -216,11 +216,11 @@
"zig": "zig"
},
"locked": {
"lastModified": 1739143498,
"narHash": "sha256-85TvsfDdOBfthR44rRJV9KXpj415StJqVyq+BBlLCvM=",
"lastModified": 1735330177,
"narHash": "sha256-JGoqNnhSr632eLo1NWKJWoZyepCZlXT0o1/2A6e1Ph4=",
"owner": "ghostty-org",
"repo": "ghostty",
"rev": "a3e462bbba724bcf312fcd5edd12bb5e0251c853",
"rev": "8111f5b9958c21e0157f63cc4ce2dfc2329c67ac",
"type": "github"
},
"original": {
@ -235,14 +235,15 @@
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
]
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1735882644,
"narHash": "sha256-3FZAG+pGt3OElQjesCAWeMkQ7C/nB1oTHLRQ8ceP110=",
"lastModified": 1732021966,
"narHash": "sha256-mnTbjpdqF0luOkou8ZFi2asa1N3AA2CchR/RqCNmsGE=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "a5a961387e75ae44cc20f0a57ae463da5e959656",
"rev": "3308484d1a443fc5bc92012435d79e80458fe43c",
"type": "github"
},
"original": {
@ -259,7 +260,7 @@
"slippi",
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
"nixpkgs-stable": "nixpkgs-stable_3"
},
"locked": {
"lastModified": 1721042469,
@ -342,11 +343,11 @@
},
"hardware": {
"locked": {
"lastModified": 1735388221,
"narHash": "sha256-e5IOgjQf0SZcFCEV/gMGrsI0gCJyqOKShBQU0iiM3Kg=",
"lastModified": 1733139194,
"narHash": "sha256-PVQW9ovo0CJbhuhCsrhFJGGdD1euwUornspKpBIgdok=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "7c674c6734f61157e321db595dbfcd8523e04e19",
"rev": "c6c90887f84c02ce9ebf33b95ca79ef45007bf88",
"type": "github"
},
"original": {
@ -358,16 +359,16 @@
"harfbuzz": {
"flake": false,
"locked": {
"lastModified": 1719502711,
"narHash": "sha256-2ieCf3ftNk851FZBDPVl+7QHWBqD729KiUxUyxi26Yg=",
"lastModified": 1711722720,
"narHash": "sha256-GdxcAPx5QyniSHPAN1ih28AD9JLUPR0ItqW9JEsl3pU=",
"owner": "harfbuzz",
"repo": "harfbuzz",
"rev": "9c03576c49db6e7207d9bcdfe3abd170a809157f",
"rev": "63973005bc07aba599b47fdd4cf788647b601ccd",
"type": "github"
},
"original": {
"owner": "harfbuzz",
"ref": "9.0.0",
"ref": "8.4.0",
"repo": "harfbuzz",
"type": "github"
}
@ -376,17 +377,15 @@
"inputs": {
"crane": "crane",
"flake-utils": "flake-utils_2",
"nixpkgs": [
"nixpkgs-unstable"
],
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1738256342,
"narHash": "sha256-P3t/QQgBUqmnjAQXds3qfKbcn5vULJXbx4eezlYF9Zs=",
"lastModified": 1733164621,
"narHash": "sha256-AhYHB343nLY4bkm9yyOT9I7LIg799ouuIBWb31gORcA=",
"owner": "helix-editor",
"repo": "helix",
"rev": "d285a8a9e5e2e9c0576c21a7bdc5e439b80a636c",
"rev": "c0bfdd7bfe8b5a3d13e7e8631eec2e8ea0b726a5",
"type": "github"
},
"original": {
@ -403,11 +402,11 @@
]
},
"locked": {
"lastModified": 1735344290,
"narHash": "sha256-oJDtWPH1oJT34RJK1FSWjwX4qcGOBRkcNQPD0EbSfNM=",
"lastModified": 1733050161,
"narHash": "sha256-lYnT+EYE47f5yY3KS/Kd4pJ6CO9fhCqumkYYkQ3TK20=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "613691f285dad87694c2ba1c9e6298d04736292d",
"rev": "62d536255879be574ebfe9b87c4ac194febf47c5",
"type": "github"
},
"original": {
@ -424,11 +423,11 @@
]
},
"locked": {
"lastModified": 1736089250,
"narHash": "sha256-/LPWMiiJGPHGd7ZYEgmbE2da4zvBW0acmshUjYC3WG4=",
"lastModified": 1733133928,
"narHash": "sha256-gU40r9AfpIr4eq+0noM8yH1Hxf+EA3dqfIpFtQl8Y1E=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "172b91bfb2b7f5c4a8c6ceac29fd53a01ef07196",
"rev": "873e39d5f4437d2f3ab06881fea8e63e45e1d011",
"type": "github"
},
"original": {
@ -453,11 +452,11 @@
]
},
"locked": {
"lastModified": 1738178255,
"narHash": "sha256-+D6Nu2ewXbMTFzx/Q4jDOo+LAOUPr0cxQJg5k33daIE=",
"lastModified": 1728669738,
"narHash": "sha256-EDNAU9AYcx8OupUzbTbWE1d3HYdeG0wO6Msg3iL1muk=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "dcadd3398abe146d60c67e0d9ee6e27b301cae82",
"rev": "0264e698149fcb857a66a53018157b41f8d97bb0",
"type": "github"
},
"original": {
@ -466,78 +465,25 @@
"type": "github"
}
},
"hyprgraphics": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1738018829,
"narHash": "sha256-5Ol5iahMlELx3lWuChyZsqqLk6sP6aqaJCJFw92OZGo=",
"owner": "hyprwm",
"repo": "hyprgraphics",
"rev": "12cd7034e441a5ebfdef1a090c0788413b4a635b",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprgraphics",
"type": "github"
}
},
"hyprgrass": {
"inputs": {
"hyprland": [
"hyprland"
]
},
"locked": {
"lastModified": 1737873323,
"narHash": "sha256-khgZJjtm+sLq0nWtugtvrRtNJ19Qnk4JnEs19VMk0Qw=",
"owner": "horriblename",
"repo": "hyprgrass",
"rev": "ff3eb4c9147c89f04533bd2e2fe42e94232bc3b0",
"type": "github"
},
"original": {
"owner": "horriblename",
"repo": "hyprgrass",
"type": "github"
}
},
"hyprland": {
"inputs": {
"aquamarine": "aquamarine",
"hyprcursor": "hyprcursor",
"hyprgraphics": "hyprgraphics",
"hyprland-protocols": "hyprland-protocols",
"hyprland-qtutils": "hyprland-qtutils",
"hyprlang": "hyprlang",
"hyprutils": "hyprutils",
"hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": [
"nixpkgs-unstable"
],
"nixpkgs": "nixpkgs_2",
"pre-commit-hooks": "pre-commit-hooks",
"systems": "systems_3",
"xdph": "xdph"
},
"locked": {
"lastModified": 1738236612,
"narHash": "sha256-fJ6VwFCp1w/CA+ONo9Ix+0JuGef5kHnfy/KWzOpSkWc=",
"lastModified": 1733157082,
"narHash": "sha256-rmJkUKyvaejRaQeEOpInjGjQv6rgFkm2uJ2iVlMEuOk=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "32c0fa2f2fe02254d5887b38cf2cffa72ddfd769",
"rev": "92186898c0ca1b3f72922b72c4af1723f0d9b888",
"type": "github"
},
"original": {
@ -558,11 +504,11 @@
]
},
"locked": {
"lastModified": 1737556638,
"narHash": "sha256-laKgI3mr2qz6tas/q3tuGPxMdsGhBi/w+HO+hO2f1AY=",
"lastModified": 1728345020,
"narHash": "sha256-xGbkc7U/Roe0/Cv3iKlzijIaFBNguasI31ynL2IlEoM=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "4c75dd5c015c8a0e5a34c6d02a018a650f57feb5",
"rev": "a7c183800e74f337753de186522b9017a07a8cee",
"type": "github"
},
"original": {
@ -571,74 +517,6 @@
"type": "github"
}
},
"hyprland-qt-support": {
"inputs": {
"hyprlang": [
"hyprland",
"hyprland-qtutils",
"hyprlang"
],
"nixpkgs": [
"hyprland",
"hyprland-qtutils",
"nixpkgs"
],
"systems": [
"hyprland",
"hyprland-qtutils",
"systems"
]
},
"locked": {
"lastModified": 1737634706,
"narHash": "sha256-nGCibkfsXz7ARx5R+SnisRtMq21IQIhazp6viBU8I/A=",
"owner": "hyprwm",
"repo": "hyprland-qt-support",
"rev": "8810df502cdee755993cb803eba7b23f189db795",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-qt-support",
"type": "github"
}
},
"hyprland-qtutils": {
"inputs": {
"hyprland-qt-support": "hyprland-qt-support",
"hyprlang": [
"hyprland",
"hyprlang"
],
"hyprutils": [
"hyprland",
"hyprland-qtutils",
"hyprlang",
"hyprutils"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1737981711,
"narHash": "sha256-lh6cL5D8nPplB3WovCQjLUZ7k7MViiBrMlpkfm4R7/c=",
"owner": "hyprwm",
"repo": "hyprland-qtutils",
"rev": "96bf0677fa9cd13508294e3d4559dfbbc8beff73",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-qtutils",
"type": "github"
}
},
"hyprlang": {
"inputs": {
"hyprutils": [
@ -655,11 +533,11 @@
]
},
"locked": {
"lastModified": 1737634606,
"narHash": "sha256-W7W87Cv6wqZ9PHegI6rH1+ve3zJPiyevMFf0/HwdbCQ=",
"lastModified": 1728168612,
"narHash": "sha256-AnB1KfiXINmuiW7BALYrKqcjCnsLZPifhb/7BsfPbns=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "f41271d35cc0f370d300413d756c2677f386af9d",
"rev": "f054f2e44d6a0b74607a6bc0f52dba337a3db38e",
"type": "github"
},
"original": {
@ -680,11 +558,11 @@
]
},
"locked": {
"lastModified": 1737978343,
"narHash": "sha256-TfFS0HCEJh63Kahrkp1h9hVDMdLU8a37Zz+IFucxyfA=",
"lastModified": 1732288281,
"narHash": "sha256-XTU9B53IjGeJiJ7LstOhuxcRjCOFkQFl01H78sT9Lg4=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "6a8bc9d2a4451df12f5179dc0b1d2d46518a90ab",
"rev": "b26f33cc1c8a7fd5076e19e2cce3f062dca6351c",
"type": "github"
},
"original": {
@ -705,11 +583,11 @@
]
},
"locked": {
"lastModified": 1735493474,
"narHash": "sha256-fktzv4NaqKm94VAkAoVqO/nqQlw+X0/tJJNAeCSfzK4=",
"lastModified": 1726874836,
"narHash": "sha256-VKR0sf0PSNCB0wPHVKSAn41mCNVCnegWmgkrneKDhHM=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "de913476b59ee88685fdc018e77b8f6637a2ae0b",
"rev": "500c81a9e1a76760371049a8d99e008ea77aa59e",
"type": "github"
},
"original": {
@ -718,27 +596,6 @@
"type": "github"
}
},
"iio-hyprland": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_4"
},
"locked": {
"lastModified": 1727632156,
"narHash": "sha256-gfH/jcrmI27OEge8OGPe7JpC0jrQJuX7v9hM/ObjjW8=",
"owner": "JeanSchoeller",
"repo": "iio-hyprland",
"rev": "bd6be6b7e0fbc8ca1a5ccbf536602838e52c347e",
"type": "github"
},
"original": {
"owner": "JeanSchoeller",
"repo": "iio-hyprland",
"type": "github"
}
},
"jovian": {
"inputs": {
"nix-github-actions": "nix-github-actions",
@ -747,11 +604,11 @@
]
},
"locked": {
"lastModified": 1735931035,
"narHash": "sha256-f3WRxasPYVKzrvAlLq+/3FRHQVfxVf5xxf0WWwnO99k=",
"lastModified": 1732739177,
"narHash": "sha256-iL32+TA/8geCzcL1r3uthrH/GPvbUak5QE++WJUkaiI=",
"owner": "Jovian-Experiments",
"repo": "Jovian-NixOS",
"rev": "7e530766a5fd9b7577296fedd655f3255f7495d8",
"rev": "8d7b2149e618696d5100c2683af1ffa893f02a75",
"type": "github"
},
"original": {
@ -764,17 +621,17 @@
"libpng": {
"flake": false,
"locked": {
"lastModified": 1726173884,
"narHash": "sha256-gBfHgGaqVYdmhWXoNKZzPyGzyw2rr3zp+DjWmfC41jk=",
"owner": "pnggroup",
"lastModified": 1549245649,
"narHash": "sha256-1+cRp0Ungme/OGfc9kGJbklYIWAFxk8Il1M+NV4KSgw=",
"owner": "glennrp",
"repo": "libpng",
"rev": "f5e92d76973a7a53f517579bc95d61483bf108c0",
"rev": "8439534daa1d3a5705ba92e653eda9251246dd61",
"type": "github"
},
"original": {
"owner": "pnggroup",
"ref": "v1.6.44",
"owner": "glennrp",
"repo": "libpng",
"rev": "8439534daa1d3a5705ba92e653eda9251246dd61",
"type": "github"
}
},
@ -818,21 +675,53 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1739055578,
"narHash": "sha256-2MhC2Bgd06uI1A0vkdNUyDYsMD0SLNGKtD8600mZ69A=",
"lastModified": 1728018373,
"narHash": "sha256-NOiTvBbRLIOe5F6RbHaAh6++BNjsb149fGZd1T4+KBg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a45fa362d887f4d4a7157d95c28ca9ce2899b70e",
"rev": "bc947f541ae55e999ffdb4013441347d83b00feb",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.11",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1730741070,
"narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d063c1dd113c91ab27959ba540c0d9753409edf3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1730741070,
"narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d063c1dd113c91ab27959ba540c0d9753409edf3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable_3": {
"locked": {
"lastModified": 1720386169,
"narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=",
@ -850,11 +739,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1736042175,
"narHash": "sha256-jdd5UWtLVrNEW8K6u5sy5upNAFmF3S4Y+OIeToqJ1X8=",
"lastModified": 1733064805,
"narHash": "sha256-7NbtSLfZO0q7MXPl5hzA0sbVJt6pWxxtGWbaVUDDmjs=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "bf689c40d035239a489de5997a4da5352434632e",
"rev": "31d66ae40417bb13765b0ad75dd200400e98de84",
"type": "github"
},
"original": {
@ -864,6 +753,38 @@
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1732758367,
"narHash": "sha256-RzaI1RO0UXqLjydtz3GAXSTzHkpb/lLD1JD8a0W4Wpo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fa42b5a5f401aab8a32bd33c9a4de0738180dc59",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1732981179,
"narHash": "sha256-F7thesZPvAMSwjRu0K8uFshTk3ZZSNAsXTIFvXBT+34=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "62c435d93bf046a5396f3016472e8f7c8e2aed65",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat_3",
@ -871,14 +792,15 @@
"nixpkgs": [
"hyprland",
"nixpkgs"
]
],
"nixpkgs-stable": "nixpkgs-stable_2"
},
"locked": {
"lastModified": 1737465171,
"narHash": "sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg=",
"lastModified": 1732021966,
"narHash": "sha256-mnTbjpdqF0luOkou8ZFi2asa1N3AA2CchR/RqCNmsGE=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17",
"rev": "3308484d1a443fc5bc92012435d79e80458fe43c",
"type": "github"
},
"original": {
@ -896,12 +818,10 @@
"helix": "helix",
"home-manager": "home-manager",
"home-manager-unstable": "home-manager-unstable",
"hyprgrass": "hyprgrass",
"hyprland": "hyprland",
"iio-hyprland": "iio-hyprland",
"jovian": "jovian",
"mobile-nixos": "mobile-nixos",
"nixpkgs": "nixpkgs",
"nixpkgs": "nixpkgs_3",
"nixpkgs-unstable": "nixpkgs-unstable",
"slippi": "slippi",
"sops-nix": "sops-nix",
@ -916,11 +836,11 @@
]
},
"locked": {
"lastModified": 1737599167,
"narHash": "sha256-S2rHCrQWCDVp63XxL/AQbGr1g5M8Zx14C7Jooa4oM8o=",
"lastModified": 1728268235,
"narHash": "sha256-lJMFnMO4maJuNO6PQ5fZesrTmglze3UFTTBuKGwR1Nw=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "38374302ae9edf819eac666d1f276d62c712dd06",
"rev": "25685cc2c7054efc31351c172ae77b21814f2d42",
"type": "github"
},
"original": {
@ -937,11 +857,11 @@
]
},
"locked": {
"lastModified": 1735871325,
"narHash": "sha256-6Ta5E4mhSfCP6LdkzkG2+BciLOCPeLKuYTJ6lOHW+mI=",
"lastModified": 1729477859,
"narHash": "sha256-r0VyeJxy4O4CgTB/PNtfQft9fPfN1VuGvnZiCxDArvg=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "a599f011db521766cbaf7c2f5874182485554f00",
"rev": "ada8266712449c4c0e6ee6fcbc442b3c217c79e1",
"type": "github"
},
"original": {
@ -961,11 +881,11 @@
]
},
"locked": {
"lastModified": 1738254766,
"narHash": "sha256-HgwiOEieKj9F7JIPR5X9YoDBb2eOwainKZqAJM/3OWU=",
"lastModified": 1725994332,
"narHash": "sha256-gla6TlSG6MIczpJ7xhXA66amcaJPAZ9lFHSUrLmR/QY=",
"owner": "lytedev",
"repo": "slippi-nix",
"rev": "3b06734c76497732e4d347f376c085a4e5d7d17d",
"rev": "68e971a57de45fb3f2081e837962f2c9b8c34240",
"type": "github"
},
"original": {
@ -981,11 +901,11 @@
]
},
"locked": {
"lastModified": 1736064798,
"narHash": "sha256-xJRN0FmX9QJ6+w8eIIIxzBU1AyQcLKJ1M/Gp6lnSD20=",
"lastModified": 1733128155,
"narHash": "sha256-m6/qwJAJYcidGMEdLqjKzRIjapK4nUfMq7rDCTmZajc=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "5dc08f9cc77f03b43aacffdfbc8316807773c930",
"rev": "c6134b6fff6bda95a1ac872a2a9d5f32e3c37856",
"type": "github"
},
"original": {
@ -1040,21 +960,6 @@
}
},
"systems_4": {
"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_5": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@ -1083,11 +988,11 @@
},
"locked": {
"dir": "nix",
"lastModified": 1737758457,
"narHash": "sha256-Z50/JcMQI2R9ttEd20gXEhuAXvAI0yp3bM7j6/Xoi+A=",
"lastModified": 1732918908,
"narHash": "sha256-k43oaC+35/LGqJ+3MjIhn4Ko+ap3wTvHCJ4sj9W/o+k=",
"owner": "wez",
"repo": "wezterm",
"rev": "4bf0007cefff7f1ad139d89b54f074d5ad7d2184",
"rev": "4906789a6d61da58f73b95f89b59c41af60e0f3b",
"type": "github"
},
"original": {
@ -1125,11 +1030,11 @@
]
},
"locked": {
"lastModified": 1737634991,
"narHash": "sha256-dBAnb7Kbnier30cA7AgxVSxxARmxKZ1vHZT33THSIr8=",
"lastModified": 1731703417,
"narHash": "sha256-rheDc/7C+yI+QspYr9J2z9kQ5P9F4ATapI7qyFAe1XA=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "e09dfe2726c8008f983e45a0aa1a3b7416aaeb8a",
"rev": "8070f36deec723de71e7557441acb17e478204d3",
"type": "github"
},
"original": {
@ -1166,16 +1071,16 @@
"zlib": {
"flake": false,
"locked": {
"lastModified": 1705948357,
"narHash": "sha256-TkPLWSN5QcPlL9D0kc/yhH0/puE9bFND24aj5NVDKYs=",
"lastModified": 1484501380,
"narHash": "sha256-j5b6aki1ztrzfCqu8y729sPar8GpyQWIrajdzpJC+ww=",
"owner": "madler",
"repo": "zlib",
"rev": "51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf",
"rev": "cacf7f1d4e3d44d871b605da3b647f07d718623f",
"type": "github"
},
"original": {
"owner": "madler",
"ref": "v1.3.1",
"ref": "v1.2.11",
"repo": "zlib",
"type": "github"
}

View file

@ -2,7 +2,6 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
hardware.url = "github:nixos/nixos-hardware";
disko.url = "github:nix-community/disko/master";
disko.inputs.nixpkgs.follows = "nixpkgs";
@ -21,16 +20,8 @@
home-manager-unstable.inputs.nixpkgs.follows = "nixpkgs-unstable";
helix.url = "github:helix-editor/helix/master";
helix.inputs.nixpkgs.follows = "nixpkgs-unstable";
hardware.url = "github:nixos/nixos-hardware";
hyprland.url = "github:hyprwm/Hyprland";
hyprland.inputs.nixpkgs.follows = "nixpkgs-unstable";
hyprgrass.url = "github:horriblename/hyprgrass";
hyprgrass.inputs.hyprland.follows = "hyprland";
iio-hyprland.url = "github:JeanSchoeller/iio-hyprland";
iio-hyprland.inputs.nixpkgs.follows = "nixpkgs";
wezterm.url = "github:wez/wezterm?dir=nix";
wezterm.inputs.nixpkgs.follows = "nixpkgs-unstable";
@ -91,7 +82,6 @@
hardware,
jovian,
mobile-nixos,
hyprland,
# nnf,
# hyprland,
slippi,
@ -185,7 +175,6 @@
iosevkaLyteTermSubset = prev.callPackage ./packages/iosevkaLyteTermSubset.nix {
inherit iosevkaLyteTerm;
};
conduwuit = prev.callPackage ./packages/conduwuit.nix {};
nix-base-container-image = final.dockerTools.buildImageWithNixDb {
name = "git.lyte.dev/lytedev/nix";
tag = "latest";
@ -249,15 +238,10 @@
};
modifications = final: prev: let
helix-input = helix;
wezterm-input = wezterm;
ghostty-input = ghostty;
hyprland-input = hyprland;
in rec {
helix = helix-input.outputs.packages.${prev.system}.helix;
helix = helix.outputs.packages.${prev.system}.helix;
final.helix = helix;
ghostty = ghostty-input.outputs.packages.${prev.system}.ghostty;
final.ghostty = ghostty;
/*
TODO: would love to use a current wezterm build so I can make use of ssh/mux functionality without breakage
source: https://github.com/wez/wezterm/issues/3771
@ -268,26 +252,6 @@
# wezterm = (import nixpkgs {inherit (prev) system;}).wezterm;
final.wezterm = wezterm;
hyprland = hyprland-input.outputs.packages.${prev.system}.default;
final.hyprland = hyprland;
bitwarden = prev.bitwarden.overrideAttrs (old: {
preBuild = ''
${old.preBuild}
pushd apps/desktop/desktop_native/proxy
cargo build --bin desktop_proxy --release
popd
'';
postInstall = ''
mkdir -p $out/bin
cp -r apps/desktop/desktop_native/target/release/desktop_proxy $out/bin
mkdir -p $out/lib/mozilla/native-messaging-hosts
substituteAll ${./packages/bitwarden.json} $out/lib/mozilla/native-messaging-hosts/com.8bit.bitwarden.json
'';
});
final.bitwarden = bitwarden;
# zellij = prev.zellij.overrideAttrs rec {
# version = "0.41.0";
# src = prev.fetchFromGitHub {
@ -332,7 +296,6 @@
inherit system;
modules = with nixosModules; [
home-manager-defaults
conduwuit
# TODO: disko?
hardware.nixosModules.common-cpu-intel
@ -399,7 +362,6 @@
{
home-manager.users.daniel = {
imports = with homeManagerModules; [
niri
senpai
iex
cargo
@ -449,6 +411,7 @@
common
gaming
graphical-workstation
plasma6
./nixos/htpc.nix
@ -506,8 +469,8 @@
password-manager
graphical-workstation
# plasma6
# virtual-machines
# virtual-machines-gui
virtual-machines
virtual-machines-gui
laptop
gaming
cross-compiler
@ -519,13 +482,13 @@
imports = with homeManagerModules; [
senpai
iex
niri
cargo
firefox-no-tabs
linux-desktop-environment-config
];
};
environment.systemPackages = with pkgs; [
ghostty.outputs.packages.${pkgs.system}.ghostty
fw-ectool
(writeShellApplication
{
@ -563,16 +526,15 @@
system = "x86_64-linux";
modules = with nixosModules; [
home-manager-unstable-defaults
outputs.diskoConfigurations.thablet
outputs.diskoConfigurations.standard
hardware.nixosModules.lenovo-thinkpad-x1-yoga
common
password-manager
graphical-workstation
# plasma6
plasma6
music-production
laptop
touchscreen
gaming
./nixos/thablet.nix

View file

@ -157,7 +157,6 @@
jujutsu
zellij
htop
sshconfig
/*
broot
@ -176,7 +175,6 @@
stateVersion = lib.mkDefault "24.05";
sessionVariables = {
TERMINAL = "ghostty";
EDITOR = "hx";
VISUAL = "hx";
PAGER = "less";
@ -261,7 +259,6 @@
desktop = {
imports = with homeManagerModules; [
wezterm
ghostty
];
};
@ -274,6 +271,21 @@
TODO: enable color scheme/theme by default
*/
enable = true;
# TODO: uses nixpkgs.pass so pass otp doesn't work
package = pkgs.firefox.override {
nativeMessagingHosts = [
pkgs.passff-host
pkgs.plasma-browser-integration
];
};
/*
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
]; # TODO: would be nice to have _all_ my firefox stuff managed here instead of Firefox Sync maybe?
*/
profiles = {
daniel = {
id = 0;
@ -306,12 +318,10 @@
firefox-no-tabs = {
programs.firefox = {
profileVersion = null;
profiles = {
daniel = {
settings = {
"alerts.useSystemBackend" = true;
"widget.gtk.rounded-bottom-corners.enabled" = true;
};
userChrome = ''
#TabsToolbar {
@ -555,73 +565,7 @@
};
};
gnome = {pkgs, ...}: {
dconf = {
enable = true;
settings = {
"org/gnome/settings-daemon/plugins/media-keys" = {
screensaver = ["<Shift><Control><Super>l"]; # lock screen
mic-mute = ["<Shift><Super>v"];
};
"org/gnome/desktop/peripherals/keyboard" = {
# gnome key repeat
repeat-interval = 7;
delay = 200;
};
"org/gnome/desktop/wm/preferences" = {
resize-with-right-button = true;
# mouse-button-modifier = '<Super>'; # default
};
"org/gnome/desktop/wm/keybindings" = {
minimize = ["<Shift><Control><Super>h"];
show-desktop = ["<Super>d"];
# mouse-button-modifier = '<Super>'; # default
};
"org/gnome/desktop/interface" = {
clock-show-weekday = true;
font-name = "IosevkaLyteTerm 12";
monospace-font-name = "IosevkaLyteTerm 12";
color-scheme = "prefer-dark";
# scaling-factor = 1.75;
};
"org/gnome/mutter" = {
experimental-features = ["variable-refresh-rate"];
};
"org/gnome/shell" = {
disable-user-extensions = false;
enabled-extensions = with pkgs.gnomeExtensions; [
tiling-shell.extensionUuid
appindicator.extensionUuid
blur-my-shell.extensionUuid
];
};
"org/gnome/shell/extensions/tilingshell" = {
inner-gaps = 8;
focus-window-right = ["<Super>l"];
focus-window-left = ["<Super>h"];
focus-window-up = ["<Super>k"];
focus-window-down = ["<Super>j"];
};
};
};
home.packages = with pkgs.gnomeExtensions; [
tiling-shell
blur-my-shell
appindicator
];
programs.gnome-shell = {
enable = true;
extensions = [{package = pkgs.gnomeExtensions.gsconnect;}];
};
programs.firefox.package = pkgs.firefox.override {
nativeMessagingHosts = with pkgs; [bitwarden];
};
};
# gnome = {};
helix = {
config,
@ -1270,41 +1214,6 @@
];
};
niri = {
pkgs,
config,
...
}: {
home.packages = with pkgs; [
niri
fuzzel
# xdg-desktop-portal-gnome
# xdg-desktop-portal-gtk
];
services.gnome-keyring.enable = true;
# xdg.portal = {
# enable = true;
# extraPortals = with pkgs; [xdg-desktop-portal-gtk xdg-desktop-portal-gnome];
# config = {
# common = {
# default = ["gtk"];
# };
# niri = {
# default = ["gtk"];
# };
# };
# };
home.file."${config.xdg.configHome}/niri" = {
source = config.lib.file.mkOutOfStoreSymlink /etc/nix/flake/modules/home-manager/niri;
};
home.file."${config.xdg.configHome}/fuzzel" = {
source = config.lib.file.mkOutOfStoreSymlink /etc/nix/flake/modules/home-manager/fuzzel;
};
};
iex = {
home.file.".iex.exs" = {
enable = true;
@ -1494,29 +1403,79 @@
wezterm = {
pkgs,
config,
# font,
...
}: {
home.packages = with pkgs; [
wezterm
];
# docs: https://wezfurlong.org/wezterm/config/appearance.html#defining-your-own-colors
programs.wezterm = with style.colors.withHashPrefix; {
enable = true;
# package = pkgs.wezterm;
extraConfig = builtins.readFile ./wezterm/config.lua;
colorSchemes = {
catppuccin-mocha-sapphire = {
ansi = map (x: style.colors.withHashPrefix.${toString x}) (pkgs.lib.lists.range 0 7);
brights = map (x: style.colors.withHashPrefix.${toString (x + 8)}) (pkgs.lib.lists.range 0 7);
home.file."${config.xdg.configHome}/wezterm" = {
source = config.lib.file.mkOutOfStoreSymlink /etc/nix/flake/modules/home-manager/wezterm;
};
};
foreground = fg;
background = bg;
ghostty = {
pkgs,
config,
...
}: {
home.packages = with pkgs; [
ghostty
];
cursor_fg = bg;
cursor_bg = text;
cursor_border = text;
home.file."${config.xdg.configHome}/ghostty" = {
source = config.lib.file.mkOutOfStoreSymlink /etc/nix/flake/modules/home-manager/ghostty;
selection_fg = bg;
selection_bg = yellow;
scrollbar_thumb = bg2;
split = bg5;
# indexed = { [136] = '#af8700' },
tab_bar = {
background = bg3;
active_tab = {
bg_color = primary;
fg_color = bg;
italic = false;
};
inactive_tab = {
bg_color = bg2;
fg_color = fgdim;
italic = false;
};
inactive_tab_hover = {
bg_color = bg3;
fg_color = primary;
italic = false;
};
new_tab = {
bg_color = bg2;
fg_color = fgdim;
italic = false;
};
new_tab_hover = {
bg_color = bg3;
fg_color = primary;
italic = false;
};
};
compose_cursor = orange;
/*
copy_mode_active_highlight_bg = { Color = '#000000' },
copy_mode_active_highlight_fg = { AnsiColor = 'Black' },
copy_mode_inactive_highlight_bg = { Color = '#52ad70' },
copy_mode_inactive_highlight_fg = { AnsiColor = 'White' },
quick_select_label_bg = { Color = 'peru' },
quick_select_label_fg = { Color = '#ffffff' },
quick_select_match_bg = { AnsiColor = 'Navy' },
quick_select_match_fg = { Color = '#ffffff' },
*/
};
};
};
};
@ -1524,11 +1483,10 @@
# zellij does not support modern terminal keyboard input:
# https://github.com/zellij-org/zellij/issues/735
programs.zellij = {
# uses home manager's toKDL generator
enable = true;
# This causes fish to start zellij immediately
# enableFishIntegration = true;
# uses home manager's toKDL generator
settings = {
pane_frames = false;
simplified_ui = true;
@ -2026,44 +1984,4 @@
z = "zellij";
};
};
sshconfig = {
programs.ssh = {
enable = true;
matchBlocks = {
"git.lyte.dev" = {
# hostname = "git.lyte.dev";
user = "forgejo";
};
"github.com" = {
user = "git";
};
"gitlab.com" = {
user = "git";
};
"codeberg.org" = {
user = "git";
};
"git.hq.bill.com" = {
user = "git";
};
"steam-deck-oled" = {
user = "deck";
hostname = "sdo";
};
"steam-deck" = {
user = "deck";
hostname = "steamdeck";
};
work = {
user = "daniel.flanagan";
};
};
extraConfig = ''
Include config.d/*
# pass obscure/keys/ssh-key-ed25519 | tail -n 7
IdentityFile ~/.ssh/id_ed25519
'';
};
};
}

View file

@ -1,38 +1,34 @@
#!/usr/bin/env bash
# TODO: we're mixing bash arrays and not-arrays - get it together
declare -A OCCUPIED
declare -A ACTIVE
declare -A FOCUSED
#define icons for workspaces 1-9
spaces=(1 2 3 4 5 6 7 8 9)
icons=(1 2 3 4 5 6 7 8 9)
ic=(1 2 3 4 5 6 7 8 9)
occupy() { export OCCUPIED["$1"]=occupied; }
unoccupy() { unset "OCCUPIED[$1]"; }
occ() { export o"$1"="occupied"; }
unocc() { unset -v o"$1"; }
activate() { export ACTIVE["$1"]=active; }
deactivate() { unset "ACTIVE[$1]"; }
active() { export a"$1"="active"; }
unactive() { unset -v a"$1"; }
focus() { export FOCUSED["$1"]=focused; }
unfocus() { unset "FOCUSED[$1]"; }
focus() { export f"$1"="focused"; }
unfocus() { unset -v f"$1"; }
workspaces() {
for s in "${spaces[@]}"; do
unfocus "$s"
deactivate "$s"
unoccupy "$s"
for num in 1 2 3 4 5 6 7 8 9; do
unfocus $num
unactive $num
unocc $num
done
# TODO: avoid recomputing these each time and actually listen to the events?
mons_json=$(hyprctl monitors -j)
for num in $(hyprctl workspaces -j | jq -r '.[] | select(.windows > 0) | .id'); do
occupy "$num"
occ "$num"
done
for num in $(echo "$mons_json" | jq -r '.[].activeWorkspace.id'); do
activate "$num"
active "$num"
done
for num in $(echo "$mons_json" | jq -r '.[] | select(.focused) | .activeWorkspace.id'); do
@ -42,37 +38,33 @@ workspaces() {
# TODO: would be nice to have monitors' workspaces show up in left-to-right
# order as laid out in physical/pixel space
# this would make glancing at the workspace indicator more intuitive
#
# TODO: might be nice to exclude certain windows as counting towards "occupation" such as xwaylandvideobridge or w/e
#
# NOTE: maybe I can group workspaces by their monitor with some mechanism for "unassigned" workspace to show up by a "primary" monitor
# render eww widget
echo "(eventbox :onscroll \"echo {} | sed -e 's/up/-1/g' -e 's/down/+1/g' | xargs hyprctl dispatch workspace\" \
(box :class \"workspaces\" :orientation \"h\" :spacing 0 :space-evenly \"true\" \
(button :onclick \"hyprctl dispatch workspace 1\" :onrightclick \"hyprctl dispatch workspace 1\" :class \"workspace ${ACTIVE[1]} ${OCCUPIED[1]} ${FOCUSED[1]}\" \"${icons[0]}\") \
(button :onclick \"hyprctl dispatch workspace 2\" :onrightclick \"hyprctl dispatch workspace 2\" :class \"workspace ${ACTIVE[2]} ${OCCUPIED[2]} ${FOCUSED[2]}\" \"${icons[1]}\") \
(button :onclick \"hyprctl dispatch workspace 3\" :onrightclick \"hyprctl dispatch workspace 3\" :class \"workspace ${ACTIVE[3]} ${OCCUPIED[3]} ${FOCUSED[3]}\" \"${icons[2]}\") \
(button :onclick \"hyprctl dispatch workspace 4\" :onrightclick \"hyprctl dispatch workspace 4\" :class \"workspace ${ACTIVE[4]} ${OCCUPIED[4]} ${FOCUSED[4]}\" \"${icons[3]}\") \
(button :onclick \"hyprctl dispatch workspace 5\" :onrightclick \"hyprctl dispatch workspace 5\" :class \"workspace ${ACTIVE[5]} ${OCCUPIED[5]} ${FOCUSED[5]}\" \"${icons[4]}\") \
(button :onclick \"hyprctl dispatch workspace 6\" :onrightclick \"hyprctl dispatch workspace 6\" :class \"workspace ${ACTIVE[6]} ${OCCUPIED[6]} ${FOCUSED[6]}\" \"${icons[5]}\") \
(button :onclick \"hyprctl dispatch workspace 7\" :onrightclick \"hyprctl dispatch workspace 7\" :class \"workspace ${ACTIVE[7]} ${OCCUPIED[7]} ${FOCUSED[7]}\" \"${icons[6]}\") \
(button :onclick \"hyprctl dispatch workspace 8\" :onrightclick \"hyprctl dispatch workspace 8\" :class \"workspace ${ACTIVE[8]} ${OCCUPIED[8]} ${FOCUSED[8]}\" \"${icons[7]}\") \
(button :onclick \"hyprctl dispatch workspace 9\" :onrightclick \"hyprctl dispatch workspace 9\" :class \"workspace ${ACTIVE[9]} ${OCCUPIED[9]} ${FOCUSED[9]}\" \"${icons[8]}\") \
(button :onclick \"hyprctl dispatch workspace 1\" :onrightclick \"hyprctl dispatch workspace 1\" :class \"workspace $a1 $o1 $f1\" \"${ic[0]}\") \
(button :onclick \"hyprctl dispatch workspace 2\" :onrightclick \"hyprctl dispatch workspace 2\" :class \"workspace $a2 $o2 $f2\" \"${ic[1]}\") \
(button :onclick \"hyprctl dispatch workspace 3\" :onrightclick \"hyprctl dispatch workspace 3\" :class \"workspace $a3 $o3 $f3\" \"${ic[2]}\") \
(button :onclick \"hyprctl dispatch workspace 4\" :onrightclick \"hyprctl dispatch workspace 4\" :class \"workspace $a4 $o4 $f4\" \"${ic[3]}\") \
(button :onclick \"hyprctl dispatch workspace 5\" :onrightclick \"hyprctl dispatch workspace 5\" :class \"workspace $a5 $o5 $f5\" \"${ic[4]}\") \
(button :onclick \"hyprctl dispatch workspace 6\" :onrightclick \"hyprctl dispatch workspace 6\" :class \"workspace $a6 $o6 $f6\" \"${ic[5]}\") \
(button :onclick \"hyprctl dispatch workspace 7\" :onrightclick \"hyprctl dispatch workspace 7\" :class \"workspace $a7 $o7 $f7\" \"${ic[6]}\") \
(button :onclick \"hyprctl dispatch workspace 8\" :onrightclick \"hyprctl dispatch workspace 8\" :class \"workspace $a8 $o8 $f8\" \"${ic[7]}\") \
(button :onclick \"hyprctl dispatch workspace 9\" :onrightclick \"hyprctl dispatch workspace 9\" :class \"workspace $a9 $o9 $f9\" \"${ic[8]}\") \
) \
)"
}
workspace_reader() {
while read -r l; do
workspaces "$l"
done
}
# initial render
workspaces
# listen to events and re-render
nc -U "$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" | workspace_reader
echo '(box "EXITING")'
while true; do
# TODO: not sure why this socat | read invocation seems to stop?
socat - "UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" | while read -r line; do
workspaces "$line"
done
done
echo '(box "DONE")'

View file

@ -1,2 +0,0 @@
./target
./result

View file

@ -1,20 +0,0 @@
{pkgs ? import <nixpkgs> {}}: let
# lock = builtins.fromJSON (builtins.readFile ../../../../../flake.lock);
# nixpkgsRev = lock.nodes.nixpkgs.locked.rev;
# pkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/${nixpkgsRev}.tar.gz") {};
pname = "hyprland-workspaces-eww";
version = "1.0.0";
src = ./src;
in
pkgs.rustPlatform.buildRustPackage {
inherit pname version src;
cargoHash = "sha256-6Wl3cOIxlPJjzEuzNhCBZJXayL8runQfAxPruvzh2Vc=";
# cargoHash = pkgs.lib.fakeHash;
checkType = "release";
postBuild = ''
# pushd target/*/release
# ls -la
# ${pkgs.upx}/bin/upx --best --lzma hyprland-workspaces-eww
# popd
'';
}

View file

@ -1 +0,0 @@
target

View file

@ -1,96 +0,0 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "hyprland-workspaces-eww"
version = "0.1.0"
dependencies = [
"serde",
"serde_json",
]
[[package]]
name = "itoa"
version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674"
[[package]]
name = "memchr"
version = "2.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
[[package]]
name = "proc-macro2"
version = "1.0.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
dependencies = [
"proc-macro2",
]
[[package]]
name = "ryu"
version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
[[package]]
name = "serde"
version = "1.0.217"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.217"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "serde_json"
version = "1.0.137"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "930cfb6e6abf99298aaad7d29abbef7a9999a9a8806a40088f55f0dcec03146b"
dependencies = [
"itoa",
"memchr",
"ryu",
"serde",
]
[[package]]
name = "syn"
version = "2.0.96"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "unicode-ident"
version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"

View file

@ -1,19 +0,0 @@
[package]
name = "hyprland-workspaces-eww"
version = "0.1.0"
edition = "2021"
[[bin]]
name = "hyprland-workspaces-eww"
path = "./main.rs"
[dependencies]
serde = "1.0.217"
serde_json = "1.0.137"
[profile.release]
strip = true
opt-level = "z"
lto = true
codegen-units = 1
panic = "abort"

View file

@ -1,186 +0,0 @@
mod workspace {
pub struct Workspace {
id: usize,
icon: char,
pub is_active: bool,
pub is_occupied: bool,
pub is_focused: bool,
}
impl Workspace {
pub fn new(id: usize) -> Self {
Self {
id,
icon: id.to_string().chars().next().unwrap_or('?'),
is_active: false,
is_occupied: false,
is_focused: false,
}
}
pub fn id(&self) -> usize {
return self.id;
}
pub fn icon(&self) -> char {
return self.icon;
}
pub fn clear_states(&mut self) {
self.is_active = false;
self.is_occupied = false;
self.is_focused = false;
}
}
}
mod eww {}
mod hypr {
pub mod hyprland {
pub mod workspace {
pub type Id = usize;
pub type Name = String;
}
pub mod socket2 {
use super::workspace;
use std::{error::Error, fmt::Display, num::ParseIntError, str::FromStr};
#[derive(Debug)]
pub enum Event {
Workspace(workspace::Id),
Exit(),
WorkspaceV2(String, String),
}
#[derive(Debug)]
pub enum EventParseError {
UnknownEventType(String),
MissingParameters(String),
InvalidParameters(String, String),
ParseIntError(ParseIntError),
}
impl From<ParseIntError> for EventParseError {
fn from(value: ParseIntError) -> Self {
Self::ParseIntError(value)
}
}
impl Error for EventParseError {}
impl Display for EventParseError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
EventParseError::UnknownEventType(event_type) => {
write!(f, "unknown event type: {event_type}")
}
EventParseError::MissingParameters(event_type) => {
write!(f, "missing parameters for event type: {event_type}")
}
EventParseError::ParseIntError(err) => {
write!(f, "error parsing integer: {err}")
}
EventParseError::InvalidParameters(event_type, params) => {
write!(
f,
"invalid parameters for event type {event_type}: {params}"
)
}
}
}
}
impl FromStr for Event {
type Err = EventParseError;
fn from_str(s: &str) -> Result<Self, Self::Err> {
let (event_type, rest): (&str, Option<&str>) = s
.find(">>")
.map(|n| {
let (a, b) = s.split_at(n);
(a, Option::Some(&b[2..]))
})
.unwrap_or((s, Option::None));
match (event_type, rest) {
("workspace", None) => {
Err(EventParseError::MissingParameters(event_type.to_string()))
}
("workspace", Some(workspace)) => Ok(Event::Workspace(workspace.parse()?)),
("workspacev2", Some(args)) => {
let args: (String, String) = args
.split_once(',')
.map(|(a, b)| (a.to_string(), b.to_string()))
.ok_or(EventParseError::InvalidParameters(
event_type.to_string(),
args.to_string(),
))?;
Ok(Event::WorkspaceV2(args.0, args.1))
}
("exit", _) => Ok(Event::Exit()),
_ => Err(EventParseError::UnknownEventType(event_type.to_string())),
}
}
}
}
}
}
use hypr::hyprland::socket2::Event;
use std::{
collections::HashMap,
env,
error::Error,
io::{BufRead, BufReader},
os::unix::net::UnixStream,
};
use workspace::Workspace;
fn main() -> Result<(), Box<dyn Error>> {
let mut workspaces: HashMap<usize, Workspace> =
(1..=9).map(|n| (n, Workspace::new(n))).collect();
let path = format!(
"{}/hypr/{}/.socket2.sock",
env::var("XDG_RUNTIME_DIR")?,
env::var("HYPRLAND_INSTANCE_SIGNATURE")?
);
eprintln!("opening {}", path);
let stream = UnixStream::connect(&path)?;
let event_lines = BufReader::new(stream).lines();
for l in event_lines.into_iter() {
match l?.parse::<Event>() {
Ok(e) => match e {
Event::Workspace(i) => match workspaces.get_mut(&i) {
Some(related_workspace) => {
eprintln!(
"setting workspace {} (id: {}) as active",
related_workspace.icon(),
related_workspace.id()
);
related_workspace.is_active = true
}
None => {
eprintln!("event for untracked workspace {}", i);
}
},
Event::Exit() => break,
other => {
eprintln!("unhandled event: {:?}", other);
}
},
Err(e) => eprintln!("error parsing event: {}", e),
}
render(&workspaces)?;
}
Ok(())
}
fn render(workspaces: &HashMap<usize, Workspace>) -> Result<(), Box<dyn Error>> {
Ok(())
}

View file

@ -1,5 +1,3 @@
set this_shell_should_notify 1
# prompt
function get_hostname
if test (uname) = Linux || test (uname) = Darwin
@ -63,9 +61,8 @@ end
function _last_cmd_duration
set_color -b normal green
set -q CMD_DURATION && printf " %dms" $CMD_DURATION
if test $CMD_DURATION -gt 5000 && test $this_shell_should_notify = 1
printf "\e]777;notify;%s;%s\e\\" "Terminal Command Finished" (history --max 1)
set this_shell_should_notify 0
if test $CMD_DURATION -gt 5000
printf "\e]777;notify;%s;%s\e\\" "WezTerm: Command Finished" (history --max 1)
end
end
@ -118,10 +115,6 @@ function _prompt_prefix
printf "# "
end
function preexec --on-event fish_preexec
set this_shell_should_notify 1
end
function fish_prompt
set last_cmd_status $status
_prompt_marker

File diff suppressed because it is too large Load diff

View file

@ -1,25 +0,0 @@
palette = 0=#45475a
palette = 1=#f38ba8
palette = 2=#a6e3a1
palette = 3=#fab387
palette = 4=#74c7ec
palette = 5=#cba6f7
palette = 6=#f9e2af
palette = 7=#bac2de
palette = 8=#585b70
palette = 9=#f38ba8
palette = 10=#a6e3a1
palette = 11=#fab387
palette = 12=#74c7ec
palette = 13=#cba6f7
palette = 14=#f9e2af
palette = 15=#a6adc8
background = #1e1e2e
foreground = #cdd6f4
cursor-color = #cdd6f4
cursor-text = #cdd6f4
selection-background = #f9e2af
selection-foreground = #1e1e2e

View file

@ -11,7 +11,6 @@ in {
# TODO: Hyprland seems to sometimes use a ton of CPU?
home.packages = with pkgs; [
glib
swayosd
];
@ -48,15 +47,8 @@ in {
"hypridle"
];
exec = [
''gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark"''
''gsettings set org.gnome.desktop.interface color-scheme "prefer-dark"''
];
env = [
"XCURSOR_SIZE,24"
"QT_QPA_PLATFORMTHEME,qt6ct"
"GTK_THEME,Adwaita-dark"
];
input = {
@ -104,14 +96,13 @@ in {
gaps_out = 6;
border_size = 2;
resize_on_border = true;
no_focus_fallback = false;
no_focus_fallback = true;
layout = "dwindle";
};
decoration = {
rounding = 10;
rounding_power = 4.0;
rounding = 5;
/*
blur = "no";
@ -138,10 +129,9 @@ in {
"$mod SHIFT, return, exec, wezterm"
*/
"$mod, return, exec, wezterm"
"$mod SHIFT, return, exec, [float] wezterm start --always-new-process"
"$mod SHIFT, return, exec, kitty"
"$mod, U, exec, firefox"
"$mod, space, exec, tofi-run | xargs hyprctl dispatch exec --"
"$mod, D, exec, tofi-drun | xargs hyprctl dispatch exec --"
"$mod, C, killactive,"
"$mod SHIFT, E, exit,"
"$mod, E, exec, dolphin"
@ -160,10 +150,10 @@ in {
"$mod, l, movefocus, r"
"$mod, k, movefocus, u"
"$mod, j, movefocus, d"
"$mod SHIFT, H, movewindow, l silent"
"$mod SHIFT, L, movewindow, r silent"
"$mod SHIFT, K, movewindow, u silent"
"$mod SHIFT, J, movewindow, d silent"
"$mod SHIFT, H, movewindow, l"
"$mod SHIFT, L, movewindow, r"
"$mod SHIFT, K, movewindow, u"
"$mod SHIFT, J, movewindow, d"
"$mod SHIFT, V, exec, swayosd-client --input-volume mute-toggle"
", XF86AudioMicMute, exec, swayosd-client --input-volume mute-toggle"
@ -194,16 +184,16 @@ in {
"$mod, 0, workspace, 10"
# Move active window to a workspace with mod + SHIFT + [0-9]
"$mod SHIFT, 1, movetoworkspacesilent, 1"
"$mod SHIFT, 2, movetoworkspacesilent, 2"
"$mod SHIFT, 3, movetoworkspacesilent, 3"
"$mod SHIFT, 4, movetoworkspacesilent, 4"
"$mod SHIFT, 5, movetoworkspacesilent, 5"
"$mod SHIFT, 6, movetoworkspacesilent, 6"
"$mod SHIFT, 7, movetoworkspacesilent, 7"
"$mod SHIFT, 8, movetoworkspacesilent, 8"
"$mod SHIFT, 9, movetoworkspacesilent, 9"
"$mod SHIFT, 0, movetoworkspacesilent, 10"
"$mod SHIFT, 1, movetoworkspace, 1"
"$mod SHIFT, 2, movetoworkspace, 2"
"$mod SHIFT, 3, movetoworkspace, 3"
"$mod SHIFT, 4, movetoworkspace, 4"
"$mod SHIFT, 5, movetoworkspace, 5"
"$mod SHIFT, 6, movetoworkspace, 6"
"$mod SHIFT, 7, movetoworkspace, 7"
"$mod SHIFT, 8, movetoworkspace, 8"
"$mod SHIFT, 9, movetoworkspace, 9"
"$mod SHIFT, 0, movetoworkspace, 10"
"$mod SHIFT, S, exec, clipshot"
# Scroll through existing workspaces with mod + scroll
@ -263,7 +253,7 @@ in {
windowrulev2 = idleinhibit,class:^.*([Ss]lippi).*$
windowrulev2 = float,class:^.*$
windowrulev2 = tile,class:^.*([Kk]itty|[Ff]irefox|[Ww]ezterm|[Dd]iscord|[Ss]potify|[Ss]lack).*$
# windowrulev2 = opacity 1.0 0.95,class:^.*$
windowrulev2 = opacity 1.0 0.95,class:^.*$
windowrulev2 = center 1,floating:1
windowrulev2 = opacity 0.0 override, class:^(xwaylandvideobridge)$
@ -282,7 +272,7 @@ in {
general = {
grace = 0;
no_fade_out = true;
no_face_out = true;
};
input-field = [

View file

@ -1,509 +0,0 @@
// This config is in the KDL format: https://kdl.dev
// "/-" comments out the following node.
// Check the wiki for a full description of the configuration:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Overview
switch-events {
lid-close { spawn "swaylock"; }
// lid-open { spawn "notify-send" "The laptop lid is open!"; }
}
// Input device configuration.
// Find the full list of options on the wiki:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Input
input {
keyboard {
// repeat-delay 180;
// repeat-rate 120;
xkb {
// You can set rules, model, layout, variant and options.
// For more information, see xkeyboard-config(7).
// For example:
// layout "us,ru"
options "ctrl:nocaps"
}
}
// Next sections include libinput settings.
// Omitting settings disables them, or leaves them at their default values.
touchpad {
// off
tap
// dwt
// dwtp
natural-scroll
// accel-speed 0.2
// accel-profile "flat"
// scroll-method "two-finger"
// disabled-on-external-mouse
}
mouse {
// off
// natural-scroll
// accel-speed 0.2
// accel-profile "flat"
// scroll-method "no-scroll"
}
trackpoint {
// off
// natural-scroll
// accel-speed 0.2
// accel-profile "flat"
// scroll-method "on-button-down"
// scroll-button 273
// middle-emulation
}
// Uncomment this to make the mouse warp to the center of newly focused windows.
// warp-mouse-to-focus
// Focus windows and outputs automatically when moving the mouse into them.
// Setting max-scroll-amount="0%" makes it work only on windows already fully on screen.
// focus-follows-mouse max-scroll-amount="0%"
}
// You can configure outputs by their name, which you can find
// by running `niri msg outputs` while inside a niri instance.
// The built-in laptop monitor is usually called "eDP-1".
// Find more information on the wiki:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Outputs
// Remember to uncomment the node by removing "/-"!
/-output "eDP-1" {
// Uncomment this line to disable this output.
// off
// Resolution and, optionally, refresh rate of the output.
// The format is "<width>x<height>" or "<width>x<height>@<refresh rate>".
// If the refresh rate is omitted, niri will pick the highest refresh rate
// for the resolution.
// If the mode is omitted altogether or is invalid, niri will pick one automatically.
// Run `niri msg outputs` while inside a niri instance to list all outputs and their modes.
mode "1920x1080@120.030"
// You can use integer or fractional scale, for example use 1.5 for 150% scale.
scale 2
// Transform allows to rotate the output counter-clockwise, valid values are:
// normal, 90, 180, 270, flipped, flipped-90, flipped-180 and flipped-270.
transform "normal"
// Position of the output in the global coordinate space.
// This affects directional monitor actions like "focus-monitor-left", and cursor movement.
// The cursor can only move between directly adjacent outputs.
// Output scale and rotation has to be taken into account for positioning:
// outputs are sized in logical, or scaled, pixels.
// For example, a 3840×2160 output with scale 2.0 will have a logical size of 1920×1080,
// so to put another output directly adjacent to it on the right, set its x to 1920.
// If the position is unset or results in an overlap, the output is instead placed
// automatically.
position x=1280 y=0
}
// Settings that influence how windows are positioned and sized.
// Find more information on the wiki:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Layout
layout {
// Set gaps around windows in logical pixels.
gaps 5
// When to center a column when changing focus, options are:
// - "never", default behavior, focusing an off-screen column will keep at the left
// or right edge of the screen.
// - "always", the focused column will always be centered.
// - "on-overflow", focusing a column will center it if it doesn't fit
// together with the previously focused column.
center-focused-column "never"
// You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between.
preset-column-widths {
// Proportion sets the width as a fraction of the output width, taking gaps into account.
// For example, you can perfectly fit four windows sized "proportion 0.25" on an output.
// The default preset widths are 1/3, 1/2 and 2/3 of the output.
// proportion 0.33333
proportion 0.5
// proportion 0.66667
// Fixed sets the width in logical pixels exactly.
// fixed 1920
}
// You can also customize the heights that "switch-preset-window-height" (Mod+Shift+R) toggles between.
// preset-window-heights { }
// You can change the default width of the new windows.
// default-column-width { proportion 0.5; }
// If you leave the brackets empty, the windows themselves will decide their initial width.
// default-column-width {}
// By default focus ring and border are rendered as a solid background rectangle
// behind windows. That is, they will show up through semitransparent windows.
// This is because windows using client-side decorations can have an arbitrary shape.
//
// If you don't like that, you should uncomment `prefer-no-csd` below.
// Niri will draw focus ring and border *around* windows that agree to omit their
// client-side decorations.
//
// Alternatively, you can override it with a window rule called
// `draw-border-with-background`.
// You can change how the focus ring looks.
focus-ring {
// Uncomment this line to disable the focus ring.
// off
// How many logical pixels the ring extends out from the windows.
width 2
// Colors can be set in a variety of ways:
// - CSS named colors: "red"
// - RGB hex: "#rgb", "#rgba", "#rrggbb", "#rrggbbaa"
// - CSS-like notation: "rgb(255, 127, 0)", rgba(), hsl() and a few others.
// Color of the ring on the active monitor.
active-color "#7fc8ff"
// Color of the ring on inactive monitors.
inactive-color "#505050"
// You can also use gradients. They take precedence over solid colors.
// Gradients are rendered the same as CSS linear-gradient(angle, from, to).
// The angle is the same as in linear-gradient, and is optional,
// defaulting to 180 (top-to-bottom gradient).
// You can use any CSS linear-gradient tool on the web to set these up.
// Changing the color space is also supported, check the wiki for more info.
//
// active-gradient from="#80c8ff" to="#bbddff" angle=45
// You can also color the gradient relative to the entire view
// of the workspace, rather than relative to just the window itself.
// To do that, set relative-to="workspace-view".
//
// inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
}
// You can also add a border. It's similar to the focus ring, but always visible.
border {
// The settings are the same as for the focus ring.
// If you enable the border, you probably want to disable the focus ring.
off
width 2
active-color "#ffc87f"
inactive-color "#505050"
// active-gradient from="#ffbb66" to="#ffc880" angle=45 relative-to="workspace-view"
// inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
}
// Struts shrink the area occupied by windows, similarly to layer-shell panels.
// You can think of them as a kind of outer gaps. They are set in logical pixels.
// Left and right struts will cause the next window to the side to always be visible.
// Top and bottom struts will simply add outer gaps in addition to the area occupied by
// layer-shell panels and regular gaps.
struts {
// left 64
// right 64
// top 64
// bottom 64
}
}
// Add lines like this to spawn processes at startup.
// Note that running niri as a session supports xdg-desktop-autostart,
// which may be more convenient to use.
// See the binds section below for more spawn examples.
spawn-at-startup "wezterm"
spawn-at-startup "firefox"
spawn-at-startup "mako"
spawn-at-startup "swayosd-server"
spawn-at-startup "swaybg -i ~/.wallpaper"
// Uncomment this line to ask the clients to omit their client-side decorations if possible.
// If the client will specifically ask for CSD, the request will be honored.
// Additionally, clients will be informed that they are tiled, removing some client-side rounded corners.
// This option will also fix border/focus ring drawing behind some semitransparent windows.
// After enabling or disabling this, you need to restart the apps for this to take effect.
// prefer-no-csd
// You can change the path where screenshots are saved.
// A ~ at the front will be expanded to the home directory.
// The path is formatted with strftime(3) to give you the screenshot date and time.
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
// You can also set this to null to disable saving screenshots to disk.
// screenshot-path null
// Animation settings.
// The wiki explains how to configure individual animations:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Animations
animations {
// Uncomment to turn off all animations.
// off
// Slow down all animations by this factor. Values below 1 speed them up instead.
// slowdown 3.0
}
// Window rules let you adjust behavior for individual windows.
// Find more information on the wiki:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules
// Work around WezTerm's initial configure bug
// by setting an empty default-column-width.
/-window-rule {
// This regular expression is intentionally made as specific as possible,
// since this is the default config, and we want no false positives.
// You can get away with just app-id="wezterm" if you want.
match app-id=r#"^org\.wezfurlong\.wezterm$"#
default-column-width {}
}
// Example: block out two password managers from screen capture.
// (This example rule is commented out with a "/-" in front.)
/-window-rule {
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
match app-id=r#"^org\.gnome\.World\.Secrets$"#
block-out-from "screen-capture"
// Use this instead if you want them visible on third-party screenshot tools.
// block-out-from "screencast"
}
// Example: enable rounded corners for all windows.
// (This example rule is commented out with a "/-" in front.)
window-rule {
geometry-corner-radius 10
clip-to-geometry true
}
binds {
// Keys consist of modifiers separated by + signs, followed by an XKB key name
// in the end. To find an XKB name for a particular key, you may use a program
// like wev.
//
// "Mod" is a special modifier equal to Super when running on a TTY, and to Alt
// when running as a winit window.
//
// Most actions that you can bind here can also be invoked programmatically with
// `niri msg action do-something`.
// Mod-Shift-/, which is usually the same as Mod-?,
// shows a list of important hotkeys.
Mod+Shift+Slash { show-hotkey-overlay; }
// Suggested binds for running programs: terminal, app launcher, screen locker.
Mod+T { spawn "wezterm"; }
Mod+Space { spawn "fuzzel"; }
Mod+D { spawn "fuzzel --drun"; }
Super+Control+Shift+L { spawn "swaylock"; }
// You can also use a shell. Do this if you need pipes, multiple commands, etc.
// Note: the entire command goes as a single argument in the end.
// Mod+T { spawn "bash" "-c" "notify-send hello && exec alacritty"; }
// Example volume keys mappings for PipeWire & WirePlumber.
// The allow-when-locked=true property makes them work even when the session is locked.
XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.05+"; }
XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.05-"; }
XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
Mod+Q { close-window; }
Mod+Left { focus-column-left; }
Mod+Down { focus-window-down; }
Mod+Up { focus-window-up; }
Mod+Right { focus-column-right; }
Mod+h { focus-column-left; }
Mod+j { focus-window-down; }
Mod+k { focus-window-up; }
Mod+l { focus-column-right; }
Mod+Ctrl+Left { move-column-left; }
Mod+Ctrl+Down { move-window-down; }
Mod+Ctrl+Up { move-window-up; }
Mod+Ctrl+Right { move-column-right; }
Mod+Ctrl+H { move-column-left; }
Mod+Ctrl+J { move-window-down; }
Mod+Ctrl+K { move-window-up; }
Mod+Ctrl+L { move-column-right; }
// Alternative commands that move across workspaces when reaching
// the first or last window in a column.
// Mod+j { focus-window-or-workspace-down; }
// Mod+K { focus-window-or-workspace-up; }
// Mod+L { focus-window-or-workspace-right; }
// Mod+h { focus-window-or-workspace-left; }
// Mod+Ctrl+J { move-window-down-or-to-workspace-down; }
// Mod+Ctrl+K { move-window-up-or-to-workspace-up; }
Mod+Home { focus-column-first; }
Mod+End { focus-column-last; }
Mod+Ctrl+Home { move-column-to-first; }
Mod+Ctrl+End { move-column-to-last; }
Mod+Shift+Left { focus-monitor-left; }
Mod+Shift+Down { focus-monitor-down; }
Mod+Shift+Up { focus-monitor-up; }
Mod+Shift+Right { focus-monitor-right; }
Mod+Shift+H { focus-monitor-left; }
Mod+Shift+J { focus-monitor-down; }
Mod+Shift+K { focus-monitor-up; }
Mod+Shift+L { focus-monitor-right; }
Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
// Alternatively, there are commands to move just a single window:
// Mod+Shift+Ctrl+Left { move-window-to-monitor-left; }
// ...
// And you can also move a whole workspace to another monitor:
// Mod+Shift+Ctrl+Left { move-workspace-to-monitor-left; }
// ...
Mod+Page_Down { focus-workspace-down; }
Mod+Page_Up { focus-workspace-up; }
Mod+U { focus-workspace-down; }
Mod+I { focus-workspace-up; }
Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
Mod+Ctrl+Page_Up { move-column-to-workspace-up; }
Mod+Ctrl+U { move-column-to-workspace-down; }
Mod+Ctrl+I { move-column-to-workspace-up; }
// Alternatively, there are commands to move just a single window:
// Mod+Ctrl+Page_Down { move-window-to-workspace-down; }
// ...
Mod+Shift+Page_Down { move-workspace-down; }
Mod+Shift+Page_Up { move-workspace-up; }
Mod+Shift+U { move-workspace-down; }
Mod+Shift+I { move-workspace-up; }
// You can bind mouse wheel scroll ticks using the following syntax.
// These binds will change direction based on the natural-scroll setting.
//
// To avoid scrolling through workspaces really fast, you can use
// the cooldown-ms property. The bind will be rate-limited to this value.
// You can set a cooldown on any bind, but it's most useful for the wheel.
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
Mod+WheelScrollRight { focus-column-right; }
Mod+WheelScrollLeft { focus-column-left; }
Mod+Ctrl+WheelScrollRight { move-column-right; }
Mod+Ctrl+WheelScrollLeft { move-column-left; }
// Usually scrolling up and down with Shift in applications results in
// horizontal scrolling; these binds replicate that.
Mod+Shift+WheelScrollDown { focus-column-right; }
Mod+Shift+WheelScrollUp { focus-column-left; }
Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
// Similarly, you can bind touchpad scroll "ticks".
// Touchpad scrolling is continuous, so for these binds it is split into
// discrete intervals.
// These binds are also affected by touchpad's natural-scroll, so these
// example binds are "inverted", since we have natural-scroll enabled for
// touchpads by default.
// Mod+TouchpadScrollDown { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02+"; }
// Mod+TouchpadScrollUp { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02-"; }
// You can refer to workspaces by index. However, keep in mind that
// niri is a dynamic workspace system, so these commands are kind of
// "best effort". Trying to refer to a workspace index bigger than
// the current workspace count will instead refer to the bottommost
// (empty) workspace.
//
// For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on
// will all refer to the 3rd workspace.
Mod+1 { focus-workspace 1; }
Mod+2 { focus-workspace 2; }
Mod+3 { focus-workspace 3; }
Mod+4 { focus-workspace 4; }
Mod+5 { focus-workspace 5; }
Mod+6 { focus-workspace 6; }
Mod+7 { focus-workspace 7; }
Mod+8 { focus-workspace 8; }
Mod+9 { focus-workspace 9; }
Mod+Ctrl+1 { move-column-to-workspace 1; }
Mod+Ctrl+2 { move-column-to-workspace 2; }
Mod+Ctrl+3 { move-column-to-workspace 3; }
Mod+Ctrl+4 { move-column-to-workspace 4; }
Mod+Ctrl+5 { move-column-to-workspace 5; }
Mod+Ctrl+6 { move-column-to-workspace 6; }
Mod+Ctrl+7 { move-column-to-workspace 7; }
Mod+Ctrl+8 { move-column-to-workspace 8; }
Mod+Ctrl+9 { move-column-to-workspace 9; }
// Alternatively, there are commands to move just a single window:
// Mod+Ctrl+1 { move-window-to-workspace 1; }
// Switches focus between the current and the previous workspace.
Mod+Tab { focus-workspace-previous; }
// Consume one window from the right into the focused column.
Mod+Comma { consume-window-into-column; }
// Expel one window from the focused column to the right.
Mod+Period { expel-window-from-column; }
// There are also commands that consume or expel a single window to the side.
Mod+BracketLeft { consume-or-expel-window-left; }
Mod+BracketRight { consume-or-expel-window-right; }
Mod+R { switch-preset-column-width; }
Mod+Shift+R { switch-preset-window-height; }
Mod+Ctrl+R { reset-window-height; }
Mod+F { maximize-column; }
Mod+Shift+F { fullscreen-window; }
Mod+C { center-column; }
// Finer width adjustments.
// This command can also:
// * set width in pixels: "1000"
// * adjust width in pixels: "-5" or "+5"
// * set width as a percentage of screen width: "25%"
// * adjust width as a percentage of screen width: "-10%" or "+10%"
// Pixel sizes use logical, or scaled, pixels. I.e. on an output with scale 2.0,
// set-column-width "100" will make the column occupy 200 physical screen pixels.
Mod+Minus { set-column-width "-10%"; }
Mod+Equal { set-column-width "+10%"; }
// Finer height adjustments when in column with other windows.
Mod+Shift+Minus { set-window-height "-10%"; }
Mod+Shift+Equal { set-window-height "+10%"; }
// Actions to switch layouts.
// Note: if you uncomment these, make sure you do NOT have
// a matching layout switch hotkey configured in xkb options above.
// Having both at once on the same hotkey will break the switching,
// since it will switch twice upon pressing the hotkey (once by xkb, once by niri).
// Mod+Space { switch-layout "next"; }
// Mod+Shift+Space { switch-layout "prev"; }
Print { screenshot; }
Ctrl+Print { screenshot-screen; }
Alt+Print { screenshot-window; }
// The quit action will show a confirmation dialog to avoid accidental exits.
Mod+Shift+E { quit; }
Ctrl+Alt+Delete { quit; }
// Powers off the monitors. To turn them back on, do any input like
// moving the mouse or pressing any other key.
Mod+Shift+P { power-off-monitors; }
}

View file

@ -1,257 +0,0 @@
{
programs.plasma = {
enable = true;
shortcuts = {
"ActivityManager"."switch-to-activity-851c180f-d52d-4fe4-b7ed-a10e70cf4ce8" = [];
# "KDE Keyboard Layout Switcher"."Switch to Last-Used Keyboard Layout" = "Meta+Alt+L";
# "KDE Keyboard Layout Switcher"."Switch to Next Keyboard Layout" = "Meta+Alt+K";
# "kaccess"."Toggle Screen Reader On and Off" = "Meta+Alt+S";
# "kcm_touchpad"."Disable Touchpad" = "Touchpad Off";
# "kcm_touchpad"."Enable Touchpad" = "Touchpad On";
# "kcm_touchpad"."Toggle Touchpad" = ["Touchpad Toggle" "Meta+Ctrl+Zenkaku Hankaku,Touchpad Toggle" "Meta+Ctrl+Zenkaku Hankaku"];
# "kmix"."decrease_microphone_volume" = "Microphone Volume Down";
"kmix"."decrease_volume" = "Volume Down";
"kmix"."decrease_volume_small" = "Shift+Volume Down";
"kmix"."increase_microphone_volume" = "Microphone Volume Up";
"kmix"."increase_volume" = "Volume Up";
"kmix"."increase_volume_small" = "Shift+Volume Up";
"kmix"."mic_mute" = ["Microphone Mute" "Meta+Volume Mute,Microphone Mute" "Meta+Shift+V" "Meta+Volume Mute,Mute Microphone"];
"kmix"."mute" = "Volume Mute";
# "ksmserver"."Halt Without Confirmation" = "none,,Shut Down Without Confirmation";
"ksmserver"."Lock Session" = ["Meta+Ctrl+Shift+L" "Screensaver,Meta+L" "Screensaver,Lock Session"];
# "ksmserver"."Log Out" = "Ctrl+Alt+Del";
# "ksmserver"."Log Out Without Confirmation" = "none,,Log Out Without Confirmation";
# "ksmserver"."LogOut" = "none,,Log Out";
# "ksmserver"."Reboot" = "none,,Reboot";
# "ksmserver"."Reboot Without Confirmation" = "none,,Reboot Without Confirmation";
# "ksmserver"."Shut Down" = "none,,Shut Down";
# "kwin"."Activate Window Demanding Attention" = "Meta+Ctrl+A";
# "kwin"."Cycle Overview" = [];
# "kwin"."Cycle Overview Opposite" = [];
# "kwin"."Decrease Opacity" = "none,,Decrease Opacity of Active Window by 5%";
# "kwin"."Edit Tiles" = "Meta+T";
"kwin"."Expose" = "Ctrl+F9";
"kwin"."ExposeAll" = ["Ctrl+F10" "Launch (C),Ctrl+F10" "Launch (C),Toggle Present Windows (All desktops)"];
"kwin"."ExposeClass" = "Ctrl+F7";
"kwin"."ExposeClassCurrentDesktop" = [];
"kwin"."Grid View" = "Meta+G";
"kwin"."Increase Opacity" = "none,,Increase Opacity of Active Window by 5%";
"kwin"."Kill Window" = "Meta+Ctrl+Esc";
"kwin"."Move Tablet to Next Output" = [];
"kwin"."MoveMouseToCenter" = "Meta+F6";
"kwin"."MoveMouseToFocus" = "Meta+F5";
"kwin"."MoveZoomDown" = [];
"kwin"."MoveZoomLeft" = [];
"kwin"."MoveZoomRight" = [];
"kwin"."MoveZoomUp" = [];
"kwin"."Overview" = "Meta+W";
"kwin"."Setup Window Shortcut" = "none,,Setup Window Shortcut";
"kwin"."Show Desktop" = "Meta+D";
"kwin"."Switch One Desktop Down" = "Meta+Ctrl+Down";
"kwin"."Switch One Desktop Up" = "Meta+Ctrl+Up";
"kwin"."Switch One Desktop to the Left" = "Meta+Ctrl+Left";
"kwin"."Switch One Desktop to the Right" = "Meta+Ctrl+Right";
"kwin"."Switch Window Down" = "Meta+Alt+Down";
"kwin"."Switch Window Left" = "Meta+Alt+Left";
"kwin"."Switch Window Right" = "Meta+Alt+Right";
"kwin"."Switch Window Up" = "Meta+Alt+Up";
"kwin"."Switch to Desktop 1" = "Ctrl+F1";
"kwin"."Switch to Desktop 10" = "none,,Switch to Desktop 10";
"kwin"."Switch to Desktop 11" = "none,,Switch to Desktop 11";
"kwin"."Switch to Desktop 12" = "none,,Switch to Desktop 12";
"kwin"."Switch to Desktop 13" = "none,,Switch to Desktop 13";
"kwin"."Switch to Desktop 14" = "none,,Switch to Desktop 14";
"kwin"."Switch to Desktop 15" = "none,,Switch to Desktop 15";
"kwin"."Switch to Desktop 16" = "none,,Switch to Desktop 16";
"kwin"."Switch to Desktop 17" = "none,,Switch to Desktop 17";
"kwin"."Switch to Desktop 18" = "none,,Switch to Desktop 18";
"kwin"."Switch to Desktop 19" = "none,,Switch to Desktop 19";
"kwin"."Switch to Desktop 2" = "Ctrl+F2";
"kwin"."Switch to Desktop 20" = "none,,Switch to Desktop 20";
"kwin"."Switch to Desktop 3" = "Ctrl+F3";
"kwin"."Switch to Desktop 4" = "Ctrl+F4";
"kwin"."Switch to Desktop 5" = "none,,Switch to Desktop 5";
"kwin"."Switch to Desktop 6" = "none,,Switch to Desktop 6";
"kwin"."Switch to Desktop 7" = "none,,Switch to Desktop 7";
"kwin"."Switch to Desktop 8" = "none,,Switch to Desktop 8";
"kwin"."Switch to Desktop 9" = "none,,Switch to Desktop 9";
"kwin"."Switch to Next Desktop" = "none,,Switch to Next Desktop";
"kwin"."Switch to Next Screen" = "none,,Switch to Next Screen";
"kwin"."Switch to Previous Desktop" = "none,,Switch to Previous Desktop";
"kwin"."Switch to Previous Screen" = "none,,Switch to Previous Screen";
"kwin"."Switch to Screen 0" = "none,,Switch to Screen 0";
"kwin"."Switch to Screen 1" = "none,,Switch to Screen 1";
"kwin"."Switch to Screen 2" = "none,,Switch to Screen 2";
"kwin"."Switch to Screen 3" = "none,,Switch to Screen 3";
"kwin"."Switch to Screen 4" = "none,,Switch to Screen 4";
"kwin"."Switch to Screen 5" = "none,,Switch to Screen 5";
"kwin"."Switch to Screen 6" = "none,,Switch to Screen 6";
"kwin"."Switch to Screen 7" = "none,,Switch to Screen 7";
"kwin"."Switch to Screen Above" = "none,,Switch to Screen Above";
"kwin"."Switch to Screen Below" = "none,,Switch to Screen Below";
"kwin"."Switch to Screen to the Left" = "none,,Switch to Screen to the Left";
"kwin"."Switch to Screen to the Right" = "none,,Switch to Screen to the Right";
"kwin"."Toggle Night Color" = [];
"kwin"."Toggle Window Raise/Lower" = "none,,Toggle Window Raise/Lower";
"kwin"."Walk Through Windows" = "Alt+Tab";
"kwin"."Walk Through Windows (Reverse)" = "Alt+Shift+Tab";
"kwin"."Walk Through Windows Alternative" = "none,,Walk Through Windows Alternative";
"kwin"."Walk Through Windows Alternative (Reverse)" = "none,,Walk Through Windows Alternative (Reverse)";
"kwin"."Walk Through Windows of Current Application" = "Alt+`";
"kwin"."Walk Through Windows of Current Application (Reverse)" = "Alt+~";
"kwin"."Walk Through Windows of Current Application Alternative" = "none,,Walk Through Windows of Current Application Alternative";
"kwin"."Walk Through Windows of Current Application Alternative (Reverse)" = "none,,Walk Through Windows of Current Application Alternative (Reverse)";
"kwin"."Window Above Other Windows" = "none,,Keep Window Above Others";
"kwin"."Window Below Other Windows" = "none,,Keep Window Below Others";
"kwin"."Window Close" = "Alt+F4";
"kwin"."Window Fullscreen" = "none,,Make Window Fullscreen";
"kwin"."Window Grow Horizontal" = "none,,Expand Window Horizontally";
"kwin"."Window Grow Vertical" = "none,,Expand Window Vertically";
"kwin"."Window Lower" = "none,,Lower Window";
"kwin"."Window Maximize" = "Meta+PgUp";
"kwin"."Window Maximize Horizontal" = "none,,Maximize Window Horizontally";
"kwin"."Window Maximize Vertical" = "none,,Maximize Window Vertically";
"kwin"."Window Minimize" = "Meta+PgDown";
"kwin"."Window Move" = "none,,Move Window";
"kwin"."Window Move Center" = "none,,Move Window to the Center";
"kwin"."Window No Border" = "none,,Toggle Window Titlebar and Frame";
"kwin"."Window On All Desktops" = "none,,Keep Window on All Desktops";
"kwin"."Window One Desktop Down" = "Meta+Ctrl+Shift+Down";
"kwin"."Window One Desktop Up" = "Meta+Ctrl+Shift+Up";
"kwin"."Window One Desktop to the Left" = "Meta+Ctrl+Shift+Left";
"kwin"."Window One Desktop to the Right" = "Meta+Ctrl+Shift+Right";
"kwin"."Window One Screen Down" = "none,,Move Window One Screen Down";
"kwin"."Window One Screen Up" = "none,,Move Window One Screen Up";
"kwin"."Window One Screen to the Left" = "none,,Move Window One Screen to the Left";
"kwin"."Window One Screen to the Right" = "none,,Move Window One Screen to the Right";
"kwin"."Window Operations Menu" = "Alt+F3";
"kwin"."Window Pack Down" = "none,,Move Window Down";
"kwin"."Window Pack Left" = "none,,Move Window Left";
"kwin"."Window Pack Right" = "none,,Move Window Right";
"kwin"."Window Pack Up" = "none,,Move Window Up";
"kwin"."Window Quick Tile Bottom" = "Meta+Down";
"kwin"."Window Quick Tile Bottom Left" = "none,,Quick Tile Window to the Bottom Left";
"kwin"."Window Quick Tile Bottom Right" = "none,,Quick Tile Window to the Bottom Right";
"kwin"."Window Quick Tile Left" = "Meta+Left";
"kwin"."Window Quick Tile Right" = "Meta+Right";
"kwin"."Window Quick Tile Top" = "Meta+Up";
"kwin"."Window Quick Tile Top Left" = "none,,Quick Tile Window to the Top Left";
"kwin"."Window Quick Tile Top Right" = "none,,Quick Tile Window to the Top Right";
"kwin"."Window Raise" = "none,,Raise Window";
"kwin"."Window Resize" = "none,,Resize Window";
"kwin"."Window Shade" = "none,,Shade Window";
"kwin"."Window Shrink Horizontal" = "none,,Shrink Window Horizontally";
"kwin"."Window Shrink Vertical" = "none,,Shrink Window Vertically";
"kwin"."Window to Desktop 1" = "none,,Window to Desktop 1";
"kwin"."Window to Desktop 10" = "none,,Window to Desktop 10";
"kwin"."Window to Desktop 11" = "none,,Window to Desktop 11";
"kwin"."Window to Desktop 12" = "none,,Window to Desktop 12";
"kwin"."Window to Desktop 13" = "none,,Window to Desktop 13";
"kwin"."Window to Desktop 14" = "none,,Window to Desktop 14";
"kwin"."Window to Desktop 15" = "none,,Window to Desktop 15";
"kwin"."Window to Desktop 16" = "none,,Window to Desktop 16";
"kwin"."Window to Desktop 17" = "none,,Window to Desktop 17";
"kwin"."Window to Desktop 18" = "none,,Window to Desktop 18";
"kwin"."Window to Desktop 19" = "none,,Window to Desktop 19";
"kwin"."Window to Desktop 2" = "none,,Window to Desktop 2";
"kwin"."Window to Desktop 20" = "none,,Window to Desktop 20";
"kwin"."Window to Desktop 3" = "none,,Window to Desktop 3";
"kwin"."Window to Desktop 4" = "none,,Window to Desktop 4";
"kwin"."Window to Desktop 5" = "none,,Window to Desktop 5";
"kwin"."Window to Desktop 6" = "none,,Window to Desktop 6";
"kwin"."Window to Desktop 7" = "none,,Window to Desktop 7";
"kwin"."Window to Desktop 8" = "none,,Window to Desktop 8";
"kwin"."Window to Desktop 9" = "none,,Window to Desktop 9";
"kwin"."Window to Next Desktop" = "none,,Window to Next Desktop";
"kwin"."Window to Next Screen" = "Meta+Shift+Right";
"kwin"."Window to Previous Desktop" = "none,,Window to Previous Desktop";
"kwin"."Window to Previous Screen" = "Meta+Shift+Left";
"kwin"."Window to Screen 0" = "none,,Move Window to Screen 0";
"kwin"."Window to Screen 1" = "none,,Move Window to Screen 1";
"kwin"."Window to Screen 2" = "none,,Move Window to Screen 2";
"kwin"."Window to Screen 3" = "none,,Move Window to Screen 3";
"kwin"."Window to Screen 4" = "none,,Move Window to Screen 4";
"kwin"."Window to Screen 5" = "none,,Move Window to Screen 5";
"kwin"."Window to Screen 6" = "none,,Move Window to Screen 6";
"kwin"."Window to Screen 7" = "none,,Move Window to Screen 7";
"kwin"."view_actual_size" = "Meta+0";
"kwin"."view_zoom_in" = ["Meta++" "Meta+=,Meta++" "Meta+=,Zoom In"];
"kwin"."view_zoom_out" = "Meta+-";
"mediacontrol"."mediavolumedown" = "none,,Media volume down";
"mediacontrol"."mediavolumeup" = "none,,Media volume up";
"mediacontrol"."nextmedia" = "Media Next";
"mediacontrol"."pausemedia" = "Media Pause";
"mediacontrol"."playmedia" = "none,,Play media playback";
"mediacontrol"."playpausemedia" = "Media Play";
"mediacontrol"."previousmedia" = "Media Previous";
"mediacontrol"."stopmedia" = "Media Stop";
"org_kde_powerdevil"."Decrease Keyboard Brightness" = "Keyboard Brightness Down";
"org_kde_powerdevil"."Decrease Screen Brightness" = "Monitor Brightness Down";
"org_kde_powerdevil"."Decrease Screen Brightness Small" = "Shift+Monitor Brightness Down";
"org_kde_powerdevil"."Hibernate" = "Hibernate";
"org_kde_powerdevil"."Increase Keyboard Brightness" = "Keyboard Brightness Up";
"org_kde_powerdevil"."Increase Screen Brightness" = "Monitor Brightness Up";
"org_kde_powerdevil"."Increase Screen Brightness Small" = "Shift+Monitor Brightness Up";
"org_kde_powerdevil"."PowerDown" = "Power Down";
"org_kde_powerdevil"."PowerOff" = "Power Off";
"org_kde_powerdevil"."Sleep" = "Sleep";
"org_kde_powerdevil"."Toggle Keyboard Backlight" = "Keyboard Light On/Off";
"org_kde_powerdevil"."Turn Off Screen" = [];
"org_kde_powerdevil"."powerProfile" = ["Battery" "Meta+B,Battery" "Meta+B,Switch Power Profile"];
"plasmashell"."activate application launcher" = ["Meta" "Alt+F1,Meta" "Alt+F1,Activate Application Launcher"];
"plasmashell"."activate task manager entry 1" = "Meta+1";
"plasmashell"."activate task manager entry 10" = "none,Meta+0,Activate Task Manager Entry 10";
"plasmashell"."activate task manager entry 2" = "Meta+2";
"plasmashell"."activate task manager entry 3" = "Meta+3";
"plasmashell"."activate task manager entry 4" = "Meta+4";
"plasmashell"."activate task manager entry 5" = "Meta+5";
"plasmashell"."activate task manager entry 6" = "Meta+6";
"plasmashell"."activate task manager entry 7" = "Meta+7";
"plasmashell"."activate task manager entry 8" = "Meta+8";
"plasmashell"."activate task manager entry 9" = "Meta+9";
"plasmashell"."clear-history" = "none,,Clear Clipboard History";
"plasmashell"."clipboard_action" = "Meta+Ctrl+X";
"plasmashell"."cycle-panels" = "Meta+Alt+P";
"plasmashell"."cycleNextAction" = "none,,Next History Item";
"plasmashell"."cyclePrevAction" = "none,,Previous History Item";
"plasmashell"."manage activities" = "Meta+Q";
"plasmashell"."next activity" = "Meta+A,none,Walk through activities";
"plasmashell"."previous activity" = "Meta+Shift+A,none,Walk through activities (Reverse)";
"plasmashell"."repeat_action" = "none,Meta+Ctrl+R,Manually Invoke Action on Current Clipboard";
"plasmashell"."show dashboard" = "Ctrl+F12";
"plasmashell"."show-barcode" = "none,,Show Barcode";
"plasmashell"."show-on-mouse-pos" = "Meta+V";
"plasmashell"."stop current activity" = "Meta+S";
"plasmashell"."switch to next activity" = "none,,Switch to Next Activity";
"plasmashell"."switch to previous activity" = "none,,Switch to Previous Activity";
"plasmashell"."toggle do not disturb" = "none,,Toggle do not disturb";
};
configFile = {
"baloofilerc"."General"."dbVersion" = 2;
"baloofilerc"."General"."exclude filters" = "*~,*.part,*.o,*.la,*.lo,*.loT,*.moc,moc_*.cpp,qrc_*.cpp,ui_*.h,cmake_install.cmake,CMakeCache.txt,CTestTestfile.cmake,libtool,config.status,confdefs.h,autom4te,conftest,confstat,Makefile.am,*.gcode,.ninja_deps,.ninja_log,build.ninja,*.csproj,*.m4,*.rej,*.gmo,*.pc,*.omf,*.aux,*.tmp,*.po,*.vm*,*.nvram,*.rcore,*.swp,*.swap,lzo,litmain.sh,*.orig,.histfile.*,.xsession-errors*,*.map,*.so,*.a,*.db,*.qrc,*.ini,*.init,*.img,*.vdi,*.vbox*,vbox.log,*.qcow2,*.vmdk,*.vhd,*.vhdx,*.sql,*.sql.gz,*.ytdl,*.tfstate*,*.class,*.pyc,*.pyo,*.elc,*.qmlc,*.jsc,*.fastq,*.fq,*.gb,*.fasta,*.fna,*.gbff,*.faa,po,CVS,.svn,.git,_darcs,.bzr,.hg,CMakeFiles,CMakeTmp,CMakeTmpQmake,.moc,.obj,.pch,.uic,.npm,.yarn,.yarn-cache,__pycache__,node_modules,node_packages,nbproject,.terraform,.venv,venv,core-dumps,lost+found";
"baloofilerc"."General"."exclude filters version" = 9;
"dolphinrc"."General"."ViewPropsTimestamp" = "2025,1,11,13,50,1.5779999999999998";
"dolphinrc"."KFileDialog Settings"."Places Icons Auto-resize" = false;
"dolphinrc"."KFileDialog Settings"."Places Icons Static Size" = 22;
"kactivitymanagerdrc"."activities"."851c180f-d52d-4fe4-b7ed-a10e70cf4ce8" = "Default";
"kactivitymanagerdrc"."main"."currentActivity" = "851c180f-d52d-4fe4-b7ed-a10e70cf4ce8";
"kded5rc"."Module-device_automounter"."autoload" = false;
"kdeglobals"."WM"."activeBackground" = "49,54,59";
"kdeglobals"."WM"."activeBlend" = "252,252,252";
"kdeglobals"."WM"."activeForeground" = "252,252,252";
"kdeglobals"."WM"."inactiveBackground" = "42,46,50";
"kdeglobals"."WM"."inactiveBlend" = "161,169,177";
"kdeglobals"."WM"."inactiveForeground" = "161,169,177";
"kwalletrc"."Wallet"."First Use" = false;
"kwinrc"."Desktops"."Id_1" = "75f95093-aa81-4dfd-9013-8c7489e1eed5";
"kwinrc"."Desktops"."Number" = 1;
"kwinrc"."Desktops"."Rows" = 1;
"kwinrc"."Tiling"."padding" = 4;
"kwinrc"."Tiling/f18ce12b-2106-508f-9542-e4e6c6fbf75f"."tiles" = "{\"layoutDirection\":\"horizontal\",\"tiles\":[{\"width\":0.25},{\"width\":0.5},{\"width\":0.25}]}";
"kwinrc"."Xwayland"."Scale" = 1.75;
"plasma-localerc"."Formats"."LANG" = "en_US.UTF-8";
};
dataFile = {
};
};
}

View file

@ -3,32 +3,15 @@
function usage {
echo "countdown - exit after a certain amount of time has passed"
echo " Usage:"
echo " countdown <TIME> && command..."
echo " countdown <SECONDS> && command..."
echo
echo " Examples:"
echo ' countdown 120 && echo "Two minutes have elapsed!"'
echo ' countdown 5m && echo "Five minutes have elapsed!"'
echo ' countdown 10h && echo "Ten hours have elapsed!"'
echo ' countdown 9d && echo "Nine days have elapsed!"'
echo ' countdown 120 && echo "Two minutes has elapsed!"'
}
[[ $# -lt 1 ]] && { printf "error: no SECONDS argument provided\n" >&2; usage; exit 1; }
t="$1"
seconds="$(echo "$t" | tr -d -c 0-9)"
if [[ $t =~ ^.*m$ ]]; then
seconds=$((seconds * 60))
fi
if [[ $t =~ ^.*h$ ]]; then
seconds=$((seconds * 60 * 60))
fi
if [[ $t =~ ^.*d$ ]]; then
seconds=$((seconds * 60 * 60 * 24))
fi
d=$(($(date +%s) + seconds));
d=$(($(date +%s) + $1));
printf 'Started at %s\n' "$(date)"
while [[ "$d" -ge "$(date +%s)" ]]; do

View file

@ -1,58 +0,0 @@
[colors]
ansi = [
"#45475a",
"#f38ba8",
"#a6e3a1",
"#fab387",
"#74c7ec",
"#cba6f7",
"#f9e2af",
"#bac2de",
]
background = "#1e1e2e"
brights = [
"#585b70",
"#f38ba8",
"#a6e3a1",
"#fab387",
"#74c7ec",
"#cba6f7",
"#f9e2af",
"#a6adc8",
]
compose_cursor = "#fab387"
cursor_bg = "#cdd6f4"
cursor_border = "#cdd6f4"
cursor_fg = "#1e1e2e"
foreground = "#cdd6f4"
scrollbar_thumb = "#181825"
selection_bg = "#f9e2af"
selection_fg = "#1e1e2e"
split = "#585b70"
[colors.tab_bar]
background = "#313244"
[colors.tab_bar.active_tab]
bg_color = "#74c7ec"
fg_color = "#1e1e2e"
italic = false
[colors.tab_bar.inactive_tab]
bg_color = "#181825"
fg_color = "#6c7086"
italic = false
[colors.tab_bar.inactive_tab_hover]
bg_color = "#313244"
fg_color = "#74c7ec"
italic = false
[colors.tab_bar.new_tab]
bg_color = "#181825"
fg_color = "#6c7086"
italic = false
[colors.tab_bar.new_tab_hover]
bg_color = "#313244"
fg_color = "#74c7ec"
italic = false

View file

@ -0,0 +1,154 @@
local wezterm = require 'wezterm'
local config = {}
if wezterm.config_builder then
config = wezterm.config_builder()
end
config.adjust_window_size_when_changing_font_size = false
config.font = wezterm.font_with_fallback {
{ family = "IosevkaLyteTerm", weight = 'Medium', italic = false },
{ family = 'Symbols Nerd Font Mono', weight = 'Regular', italic = false },
'Noto Color Emoji',
}
config.font_size = 12.0
-- config.window_frame.font = config.font
-- config.window_frame.font_size = font_size
config.default_cursor_style = 'BlinkingBar'
-- config.disable_default_key_bindings = true
config.hide_tab_bar_if_only_one_tab = true
config.use_fancy_tab_bar = false
config.tab_bar_at_bottom = true
config.window_background_opacity = 1.0
config.enable_kitty_keyboard = true
config.show_new_tab_button_in_tab_bar = true
config.notification_handling = "SuppressFromFocusedTab"
-- config.front_end = "WebGpu"
-- config.webgpu_power_preference = 'HighPerformance'
config.enable_wayland = true
-- config.use_ime = true
local function tab_title(tab_info)
local title = tab_info.tab_title
if title and #title > 0 then
return title
end
return tab_info.active_pane.title
end
-- wezterm.on('format-tab-title', function (tab, tabs, panes, config, hover, max_width)
wezterm.on('format-tab-title', function(tab, _, _, _, _, max_width)
local title = tab_title(tab)
return ' ' .. string.sub(title, 0, max_width - 2) .. ' '
end)
-- see nix module which has home manager create this color scheme file
config.color_scheme = 'catppuccin-mocha-sapphire';
config.inactive_pane_hsb = {
saturation = 0.8,
brightness = 0.7,
}
config.keys = {
{
key = 'Insert',
mods = 'SHIFT',
action = wezterm.action.PasteFrom 'Clipboard'
},
{
key = 'v',
mods = 'CTRL|SHIFT',
action = wezterm.action.PasteFrom 'PrimarySelection'
},
{
key = 't',
mods = 'CTRL|SHIFT',
action = wezterm.action.SpawnTab 'CurrentPaneDomain'
},
{
key = 'h',
mods = 'CTRL',
action = wezterm.action.ActivatePaneDirection 'Left'
},
{
key = 'l',
mods = 'CTRL',
action = wezterm.action.ActivatePaneDirection 'Right'
},
{
key = 'k',
mods = 'CTRL',
action = wezterm.action.ActivatePaneDirection 'Up'
},
{
key = 'j',
mods = 'CTRL',
action = wezterm.action.ActivatePaneDirection 'Down'
},
{
key = 'j',
mods = 'CTRL|SHIFT',
action = wezterm.action.SplitVertical { domain = 'CurrentPaneDomain' }
},
{
key = 'l',
mods = 'CTRL|SHIFT',
action = wezterm.action.SplitHorizontal { domain = 'CurrentPaneDomain' }
},
{
key = 'k',
mods = 'CTRL|SHIFT',
action = wezterm.action.SplitVertical { args = { 'top' }, domain = 'CurrentPaneDomain' }
},
{
key = 'h',
mods = 'CTRL|SHIFT',
action = wezterm.action.SplitHorizontal { args = { 'right' }, domain = 'CurrentPaneDomain' }
},
{
key = 'p',
mods = 'CTRL|SHIFT',
action = wezterm.action.ActivateCommandPalette
},
{
key = 'w',
mods = 'CTRL|SHIFT',
action = wezterm.action.CloseCurrentPane { confirm = true },
},
{
key = 'w',
mods = 'CTRL|ALT|SHIFT',
action = wezterm.action.CloseCurrentTab { confirm = true },
},
{
key = 'l',
mods = 'CTRL|SHIFT|ALT',
action = wezterm.action.ShowDebugOverlay
},
{
key = 'r',
mods = 'CTRL|SHIFT|ALT',
action = wezterm.action.RotatePanes 'Clockwise'
},
}
-- config.unix_domains = {
-- {
-- name = 'unix',
-- local_echo_threshold_ms = 10,
-- },
-- }
-- config.default_gui_startup_args = { 'connect', 'unix' }
-- config.default_domain = 'unix'
config.window_padding = {
top = '0.5cell',
bottom = '0.5cell',
left = '1cell',
right = '1cell',
}
return config

View file

@ -1,167 +0,0 @@
local wezterm = require 'wezterm'
local config = wezterm.config_builder()
config.adjust_window_size_when_changing_font_size = false
config.color_scheme = 'catppuccin-mocha-sapphire';
config.font_size = 12.0
config.font = wezterm.font_with_fallback {
{ family = "IosevkaLyteTerm", weight = 'Medium', italic = false },
{ family = 'Symbols Nerd Font Mono', weight = 'Regular', italic = false },
'Noto Color Emoji',
}
config.hide_tab_bar_if_only_one_tab = true
config.use_fancy_tab_bar = false
config.tab_bar_at_bottom = true
config.notification_handling = "SuppressFromFocusedTab"
-- config.window_decorations = "RESIZE"
local a = wezterm.action
local s = { domain = 'CurrentPaneDomain' }
local st = { domain = 'CurrentPaneDomain', args={'top'} }
local sr = { domain = 'CurrentPaneDomain', args={'right'} }
config.keys = {
{ key = 'j', mods = 'CTRL|SHIFT', action = a.SplitVertical(s) },
{ key = 'k', mods = 'CTRL|SHIFT', action = a.SplitVertical(st) },
{ key = 'l', mods = 'CTRL|SHIFT', action = a.SplitHorizontal(s) },
{ key = 'h', mods = 'CTRL|SHIFT', action = a.SplitHorizontal(sr) },
{ key = 'j', mods = 'CTRL', action = a.ActivatePaneDirection'Down' },
{ key = 'k', mods = 'CTRL', action = a.ActivatePaneDirection'Up' },
{ key = 'l', mods = 'CTRL', action = a.ActivatePaneDirection'Right' },
{ key = 'h', mods = 'CTRL', action = a.ActivatePaneDirection'Left' },
{ key = 'w', mods = 'CTRL', action = a.CloseCurrentPane{confirm=true} },
}
return config
-- config.window_background_opacity = 1.0
-- config.enable_kitty_keyboard = true
-- config.show_new_tab_button_in_tab_bar = true
-- config.notification_handling = "SuppressFromFocusedTab"
-- config.front_end = "WebGpu"
-- config.webgpu_power_preference = 'HighPerformance'
-- config.enable_wayland = true
-- config.use_ime = true
-- local function tab_title(tab_info)
-- local title = tab_info.tab_title
-- if title and #title > 0 then
-- return title
-- end
-- return tab_info.active_pane.title
-- end
-- wezterm.on('format-tab-title', function (tab, tabs, panes, config, hover, max_width)
-- wezterm.on('format-tab-title', function(tab, _, _, _, _, max_width)
-- local title = tab_title(tab)
-- return ' ' .. string.sub(title, 0, max_width - 2) .. ' '
-- end)
-- see nix module which has home manager create this color scheme file
-- config.inactive_pane_hsb = {
-- saturation = 0.8,
-- brightness = 0.7,
-- }
-- config.keys = {
-- {
-- key = 'Insert',
-- mods = 'SHIFT',
-- action = wezterm.action.PasteFrom 'Clipboard'
-- },
-- {
-- key = 'v',
-- mods = 'CTRL|SHIFT',
-- action = wezterm.action.PasteFrom 'PrimarySelection'
-- },
-- {
-- key = 't',
-- mods = 'CTRL|SHIFT',
-- action = wezterm.action.SpawnTab 'CurrentPaneDomain'
-- },
-- {
-- key = 'h',
-- mods = 'CTRL',
-- action = wezterm.action.ActivatePaneDirection 'Left'
-- },
-- {
-- key = 'l',
-- mods = 'CTRL',
-- action = wezterm.action.ActivatePaneDirection 'Right'
-- },
-- {
-- key = 'k',
-- mods = 'CTRL',
-- action = wezterm.action.ActivatePaneDirection 'Up'
-- },
-- {
-- key = 'j',
-- mods = 'CTRL',
-- action = wezterm.action.ActivatePaneDirection 'Down'
-- },
-- {
-- key = 'j',
-- mods = 'CTRL|SHIFT',
-- action = wezterm.action.SplitVertical { domain = 'CurrentPaneDomain' }
-- },
-- {
-- key = 'l',
-- mods = 'CTRL|SHIFT',
-- action = wezterm.action.SplitHorizontal { domain = 'CurrentPaneDomain' }
-- },
-- {
-- key = 'k',
-- mods = 'CTRL|SHIFT',
-- action = wezterm.action.SplitVertical { args = { 'top' }, domain = 'CurrentPaneDomain' }
-- },
-- {
-- key = 'h',
-- mods = 'CTRL|SHIFT',
-- action = wezterm.action.SplitHorizontal { args = { 'right' }, domain = 'CurrentPaneDomain' }
-- },
-- {
-- key = 'p',
-- mods = 'CTRL|SHIFT',
-- action = wezterm.action.ActivateCommandPalette
-- },
-- {
-- key = 'w',
-- mods = 'CTRL|SHIFT',
-- action = wezterm.action.CloseCurrentPane { confirm = true },
-- },
-- {
-- key = 'w',
-- mods = 'CTRL|ALT|SHIFT',
-- action = wezterm.action.CloseCurrentTab { confirm = true },
-- },
-- {
-- key = 'l',
-- mods = 'CTRL|SHIFT|ALT',
-- action = wezterm.action.ShowDebugOverlay
-- },
-- {
-- key = 'r',
-- mods = 'CTRL|SHIFT|ALT',
-- action = wezterm.action.RotatePanes 'Clockwise'
-- },
-- }
-- config.unix_domains = {
-- {
-- name = 'unix',
-- local_echo_threshold_ms = 10,
-- },
-- }
-- config.default_gui_startup_args = { 'connect', 'unix' }
-- config.default_domain = 'unix'
-- config.window_padding = {
-- top = '0.5cell',
-- bottom = '0.5cell',
-- left = '1cell',
-- right = '1cell',
-- }

View file

@ -1,277 +0,0 @@
# https://github.com/NixOS/nixpkgs/blob/32aaedffae68f54312c4c7726f828be82f278a48/nixos/modules/services/matrix/conduwuit.nix{
{
config,
lib,
pkgs,
...
}: let
cfg = config.services.conduwuit;
defaultUser = "conduwuit";
defaultGroup = "conduwuit";
format = pkgs.formats.toml {};
configFile = format.generate "conduwuit.toml" cfg.settings;
in {
meta.maintainers = with lib.maintainers; [niklaskorz];
options.services.conduwuit = {
enable = lib.mkEnableOption "conduwuit";
user = lib.mkOption {
type = lib.types.nonEmptyStr;
description = ''
The user {command}`conduwuit` is run as.
'';
default = defaultUser;
};
group = lib.mkOption {
type = lib.types.nonEmptyStr;
description = ''
The group {command}`conduwuit` is run as.
'';
default = defaultGroup;
};
extraEnvironment = lib.mkOption {
type = lib.types.attrsOf lib.types.str;
description = "Extra Environment variables to pass to the conduwuit server.";
default = {};
example = {
RUST_BACKTRACE = "yes";
};
};
package = lib.mkPackageOption pkgs.unstable-packages "conduwuit" {};
settings = lib.mkOption {
type = lib.types.submodule {
freeformType = format.type;
options = {
global.server_name = lib.mkOption {
type = lib.types.nonEmptyStr;
example = "example.com";
description = "The server_name is the name of this server. It is used as a suffix for user and room ids.";
};
global.address = lib.mkOption {
type = lib.types.nullOr (lib.types.listOf lib.types.nonEmptyStr);
default = null;
example = [
"127.0.0.1"
"::1"
];
description = ''
Addresses (IPv4 or IPv6) to listen on for connections by the reverse proxy/tls terminator.
If set to `null`, conduwuit will listen on IPv4 and IPv6 localhost.
Must be `null` if `unix_socket_path` is set.
'';
};
global.port = lib.mkOption {
type = lib.types.listOf lib.types.port;
default = [6167];
description = ''
The port(s) conduwuit will be running on.
You need to set up a reverse proxy in your web server (e.g. apache or nginx),
so all requests to /_matrix on port 443 and 8448 will be forwarded to the conduwuit
instance running on this port.
'';
};
global.unix_socket_path = lib.mkOption {
type = lib.types.nullOr lib.types.path;
default = null;
description = ''
Listen on a UNIX socket at the specified path. If listening on a UNIX socket,
listening on an address will be disabled. The `address` option must be set to
`null` (the default value). The option {option}`services.conduwuit.group` must
be set to a group your reverse proxy is part of.
This will automatically add a system user "conduwuit" to your system if
{option}`services.conduwuit.user` is left at the default, and a "conduwuit"
group if {option}`services.conduwuit.group` is left at the default.
'';
};
global.unix_socket_perms = lib.mkOption {
type = lib.types.ints.positive;
default = 660;
description = "The default permissions (in octal) to create the UNIX socket with.";
};
global.max_request_size = lib.mkOption {
type = lib.types.ints.positive;
default = 20000000;
description = "Max request size in bytes. Don't forget to also change it in the proxy.";
};
global.allow_registration = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
Whether new users can register on this server.
Registration with token requires `registration_token` or `registration_token_file` to be set.
If set to true without a token configured, and
`yes_i_am_very_very_sure_i_want_an_open_registration_server_prone_to_abuse`
is set to true, users can freely register.
'';
};
global.allow_encryption = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Whether new encrypted rooms can be created. Note: existing rooms will continue to work.";
};
global.allow_federation = lib.mkOption {
type = lib.types.bool;
default = true;
description = ''
Whether this server federates with other servers.
'';
};
global.trusted_servers = lib.mkOption {
type = lib.types.listOf lib.types.nonEmptyStr;
default = ["matrix.org"];
description = ''
Servers listed here will be used to gather public keys of other servers
(notary trusted key servers).
Currently, conduwuit doesn't support inbound batched key requests, so
this list should only contain other Synapse servers.
Example: `[ "matrix.org" "constellatory.net" "tchncs.de" ]`
'';
};
global.database_path = lib.mkOption {
readOnly = true;
type = lib.types.path;
default = "/var/lib/conduwuit/";
description = ''
Path to the conduwuit database, the directory where conduwuit will save its data.
Note that database_path cannot be edited because of the service's reliance on systemd StateDir.
'';
};
global.allow_check_for_updates = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
If enabled, conduwuit will send a simple GET request periodically to
<https://pupbrain.dev/check-for-updates/stable> for any new announcements made.
Despite the name, this is not an update check endpoint, it is simply an announcement check endpoint.
Disabled by default.
'';
};
};
};
default = {};
# TOML does not allow null values, so we use null to omit those fields
apply = lib.filterAttrsRecursive (_: v: v != null);
description = ''
Generates the conduwuit.toml configuration file. Refer to
<https://conduwuit.puppyirl.gay/configuration.html>
for details on supported values.
'';
};
};
config = lib.mkIf cfg.enable {
assertions = [
{
assertion = !(cfg.settings ? global.unix_socket_path) || !(cfg.settings ? global.address);
message = ''
In `services.conduwuit.settings.global`, `unix_socket_path` and `address` cannot be set at the
same time.
Leave one of the two options unset or explicitly set them to `null`.
'';
}
{
assertion = cfg.user != defaultUser -> config ? users.users.${cfg.user};
message = "If `services.conduwuit.user` is changed, the configured user must already exist.";
}
{
assertion = cfg.group != defaultGroup -> config ? users.groups.${cfg.group};
message = "If `services.conduwuit.group` is changed, the configured group must already exist.";
}
];
users.users = lib.mkIf (cfg.user == defaultUser) {
${defaultUser} = {
group = cfg.group;
home = cfg.settings.global.database_path;
isSystemUser = true;
};
};
users.groups = lib.mkIf (cfg.group == defaultGroup) {
${defaultGroup} = {};
};
systemd.services.conduwuit = {
description = "Conduwuit Matrix Server";
documentation = ["https://conduwuit.puppyirl.gay/"];
wantedBy = ["multi-user.target"];
wants = ["network-online.target"];
after = ["network-online.target"];
environment = lib.mkMerge [
{CONDUWUIT_CONFIG = configFile;}
cfg.extraEnvironment
];
startLimitBurst = 5;
startLimitIntervalSec = 60;
serviceConfig = {
DynamicUser = true;
User = cfg.user;
Group = cfg.group;
DevicePolicy = "closed";
LockPersonality = true;
MemoryDenyWriteExecute = true;
NoNewPrivileges = true;
ProtectClock = true;
ProtectControlGroups = true;
ProtectHome = true;
ProtectHostname = true;
ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
PrivateDevices = true;
PrivateMounts = true;
PrivateTmp = true;
PrivateUsers = true;
PrivateIPC = true;
RemoveIPC = true;
RestrictAddressFamilies = [
"AF_INET"
"AF_INET6"
"AF_UNIX"
];
RestrictNamespaces = true;
RestrictRealtime = true;
SystemCallArchitectures = "native";
SystemCallFilter = [
"@system-service"
"@resources"
"~@clock"
"@debug"
"@module"
"@mount"
"@reboot"
"@swap"
"@cpu-emulation"
"@obsolete"
"@timer"
"@chown"
"@setuid"
"@privileged"
"@keyring"
"@ipc"
];
SystemCallErrorNumber = "EPERM";
StateDirectory = "conduwuit";
StateDirectoryMode = "0700";
RuntimeDirectory = "conduwuit";
RuntimeDirectoryMode = "0750";
ExecStart = lib.getExe cfg.package;
Restart = "on-failure";
RestartSec = 10;
};
};
};
}

View file

@ -18,30 +18,6 @@
# TODO: include the home-manager modules for daniel?
};
niri = {pkgs, ...}: {
environment.systemPackages = with pkgs; [niri];
systemd.user.services.polkit = {
description = "PolicyKit Authentication Agent";
wantedBy = ["niri.service"];
after = ["graphical-session.target"];
partOf = ["graphical-session.target"];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
# security.pam.services.swaylock = {};
programs.dconf.enable = pkgs.lib.mkDefault true;
fonts.enableDefaultPackages = pkgs.lib.mkDefault true;
security.polkit.enable = true;
services.gnome.gnome-keyring.enable = true;
};
hyprland = {pkgs, ...}: {
imports = with nixosModules; [
ewwbar
@ -51,7 +27,7 @@
programs.hyprland = {
enable = true;
};
environment.systemPackages = with pkgs; [hyprpaper xwaylandvideobridge netcat-openbsd];
environment.systemPackages = with pkgs; [hyprpaper xwaylandvideobridge socat];
programs.hyprland = {
package = flakeInputs.hyprland.packages.${pkgs.system}.hyprland;
@ -110,11 +86,9 @@
xdg.portal = {
enable = true;
wlr.enable = true;
# gtk.enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-wlr
xdg-desktop-portal-gtk
];
};
@ -179,7 +153,6 @@
};
deno-netlify-ddns-client = import ./deno-netlify-ddns-client.nix;
conduwuit = import ./conduwuit.nix;
fallback-hostname = {lib, ...}: {
networking.hostName = lib.mkDefault "set-a-hostname-dingus";
@ -275,9 +248,6 @@
MANPAGER = "bat --style=plain";
};
systemPackages = with pkgs; [
aria2
iputils
inetutils
curl
dua
bat
@ -452,10 +422,6 @@
wifi
];
environment.systemPackages = with pkgs; [
acpi
];
services.udev.extraRules = ''
ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.coreutils}/bin/chgrp video /sys/class/backlight/%k/brightness"
ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.coreutils}/bin/chmod g+w /sys/class/backlight/%k/brightness"
@ -486,14 +452,6 @@
};
};
touchscreen = {pkgs, ...}: {
environment.systemPackages = with pkgs; [
wvkbd # on-screen keyboard
flakeInputs.iio-hyprland.outputs.packages.${system}.default # auto-rotate hyprland displays
flakeInputs.hyprgrass.outputs.packages.${system}.hyprgrass # hyprland touch gestures
];
};
emacs = {pkgs, ...}: {
environment.systemPackages = with pkgs; [
emacs
@ -550,6 +508,7 @@
nodePackages.yaml-language-server
xh
curl
google-chrome
];
hardware.gpgSmartcards.enable = true;
@ -615,6 +574,10 @@
enable = true;
};
programs.chromium = {
enable = true;
};
programs.btop = {
enable = true;
package = pkgs.btop.override {
@ -683,9 +646,6 @@
development-tools
printing
music-consumption
kde-connect
# plasma6
gnome
video-tools
radio-tools
android-dev
@ -714,8 +674,6 @@
};
environment = {
systemPackages = with pkgs; [
firefox
google-chrome
libnotify
slides
slack
@ -730,62 +688,8 @@
};
};
gnome = {
pkgs,
lib,
...
}: {
imports = with nixosModules; [pipewire];
services = {
xserver = {
enable = true;
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
};
udev.packages = [pkgs.gnome-settings-daemon];
};
environment = {
variables.GSK_RENDERER = "gl";
systemPackages = with pkgs; [
bitwarden
# adwaita-gtk-theme
papirus-icon-theme
adwaita-icon-theme
adwaita-icon-theme-legacy
];
};
programs.kdeconnect = {
enable = true;
package = pkgs.gnomeExtensions.gsconnect;
};
networking.firewall = rec {
allowedTCPPortRanges = [
{
from = 1714;
to = 1764;
}
];
allowedUDPPortRanges = allowedTCPPortRanges;
};
home-manager.users.daniel = {
imports = with homeManagerModules; [
gnome
];
home.file.".face" = {
enable = true;
source = builtins.fetchurl {
url = "https://lyte.dev/img/avatar3-square-512.png";
sha256 = "sha256:15zwbwisrc01m7ad684rsyq19wl4s33ry9xmgzmi88k1myxhs93x";
};
};
};
};
# gnome = {};
# intel = {};
radio-tools = {pkgs, ...}: {
environment = {
@ -830,19 +734,10 @@
];
services.xserver.enable = true;
services.displayManager.sddm = {
enable = true;
# package = lib.mkForce pkgs.kdePackages.sddm;
settings = {};
# theme = "";
enableHidpi = true;
wayland = {
enable = true;
compositor = "weston";
};
wayland.enable = true;
};
services.desktopManager.plasma6.enable = true;
programs.dconf.enable = true;
@ -898,8 +793,8 @@
gaming = {pkgs, ...}: {
imports = with nixosModules; [
# lutris # use the flatpak
steam # TODO: use the flatpak?
lutris
steam
];
environment = {
@ -1169,17 +1064,19 @@
};
steam = {pkgs, ...}: {
programs.gamescope.enable = true;
# programs.gamescope.enable = true;
programs.steam = {
enable = true;
/*
extest.enable = true;
gamescopeSession.enable = true;
extraPackages = with pkgs; [
gamescope
gamescope
];
*/
extraCompatPackages = with pkgs; [
proton-ge-bin

View file

@ -1399,11 +1399,86 @@ sudo nix run nixpkgs#ipmitool -- raw 0x30 0x30 0x02 0xff 0x00
options,
...
}: let
toml = pkgs.formats.toml {};
kanidm-package = config.services.kanidm.package;
domain = "idm.h.lyte.dev";
name = "kanidm";
storage = "/storage/${name}";
cert = "${storage}/certs/idm.h.lyte.dev.crt";
key = "${storage}/certs/idm.h.lyte.dev.key";
serverSettings = {
inherit domain;
bindaddress = "127.0.0.1:8443";
# ldapbindaddress
tls_chain = cert;
tls_key = key;
origin = "https://${domain}";
db_path = "${storage}/data/kanidm.db";
log_level = "info";
online_backup = {
path = "${storage}/backups/";
schedule = "00 22 * * *";
# versions = 7;
};
};
unixdSettings = {
hsm_pin_path = "/var/cache/${name}-unixd/hsm-pin";
pam_allowed_login_groups = [];
};
clientSettings = {
uri = "https://idm.h.lyte.dev";
};
user = name;
group = name;
storage = "/storage/${name}";
serverConfigFile = toml.generate "server.toml" serverSettings;
unixdConfigFile = toml.generate "kanidm-unixd.toml" unixdSettings;
clientConfigFile = toml.generate "kanidm-config.toml" clientSettings;
defaultServiceConfig = {
BindReadOnlyPaths = [
"/nix/store"
"-/etc/resolv.conf"
"-/etc/nsswitch.conf"
"-/etc/hosts"
"-/etc/localtime"
];
CapabilityBoundingSet = [];
# ProtectClock= adds DeviceAllow=char-rtc r
DeviceAllow = "";
# Implies ProtectSystem=strict, which re-mounts all paths
# DynamicUser = true;
LockPersonality = true;
MemoryDenyWriteExecute = true;
NoNewPrivileges = true;
PrivateDevices = true;
PrivateMounts = true;
PrivateNetwork = true;
PrivateTmp = true;
PrivateUsers = true;
ProcSubset = "pid";
ProtectClock = true;
ProtectHome = true;
ProtectHostname = true;
# Would re-mount paths ignored by temporary root
#ProtectSystem = "strict";
ProtectControlGroups = true;
ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
ProtectProc = "invisible";
RestrictAddressFamilies = [];
RestrictNamespaces = true;
RestrictRealtime = true;
RestrictSUIDSGID = true;
SystemCallArchitectures = "native";
SystemCallFilter = ["@system-service" "~@privileged @resources @setuid @keyring"];
# Does not work well with the temporary root
#UMask = "0066";
};
in {
# kanidm
config = {
@ -1424,9 +1499,9 @@ sudo nix run nixpkgs#ipmitool -- raw 0x30 0x30 0x02 0xff 0x00
script = ''
umask 077
# this line should be unnecessary now that we have this in tmpfiles
install -d -m 0700 -o "${name}" -g "${name}" "${storage}/data" "${storage}/certs"
install -d -m 0700 -o "${user}" -g "${group}" "${storage}/data" "${storage}/certs"
cd /var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/idm.h.lyte.dev
install -m 0700 -o "${name}" -g "${name}" idm.h.lyte.dev.key idm.h.lyte.dev.crt "${storage}/certs"
install -m 0700 -o "${user}" -g "${group}" idm.h.lyte.dev.key idm.h.lyte.dev.crt "${storage}/certs"
'';
path = with pkgs; [rsync];
serviceConfig = {
@ -1435,12 +1510,18 @@ sudo nix run nixpkgs#ipmitool -- raw 0x30 0x30 0x02 0xff 0x00
};
};
environment.systemPackages = [kanidm-package];
systemd.tmpfiles.settings."10-kanidm" = {
"${config.services.kanidm.serverSettings.online_backup.path}".d = {
user = name;
group = name;
"${serverSettings.online_backup.path}".d = {
inherit user group;
mode = "0700";
};
## "${builtins.dirOf unixdSettings.hsm_pin_path}".d = {
## user = "${user}-unixd";
## group = "${group}-unixd";
## mode = "0700";
## };
"${storage}/data".d = {
inherit user group;
mode = "0700";
@ -1451,65 +1532,170 @@ sudo nix run nixpkgs#ipmitool -- raw 0x30 0x30 0x02 0xff 0x00
};
};
services.kanidm = {
enableServer = true;
serverSettings = {
inherit domain;
origin = "https://${domain}";
bindaddress = "127.0.0.1:8443";
tls_chain = "${storage}/certs/idm.h.lyte.dev.crt";
tls_key = "${storage}/certs/idm.h.lyte.dev.key";
log_level = "info";
online_backup = {
path = "${storage}/backups/";
schedule = "00 22 * * *";
versions = 50;
};
};
enablePam = false;
unixSettings = {
# pam_allowed_login_groups = [];
};
enableClient = true;
clientSettings = {
uri = "https://idm.h.lyte.dev";
};
provision = {
# enable = true;
# instanceUrl = "https://${domain}";
# adminPasswordFile = config.sops.secrets.kanidm-admin-password-file.path
# idmAdminPasswordFile = config.sops.secrets.kanidm-admin-password-file.path
# autoRemove = true;
# groups = {
# myGroup = {
# members = ["myUser" /* ...*/];
# }
# };
# persons = {
# myUser = {
# displayName = "display name";
# legalName = "My User";
# mailAddresses = ["myuser@example.com"];
# groups = ["myGroup"];
# }
# };
# systems = {
# oauth2 = {
# mySystem = {
# enableLegacyCrypto = false;
# enableLocalhostRedirects = true; # only for public
# allowInsecureClientDisablePkce = false;
# basicSecretFile = config.sops.secrets.basic-secret-file...
# claimMap = {};
# };
# };
# };
};
users.groups = {
${group} = {};
"${group}-unixd" = {};
};
users.users.${user} = {
inherit group;
description = "kanidm server";
isSystemUser = true;
packages = [kanidm-package];
};
users.users."${user}-unixd" = {
group = "${group}-unixd";
description = lib.mkForce "kanidm PAM daemon";
isSystemUser = true;
};
# the kanidm module in nixpkgs was not working for me, so I rolled my own
# loosely based off it
systemd.services.kanidm = {
enable = true;
path = with pkgs; [openssl] ++ [kanidm-package];
description = "kanidm identity management daemon";
wantedBy = ["multi-user.target"];
after = ["network.target"];
requires = ["copy-kanidm-certificates-from-caddy.service"];
script = ''
pwd
ls -la
ls -laR /storage/kanidm
${kanidm-package}/bin/kanidmd server -c ${serverConfigFile}
'';
# environment.RUST_LOG = serverSettings.log_level;
serviceConfig = lib.mkMerge [
defaultServiceConfig
{
StateDirectory = name;
StateDirectoryMode = "0700";
RuntimeDirectory = "${name}d";
User = user;
Group = group;
AmbientCapabilities = ["CAP_NET_BIND_SERVICE"];
CapabilityBoundingSet = ["CAP_NET_BIND_SERVICE"];
PrivateUsers = lib.mkForce false;
PrivateNetwork = lib.mkForce false;
RestrictAddressFamilies = ["AF_INET" "AF_INET6" "AF_UNIX"];
# TemporaryFileSystem = "/:ro";
BindReadOnlyPaths = [
"${storage}/certs"
];
BindPaths = [
"${storage}/data"
# socket
"/run/${name}d:/run/${name}d"
# backups
serverSettings.online_backup.path
];
}
];
};
systemd.services.kanidm-unixd = {
description = "Kanidm PAM daemon";
wantedBy = ["multi-user.target"];
after = ["network.target"];
restartTriggers = [unixdConfigFile clientConfigFile];
serviceConfig = lib.mkMerge [
defaultServiceConfig
{
CacheDirectory = "${name}-unixd";
CacheDirectoryMode = "0700";
RuntimeDirectory = "${name}-unixd";
ExecStart = "${kanidm-package}/bin/kanidm_unixd";
User = "${user}-unixd";
Group = "${group}-unixd";
BindReadOnlyPaths = [
"-/etc/kanidm"
"-/etc/static/kanidm"
"-/etc/ssl"
"-/etc/static/ssl"
"-/etc/passwd"
"-/etc/group"
];
BindPaths = [
# socket
"/run/kanidm-unixd:/var/run/kanidm-unixd"
];
# Needs to connect to kanidmd
PrivateNetwork = lib.mkForce false;
RestrictAddressFamilies = ["AF_INET" "AF_INET6" "AF_UNIX"];
TemporaryFileSystem = "/:ro";
}
];
environment.RUST_LOG = serverSettings.log_level;
};
systemd.services.kanidm-unixd-tasks = {
description = "Kanidm PAM home management daemon";
wantedBy = ["multi-user.target"];
after = ["network.target" "kanidm-unixd.service"];
partOf = ["kanidm-unixd.service"];
restartTriggers = [unixdConfigFile clientConfigFile];
serviceConfig = {
ExecStart = "${kanidm-package}/bin/kanidm_unixd_tasks";
BindReadOnlyPaths = [
"/nix/store"
"-/etc/resolv.conf"
"-/etc/nsswitch.conf"
"-/etc/hosts"
"-/etc/localtime"
"-/etc/kanidm"
"-/etc/static/kanidm"
];
BindPaths = [
# To manage home directories
"/home"
# To connect to kanidm-unixd
"/run/kanidm-unixd:/var/run/kanidm-unixd"
];
# CAP_DAC_OVERRIDE is needed to ignore ownership of unixd socket
CapabilityBoundingSet = ["CAP_CHOWN" "CAP_FOWNER" "CAP_DAC_OVERRIDE" "CAP_DAC_READ_SEARCH"];
IPAddressDeny = "any";
# Need access to users
PrivateUsers = false;
# Need access to home directories
ProtectHome = false;
RestrictAddressFamilies = ["AF_UNIX"];
TemporaryFileSystem = "/:ro";
Restart = "on-failure";
};
environment.RUST_LOG = serverSettings.log_level;
};
environment.etc = {
"kanidm/server.toml".source = serverConfigFile;
"kanidm/config".source = clientConfigFile;
"kanidm/unixd".source = unixdConfigFile;
};
system.nssModules = [kanidm-package];
system.nssDatabases.group = [name];
system.nssDatabases.passwd = [name];
## environment.etc."kanidm/server.toml" = {
## mode = "0600";
## group = "kanidm";
## user = "kanidm";
## };
## environment.etc."kanidm/config" = {
## mode = "0600";
## group = "kanidm";
## user = "kanidm";
## };
services.caddy.virtualHosts."idm.h.lyte.dev" = {
extraConfig = ''reverse_proxy https://idm.h.lyte.dev:8443'';
};
@ -1752,7 +1938,7 @@ sudo nix run nixpkgs#ipmitool -- raw 0x30 0x30 0x02 0xff 0x00
virtualisation.oci-containers = {
containers.actual = {
image = "ghcr.io/actualbudget/actual-server:25.2.1";
image = "ghcr.io/actualbudget/actual-server:24.11.0";
autoStart = true;
ports = ["5006:5006"];
volumes = ["/storage/actual:/data"];
@ -1786,41 +1972,12 @@ sudo nix run nixpkgs#ipmitool -- raw 0x30 0x30 0x02 0xff 0x00
factorio-server-settings = {mode = "0777";};
};
}
({
pkgs,
config,
...
}: let
port = builtins.head config.services.conduwuit.settings.global.port;
sPort = toString port;
in {
sops.secrets.matrix-registration-token-file.mode = "0400";
services.conduwuit = {
enable = true;
settings = {
global = {
allow_check_for_updates = true;
allow_federation = false;
registration_token_file = config.sops.secrets.matrix-registration-token-file.path;
server_name = "lyte.dev";
};
};
};
services.caddy.virtualHosts."matrix.lyte.dev".extraConfig = ''
reverse_proxy /_matrix/* :${sPort}
reverse_proxy /_synapse/client/* :${sPort}
'';
services.caddy.virtualHosts."lyte.dev:8448".extraConfig = ''
reverse_proxy /_matrix/* :${sPort}
'';
# TODO: backups
# TODO: reverse proxy
})
];
/*
TODO: non-root processes and services that access secrets need to be part of
the 'keys' group
maybe this will fix plausible?
systemd.services.some-service = {
serviceConfig.SupplementaryGroups = [ config.users.groups.keys.name ];

View file

@ -109,15 +109,14 @@
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
monitor = [
# "DP-2,3840x2160@60,-2160x0,1,transform,3"
# "DP-3,3840x2160@120,${toString (builtins.ceil (2160 / 1.5))}x0,1"
"DP-3,3840x2160@120,0x0,1"
"DP-3,3840x2160@120,${toString (builtins.ceil (2160 / 1.5))}x0,1"
# TODO: HDR breaks screenshare?
/*
"DP-3,3840x2160@120,${toString (builtins.ceil (2160 / 1.5))}x0,1,bitdepth,10"
"desc:LG Display 0x0521,3840x2160@120,0x0,1"
"desc:Dell Inc. DELL U2720Q D3TM623,3840x2160@60,3840x0,1.5,transform,1"
*/
"DP-2,3840x2160@60,3840x0,1.5,transform,3"
"DP-1,3840x2160@60,0x0,1.5,transform,1"
];
input = {
force_no_accel = true;
@ -131,8 +130,8 @@
"5, monitor:DP-3, default:false"
"6, monitor:DP-3, default:false"
"7, monitor:DP-3, default:false"
"8, monitor:DP-2, default:true"
"9, monitor:DP-2, default:false"
"8, monitor:DP-1, default:true"
"9, monitor:DP-1, default:false"
];
};
};

View file

@ -176,15 +176,7 @@
loader = {
efi.canTouchEfiVariables = true;
systemd-boot = {
enable = true;
extraEntries = {
"arch.conf" = ''
title Arch
efi /efi/Arch/grubx64.efi
'';
};
};
systemd-boot.enable = true;
};
# NOTE(oninstall):
@ -197,7 +189,6 @@
kernelParams = [
"rtc_cmos.use_acpi_alarm=1"
"amdgpu.sg_display=0"
"boot.shell_on_fail=1"
"acpi_osi=\"!Windows 2020\""
# "nvme.noacpi=1" # maybe causing crashes upon waking?
@ -241,14 +232,14 @@
};
services.fprintd = {
enable = true;
enable = false;
package = pkgs.fprintd.overrideAttrs {
# Source: https://github.com/NixOS/nixpkgs/commit/87ca2dc071581aea0e691c730d6844f1beb07c9f
# mesonCheckFlags = [
# PAM related checks are timing out
# "--no-suite"
# "fprintd:TestPamFprintd"
# ];
mesonCheckFlags = [
# PAM related checks are timing out
"--no-suite"
"fprintd:TestPamFprintd"
];
};
};

View file

@ -47,23 +47,23 @@
ip = "192.168.0.9";
additionalHosts = [
".beefcake.lan"
"a.lyte.dev"
"atuin.h.lyte.dev"
"nix.h.lyte.dev"
"idm.h.lyte.dev"
"git.lyte.dev"
"video.lyte.dev"
"paperless.h.lyte.dev"
"audio.lyte.dev"
"a.lyte.dev"
"bw.lyte.dev"
"files.lyte.dev"
"finances.h.lyte.dev"
"git.lyte.dev"
"grafana.h.lyte.dev"
"idm.h.lyte.dev"
"matrix.lyte.dev"
"nextcloud.h.lyte.dev"
"nix.h.lyte.dev"
"onlyoffice.h.lyte.dev"
"paperless.h.lyte.dev"
"prometheus.h.lyte.dev"
"video.lyte.dev"
"vpn.h.lyte.dev"
"atuin.h.lyte.dev"
"grafana.h.lyte.dev"
"prometheus.h.lyte.dev"
"finances.h.lyte.dev"
"nextcloud.h.lyte.dev"
"onlyoffice.h.lyte.dev"
"a.lyte.dev"
];
};
};

View file

@ -75,61 +75,6 @@
};
home-manager.users.daniel = {
home = {
pointerCursor = {
size = 40;
};
};
programs.hyprlock.settings = {
label = [
{
monitor = "";
font_size = 32;
halign = "center";
valign = "center";
text_align = "center";
color = "rgba(255, 255, 255, 0.5)";
position = "0 -500";
font_family = "IosevkaLyteTerm";
text = "cmd[update:30000] acpi";
shadow_passes = 3;
shadow_size = 1;
shadow_color = "rgba(0, 0, 0, 1.0)";
shadow_boost = 1.0;
}
];
};
services.hypridle = let
secondsPerMinute = 60;
lockSeconds = 10 * secondsPerMinute;
in {
settings = {
listener = [
{
timeout = lockSeconds + 55;
on-timeout = ''systemctl suspend'';
}
];
};
};
wayland.windowManager.hyprland = {
settings = {
exec-once = [
"eww open bar0"
];
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
monitor = [
"eDP-1,2560x1440@60Hz,0x0,1.25"
];
};
};
wayland.windowManager.sway = {
config = {
output = {

View file

@ -1,9 +0,0 @@
{
"name": "com.8bit.bitwarden",
"description": "Bitwarden desktop <-> browser bridge",
"path": "@out@/bin/desktop_proxy",
"type": "stdio",
"allowed_extensions": [
"{446900e4-71c2-419f-a6a7-df9c091e268b}"
]
}

View file

@ -62,10 +62,9 @@ See [lib/internal.md](./lib/internal.md).
## Short Term
- gnome missing icons
- ghostty only notify if window or pane or w/e is not focused
- more-easily manage gitea repo mirroring to github?
- a.lyte.dev for web analytics is down
- router https://github.com/breakds/nixos-routers/blob/main/machines/welderhelper/router.nix
- a.lyte.dev for web analytics
- grafana and stuff for monitoring
- alerts?
- Broot config?

View file

@ -27,7 +27,6 @@ restic-rascal-passphrase: ENC[AES256_GCM,data:yonKbBh4riGwxc/qcj8F/qrgAtA1sWhYej
restic-rascal-ssh-private-key: ENC[AES256_GCM,data:ddsOs0XsayyQI9qc6LzwQpdDnfwNpbj8PbBJ5fyuqtlVNYndeLxaYcbZI2ULSUhgR1tN0FS+ggGTHQhVvjwksNvpskUGHNKkSLKH3D/mn5N9tsoeAblN4gZsloZdqXBVzEehumcQMdhh6iy6NkNbuinKrVKDhLV25PrFKuSBEYw9VHU7HAMW5Tfop3RzBXjZWETCDAR2OQa7d1dXsJ0Kw6b9RFmRe5MGQ0J7YhjdTg26JGMMVSeHvr5UbiUJkGA5RvOLEDM2Dfai7Lf8yRPZVxUl+rdRsNvNYEoYGu5rGLUFcuqIbQ+s40dP2uXwWauwkIvHUjEahkbP0httj4Kg3qIJBRPg7OuS+MOwAnLEAs3hl5zeBV396yA9qjWW8nhnbml58/uFFbfXbJWTM3r8cMpFbHKD+Ojo/99fm5Vy3pAMzNzEsHOaT+iyDYyNkV5OH1GyKK9n7kIRLdqmWe7GmaKXlwVvNUPi3RvLX9VXq83a4BuupFyTmaNfPGMs/17830aleV674+QVgKh3VyFtuJy6KBpMXDv16wFo,iv:S2I3h6pmKLxEc29E0zn2b8lscqA//5/ZMTV9q+/tdvs=,tag:ALeCT+nrVPDfS21xC555sA==,type:str]
restic-ssh-priv-key-benland: ENC[AES256_GCM,data:G+uiYZTvqXhpJb66j6Q6S+otlXeRX0CdYeMHzSMjIbvbI0AVm0yCU7COO5/O8i47NpvrKKS1kVxVEK8ixLRUowkl3hgRXhxsBIPFnpkMD0ENmJttm4HOpi0qIWMwzPYTjkz/slY4HcTFnCfYy1ZpURQdWwZsr1EdAA05bUMTtM22R3uOMzjO8uf72PCWX7yffo8MxsLmWvNVAOhVlrb2H5KQNR/IquFK3TFoZitq5nVDG9tcEFkX+lgA3zsmCHU/2DvvodgeRoltaAFvgjVznNGf4e5p8owHUtSzX52HwGZRiUlMuhpre2gm1r73n8AyZe41II+LX/85fMfZDdyayIGv3AAMBib8H0/AoChexRcdLQEmzOgRrXsgucDJrWSWP6WMBVyamUm79m5ep0fvL1lJftuJqN0uuq9dBrispdso4x+6jk/pDf5pEM/FE6s1rY832BEb7q0PnjyvVogOez+cIihmMpDdnS0A/8TFzg29i3C+93x5vrt3k7atNzR/jN+/GqX2FKLzxWrrIw2d,iv:IP+N8JQu+XRvwTtBnxu54ujzU5UliltXG3mk9HfJaN8=,tag:4oinE9QMaSh8IfUd/ttM3Q==,type:str]
paperless-superuser-password: ENC[AES256_GCM,data:lypWK73mOYI2hyQAW/4T3cDiVtsts3kKb7LZb9ES3n97Kn5l,iv:jBHUBFbb4GqQ3gnK0h5VCaGj3/kd3/eGa1QFiE7+B9I=,tag:UoQar+x1xVnCV2k+9hYjWA==,type:str]
matrix-registration-token-file: ENC[AES256_GCM,data:SthCOqjdMhdWK6mDaVcG3LSBsLEhNNpgwPQmdKDcQJJygTnkYwUY6RdD6Joxgxqscz8evJfogtw/iNFdocm/YEwn/0pvbAiC0GLxT0Ar3Rg6aXeedrbhHQ==,iv:fq4mmP14w7Y0+zNqSI58KZ5+6e4YHm2XhmE7zs0/SgE=,tag:Yu0prJTc3b+fpjK75GBVvA==,type:str]
factorio-server-settings: ENC[AES256_GCM,data:KlHkHGenkoLtqt0YCETwQdhH0tvvqsyake3lC9Wimso3Y8IXvDfkLpOTE53Jq4frf1QMJh0LYyle+AmIgGvB0gAp/4fM1E4Ah9JPtKkcjVPyQIypuaDsPaVQMxMlJt1+TLX2fbSWdxOo0lulNg==,iv:AHq37PY3ZxKF0+ClUrSvhJSBuXFtGZLBZW/ZADrVqLI=,tag:B0gFyy6rmd6CGJfzAhO02A==,type:str]
flanilla.env: ENC[AES256_GCM,data:qp0cpjHgpFx2gICtH8vNusJt08MLOIS3,iv:lugXNEJpMJ8mSwvo2jDwTwsY0x3kcHQDc29Z2Wz+LB4=,tag:0/FWQKUXePemFWGXbH1Tjg==,type:str]
sops:
@ -54,8 +53,8 @@ sops:
bGpacHFRSkJYUUMwOEh4cVBXZ1NESmsKa5EhZ7148ojCqZldukLcPLr93HqnpNgq
rMI0Nyz4Z4lkTVMRpA94zyNTkNwJ02/CYcKi8EJi6jGZnNPUTcnTwg==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2025-02-11T06:57:42Z"
mac: ENC[AES256_GCM,data:EtQKfdiE0NLZaFCZ8BIsGY6zhBU5YTVOju9HFPSrJ1DAyLj/T0izWtQKUTxYtzFSY+9CTptH5RTB3+z0RrC4zs+nBp44CWfQC5GB4odgd5U797YTuC4O5jngDWWemRjf2jD/HEngznSqjHzCNuGzNCx16eYHuebSQOiQGwhTeoc=,iv:qi6UBV7u1JTyFB3Rm0DeJA6ZcbigEqW39FhrcGfspmw=,tag:ADA24OcFSUK8Q/Gp2PUTLA==,type:str]
lastmodified: "2024-12-26T16:42:22Z"
mac: ENC[AES256_GCM,data:COh57637D7BnYa2ke+SsGnRuyWmS3X6xDJNV0ATWEHqKjckZ2tqyfL1ugGuokmqilIsRcXi2q5sqCd8uNrWZLicZ/6eQ5w7CqoFU8OEON6ERibQ36X0oLsz9teuT+bx9ZMfzYOKh0LZY0XP9es7W+4PC3XiBJcIB2GWTTrrGaI4=,iv:aeBvVjC7Qn/ohYmpC6lvcve0bMSBsvfRSa1kyiyj0Rg=,tag:hld5rkOq5mfcGFShKuKgng==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.9.2
version: 3.9.1

View file

@ -8,20 +8,20 @@ sops:
- recipient: age1stdue5q5teskee057ced6rh9pzzr93xsy66w4sc3zu49rgxl7cjshztt45
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA1RW5FaXYrSWxUQ1BQa0xl
eU9GSGNqVitqeTcvOHRwTTBSSG13cEZHTUNJCjVYT2JpaGxrU2VBS3hPOWtJemlR
S1hHck1qczhlTytWV3ZkdnE0aWVhT1UKLS0tIEoyWXczU3FmMXZiQkRJZEUwV0lV
YldzL212ZlVaUStXcWRIN1lVMXVjd1UKqcfnuSxm19ClrxaH8koodgI3ZBlzKNWa
fR/jUQMOGike43A383AprwnW7Y6ReLUOfixW2mMteT/ofEJeohEhEA==
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBlSFVjMEhNUEF5Q1ZWRmRB
cUQvQ0JYY2ZzNndPeVN4UTNhTUxZVzBvc3hBCkcwNHUyeEhMZFFHU3RIQWlONTRT
dUhlZUlHRjJQeGZwRk9td1FSZzZtR0kKLS0tIHphbVpncE9HLys2bWJicUtmU2Fp
b05GOEpRVURQYnJSZzhhalp3TW1kbHMKk/z68IP6WMZV+PbjJvM2EWhacJZoLMj3
iSGt5TqerVUOrQT00+Gx3laImdismLp9CjulEl82QyaYpmUvVYkEMA==
-----END AGE ENCRYPTED FILE-----
- recipient: age14ewl97x5g52ajf269cmmwzrgf22m9dsr7mw7czfa356qugvf4gvq5dttfv
- recipient: age12x49p3mwf27r9gdkfmfqu7lr6gwcwznlhcvcgmv8dz3gac2mkdgsp36y9p
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBuNlkzNXZDWUY0VmtOTlBz
U2dmaWlJcFo3czJjUm8yYzRFTEJzNzdBc1ZZCjg4OUdzN0QvLzFONXhmL3pYVll0
Ym1RNHovNWF5WENMM3FXckliT3hRL1kKLS0tIGNLaG9hY25zOThrZDJCV05nbENx
UWpwTSs2L1NIYXpZYkpDWjNWbWVQWlkKUIwLyA1EzSbJj9MJsBQ5f0bJawtbXQHT
21TIp1Ki3juXLvsz0n7Pl+r2/lF907HpriDI7zWK+I/iviTpw+TwTA==
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB6eW9QekJRTzlNWHVvK3hD
b0ZTWDdWY2RiZTBwZEZMcnpEMjlydkJrOGlrCldxZFhHcjlGRVRYNVJEc0R4Y1BZ
TldMNW81a2VjMm5SWHhHNFRVMWlFQTgKLS0tIEIycWtsT3pEbVZIc2FvZGpsbENz
MENZdE13U2J0eWtoOHJSbEJ3TVFUS2sK23t+MAjYfBI1j7B97mU0akq8zuRh7pOv
admjZR86rxMqs/Guj+nKhQ2pn/JeozlPOvwiaxD9eIVJBtIQK2my4A==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-09-14T12:41:15Z"
mac: ENC[AES256_GCM,data:sO3omCYH1urB/qcW3VippCinCUO1cmp5KrUSQk5ms7k+i9xUhdL3tTYHGVTa4PHV6VluukKnHuwAijo+rneNdCeMdIkAEskk/X6SDYgkwmjXuNcNEA4la22EqSrenJ8W3UafHDvP8+vpUKAzVo0E82Vmo9/YNJaqvqQM8PtciSc=,iv:2GboNZpAezZsWK3CbcwVw40zW4CucP3JhsYlvZ/Hy2M=,tag:w3XmkN76oYV+PmliPB01MQ==,type:str]

View file

@ -1,4 +1,3 @@
/target
/result
/.direnv
/.pre-commit-config.yaml

View file

@ -3,12 +3,12 @@
inputs.git-hooks.url = "github:cachix/git-hooks.nix";
inputs.git-hooks.inputs.nixpkgs.follows = "nixpkgs";
outputs = inputs: let
inherit (import nix/boilerplate.nix inputs) call genPkgs;
inherit (import nix/boilerplate.nix inputs) fullImport genPkgs;
in {
# overlays = import nix/overlays.nix;
checks = call (import nix/checks.nix);
packages = call (import nix/packages.nix);
devShells = call (import nix/shells.nix);
checks = fullImport nix/checks.nix;
packages = fullImport nix/packages.nix;
devShells = fullImport nix/shells.nix;
formatter = genPkgs (p: p.alejandra);
};
}

View file

@ -4,7 +4,7 @@ inputs @ {
...
}: let
forSelfOverlay =
if builtins.hasAttr "overlays" self && builtins.hasAttr "forSelf" self.overlays
if builtins.hasAttr "forSelf" self.overlays
then self.overlays.forSelf
else (_: p: p);
in rec {

View file

@ -1,6 +1,6 @@
{pkgs, ...}: rec {
my-package = pkgs.rustPlatform.buildRustPackage {
pname = "my-binary";
lyrs = pkgs.rustPlatform.buildRustPackage {
pname = "lyrs";
version = "0.1.0";
/*
@ -15,8 +15,38 @@
src = ./..;
hash = pkgs.lib.fakeHash;
cargoHash = pkgs.lib.fakeHash;
cargoHash = "sha256-XHCXOlG4sdr1A3lqIK/7bB3soms1jxMIdfsFABmHVog=";
};
default = my-package;
pwatch = pkgs.writeShellScriptBin "pwatch" ''
dir="$(dirname "$(cargo locate-project --workspace --message-format plain)")"
pushd "$dir"
additional_watchexec_args=""
if [[ -f apps/$pkg/build.rs ]]; then
additional_watchexec_args="--watch apps/$pkg/build.rs"
fi
pkg="$1"; shift
cargo_subcmd="$1"; shift
cargo_subcmd_args="$@"; shift
argfile="apps/$pkg/.watchexec.argfile"
argfile_args=""
if [[ -f $argfile ]]; then
argfile_args="@$argfile"
fi
watchexec $argfile_args --stop-timeout 0s --restart \
--watch Cargo.toml \
--watch libs \
--watch apps/$pkg/src/ \
--watch apps/$pkg/Cargo.toml \
$additional_watchexec_args \
cargo "$cargo_subcmd" --package "$pkg" "$cargo_subcmd_args"
popd
'';
default = lyrs;
}

View file

@ -5,9 +5,9 @@
}: let
inherit (pkgs) system;
in rec {
my-package-dev = pkgs.mkShell {
lyrs-dev = pkgs.mkShell {
inherit (self.checks.${system}.git-hooks) shellHook;
inputsFrom = [self.packages.${system}.my-package];
inputsFrom = [self.packages.${system}.lyrs];
packages = with pkgs; [
convco
rustPackages.clippy
@ -18,5 +18,5 @@ in rec {
lldb
];
};
default = my-package-dev;
default = lyrs-dev;
}