1
0
mirror of https://github.com/kmein/niveum synced 2026-03-21 20:31:07 +01:00

68 Commits

Author SHA1 Message Date
b274a59a50 niri: add shortcut to float windows 2025-08-26 08:29:09 +02:00
b4de03bb3c replace more instances of rofi by wofi 2025-08-26 08:28:56 +02:00
b0062abbfe passmenu: fix 2025-08-26 07:50:31 +02:00
0e9a046c5f obsidian-vim: add fugitive 2025-08-26 07:50:24 +02:00
72ab319e65 niri: set window rules 2025-08-26 07:50:06 +02:00
f08e43067b configure niri 2025-08-26 07:19:54 +02:00
d0ac0af7c3 use wl-clipboard 2025-08-26 07:19:17 +02:00
5febabb7fa use wofi 2025-07-11 11:37:23 +02:00
44d29f90e9 working niri config 2025-07-10 06:51:51 +02:00
1aaf0fe5ae configure wayland for kabsa 2025-07-09 09:23:41 +02:00
e8e165ff03 hledger: disable remote auto-sync 2025-07-05 10:41:02 +02:00
5175bd5f4a simplescreenrecorder 2025-07-05 10:40:51 +02:00
874c502094 brave 2025-07-05 10:40:43 +02:00
4490c0a97c Merge remote-tracking branch 'origin/update_flake_lock_action' 2025-06-22 08:07:49 +02:00
github-actions[bot]
8e76899b40 flake.lock: Update
Flake lock file updates:

• Updated input 'agenix':
    'github:ryantm/agenix/4835b1dc898959d8547a871ef484930675cb47f1?narHash=sha256-NwmAFuDUO/PFcgaGGr4j3ozG9Pe5hZ/ogitWhY%2BD81k%3D' (2025-05-18)
  → 'github:ryantm/agenix/531beac616433bac6f9e2a19feb8e99a22a66baf?narHash=sha256-9P1FziAwl5%2B3edkfFcr5HeGtQUtrSdk/MksX39GieoA%3D' (2025-06-17)
• Updated input 'home-manager':
    'github:nix-community/home-manager/282e1e029cb6ab4811114fc85110613d72771dea?narHash=sha256-RMhjnPKWtCoIIHiuR9QKD7xfsKb3agxzMfJY8V9MOew%3D' (2025-05-31)
  → 'github:nix-community/home-manager/7aae0ee71a17b19708b93b3ed448a1a0952bf111?narHash=sha256-gjN3j7joRvT3a8Zgcylnd4NFsnXeDBumqiu4HmY1RIg%3D' (2025-06-05)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/a59eb7800787c926045d51b70982ae285faa2346?narHash=sha256-q8jG2HJWgooWa9H0iatZqBPF3bp0504e05MevFmnFLY%3D' (2025-05-31)
  → 'github:NixOS/nixpkgs/b2485d56967598da068b5a6946dadda8bfcbcd37?narHash=sha256-3vkjFnxCOP6vm5Pm13wC/Zy6/VYgei/I/2DWgW4RFeA%3D' (2025-06-20)
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/3603bcb66c0a5d4529370510bd6529d34107d63a?narHash=sha256-Ea5JtjFUoTpMJGnbXmXirk8dDdVIWmDp0o%2BeQDc9vzs%3D' (2025-06-02)
  → 'github:NixOS/nixpkgs/ba476a871a35075644c3340b3651101ddf77ee0d?narHash=sha256-zgPnxYqkf/CEl5m/lx02D%2BFaLWPRUM/RLo/qekTuu8Q%3D' (2025-06-22)
• Updated input 'nur':
    'github:nix-community/NUR/7995f4bde30d1dc463f7d39a5118709e19d8e608?narHash=sha256-sBG2NR%2BtB1y4xMYguJT2IsTV2mf8PzWRoz2gScUFHg8%3D' (2025-06-02)
  → 'github:nix-community/NUR/8d68e170fd6f9e8b8921db79419c209a1aeabc36?narHash=sha256-rtItxhQM%2BZkd2ys/lT2MoXCUVEhyj51Em5o9Wd6qqGU%3D' (2025-06-22)
• Updated input 'nur/nixpkgs':
    'github:nixos/nixpkgs/910796cabe436259a29a72e8d3f5e180fc6dfacc?narHash=sha256-StSrWhklmDuXT93yc3GrTlb0cKSS0agTAxMGjLKAsY8%3D' (2025-05-31)
  → 'github:nixos/nixpkgs/08f22084e6085d19bcfb4be30d1ca76ecb96fe54?narHash=sha256-XE/lFNhz5lsriMm/yjXkvSZz5DfvKJLUjsS6pP8EC50%3D' (2025-06-19)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/7ec2ea005b600dac9436a7c5c6b66d960cbfcea2?narHash=sha256-TQSaFa1wWJr6GOs%2BK8lecK4AKKr8k6mwxHIPCOmVkgs%3D' (2025-06-02)
  → 'github:oxalica/rust-overlay/3d7d4c4e284f26d6dc4840491c66884912be0062?narHash=sha256-wiW2j63MyGQyyijRF25hf7Ab7vx4G8pCiGjUe3OGV4c%3D' (2025-06-21)
• Updated input 'stylix':
    'github:danth/stylix/2ccc6cbd33b3d9c52b6f6c096a66880a52f37933?narHash=sha256-kG45D1iaM8j///luopldYoVBd4L%2B41YscY8PjwLtcZM%3D' (2025-06-02)
  → 'github:danth/stylix/cc82dae884f45ffeb996d2b5116afa70933e507f?narHash=sha256-Yblt2LusglzBXlg%2BekckztIUgvl1WQwJ7gLRJEt/IHE%3D' (2025-06-19)
2025-06-22 01:12:22 +00:00
8617c8e982 add portfolio-performance 2025-06-10 09:16:01 +02:00
0025d82cd8 literature-quote: fix selection with xan 2025-06-09 11:34:19 +02:00
03c0e49572 mahlzeit: disable 2025-06-05 13:01:53 +02:00
7c3c13abb8 anubis: weigh the souls of the AI scrapers 2025-06-03 21:06:53 +02:00
f954e867dc tlg-wotd: update cltk 2025-06-03 20:08:04 +02:00
67f682aa88 radio-news: package 2025-06-03 20:07:49 +02:00
0ceecf4c14 ci: disable kibbeh 2025-06-03 15:21:38 +02:00
6fdac40832 24.11 → 25.05 2025-06-03 14:55:09 +02:00
2ba3c05e4a radio-news: good news only 2025-05-28 09:32:26 +02:00
6ab7e96894 wallabag: init 2025-05-28 09:31:50 +02:00
ddd759a838 ssh: kibbeh -> kabsa 2025-05-21 10:51:05 +02:00
5244ae3850 fu-vpn: include xauthority setup 2025-05-21 10:50:38 +02:00
b90aa5ef07 fu-vpn: use sudo 2025-05-21 10:46:43 +02:00
d52c10bc84 format 2025-05-21 10:46:32 +02:00
a6bc317141 i3status-rust: display all batteries with remaining time 2025-05-21 10:46:18 +02:00
d4ee3cf692 heavily simplify dashboard 2025-05-21 10:45:45 +02:00
c96ac804df reinstate kabsa 2025-05-21 07:43:52 +02:00
4af218f7ad radio-news: send earlier 2025-05-16 14:03:42 +02:00
b08576c972 radio-news: expire earlier 2025-05-16 10:08:30 +02:00
44cb0bf8a5 remock secrets 2025-05-14 16:39:04 +02:00
4c9305c89d init brainmelter 2025-05-14 06:57:06 +02:00
8c838966f2 radio news: automatically post digest 2025-05-13 20:22:42 +02:00
6ffb80322b radio news digest 2025-05-13 19:51:43 +02:00
6e1bbb878a update 2025-05-10 22:08:32 +02:00
4a1abf06f6 pls: more musical criticism 2025-05-07 10:54:17 +02:00
e9a6a482ee install packages for photography 2025-05-07 09:14:53 +02:00
3bdf539540 neovim: set colorscheme light 2025-04-28 13:17:38 +02:00
f053f6292d update 2025-04-28 13:10:56 +02:00
e350eac5c7 librsvg 2025-04-28 11:00:09 +02:00
046f2ca75d systemd-tmpfiles-clean: enable for user 2025-04-15 14:22:28 +02:00
6fcba6dc75 ssh: kabsa -> kibbeh 2025-03-31 10:20:09 +02:00
3750b6c131 update 2025-03-30 22:35:46 +02:00
4046339f5b get ready for VPNing to germany 2025-03-21 09:07:43 +01:00
da224a0e4b stylix: spring has begun 2025-03-21 09:07:29 +01:00
60a73a81be ssh: add travel laptop public key 2025-03-16 08:56:18 +01:00
889eb1d5c2 yta: download best quality opus 2025-03-16 08:56:07 +01:00
github-actions[bot]
e34b3e02b3 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/1546c45c538633ae40b93e2d14e0bb6fd8f13347?narHash=sha256-F0qDu2egq18M3edJwEOAE%2BD%2BVQ%2ByESK6YWPRQBfOqq8%3D' (2025-03-02)
  → 'github:NixOS/nixpkgs/cdd2ef009676ac92b715ff26630164bb88fec4e0?narHash=sha256-prZ0M8vE/ghRGGZcflvxCu40ObKaB%2Bikn74/xQoNrGQ%3D' (2025-03-13)
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/4f8cf457154521f90d60ed0b785774a728842875?narHash=sha256-ADrsBEvcCGQEZWrkmUES6PpoqSKXVlrHhteHT6Sbr2o%3D' (2025-03-04)
  → 'github:NixOS/nixpkgs/1a4711b6be669d31f21b417a7f8b60801367dfee?narHash=sha256-03bPiYMWpguzc4JwAGoD7j2GEi1K2k9wrNbfoaFrYg4%3D' (2025-03-16)
• Updated input 'nur':
    'github:nix-community/NUR/8cf34376717c39b3f8ed2d28091ff2a2455b3ab8?narHash=sha256-SN5pa746g3yeOBaouHZU1RCS2ZtUFKWpZtDG86xgSig%3D' (2025-03-04)
  → 'github:nix-community/NUR/cbd6b0ec3da4afb2e45f3275af8cb9f1dc718534?narHash=sha256-ylgdokg/pY5a2GPddDGGNR8MA0MOYStuxjwn8AnPDbk%3D' (2025-03-15)
• Updated input 'nur/nixpkgs':
    'github:nixos/nixpkgs/ba487dbc9d04e0634c64e3b1f0d25839a0a68246?narHash=sha256-WZNlK/KX7Sni0RyqLSqLPbK8k08Kq7H7RijPJbq9KHM%3D' (2025-03-03)
  → 'github:nixos/nixpkgs/6607cf789e541e7873d40d3a8f7815ea92204f32?narHash=sha256-cPfs8qMccim2RBgtKGF%2Bx9IBCduRvd/N5F4nYpU0TVE%3D' (2025-03-13)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/aefb7017d710f150970299685e8d8b549d653649?narHash=sha256-52vwEV0oS2lCnx3c/alOFGglujZTLmObit7K8VblnS8%3D' (2025-03-04)
  → 'github:oxalica/rust-overlay/028cd247a6375f83b94adc33d83676480fc9c294?narHash=sha256-6wuOGWkyW6R4A6Th9NMi6WK2jjddvZt7V2%2BrLPk6L3o%3D' (2025-03-15)
• Updated input 'stylix':
    'github:danth/stylix/aaa2eb8956770c096f9c46fb163bb26602e20e56?narHash=sha256-QRlcA8rtfNdyKpBE%2BptjiB9717Tzum4/sKBSbsyqL6k%3D' (2025-02-25)
  → 'github:danth/stylix/9bfc74f330ead111e8ea354b2220a431b0cfaa26?narHash=sha256-utsgC6H3ja6sLAXMd8//I2D7yjyScFqVDRX0wpbqPZo%3D' (2025-03-14)
• Updated input 'stylix/firefox-gnome-theme':
    'github:rafaelmardojai/firefox-gnome-theme/a89108e6272426f4eddd93ba17d0ea101c34fb21?narHash=sha256-vAxN2f3rvl5q62gQQjZGVSvF93nAsOxntuFz%2Be/655w%3D' (2025-02-10)
  → 'github:rafaelmardojai/firefox-gnome-theme/5a81d390bb64afd4e81221749ec4bffcbeb5fa80?narHash=sha256-RsvHGNTmO2e/eVfgYK7g%2BeYEdwwh7SbZa%2BgZkT24MEA%3D' (2025-03-10)
• Updated input 'stylix/git-hooks':
    'github:cachix/git-hooks.nix/9364dc02281ce2d37a1f55b6e51f7c0f65a75f17?narHash=sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg%3D' (2025-01-21)
  → 'github:cachix/git-hooks.nix/b5a62751225b2f62ff3147d0a334055ebadcd5cc?narHash=sha256-srpAbmJapkaqGRE3ytf3bj4XshspVR5964OX5LfjDWc%3D' (2025-03-07)
• Updated input 'stylix/tinted-tmux':
    'github:tinted-theming/tinted-tmux/b6c7f46c8718cc484f2db8b485b06e2a98304cd0?narHash=sha256-/etfUV3HzAaLW3RSJVwUaW8ULbMn3v6wbTlXSKbcoWQ%3D' (2025-02-23)
  → 'github:tinted-theming/tinted-tmux/d48ee86394cbe45b112ba23ab63e33656090edb4?narHash=sha256-zWcCXgdC4/owfH/eEXx26y5BLzTrefjtSLFHWVD5KxU%3D' (2025-03-02)
• Updated input 'voidrice':
    'github:Lukesmithxyz/voidrice/59632a5668f1af956ec325f8d8455d312727b8a8?narHash=sha256-y80KJjdbvko53yK6AvxVrmU/yYnyYQxTT6FZOXhCDVk%3D' (2025-03-02)
  → 'github:Lukesmithxyz/voidrice/5f385da9f686ffb9ab61c194a46539cbe53357ea?narHash=sha256-ZoEyircvifmAH7QqDpdDxhaHMdAfWtjZB6JiSvMBRVg%3D' (2025-03-09)
2025-03-16 01:03:16 +00:00
d7f01e0a5e manakish: switch to network manager 2025-03-05 14:28:05 +01:00
6ea3629f77 mycelium: add manakish 2025-03-05 14:27:51 +01:00
b010f7e7cc kibbeh: unify locale 2025-03-05 10:05:13 +01:00
0b60f953b7 mycelium host aliases for all 2025-03-05 10:05:13 +01:00
d64ce2036a ci: apt-get update 2025-03-05 10:05:13 +01:00
ebe3997beb init mycelium 2025-03-05 10:05:13 +01:00
1b23814dc3 update 2025-03-04 20:37:09 +01:00
df35d1d935 flake: change retiolum to stockholm mirror 2025-02-26 10:13:28 +01:00
b01c289a26 kibbeh: install tmux 2025-02-26 10:06:44 +01:00
dafa3229bb kibbeh: install telegram 2025-02-13 19:14:55 +01:00
dee784472f mock secrets 2025-02-11 21:18:14 +01:00
295f8257e3 kibbeh: configure 2025-02-11 21:04:02 +01:00
5adc8309f2 init kibbeh (ex-kabsa) 2025-02-11 15:51:06 +01:00
cd58ea209e fonts+keyboards: add syriac 2025-02-10 11:35:38 +01:00
0ae493a0f5 nil: add nixfmt as formatter 2025-02-07 15:45:51 +01:00
c0f6fc1121 aerc: add letos, remove fysi, fix cock 2025-02-07 13:02:01 +01:00
59 changed files with 1989 additions and 435 deletions

View File

@@ -11,7 +11,9 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Install QEMU (ARM) - name: Install QEMU (ARM)
run: sudo apt-get install -y qemu-user-static run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
if: ${{ matrix.system == 'ful' }} if: ${{ matrix.system == 'ful' }}
- name: Install Nix (ARM) - name: Install Nix (ARM)
uses: cachix/install-nix-action@v16 uses: cachix/install-nix-action@v16

View File

@@ -15,6 +15,7 @@ in {
pkgs.unzip pkgs.unzip
pkgs.unrar pkgs.unrar
pkgs.p7zip pkgs.p7zip
pkgs.sshuttle
pkgs.zip pkgs.zip
# MONITORS # MONITORS
pkgs.iftop # interface bandwidth monitor pkgs.iftop # interface bandwidth monitor
@@ -52,6 +53,22 @@ in {
pkgs.psmisc # for killall, pstree pkgs.psmisc # for killall, pstree
]; ];
security.wrappers = {
pmount = {
setuid = true;
owner = "root";
group = "root";
source = "${pkgs.pmount}/bin/pmount";
};
pumount = {
setuid = true;
owner = "root";
group = "root";
source = "${pkgs.pmount}/bin/pumount";
};
};
environment.shellAliases = let environment.shellAliases = let
take = pkgs.writers.writeDash "take" '' take = pkgs.writers.writeDash "take" ''
mkdir "$1" && cd "$1" mkdir "$1" && cd "$1"

View File

@@ -14,6 +14,12 @@ in {
group = config.users.users.me.group; group = config.users.users.me.group;
mode = "400"; mode = "400";
}; };
email-password-letos = {
file = ../secrets/email-password-letos.age;
owner = config.users.users.me.name;
group = config.users.users.me.group;
mode = "400";
};
email-password-posteo = { email-password-posteo = {
file = ../secrets/email-password-posteo.age; file = ../secrets/email-password-posteo.age;
owner = config.users.users.me.name; owner = config.users.users.me.name;
@@ -79,9 +85,24 @@ in {
address = "2210@cock.li"; address = "2210@cock.li";
userName = address; userName = address;
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-cock.path}"; passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-cock.path}";
realName = ""; realName = "2210";
imap.host = "mail.cock.li"; imap.host = "mail.cock.li";
imap.port = 993;
smtp.host = imap.host; smtp.host = imap.host;
smtp.port = 25;
smtp.tls.useStartTls = true;
};
letos =
lib.recursiveUpdate defaults
{
userName = "slfletos";
address = "letos.sprachlit@hu-berlin.de";
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-letos.path}";
imap.host = "mailbox.cms.hu-berlin.de";
imap.port = 993;
smtp.host = "mailhost.cms.hu-berlin.de";
smtp.port = 25;
smtp.tls.useStartTls = true;
}; };
posteo = posteo =
lib.recursiveUpdate defaults lib.recursiveUpdate defaults

View File

@@ -1,58 +1,8 @@
{ {
pkgs, pkgs,
lib, lib,
config,
... ...
}: let }: let
alacritty-cfg = theme:
(pkgs.formats.yaml {}).generate "alacritty.yml" {
bell = {
animation = "EaseOut";
duration = 100;
color = "#ffffff";
};
font = {
normal.family = "Monospace";
size = 6;
};
live_config_reload = true;
key_bindings = [
{
key = "Plus";
mods = "Control";
action = "IncreaseFontSize";
}
{
key = "Minus";
mods = "Control";
action = "DecreaseFontSize";
}
{
key = "Key0";
mods = "Control";
action = "ResetFontSize";
}
];
colors = let
colourNames = ["black" "red" "green" "yellow" "blue" "magenta" "cyan" "white"];
colourPairs = lib.getAttrs colourNames theme;
in {
primary = {inherit (theme) background foreground;};
cursor = {inherit (theme) cursor;};
normal = lib.mapAttrs (_: colour: colour.dark) colourPairs;
bright = lib.mapAttrs (_: colour: colour.bright) colourPairs;
};
};
alacritty-pkg = pkgs.symlinkJoin {
name = "alacritty";
paths = [
(pkgs.writers.writeDashBin "alacritty" ''
${pkgs.alacritty}/bin/alacritty --config-file /var/theme/config/alacritty.yml msg create-window "$@" ||
${pkgs.alacritty}/bin/alacritty --config-file /var/theme/config/alacritty.yml "$@"
'')
pkgs.alacritty
];
};
in { in {
environment.variables.TERMINAL = "alacritty"; environment.variables.TERMINAL = "alacritty";

View File

@@ -7,10 +7,4 @@
}; };
environment.systemPackages = [ pkgs.bluetuith ]; environment.systemPackages = [ pkgs.bluetuith ];
# services.blueman.enable = true;
# environment.systemPackages = [pkgs.blueman];
# home-manager.users.me = {services.blueman-applet.enable = true;};
} }

View File

@@ -44,7 +44,7 @@ in {
transliteration=$(${pkgs.writers.makePythonWriter pkgs.python311 pkgs.python311Packages pkgs.python3Packages "translit.py" { transliteration=$(${pkgs.writers.makePythonWriter pkgs.python311 pkgs.python311Packages pkgs.python3Packages "translit.py" {
# revert to pkgs.writers.writePython3 once https://github.com/NixOS/nixpkgs/pull/353367 is merged # revert to pkgs.writers.writePython3 once https://github.com/NixOS/nixpkgs/pull/353367 is merged
libraries = [ pkgs.python311Packages.cltk ]; libraries = [ pkgs.python3Packages.cltk ];
} '' } ''
import sys import sys
from cltk.phonology.grc.transcription import Transcriber from cltk.phonology.grc.transcription import Transcriber

View File

@@ -8,6 +8,7 @@
niveumPackages.cro niveumPackages.cro
pkgs.tor-browser-bundle-bin pkgs.tor-browser-bundle-bin
pkgs.firefox pkgs.firefox
pkgs.brave
]; ];
home-manager.users.me = { home-manager.users.me = {

View File

@@ -6,6 +6,16 @@
}: let }: let
inherit (import ../lib) tmpfilesConfig; inherit (import ../lib) tmpfilesConfig;
in { in {
systemd.user.services.systemd-tmpfiles-clean = {
enable = true;
wantedBy = [ "default.target" ];
startAt = "daily";
script = "systemd-tmpfiles --user --clean";
serviceConfig = {
Type = "oneshot";
};
};
systemd.user.tmpfiles.users.me.rules = map tmpfilesConfig [ systemd.user.tmpfiles.users.me.rules = map tmpfilesConfig [
{ {
type = "d"; type = "d";

View File

@@ -6,23 +6,25 @@
unstablePackages, unstablePackages,
inputs, inputs,
... ...
}: let }:
let
inherit (lib.strings) makeBinPath; inherit (lib.strings) makeBinPath;
inherit (import ../lib) localAddresses kieran remoteDir; inherit (import ../lib) localAddresses kieran remoteDir;
defaultApplications = (import ../lib).defaultApplications {inherit pkgs;}; defaultApplications = (import ../lib).defaultApplications { inherit pkgs; };
in { in
{
imports = [ imports = [
inputs.self.nixosModules.system-dependent inputs.self.nixosModules.system-dependent
inputs.self.nixosModules.power-action inputs.self.nixosModules.power-action
{ {
boot.supportedFilesystems = ["ntfs"]; boot.supportedFilesystems = [ "ntfs" ];
} }
{ {
nixpkgs = { nixpkgs = {
config = { config = {
allowUnfree = true; allowUnfree = true;
packageOverrides = pkgs: { packageOverrides = pkgs: {
dmenu = pkgs.writers.writeDashBin "dmenu" ''exec ${pkgs.rofi}/bin/rofi -dmenu "$@"''; dmenu = pkgs.writers.writeDashBin "dmenu" ''exec ${pkgs.wofi}/bin/wofi -dmenu "$@"'';
}; };
permittedInsecurePackages = [ permittedInsecurePackages = [
"qtwebkit-5.212.0-alpha4" "qtwebkit-5.212.0-alpha4"
@@ -74,7 +76,10 @@ in {
hashedPasswordFile = config.age.secrets.kfm-password.path; hashedPasswordFile = config.age.secrets.kfm-password.path;
isNormalUser = true; isNormalUser = true;
uid = 1000; uid = 1000;
extraGroups = ["pipewire" "audio"]; extraGroups = [
"pipewire"
"audio"
];
}; };
nix.settings.trusted-users = [ config.users.users.me.name ]; nix.settings.trusted-users = [ config.users.users.me.name ];
@@ -87,25 +92,27 @@ in {
} }
{ {
environment.interactiveShellInit = "export PATH=$PATH"; environment.interactiveShellInit = "export PATH=$PATH";
environment.shellAliases = let environment.shellAliases =
swallow = command: "${niveumPackages.swallow}/bin/swallow ${command}"; let
in { swallow = command: "${niveumPackages.swallow}/bin/swallow ${command}";
o = "${pkgs.xdg-utils}/bin/xdg-open"; in
ns = "nix-shell --run zsh"; {
pbcopy = "${pkgs.xclip}/bin/xclip -selection clipboard -in"; o = "${pkgs.xdg-utils}/bin/xdg-open";
pbpaste = "${pkgs.xclip}/bin/xclip -selection clipboard -out"; ns = "nix-shell --run zsh";
tmux = "${pkgs.tmux}/bin/tmux -2"; pbcopy = "${pkgs.wl-clipboard}/bin/wl-copy";
sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv"; pbpaste = "${pkgs.wl-clipboard}/bin/wl-paste";
zathura = swallow "${pkgs.zathura}/bin/zathura"; tmux = "${pkgs.tmux}/bin/tmux -2";
im = "${pkgs.openssh}/bin/ssh weechat@makanek -t tmux attach-session -t IM"; sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv";
yt = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -ic"; # Download video link zathura = swallow "${pkgs.zathura}/bin/zathura";
yta = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -xic"; # Download with audio im = "${pkgs.openssh}/bin/ssh weechat@makanek -t tmux attach-session -t IM";
}; yt = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -ic"; # Download video link
yta = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata --audio-format opus --audio-quality 0 -xic"; # Download with audio
};
} }
{ {
i18n = { i18n = {
defaultLocale = "en_DK.UTF-8"; defaultLocale = "en_DK.UTF-8";
supportedLocales = ["all"]; supportedLocales = [ "all" ];
}; };
} }
{ {
@@ -121,28 +128,18 @@ in {
enable = true; enable = true;
greeters.gtk = { greeters.gtk = {
enable = true; enable = true;
indicators = ["~spacer" "~host" "~spacer" "~session" "~power"]; indicators = [
"~spacer"
"~host"
"~spacer"
"~session"
"~power"
];
}; };
}; };
}; };
} }
{ { programs.command-not-found.enable = true; }
security.wrappers = {
pmount = {
setuid = true;
owner = "root";
group = "root";
source = "${pkgs.pmount}/bin/pmount";
};
pumount = {
setuid = true;
owner = "root";
group = "root";
source = "${pkgs.pmount}/bin/pumount";
};
};
}
{programs.command-not-found.enable = true;}
{ {
programs.gnupg = { programs.gnupg = {
agent = { agent = {
@@ -157,7 +154,11 @@ in {
environment.systemPackages = [ environment.systemPackages = [
pkgs.gnupg pkgs.gnupg
(pkgs.pass.withExtensions (e: [e.pass-otp e.pass-import e.pass-genphrase])) (pkgs.pass.withExtensions (e: [
e.pass-otp
e.pass-import
e.pass-genphrase
]))
]; ];
} }
{ {
@@ -170,12 +171,10 @@ in {
}; };
} }
{ {
networking.hosts = networking.hosts = lib.mapAttrs' (name: address: {
lib.mapAttrs' (name: address: { name = address;
name = address; value = [ "${name}.local" ];
value = ["${name}.local"]; }) localAddresses;
})
localAddresses;
} }
{ {
home-manager.users.me.home.stateVersion = "22.05"; home-manager.users.me.home.stateVersion = "22.05";
@@ -183,9 +182,9 @@ in {
} }
{ {
systemd.user.services.udiskie = { systemd.user.services.udiskie = {
after = ["udisks2.service"]; after = [ "udisks2.service" ];
wants = ["udisks2.service"]; wants = [ "udisks2.service" ];
wantedBy = ["graphical-session.target"]; wantedBy = [ "graphical-session.target" ];
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.udiskie}/bin/udiskie --verbose --no-config --notify"; ExecStart = "${pkgs.udiskie}/bin/udiskie --verbose --no-config --notify";
}; };
@@ -223,12 +222,14 @@ in {
./hledger.nix ./hledger.nix
./htop.nix ./htop.nix
./fu-berlin.nix ./fu-berlin.nix
./fysi.nix
./i3.nix ./i3.nix
./niri.nix
./i3status-rust.nix ./i3status-rust.nix
./keyboard.nix ./keyboard.nix
./mycelium.nix
./kdeconnect.nix ./kdeconnect.nix
{home-manager.users.me.home.file.".XCompose".source = ../lib/keyboards/XCompose;} { home-manager.users.me.home.file.".XCompose".source = ../lib/keyboards/XCompose; }
{ services.upower.enable = true; }
./lb.nix ./lb.nix
./mpv.nix ./mpv.nix
./mime.nix ./mime.nix
@@ -256,6 +257,11 @@ in {
./watson.nix ./watson.nix
./wallpaper.nix ./wallpaper.nix
./zsh.nix ./zsh.nix
{
home-manager.users.me.home.file.".zshrc".text = ''
# nothing to see here
'';
}
./tor.nix ./tor.nix
./stw-berlin.nix ./stw-berlin.nix
./mastodon-bot.nix ./mastodon-bot.nix
@@ -287,7 +293,7 @@ in {
download = "${config.users.users.me.home}/sync/Downloads"; download = "${config.users.users.me.home}/sync/Downloads";
music = "${config.users.users.me.home}/mobile/audio"; music = "${config.users.users.me.home}/mobile/audio";
pictures = "${config.users.users.me.home}/cloud/nextcloud/Bilder"; pictures = "${config.users.users.me.home}/cloud/nextcloud/Bilder";
publicShare = "${config.users.users.me.home}/cloud/nextcloud/tmp"; publicShare = "${config.users.users.me.home}/cloud/nextcloud/tmp";
videos = pictures; videos = pictures;
}; };
}; };

View File

@@ -5,6 +5,7 @@
}: { }: {
home-manager.users.me = { home-manager.users.me = {
services.flameshot = { services.flameshot = {
package = pkgs.flameshot.override { enableWlrSupport = true; };
enable = true; enable = true;
settings.General = { settings.General = {
autoCloseIdleDaemon = true; autoCloseIdleDaemon = true;

View File

@@ -1,5 +1,6 @@
{ {
pkgs, pkgs,
config,
niveumPackages, niveumPackages,
... ...
}: let }: let
@@ -24,11 +25,6 @@
url = "https://github.com/MKilani/Djehuty/archive/master.zip"; url = "https://github.com/MKilani/Djehuty/archive/master.zip";
sha256 = "sha256-S3vZxdeBj57KJsF+zaZw7sQw8T+z1aVC2CnpnZ0/x2c="; sha256 = "sha256-S3vZxdeBj57KJsF+zaZw7sQw8T+z1aVC2CnpnZ0/x2c=";
}; };
brill = zip-font "Brill" {
url = "https://brill.com/fileasset/The_Brill_Typeface_Package_v_4_0.zip";
stripRoot = false;
hash = "sha256-ugmEIkeBzD/4C9wkVfbctEtnzI8Kw+YD6KGcbk4BAf4=";
};
antinoou = zip-font "Antinoou" { antinoou = zip-font "Antinoou" {
url = "https://www.evertype.com/fonts/coptic/AntinoouFont.zip"; url = "https://www.evertype.com/fonts/coptic/AntinoouFont.zip";
sha256 = "0jwihj08n4yrshcx07dnaml2x9yws6dgyjkvg19jqbz17drbp3sw"; sha256 = "0jwihj08n4yrshcx07dnaml2x9yws6dgyjkvg19jqbz17drbp3sw";
@@ -92,7 +88,7 @@ in {
newGardiner newGardiner
junicode junicode
koineGreek koineGreek
brill # brill
ezra-sil ezra-sil
fira fira
font-awesome font-awesome
@@ -112,6 +108,7 @@ in {
noto-fonts noto-fonts
noto-fonts-cjk-sans noto-fonts-cjk-sans
noto-fonts-emoji noto-fonts-emoji
nerd-fonts.blex-mono
roboto-slab roboto-slab
scheherazade-new scheherazade-new
source-code-pro source-code-pro
@@ -124,10 +121,10 @@ in {
zilla-slab zilla-slab
]; # google-fonts league-of-moveable-type ]; # google-fonts league-of-moveable-type
fontconfig.defaultFonts = rec { fontconfig.defaultFonts = rec {
monospace = ["Noto Sans Mono"] ++ emoji; monospace = [config.stylix.fonts.monospace.name] ++ emoji;
serif = ["Noto Serif" "Noto Naskh Arabic" "Noto Serif Devanagari"]; serif = [config.stylix.fonts.serif.name "Scheherazade New" "Ezra SIL" "Antinoou" "Noto Serif Devanagari"];
sansSerif = ["Noto Sans Display" "Noto Naskh Arabic" "Noto Sans Hebrew" "Noto Sans Devanagari" "Noto Sans CJK JP" "Noto Sans Coptic"]; sansSerif = [config.stylix.fonts.sansSerif.name "Noto Sans Display" "Noto Naskh Arabic" "Noto Sans Hebrew" "Noto Sans Devanagari" "Noto Sans CJK JP" "Noto Sans Coptic" "Noto Sans Syriac Western"];
emoji = ["Noto Color Emoji"]; emoji = [config.stylix.fonts.emoji.name];
}; };
# xelatex fails with woff files # xelatex fails with woff files
# ref https://tex.stackexchange.com/questions/392144/xelatex-and-fontspec-crash-trying-to-find-woff-file-for-some-fonts-but-not-other # ref https://tex.stackexchange.com/questions/392144/xelatex-and-fontspec-crash-trying-to-find-woff-file-for-some-fonts-but-not-other

View File

@@ -131,7 +131,10 @@ in {
(pkgs.writers.writeDashBin "fu-vpn" '' (pkgs.writers.writeDashBin "fu-vpn" ''
if ${pkgs.wirelesstools}/bin/iwgetid | ${pkgs.gnugrep}/bin/grep --invert-match eduroam if ${pkgs.wirelesstools}/bin/iwgetid | ${pkgs.gnugrep}/bin/grep --invert-match eduroam
then then
${pkgs.openconnect}/bin/openconnect vpn.fu-berlin.de --useragent=AnyConnect # root firefox will not open login window unless root owns Xauthority
sudo cp $XAUTHORITY /root/.Xauthority
sudo chown root: /root/.Xauthority
XAUTHORITY=/root/.Xauthority sudo ${pkgs.openconnect}/bin/openconnect vpn.fu-berlin.de --useragent=AnyConnect
fi fi
'') '')
]; ];

View File

@@ -6,10 +6,8 @@
... ...
}: let }: let
dashboard = pkgs.writers.writeDashBin "dashboard" '' dashboard = pkgs.writers.writeDashBin "dashboard" ''
${pkgs.alacritty}/bin/alacritty --class wtf --command ${pkgs.writers.writeDash "dashboard-inner" '' ${pkgs.alacritty}/bin/alacritty --option font.size=4 --class dashboard --command ${pkgs.writers.writeDash "dashboard-inner" ''
export WTF_OWM_API_KEY="$(cat ${config.age.secrets.openweathermap-api-key.path})" exec ${pkgs.procps}/bin/watch -c -n 10 ${niveumPackages.q}/bin/q
export WTF_MINIFLUX_API_KEY="$(cat ${config.age.secrets.miniflux-api-token.path})"
exec ${niveumPackages.dashboard}/bin/dashboard
''} ''}
''; '';
inherit (import ../lib) defaultApplications; inherit (import ../lib) defaultApplications;
@@ -310,7 +308,7 @@ in {
exec "${pkgs.writers.writeDash "irc" "exec ${pkgs.alacritty}/bin/alacritty --class message -e ssh weechat@makanek -t tmux attach-session -t IM"}" exec "${pkgs.writers.writeDash "irc" "exec ${pkgs.alacritty}/bin/alacritty --class message -e ssh weechat@makanek -t tmux attach-session -t IM"}"
exec "${pkgs.writers.writeDash "email" "exec ${pkgs.alacritty}/bin/alacritty --class message -e aerc"}" exec "${pkgs.writers.writeDash "email" "exec ${pkgs.alacritty}/bin/alacritty --class message -e aerc"}"
assign [class="wtf"] ${infoWorkspace} assign [class="dashboard"] ${infoWorkspace}
exec ${dashboard}/bin/dashboard exec ${dashboard}/bin/dashboard
''; '';
config = lib.mkMerge [ config = lib.mkMerge [

View File

@@ -55,7 +55,9 @@
} }
{ {
block = "battery"; block = "battery";
device = config.niveum.batteryName; format = "$icon $percentage $time";
device = "DisplayDevice";
driver = "upower";
} }
{ {
block = "sound"; block = "sound";

View File

@@ -7,18 +7,19 @@
commaSep = builtins.concatStringsSep ","; commaSep = builtins.concatStringsSep ",";
xkbOptions = ["compose:caps" "terminate:ctrl_alt_bksp" "grp:ctrls_toggle"]; xkbOptions = ["compose:caps" "terminate:ctrl_alt_bksp" "grp:ctrls_toggle"];
languages = { languages = {
deutsch = { code = "de"; variant = "T3"; };
greek = { code = "gr"; variant = "polytonic"; };
russian = { code = "ru"; variant = "phonetic"; };
arabic = { code = "ara"; variant = "buckwalter"; }; # ../lib/keyboards/arabic; arabic = { code = "ara"; variant = "buckwalter"; }; # ../lib/keyboards/arabic;
coptic = ../lib/keyboards/coptic;
avestan = ../lib/keyboards/avestan; avestan = ../lib/keyboards/avestan;
gothic = ../lib/keyboards/gothic; coptic = ../lib/keyboards/coptic;
deutsch = { code = "de"; variant = "T3"; };
farsi = { code = "ir"; variant = "qwerty"; }; farsi = { code = "ir"; variant = "qwerty"; };
sanskrit = { code = "in"; variant = "san-kagapa"; }; gothic = ../lib/keyboards/gothic;
greek = { code = "gr"; variant = "polytonic"; };
gujarati = {code = "in"; variant = "guj-kagapa"; }; gujarati = {code = "in"; variant = "guj-kagapa"; };
urdu = {code = "in"; variant = "urd-phonetic"; };
hebrew = {code = "il"; variant = "phonetic";}; hebrew = {code = "il"; variant = "phonetic";};
russian = { code = "ru"; variant = "phonetic"; };
sanskrit = { code = "in"; variant = "san-kagapa"; };
syriac = { code = "sy"; variant = "syc_phonetic"; };
urdu = {code = "in"; variant = "urd-phonetic"; };
}; };
defaultLanguage = languages.deutsch; defaultLanguage = languages.deutsch;
in { in {
@@ -26,28 +27,33 @@ in {
# man 7 xkeyboard-config # man 7 xkeyboard-config
services.xserver = { services.xserver = {
exportConfiguration = true; # link /usr/share/X11 properly # exportConfiguration = true; # link /usr/share/X11 properly
xkb.layout = defaultLanguage.code; xkb.layout = defaultLanguage.code;
# T3: https://upload.wikimedia.org/wikipedia/commons/a/a9/German-Keyboard-Layout-T3-Version1-large.png # T3: https://upload.wikimedia.org/wikipedia/commons/a/a9/German-Keyboard-Layout-T3-Version1-large.png
# buckwalter: http://www.qamus.org/transliteration.htm # buckwalter: http://www.qamus.org/transliteration.htm
xkb.variant = defaultLanguage.variant; xkb.variant = defaultLanguage.variant;
xkb.options = commaSep xkbOptions; xkb.options = commaSep xkbOptions;
xkb.dir = pkgs.symlinkJoin { xkb.extraLayouts = {
name = "x-keyboard-directory"; "coptic" = {
paths = [ languages = ["cop"];
"${pkgs.xkeyboard_config}/etc/X11/xkb" description = "Coptic";
(pkgs.linkFarm "custom-x-keyboards" ( symbolsFile = ../lib/keyboards/coptic;
lib.mapAttrsToList (name: value: { };
name = "symbols/${name}"; "gothic" = {
path = value; languages = ["got"];
}) (lib.filterAttrs (_: value: !(value ? "code")) languages) ++ [ description = "Gothic";
{ symbolsFile = ../lib/keyboards/gothic;
name = "symbols/ir"; };
path = ../lib/keyboards/farsi; "avestan" = {
} languages = ["ave"];
] description = "Avestan";
)) symbolsFile = ../lib/keyboards/avestan;
]; };
"farsi-good" = {
languages = ["fas"];
description = "Farsi, but good";
symbolsFile = ../lib/keyboards/farsi;
};
}; };
}; };
@@ -65,7 +71,16 @@ in {
pkgs.writers.writeDashBin "kb-${language}" '' pkgs.writers.writeDashBin "kb-${language}" ''
${pkgs.xorg.setxkbmap}/bin/setxkbmap ${defaultLanguage.code},${code} ${defaultLanguage.variant},${variant} ${toString (map (option: "-option ${option}") xkbOptions)} ${pkgs.xorg.setxkbmap}/bin/setxkbmap ${defaultLanguage.code},${code} ${defaultLanguage.variant},${variant} ${toString (map (option: "-option ${option}") xkbOptions)}
'') '')
languages; languages ++
lib.mapAttrsToList
(language: settings:
let
code = if settings ? "code" then settings.code else language;
variant = if settings ? "variant" then settings.variant else "";
in
pkgs.writers.writeDashBin "kb-niri-${language}" ''
${pkgs.gnused}/bin/sed -i 's/^\(\s*layout\) ".*"$/\1 "${defaultLanguage.code},${code}"/;s/^\(\s*variant\) ".*"$/\1 "${defaultLanguage.variant},${variant}"/' ~/.config/niri/config.kdl
'') languages;
# improve held key rate # improve held key rate
services.xserver.displayManager.sessionCommands = "${pkgs.xorg.xset}/bin/xset r rate 300 50"; services.xserver.displayManager.sessionCommands = "${pkgs.xorg.xset}/bin/xset r rate 300 50";

View File

@@ -36,7 +36,7 @@ in {
"Alt+j" = "add video-pan-y -0.05"; "Alt+j" = "add video-pan-y -0.05";
}; };
scripts = [ scripts = [
pkgs.mpvScripts.quality-menu # pkgs.mpvScripts.quality-menu
niveumPackages.mpv-visualizer niveumPackages.mpv-visualizer
]; ];
}; };

15
configs/mycelium.nix Normal file
View File

@@ -0,0 +1,15 @@
{ lib, ... }:
let
myceliumAddresses = import ../lib/mycelium-network.nix;
in
{
services.mycelium = {
enable = true;
openFirewall = true;
};
networking.hosts = lib.mapAttrs' (name: address: {
name = address;
value = [ "${name}.m" ];
}) myceliumAddresses;
}

View File

@@ -38,7 +38,7 @@
(pkgs.writers.writeDashBin "vim" ''neovim "$@"'') (pkgs.writers.writeDashBin "vim" ''neovim "$@"'')
(niveumPackages.vim.override { (niveumPackages.vim.override {
stylixColors = config.lib.stylix.colors; stylixColors = config.lib.stylix.colors;
colorscheme = "base16-gruvbox-dark-medium"; # colorscheme = "base16-gruvbox-light-medium";
}) })
# language servers # language servers
@@ -46,6 +46,7 @@
pkgs.haskellPackages.haskell-language-server pkgs.haskellPackages.haskell-language-server
pkgs.texlab pkgs.texlab
pkgs.nil pkgs.nil
pkgs.nixfmt-rfc-style
pkgs.rust-analyzer pkgs.rust-analyzer
pkgs.nodePackages.typescript-language-server pkgs.nodePackages.typescript-language-server
pkgs.lua-language-server pkgs.lua-language-server

View File

@@ -0,0 +1,46 @@
{ pkgs, niveumPackages, config, ... }: {
environment.variables.EDITOR = pkgs.lib.mkForce "nvim";
environment.shellAliases.vi = "nvim";
environment.shellAliases.vim = "nvim";
environment.shellAliases.view = "nvim -R";
home-manager.users.me = {
editorconfig = {
enable = true;
settings = {
"*" = {
charset = "utf-8";
end_of_line = "lf";
trim_trailing_whitespace = true;
insert_final_newline = true;
indent_style = "space";
indent_size = 2;
};
"*.py" = { indent_size = 4; };
Makefile = { indent_style = "tab"; };
"*.md" = { trim_trailing_whitespace = false; };
};
};
};
environment.systemPackages = [
(pkgs.writers.writeDashBin "vim" ''neovim "$@"'')
(niveumPackages.vim.override {
stylixColors = config.lib.stylix.colors;
# colorscheme = "base16-gruvbox-dark-medium";
})
# language servers
pkgs.pyright
pkgs.haskellPackages.haskell-language-server
pkgs.texlab
pkgs.nil
pkgs.rust-analyzer
pkgs.nodePackages.typescript-language-server
pkgs.lua-language-server
pkgs.nodePackages.vscode-langservers-extracted
pkgs.lemminx
niveumPackages.jq-lsp
pkgs.dhall-lsp-server
];
}

445
configs/niri.nix Normal file
View File

@@ -0,0 +1,445 @@
{
pkgs,
config,
niveumPackages,
lib,
...
}:
let
inherit (import ../lib) defaultApplications;
niriConfig =
let
klem = niveumPackages.klem.override {
config.dmenu = "${pkgs.dmenu}/bin/dmenu -i -p klem";
config.scripts = {
"p.r paste" = pkgs.writers.writeDash "p.r" ''
${pkgs.curl}/bin/curl -fSs http://p.r --data-binary @- \
| ${pkgs.coreutils}/bin/tail --lines=1 \
| ${pkgs.gnused}/bin/sed 's/\\<r\\>/krebsco.de/'
'';
"envs.sh paste" = pkgs.writers.writeDash "envs-host" ''
${pkgs.curl}/bin/curl -F "file=@-" https://envs.sh
'';
"envs.sh shorten" = pkgs.writers.writeDash "envs-shorten" ''
${pkgs.curl}/bin/curl -F "shorten=$(${pkgs.coreutils}/bin/cat)" https://envs.sh
'';
"go.r shorten" = pkgs.writers.writeDash "go.r" ''
${pkgs.curl}/bin/curl -fSs http://go.r -F "uri=$(${pkgs.coreutils}/bin/cat)"
'';
"4d2.org paste" = pkgs.writers.writeDash "4d2-paste" ''
${pkgs.curl}/bin/curl -F "file=@-" https://depot.4d2.org/
'';
"0x0.st shorten" = pkgs.writers.writeDash "0x0.st" ''
${pkgs.curl}/bin/curl -fSs https://0x0.st -F "shorten=$(${pkgs.coreutils}/bin/cat)"
'';
"rot13" = pkgs.writers.writeDash "rot13" ''
${pkgs.coreutils}/bin/tr '[A-Za-z]' '[N-ZA-Mn-za-m]'
'';
"ipa" = pkgs.writers.writeDash "ipa" ''
${niveumPackages.ipa}/bin/ipa
'';
"betacode" = pkgs.writers.writeDash "betacode" ''
${niveumPackages.betacode}/bin/betacode
'';
"curl" = pkgs.writers.writeDash "curl" ''
${pkgs.curl}/bin/curl -fSs "$(${pkgs.coreutils}/bin/cat)"
'';
ocr = pkgs.writers.writeDash "ocr" ''
${pkgs.tesseract4}/bin/tesseract -l eng+deu - stdout
'';
emojai = pkgs.writers.writeDash "emojai" ''
${pkgs.curl}/bin/curl https://www.emojai.app/api/generate -X POST -H 'Content-Type: application/json' --data-raw "$(${pkgs.jq}/bin/jq -sR '{emoji:.}')" | ${pkgs.jq}/bin/jq -r .result
'';
"gpt-3.5" = pkgs.writers.writeDash "gpt" ''
${niveumPackages.gpt35}/bin/gpt
'';
gpt-4 = pkgs.writers.writeDash "gpt" ''
${niveumPackages.gpt4}/bin/gpt
'';
};
};
in
''
spawn-at-startup "${pkgs.ironbar}/bin/ironbar"
spawn-at-startup "${pkgs.xwayland-satellite}/bin/xwayland-satellite"
environment {
DISPLAY ":0"
ANKI_WAYLAND "1"
}
input {
warp-mouse-to-focus
focus-follows-mouse max-scroll-amount="0%"
keyboard {
repeat-rate 35
repeat-delay 350
track-layout "global"
xkb {
layout "de"
variant "T3"
options "ctrl:nocaps,compose:caps,grp:ctrls_toggle"
}
}
touchpad {
click-method "clickfinger"
tap
dwt
dwtp
}
}
prefer-no-csd
hotkey-overlay {
skip-at-startup
}
layout {
gaps 5
default-column-width {
proportion 0.5
}
preset-column-widths {
proportion 0.33333
proportion 0.5
proportion 0.66667
}
focus-ring {
width 2
}
shadow {
// on
softness 30
spread 5
offset x=0 y=5
draw-behind-window true
color "#00000070"
// inactive-color "#00000054"
}
tab-indicator {
// off
hide-when-single-tab
place-within-column
gap 5
width 4
length total-proportion=1.0
position "right"
gaps-between-tabs 2
corner-radius 8
active-color "red"
inactive-color "gray"
urgent-color "blue"
// active-gradient from="#80c8ff" to="#bbddff" angle=45
// inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
// urgent-gradient from="#800" to="#a33" angle=45
}
border {
off
}
}
animations {
// off
workspace-switch {
spring damping-ratio=1.0 stiffness=1000 epsilon=0.0001
}
window-open {
duration-ms 150
curve "ease-out-expo"
}
window-close {
duration-ms 150
curve "ease-out-quad"
}
horizontal-view-movement {
spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
}
window-movement {
spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
}
window-resize {
spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
}
config-notification-open-close {
spring damping-ratio=0.6 stiffness=1000 epsilon=0.001
}
screenshot-ui-open {
duration-ms 200
curve "ease-out-quad"
}
overview-open-close {
spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
}
}
window-rule {
geometry-corner-radius 0
clip-to-geometry true
}
window-rule {
match app-id="mpv"
open-floating true
}
window-rule {
match app-id="rofi"
open-floating true
}
window-rule {
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
open-floating true
default-floating-position x=32 y=32 relative-to="bottom-left"
}
window-rule {
match is-window-cast-target=true
border {
on
width 3
active-color "#f38ba8"
inactive-color "#7d0d2d"
}
}
binds {
Mod+Shift+Slash { show-hotkey-overlay; }
Mod+Return { spawn "${(defaultApplications pkgs).terminal}"; }
Mod+D { spawn "${pkgs.wofi}/bin/wofi" "--show" "run"; }
Mod+Shift+D { spawn "${niveumPackages.notemenu}/bin/notemenu"; }
Mod+T { spawn "${(defaultApplications pkgs).fileManager}"; }
Mod+Y { spawn "${(defaultApplications pkgs).browser}"; }
Mod+P { spawn "${niveumPackages.passmenu}/bin/passmenu"; }
Mod+U { spawn "${niveumPackages.unicodmenu}/bin/unicodmenu"; }
Mod+Shift+Z { toggle-window-floating; }
Mod+B { spawn "${pkgs.ironbar}/bin/ironbar" "bar" "bar-1337" "toggle-visible"; }
Mod+F12 { spawn "${klem}/bin/klem"; }
Mod+Shift+Q { close-window; }
XF86AudioRaiseVolume allow-when-locked=true { spawn "${pkgs.pamixer}/bin/pamixer -i 5"; }
XF86AudioLowerVolume allow-when-locked=true { spawn "${pkgs.pamixer}/bin/pamixer -d 5"; }
XF86AudioMute allow-when-locked=true { spawn "${pkgs.pamixer}/bin/pamixer -t"; }
XF86AudioPause allow-when-locked=true { spawn "${pkgs.playerctl}/bin/playerctl play-pause"; }
XF86AudioPlay allow-when-locked=true { spawn "${pkgs.playerctl}/bin/playerctl play-pause"; }
XF86AudioNext allow-when-locked=true { spawn "${pkgs.playerctl}/bin/playerctl next"; }
XF86AudioPrev allow-when-locked=true { spawn "${pkgs.playerctl}/bin/playerctl previous"; }
XF86AudioStop allow-when-locked=true { spawn "${pkgs.playerctl}/bin/playerctl stop"; }
Print { spawn "flameshot gui"; }
Mod+Shift+W { spawn "swaylock"; }
Mod+Comma { consume-or-expel-window-left; }
Mod+Period { consume-or-expel-window-right; }
Mod+W { toggle-column-tabbed-display; }
Mod+A repeat=false { toggle-overview; }
Mod+F { maximize-column; }
Mod+C { center-column; }
Mod+Minus { set-column-width "-25%"; }
Mod+Plus { set-column-width "+25%"; }
Mod+Ctrl+0 { spawn "niri" "msg" "action" "switch-layout" "0"; }
Mod+Ctrl+1 { spawn "niri" "msg" "action" "switch-layout" "1"; }
Mod+Ctrl+2 { spawn "niri" "msg" "action" "switch-layout" "2"; }
Mod+Ctrl+3 { spawn "niri" "msg" "action" "switch-layout" "3"; }
Mod+Ctrl+4 { spawn "niri" "msg" "action" "switch-layout" "4"; }
Mod+Ctrl+5 { spawn "niri" "msg" "action" "switch-layout" "5"; }
Mod+Ctrl+6 { spawn "niri" "msg" "action" "switch-layout" "6"; }
Mod+Ctrl+7 { spawn "niri" "msg" "action" "switch-layout" "7"; }
Mod+Ctrl+8 { spawn "niri" "msg" "action" "switch-layout" "8"; }
Mod+Ctrl+9 { spawn "niri" "msg" "action" "switch-layout" "9"; }
Mod+H { focus-column-or-monitor-left; }
Mod+J { focus-window-or-workspace-down; }
Mod+K { focus-window-or-workspace-up; }
Mod+L { focus-column-or-monitor-right; }
Mod+Shift+H { move-column-left-or-to-monitor-left; }
Mod+Shift+J { move-window-down-or-to-workspace-down; }
Mod+Shift+K { move-window-up-or-to-workspace-up; }
Mod+Shift+L { move-column-right-or-to-monitor-right; }
Mod+Ctrl+H { focus-monitor-left; }
Mod+Ctrl+J { focus-monitor-down; }
Mod+Ctrl+K { focus-monitor-up; }
Mod+Ctrl+L { focus-monitor-right; }
Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
Mod+Shift+Ctrl+J { move-column-to-workspace-down; }
Mod+Shift+Ctrl+K { move-column-to-workspace-up; }
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
Mod+Shift+Alt+Ctrl+H { move-workspace-to-monitor-left; }
Mod+Shift+Alt+Ctrl+J { move-workspace-down; }
Mod+Shift+Alt+Ctrl+K { move-workspace-up; }
Mod+Shift+Alt+Ctrl+L { move-workspace-to-monitor-right; }
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+0 { focus-workspace 10; }
Mod+Shift+1 { move-window-to-workspace "1"; }
Mod+Shift+2 { move-window-to-workspace "2"; }
Mod+Shift+3 { move-window-to-workspace "3"; }
Mod+Shift+4 { move-window-to-workspace "4"; }
Mod+Shift+5 { move-window-to-workspace "5"; }
Mod+Shift+6 { move-window-to-workspace "6"; }
Mod+Shift+7 { move-window-to-workspace "7"; }
Mod+Shift+8 { move-window-to-workspace "8"; }
Mod+Shift+9 { move-window-to-workspace "9"; }
Mod+Shift+0 { move-window-to-workspace "0"; }
}
'';
in
{
system.activationScripts.niriConfig = {
text = ''
cp ${pkgs.writeText "config.kdl" niriConfig} ${config.users.users.me.home}/.config/niri/config.kdl
chown ${config.users.users.me.name}:${config.users.users.me.group} ${config.users.users.me.home}/.config/niri/config.kdl
'';
};
programs.niri.enable = true;
services.displayManager.defaultSession = lib.mkForce "niri";
home-manager.users.me = {
xdg.configFile."ironbar/style.css".text = ''
* {
font-size: 8pt;
font-family: "Gentium Plus", "BlexMono Nerd Font";
}
box, menubar, button {
background-color: unset;
box-shadow: none;
background-image: none;
}
.clock, .upower, .volume {
font-weight: unset;
}
tooltip * {
font-family: "BlexMono Nerd Font";
font-size: 7pt;
}
'';
xdg.configFile."ironbar/config.json".source = (pkgs.formats.json { }).generate "ironbar.json" {
name = "bar-1337";
height = 12;
layer = "top";
position = "bottom";
start = [ ];
center = [
{
type = "tray";
icon_size = 8;
}
{ type = "clipboard"; }
{ type = "notifications"; }
];
end = [
{
type = "upower";
icon_size = 8;
format = "{percentage}%";
}
{
type = "label";
tooltip = "{{df -h --output=size,used,avail,pcent,target}}";
label = "\t{{5000:df -h / --output=avail | tail +2}}";
}
{
type = "label";
tooltip = "{{free -Lh --si | awk '{for(i=1;i<=NF;i++){printf \"%s%s\", $i, (i%2? OFS: ORS)} if(NF%2) printf ORS}'}}";
label = "󰍛\t{{500:free -h --si | awk 'NR==2{printf $3 \"\\n\"}'}}";
}
{
type = "label";
tooltip = "{{}}";
on_click_left = "pamixer -t";
on_scroll_up = "pamixer -i 1";
on_scroll_down = "pamixer -d 1";
label = "{{500:if $(pamixer --get-mute) = true; then echo ; else echo ; fi}}\t{{500:pamixer --get-volume}}%";
}
{
type = "label";
tooltip = "{{uptime}}";
label = "\t{{500:uptime | sed 's/.*load average: \\([^ ]*\\);.*/\\1/' | tr ' ' '\n'}}";
}
{
type = "label";
tooltip = "{{khal list today today -d astro-test-3 }}";
label = "";
}
{
type = "label";
tooltip = "{{curl wttr.in/?0 | ${pkgs.ansifilter}/bin/ansifilter}}";
label = "󰔏";
}
{
type = "label";
name = "cal";
tooltip = "{{cal}}";
label = "{{500:date +'<U+F017>\t%Y-%m-%d (%W %a) %H:%M'}}";
}
];
};
programs.alacritty.enable = true; # Super+T in the default setting (terminal)
programs.swaylock.enable = true; # Super+Alt+L in the default setting (screen locker)
services.swaync = {
enable = true;
settings = {
notification-window-width = 300;
control-center-width = 300;
widgets = [
"volume"
"mpris"
"title"
"dnd"
"notifications"
];
widget-config = {
title = {
text = "ϥ̄";
"clear-all-button" = true;
"button-text" = "";
};
dnd.text = "̄̄ϣ̄̄";
label.text = "";
};
};
};
services.swayidle.enable = true; # idle management daemon
home.packages = with pkgs; [
xdg-desktop-portal-gnome
swaybg
];
};
services.gnome.gnome-keyring.enable = true; # secret service
security.pam.services.swaylock = { };
}

View File

@@ -73,6 +73,7 @@ in {
pcmanfm pcmanfm
# MEDIA # MEDIA
ffmpeg ffmpeg
simplescreenrecorder
imagemagick imagemagick
exiftool exiftool
nsxiv nsxiv
@@ -85,7 +86,7 @@ in {
gcc gcc
python3Packages.jsonschema # json validation python3Packages.jsonschema # json validation
pup # html toolkit pup # html toolkit
xsv # csv toolkit xan # csv toolkit
magic-wormhole-rs # file transfer magic-wormhole-rs # file transfer
man-pages man-pages
man-pages-posix man-pages-posix
@@ -94,9 +95,10 @@ in {
gnome-disk-utility gnome-disk-utility
arandr # xrandr for noobs arandr # xrandr for noobs
libnotify # for notify-send libnotify # for notify-send
xclip # clipboard CLI wl-clipboard # clipboard CLI
xdragon # drag and drop xdragon # drag and drop
xorg.xkill # kill by clicking xorg.xkill # kill by clicking
portfolio # personal finance overview
audacity audacity
calibre calibre
electrum electrum
@@ -119,10 +121,10 @@ in {
pdftk # pdf toolkit pdftk # pdf toolkit
mupdf mupdf
poppler_utils # pdf toolkit poppler_utils # pdf toolkit
okular # the word is nucular kdePackages.okular # the word is nucular
xournalpp # for annotating pdfs xournalpp # for annotating pdfs
pdfpc # presenter console for pdf slides pdfpc # presenter console for pdf slides
niveumPackages.hc # print files as qr codes # niveumPackages.hc # print files as qr codes
yt-dlp yt-dlp
espeak espeak
rink # unit converter rink # unit converter
@@ -142,11 +144,10 @@ in {
niveumPackages.pls niveumPackages.pls
niveumPackages.mpv-tv niveumPackages.mpv-tv
niveumPackages.mpv-iptv niveumPackages.mpv-iptv
jellyfin-media-player # jellyfin-media-player
niveumPackages.devanagari niveumPackages.devanagari
niveumPackages.betacode # ancient greek betacode to unicode converter niveumPackages.betacode # ancient greek betacode to unicode converter
niveumPackages.meteo niveumPackages.meteo
niveumPackages.mahlzeit
niveumPackages.jq-lsp niveumPackages.jq-lsp
niveumPackages.swallow # window swallowing niveumPackages.swallow # window swallowing
niveumPackages.literature-quote niveumPackages.literature-quote
@@ -238,8 +239,8 @@ in {
html-tidy html-tidy
nodePackages.csslint nodePackages.csslint
nodePackages.jsonlint nodePackages.jsonlint
unstablePackages.deno # better node.js deno # better node.js
texlive.combined.scheme-full # texlive.combined.scheme-full
latexrun latexrun
(aspellWithDicts (dict: [dict.de dict.en dict.en-computers])) (aspellWithDicts (dict: [dict.de dict.en dict.en-computers]))
# haskellPackages.pandoc-citeproc # haskellPackages.pandoc-citeproc
@@ -250,6 +251,7 @@ in {
# gnumeric # gnumeric
dia dia
pandoc pandoc
librsvg # pandoc depends on this to include SVG in documents
# niveumPackages.man-pandoc # niveumPackages.man-pandoc
typst typst
# proselint # proselint
@@ -261,6 +263,10 @@ in {
# nightly.rust # nightly.rust
shellcheck shellcheck
# photography
gphoto2
darktable
(pkgs.writers.writeDashBin "hass-cli" '' (pkgs.writers.writeDashBin "hass-cli" ''
HASS_SERVER=http://zaatar.r:8123 HASS_TOKEN="$(cat ${config.age.secrets.home-assistant-token.path})" exec ${pkgs.home-assistant-cli}/bin/hass-cli "$@" HASS_SERVER=http://zaatar.r:8123 HASS_TOKEN="$(cat ${config.age.secrets.home-assistant-token.path})" exec ${pkgs.home-assistant-cli}/bin/hass-cli "$@"
'') '')

View File

@@ -3,7 +3,6 @@
externalNetwork = import ../lib/external-network.nix; externalNetwork = import ../lib/external-network.nix;
in { in {
users.users.me.openssh.authorizedKeys.keys = kieran.sshKeys; users.users.me.openssh.authorizedKeys.keys = kieran.sshKeys;
programs.ssh.startAgent = true; programs.ssh.startAgent = true;
home-manager.users.me = { home-manager.users.me = {

View File

@@ -17,5 +17,7 @@ in {
}; };
}; };
users.users.root.openssh.authorizedKeys.keys = kieran.sshKeys; users.users.root.openssh.authorizedKeys.keys = kieran.sshKeys ++ [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPoiRIn1dBUtpApcUyGbZKN+m5KBSgKIDQjdnQ8vU0xU kfm@kibbeh" # travel laptop
];
} }

View File

@@ -18,7 +18,7 @@ in {
stylix.enable = true; stylix.enable = true;
stylix.image = generatedWallpaper; stylix.image = generatedWallpaper;
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.yaml"; stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/ayu-light.yaml";
stylix.cursor = { stylix.cursor = {
name = "capitaine-cursors-white"; name = "capitaine-cursors-white";
@@ -52,18 +52,18 @@ in {
stylix.fonts = { stylix.fonts = {
serif = { serif = {
package = pkgs.noto-fonts; package = pkgs.gentium;
name = "Noto Serif"; name = "Gentium Plus";
}; };
sansSerif = { sansSerif = {
package = pkgs.noto-fonts; package = pkgs.gentium;
name = "Noto Sans"; name = "Gentium Plus";
}; };
monospace = { monospace = {
package = pkgs.noto-fonts; package = pkgs.nerd-fonts.blex-mono;
name = "Noto Sans Mono"; name = "BlexMono Nerd Font";
}; };
emoji = { emoji = {

View File

@@ -2,11 +2,10 @@
config, config,
pkgs, pkgs,
... ...
}: { }: let
home-manager.users.me.home.file.".zshrc".text = '' promptColours.success = "cyan";
# nothing to see here promptColours.failure = "red";
''; in {
environment.systemPackages = [pkgs.atuin]; environment.systemPackages = [pkgs.atuin];
environment.variables.ATUIN_CONFIG_DIR = toString (pkgs.writeTextDir "/config.toml" '' environment.variables.ATUIN_CONFIG_DIR = toString (pkgs.writeTextDir "/config.toml" ''
auto_sync = true auto_sync = true
@@ -58,7 +57,7 @@
fpath=(${zsh-completions}/src $fpath) fpath=(${zsh-completions}/src $fpath)
''; '';
promptInit = with config.niveum; '' promptInit = ''
autoload -Uz vcs_info autoload -Uz vcs_info
zstyle ':vcs_info:*' enable git zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:*' check-for-changes true zstyle ':vcs_info:*' check-for-changes true

604
flake.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -6,21 +6,22 @@
# alew-web.url = "git+ssh://gitea@code.kmein.de:22022/kfm/alew-web.git?ref=refs/heads/master"; # alew-web.url = "git+ssh://gitea@code.kmein.de:22022/kfm/alew-web.git?ref=refs/heads/master";
coptic-dictionary.url = "github:kmein/coptic-dictionary"; coptic-dictionary.url = "github:kmein/coptic-dictionary";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
home-manager.url = "github:nix-community/home-manager/release-24.11"; home-manager.url = "github:nix-community/home-manager/release-25.05";
menstruation-backend.url = "github:kmein/menstruation.rs"; menstruation-backend.url = "github:kmein/menstruation.rs";
menstruation-telegram.url = "github:kmein/menstruation-telegram"; menstruation-telegram.url = "github:kmein/menstruation-telegram";
centerpiece.url = "github:friedow/centerpiece";
nix-on-droid.url = "github:t184256/nix-on-droid/release-23.05"; nix-on-droid.url = "github:t184256/nix-on-droid/release-23.05";
nixinate.url = "github:matthewcroughan/nixinate"; nixinate.url = "github:matthewcroughan/nixinate";
nixpkgs-old.url = "github:NixOS/nixpkgs/50fc86b75d2744e1ab3837ef74b53f103a9b55a0"; nixpkgs-old.url = "github:NixOS/nixpkgs/50fc86b75d2744e1ab3837ef74b53f103a9b55a0";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/master"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/master";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
nur.url = "github:nix-community/NUR"; nur.url = "github:nix-community/NUR";
recht.url = "github:kmein/recht"; recht.url = "github:kmein/recht";
retiolum.url = "git+https://git.thalheim.io/Mic92/retiolum"; retiolum.url = "github:krebs/retiolum";
rust-overlay.url = "github:oxalica/rust-overlay"; rust-overlay.url = "github:oxalica/rust-overlay";
scripts.url = "github:kmein/scripts"; scripts.url = "github:kmein/scripts";
stockholm.url = "github:krebs/stockholm"; stockholm.url = "github:krebs/stockholm";
stylix.url = "github:danth/stylix/release-24.11"; stylix.url = "github:danth/stylix/release-25.05";
telebots.url = "github:kmein/telebots"; telebots.url = "github:kmein/telebots";
tinc-graph.url = "github:kmein/tinc-graph"; tinc-graph.url = "github:kmein/tinc-graph";
voidrice.url = "github:Lukesmithxyz/voidrice"; voidrice.url = "github:Lukesmithxyz/voidrice";
@@ -71,6 +72,7 @@
nixinate, nixinate,
flake-utils, flake-utils,
nix-on-droid, nix-on-droid,
centerpiece,
stylix, stylix,
... ...
}: }:
@@ -111,6 +113,7 @@
tabula = "root@tabula"; tabula = "root@tabula";
kabsa = "root@kabsa"; kabsa = "root@kabsa";
fatteh = "root@fatteh"; fatteh = "root@fatteh";
kibbeh = "root@kibbeh";
}; };
in in
lib.attrsets.nameValuePair "deploy-${hostname}" { lib.attrsets.nameValuePair "deploy-${hostname}" {
@@ -227,7 +230,15 @@
specialArgs = niveumSpecialArgs system; specialArgs = niveumSpecialArgs system;
modules = [ modules = [
systems/zaatar/configuration.nix systems/zaatar/configuration.nix
inputs.self.nixosModules.moodle-dl agenix.nixosModules.default
retiolum.nixosModules.retiolum
];
};
kibbeh = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = niveumSpecialArgs system;
modules = [
systems/kibbeh/configuration.nix
agenix.nixosModules.default agenix.nixosModules.default
retiolum.nixosModules.retiolum retiolum.nixosModules.retiolum
]; ];
@@ -309,7 +320,7 @@
nur.overlays.default nur.overlays.default
(self: super: { (self: super: {
mpv = super.mpv.override {scripts = [inputs.self.packages.${system}.mpv-visualizer super.mpvScripts.mpris];}; mpv = super.mpv.override {scripts = [inputs.self.packages.${system}.mpv-visualizer super.mpvScripts.mpris];};
dmenu = super.writers.writeDashBin "dmenu" ''exec ${pkgs.rofi}/bin/rofi -dmenu "$@"''; dmenu = super.writers.writeDashBin "dmenu" ''exec ${pkgs.wofi}/bin/wofi --dmenu "$@"'';
}) })
]; ];
}; };
@@ -326,6 +337,7 @@
packages = rec { packages = rec {
auc = pkgs.callPackage packages/auc.nix {}; auc = pkgs.callPackage packages/auc.nix {};
betacode = pkgs.callPackage packages/betacode.nix {}; betacode = pkgs.callPackage packages/betacode.nix {};
brainmelter = pkgs.callPackage packages/brainmelter.nix {};
brassica = pkgs.callPackage packages/brassica.nix {}; brassica = pkgs.callPackage packages/brassica.nix {};
cheat-sh = pkgs.callPackage packages/cheat-sh.nix {}; cheat-sh = pkgs.callPackage packages/cheat-sh.nix {};
closest = pkgs.callPackage packages/closest {}; closest = pkgs.callPackage packages/closest {};
@@ -385,6 +397,7 @@
opustags = pkgs.callPackage packages/opustags.nix {}; opustags = pkgs.callPackage packages/opustags.nix {};
pls = pkgs.callPackage packages/pls.nix {}; pls = pkgs.callPackage packages/pls.nix {};
polyglot = pkgs.callPackage packages/polyglot.nix {}; polyglot = pkgs.callPackage packages/polyglot.nix {};
q = pkgs.callPackage packages/q.nix {};
qrpaste = pkgs.callPackage packages/qrpaste.nix {}; qrpaste = pkgs.callPackage packages/qrpaste.nix {};
random-zeno = pkgs.callPackage packages/random-zeno.nix {}; random-zeno = pkgs.callPackage packages/random-zeno.nix {};
rfc = pkgs.callPackage packages/rfc.nix {}; rfc = pkgs.callPackage packages/rfc.nix {};
@@ -394,6 +407,7 @@
text2pdf = pkgs.callPackage packages/text2pdf.nix {}; text2pdf = pkgs.callPackage packages/text2pdf.nix {};
timer = pkgs.callPackage packages/timer.nix {}; timer = pkgs.callPackage packages/timer.nix {};
tocharian-font = pkgs.callPackage packages/tocharian-font.nix {}; tocharian-font = pkgs.callPackage packages/tocharian-font.nix {};
passmenu = pkgs.callPackage packages/passmenu.nix {};
trans = pkgs.callPackage packages/trans.nix {}; trans = pkgs.callPackage packages/trans.nix {};
ttspaste = pkgs.callPackage packages/ttspaste.nix {}; ttspaste = pkgs.callPackage packages/ttspaste.nix {};
unicodmenu = pkgs.callPackage packages/unicodmenu.nix {}; unicodmenu = pkgs.callPackage packages/unicodmenu.nix {};
@@ -402,6 +416,7 @@
vg = pkgs.callPackage packages/vg.nix {}; vg = pkgs.callPackage packages/vg.nix {};
vim = pkgs.callPackage packages/vim.nix {niveumPackages = self.packages.${system};}; vim = pkgs.callPackage packages/vim.nix {niveumPackages = self.packages.${system};};
obsidian-vim = pkgs.callPackage packages/obsidian-vim.nix {}; obsidian-vim = pkgs.callPackage packages/obsidian-vim.nix {};
radio-news = pkgs.callPackage packages/radio-news.nix {};
vimPlugins-cheat-sh-vim = pkgs.callPackage packages/vimPlugins/cheat-sh.nix {}; vimPlugins-cheat-sh-vim = pkgs.callPackage packages/vimPlugins/cheat-sh.nix {};
vimPlugins-icalendar-vim = pkgs.callPackage packages/vimPlugins/icalendar-vim.nix {}; vimPlugins-icalendar-vim = pkgs.callPackage packages/vimPlugins/icalendar-vim.nix {};
vimPlugins-jq-vim = pkgs.callPackage packages/vimPlugins/jq-vim.nix {}; vimPlugins-jq-vim = pkgs.callPackage packages/vimPlugins/jq-vim.nix {};

8
lib/mycelium-network.nix Normal file
View File

@@ -0,0 +1,8 @@
{
zaatar = "5c5:49e0:7793:f017:59e1:1715:9e0e:3fc8";
fatteh = "463:a0d4:daa3:aa8d:a9b1:744a:46a5:7a80";
ful = "5bf:d60e:bebf:5163:f495:8787:880c:6d41";
kabsa = "432:e30:d5d8:9311:e34b:6587:96ee:3fcb";
makanek = "43f:ad4f:fa67:d9f7:8a56:713c:7418:164b";
manakish = "512:d3bd:3cd9:fcc8:ae34:81fa:385f:8c21";
}

175
lib/style.css Normal file
View File

@@ -0,0 +1,175 @@
* {
font-size: 14px;
border-radius: 5px;
}
window#waybar {
/* `otf-font-awesome` is required to be installed for icons */
font-family: FontAwesome, monospace;
background-color: transparent;
border-bottom: 0px;
color: #ebdbb2;
transition-property: background-color;
transition-duration: .5s;
}
window#waybar.hidden {
opacity: 0.2;
}
window#waybar.empty #window {
background-color: transparent;
}
/*
window#waybar.empty {
background-color: transparent;
}
window#waybar.solo {
background-color: #FFFFFF;
}
*/
.modules-right {
margin: 10px 10px 0 0;
}
.modules-center {
margin: 10px 0 0 0;
}
.modules-left {
margin: 10px 0 0 10px;
}
button {
/* Use box-shadow instead of border so the text isn't offset */
/* box-shadow: inset 0 -3px transparent; */
border: none;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
/*
button:hover {
background: inherit;
box-shadow: inset 0 -3px #ebdbb2;
} */
#workspaces {
background-color: #282828;
}
#workspaces button {
padding: 0 5px;
background-color: transparent;
color: #ebdbb2;
border-radius: 0;
}
#workspaces button:first-child {
border-radius: 5px 0 0 5px;
}
#workspaces button:last-child {
border-radius: 0 5px 5px 0;
}
#workspaces button:hover {
color: #d79921;
}
#workspaces button.focused {
background-color: #665c54;
/* box-shadow: inset 0 -3px #ffffff; */
}
#workspaces button.urgent {
background-color: #b16286;
}
#idle_inhibitor,
#cava,
#scratchpad,
#mode,
#window,
#clock,
#battery,
#backlight,
#wireplumber,
#tray,
#mpris,
#load {
padding: 0 10px;
background-color: #282828;
color: #ebdbb2;
}
#mode {
background-color: #689d6a;
color: #282828;
/* box-shadow: inset 0 -3px #ffffff; */
}
/* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
}
/* If workspaces is the rightmost module, omit right margin */
.modules-right > widget:last-child > #workspaces {
margin-right: 0;
}
#cava {
padding: 0 5px;
}
#battery.charging, #battery.plugged {
background-color: #98971a;
color: #282828;
}
@keyframes blink {
to {
background-color: #282828;
color: #ebdbb2;
}
}
/* Using steps() instead of linear as a timing function to limit cpu usage */
#battery.critical:not(.charging) {
background-color: #cc241d;
color: #ebdbb2;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: steps(12);
animation-iteration-count: infinite;
animation-direction: alternate;
}
label:focus {
background-color: #000000;
}
#wireplumber.muted {
background-color: #458588;
}
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
}
#mpris.playing {
background-color: #d79921;
color: #282828;
}
#tray menu {
font-family: sans-serif;
}
#scratchpad.empty {
background: transparent;
}

View File

@@ -113,7 +113,13 @@ local language_servers = {
html = {}, -- vscode-langservers-extracted html = {}, -- vscode-langservers-extracted
jsonls = {}, -- vscode-langservers-extracted jsonls = {}, -- vscode-langservers-extracted
lemminx = {}, -- lemminx (for xml) lemminx = {}, -- lemminx (for xml)
nil_ls = {}, -- github:oxalica/nil nil_ls = {
['nil'] = {
formatting = {
command = { "nixfmt" },
},
},
}, -- github:oxalica/nil
dhall_lsp_server = {}, -- dhall-lsp-server dhall_lsp_server = {}, -- dhall-lsp-server
-- rnix = {}, -- rnix-lsp -- rnix = {}, -- rnix-lsp
jqls = {}, -- jq-lsp jqls = {}, -- jq-lsp

View File

@@ -40,8 +40,6 @@ let g:netrw_banner=0
let g:netrw_browse_split=4 let g:netrw_browse_split=4
let g:netrw_altv=1 " open splits to the right let g:netrw_altv=1 " open splits to the right
let g:netrw_liststyle=3 " tree view let g:netrw_liststyle=3 " tree view
let g:netrw_list_hide=netrw_gitignore#Hide()
let g:netrw_list_hide.=',\(^\|\s\s\)\zs\.\S\+'
let g:netrw_winsize = 25 let g:netrw_winsize = 25
call matchadd('colorcolumn', '\%101v', 100) call matchadd('colorcolumn', '\%101v', 100)

39
packages/brainmelter.nix Executable file
View File

@@ -0,0 +1,39 @@
{ writers, flite, netcat, gnused, ... }:
writers.writeDashBin "brainmelter" ''
SERVER="brockman.news"
PORT=6667
NICK="irccat"
USER="irccat"
CHANNEL="#all"
# Open connection to IRC server using a FIFO and netcat
FIFO=$(mktemp -u)
mkfifo "$FIFO"
trap "rm -f $FIFO" EXIT
# Send IRC commands
{
echo "NICK $NICK"
echo "USER $USER 0 * :$USER"
sleep 5
echo "JOIN $CHANNEL"
while true; do
sleep 30
echo "PING :keepalive"
done
} > "$FIFO" &
# Read from server and write to stdout
${netcat}/bin/nc "$SERVER" "$PORT" < "$FIFO" | while IFS= read -r line; do
voice="$(echo -e "awb\nkal\nrms\nslt" | shuf -n1)"
echo "$line" \
| ${gnused}/bin/sed -n 's/.*go.brockman.news\/\S\+ //p' \
| tee /dev/stderr \
| ${flite}/bin/flite -voice "$voice"
# Respond to PINGs to avoid timeout
if [ "$line" = PING* ]; then
server_ping=$(echo "$line" | cut -d':' -f2)
echo "PONG :$server_ping" > "$FIFO"
fi
done
''

View File

@@ -1,7 +1,7 @@
{ {
writers, writers,
fetchurl, fetchurl,
xsv, xan,
}: let }: let
database = fetchurl { database = fetchurl {
url = "http://c.krebsco.de/greek.csv"; url = "http://c.krebsco.de/greek.csv";
@@ -9,5 +9,5 @@
}; };
in in
writers.writeDashBin "heuretes" '' writers.writeDashBin "heuretes" ''
${xsv}/bin/xsv search -s simple "^$*$" ${database} | ${xsv}/bin/xsv table ${xan}/bin/xan search -s simple "^$*$" ${database} | ${xan}/bin/xan table
'' ''

View File

@@ -42,14 +42,14 @@ in
pkgs.writers.writeDashBin "klem" '' pkgs.writers.writeDashBin "klem" ''
set -efu set -efu
${pkgs.xclip}/bin/xclip -selection ${cfg.selection} -out \ ${pkgs.wl-clipboard}/bin/wl-paste \
| case $(echo "${ | case $(echo "${
lib.concatStringsSep "\n" (lib.attrNames cfg.scripts) lib.concatStringsSep "\n" (lib.attrNames cfg.scripts)
}" | ${cfg.dmenu}) in }" | ${cfg.dmenu}) in
${lib.concatStringsSep "\n" (lib.mapAttrsToList scriptCase cfg.scripts)} ${lib.concatStringsSep "\n" (lib.mapAttrsToList scriptCase cfg.scripts)}
*) ${pkgs.coreutils}/bin/cat ;; *) ${pkgs.coreutils}/bin/cat ;;
esac \ esac \
| ${pkgs.xclip}/bin/xclip -selection ${cfg.selection} -in | ${pkgs.wl-clipboard}/bin/wl-copy
${pkgs.libnotify}/bin/notify-send --app-name="klem" "Result copied to clipboard." ${pkgs.libnotify}/bin/notify-send --app-name="klem" "Result copied to clipboard."
'' ''

View File

@@ -1,31 +1,31 @@
{ {
writers, writers,
lib, lib,
xsv, xan,
curl, curl,
gnused, gnused,
}: }:
writers.writeDashBin "literature-quote" '' writers.writeDashBin "literature-quote" ''
PATH=$PATH:${lib.makeBinPath [xsv curl gnused]} PATH=$PATH:${lib.makeBinPath [xan curl gnused]}
ROW=$(curl -Ls http://kmein.github.io/logotheca/quotes.csv | shuf -n1) ROW=$(curl -Ls http://kmein.github.io/logotheca/quotes.csv | shuf -n1)
( (
QUOTE="$(echo "$ROW" | xsv select 4)" QUOTE="$(echo "$ROW" | xan select 3)"
echo "$QUOTE" | sed 's/^"//;s/"$//;s/\s*||\s*/\n\n/g;s/\s*|\s*/\n/g' echo "$QUOTE" | sed 's/^"//;s/"$//;s/\s*||\s*/\n\n/g;s/\s*|\s*/\n/g'
echo echo
AUTHOR="$(echo "$ROW" | xsv select 1)" AUTHOR="$(echo "$ROW" | xan select 0)"
# Prepare the output # Prepare the output
ATTRIBUTION="($AUTHOR" ATTRIBUTION="($AUTHOR"
SOURCE="$(echo "$ROW" | xsv select 2)" SOURCE="$(echo "$ROW" | xan select 1)"
# Add SOURCE if it's not empty # Add SOURCE if it's not empty
if [ -n "$SOURCE" ]; then if [ -n "$SOURCE" ]; then
ATTRIBUTION="$ATTRIBUTION: $SOURCE" ATTRIBUTION="$ATTRIBUTION: $SOURCE"
fi fi
LOC="$(echo "$ROW" | xsv select 3 | sed 's/""//;s/-//g')" LOC="$(echo "$ROW" | xan select 2 | sed 's/""//;s/-//g')"
# Add LOC if it's not empty # Add LOC if it's not empty
if [ -n "$LOC" ]; then if [ -n "$LOC" ]; then
ATTRIBUTION="$ATTRIBUTION, $LOC" ATTRIBUTION="$ATTRIBUTION, $LOC"

View File

@@ -1,7 +1,7 @@
{ {
writers, writers,
lib, lib,
rofi, wofi,
findutils, findutils,
coreutils, coreutils,
noteDirectory ? "~/state/obsidian", noteDirectory ? "~/state/obsidian",
@@ -11,7 +11,7 @@
writers.writeDashBin "notemenu" '' writers.writeDashBin "notemenu" ''
set -efu set -efu
PATH=$PATH:${ PATH=$PATH:${
lib.makeBinPath [rofi findutils coreutils] lib.makeBinPath [wofi findutils coreutils]
} }
cd ${noteDirectory} cd ${noteDirectory}
@@ -21,7 +21,7 @@ writers.writeDashBin "notemenu" ''
echo $(date -I -d yesterday).md echo $(date -I -d yesterday).md
''} ''}
find . -not -path '*/.*' -type f -printf "%T@ %p\n" | sort --reverse --numeric-sort | cut --delimiter=" " --fields=2- find . -not -path '*/.*' -type f -printf "%T@ %p\n" | sort --reverse --numeric-sort | cut --delimiter=" " --fields=2-
} | rofi -dmenu -i -p 'notes') } | wofi -dmenu -i -p 'notes')
if test "$note_file" if test "$note_file"
then then
alacritty --working-directory ${noteDirectory} -e ${niveumPackages.obsidian-vim}/bin/nvim "$note_file" alacritty --working-directory ${noteDirectory} -e ${niveumPackages.obsidian-vim}/bin/nvim "$note_file"

View File

@@ -35,6 +35,7 @@ neovim.override {
vimPlugins.nerdtree vimPlugins.nerdtree
vimPlugins.fzf-vim vimPlugins.fzf-vim
vimPlugins.fzfWrapper vimPlugins.fzfWrapper
vimPlugins.vim-fugitive
]; ];
}; };
} }

18
packages/passmenu.nix Normal file
View File

@@ -0,0 +1,18 @@
{ writers, wofi, pass, fd, libnotify, ... }:
writers.writeBashBin "passmenu" ''
shopt -s nullglob globstar
IFS=$'\n'
prefix=$(readlink -f ''${PASSWORD_STORE_DIR-~/.password-store})
password_files=( $( ${fd}/bin/fd -L ".gpg\$" "$prefix" ) )
password_files=( "''${password_files[@]#"$prefix"/}" )
password_files=( "''${password_files[@]%.gpg}" )
password=$( printf '%s\n' "''${password_files[@]}" | ${wofi}/bin/wofi -i -k /dev/null -d menu -- "$@" )
[[ -n $password ]] || exit
OUT=$(${pass}/bin/pass show --clip "$password")
${libnotify}/bin/notify-send -t 5000 "$(echo "$OUT" | grep '^login:' | sed 's/^login: //')"
''

View File

@@ -30,10 +30,27 @@
"that's a good song!" "that's a good song!"
"👍" "👍"
"vibin'" "vibin'"
"this is a jam!"
"absolutely love it!"
"such a vibe!"
"this track is fire!"
"feeling this one!"
"pure gold!"
"this is my jam!"
"so catchy!"
"on repeat!"
"this is a masterpiece!"
"let's dance!"
"I'm all in!"
"so gut!"
"mega!"
"ich fühl's!"
"das ist Musik für die Seele!"
]; ];
messages.bad = [ messages.bad = [
"how can anyone listen to this?" "how can anyone listen to this?"
"(°° " "(°° "
"skip this!" "skip this!"
"next, please! i'm suffering!" "next, please! i'm suffering!"
"that's just bad music" "that's just bad music"
@@ -43,12 +60,40 @@
"turn that down" "turn that down"
"make it stooop" "make it stooop"
"noooo" "noooo"
"this is painful to listen to"
"what is this noise?"
"not my cup of tea"
"this is a hard pass"
"yikes!"
"please no more"
"this is a disaster"
"I can't handle this"
"this is just wrong"
"let's skip this one"
"ugh, why?"
"definitely not a fan"
"wie kann man das hören?"
"das ist schrecklich!"
"bitte nicht!"
"das ist einfach schlecht"
"oh nein, nicht das!"
]; ];
messages.neutral = [ messages.neutral = [
"meh" "meh"
"i have no opinion about this song" "i have no opinion about this song"
"idk man" "idk man"
"it's okay"
"not bad, not great"
"just average"
"it's fine"
"i can take it or leave it"
"kann man hören"
"ist in ordnung"
"naja"
"nicht schlecht, nicht gut"
"ich kann damit leben"
"es ist was es ist"
]; ];
in in
writers.writeDashBin "pls" '' writers.writeDashBin "pls" ''

9
packages/q.nix Normal file
View File

@@ -0,0 +1,9 @@
{ writers, lib, todoman, khal, util-linux, wego, pass }:
writers.writeDashBin "q" ''
export PATH=$PATH:${lib.makeBinPath [todoman khal util-linux wego pass]}
(todo list --due 240; echo) &
(khal list today today; echo) &
(cal -3; echo) &
(wego -location Berlin -owm-api-key "$(pass api-keys/openweathermap)" -frontend emoji -days 2; echo) &
wait
''

View File

@@ -2,7 +2,7 @@
writers, writers,
mktemp, mktemp,
qrencode, qrencode,
xclip, wl-clipboard,
nsxiv, nsxiv,
}: }:
writers.writeDashBin "qrpaste" '' writers.writeDashBin "qrpaste" ''
@@ -11,6 +11,6 @@ writers.writeDashBin "qrpaste" ''
clean() { clean() {
rm "$file" rm "$file"
} }
${qrencode}/bin/qrencode "$(${xclip}/bin/xclip -selection clipboard -out)" -o "$file" ${qrencode}/bin/qrencode "$(${wl-clipboard}/bin/wl-paste)" -o "$file"
${nsxiv}/bin/nsxiv "$file" ${nsxiv}/bin/nsxiv "$file"
'' ''

47
packages/radio-news.nix Normal file
View File

@@ -0,0 +1,47 @@
{ writers, lib, gnused, curl, jq, yq }:
writers.writeBashBin "radio-news" ''
set -efu
PATH=$PATH:${lib.makeBinPath [gnused curl jq yq]}
EVENTS=$(
curl https://www.goodnewsnetwork.org/feed/ \
| xq '
.rss.channel.item
| map(select((.pubDate|strptime("%a, %d %b %Y %H:%M:%S %z")) as $date | ($date | mktime) > (now - (60 * 60 * 24))) | {title, description})
'
)
SYSTEM_PROMPT=$(cat <<EOF
You are a news anchor writing a short news digest for a radio broadcast.
Summarize the following news headlines into a cohesive, engaging script under 400 words.
Keep it professional, concise as possible, and easy to follow.
Please no unnecessary explanations why the news is good.
Begin the digest with: "Here's your good news update."
EOF
)
REQUEST=$(cat <<EOF
{
"system_instruction": {
"parts": [
{
"text": $(jq -Rs <<< "$SYSTEM_PROMPT")
}
]
},
"contents": [
{
"parts": [
{
"text": $(jq -Rs <<< "$EVENTS")
}
]
}
]
}
EOF
)
echo "$REQUEST" | curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash-8b:generateContent?key=$GEMINI_API_KEY" -s -H "Content-Type: application/json" -d @-
''

View File

@@ -1,10 +1,10 @@
{ {
writers, writers,
xclip, wl-clipboard,
espeak, espeak,
}: }:
writers.writeDashBin "ttspaste" '' writers.writeDashBin "ttspaste" ''
${xclip}/bin/xclip -selection clipboard -out | ${espeak}/bin/espeak ${wl-clipboard}/bin/paste | ${espeak}/bin/espeak
'' ''
# curl, mpv, # curl, mpv,
# ${curl}/bin/curl -G http://tts.r/api/tts --data-urlencode 'text@-' | ${mpv}/bin/mpv - # ${curl}/bin/curl -G http://tts.r/api/tts --data-urlencode 'text@-' | ${mpv}/bin/mpv -

View File

@@ -8,7 +8,7 @@
dmenu, dmenu,
gnused, gnused,
libnotify, libnotify,
xclip, wl-clipboard,
xdotool, xdotool,
gawk, gawk,
fetchFromGitHub, fetchFromGitHub,
@@ -90,7 +90,7 @@ in
writers.writeDashBin "unicodmenu" '' writers.writeDashBin "unicodmenu" ''
history_file=$HOME/.cache/unicodmenu history_file=$HOME/.cache/unicodmenu
touch "$history_file" touch "$history_file"
PATH=${lib.makeBinPath [coreutils dmenu gawk gnused libnotify xclip xdotool]} PATH=${lib.makeBinPath [coreutils dmenu gawk gnused libnotify wl-clipboard xdotool]}
all_characters() { all_characters() {
tac "$history_file" tac "$history_file"
@@ -101,7 +101,7 @@ in
[ "$chosen" != "" ] || exit [ "$chosen" != "" ] || exit
echo "$chosen" | tr -d '\n' | xclip -selection clipboard echo "$chosen" | tr -d '\n' | wl-copy
if [ -n "$1" ]; then if [ -n "$1" ]; then
xdotool key Shift+Insert xdotool key Shift+Insert

Submodule secrets updated: ae632b083f...e14a3170cc

View File

@@ -1,13 +1,10 @@
secrets/alertmanager-token-reporters.age secrets/alertmanager-token-reporters.age
secrets/cifs-credentials-hu-berlin.age
secrets/cifs-credentials-zodiac.age secrets/cifs-credentials-zodiac.age
secrets/di-fm-key.age secrets/di-fm-key.age
secrets/email-password-cock.age secrets/email-password-cock.age
secrets/email-password-dslalewa.age
secrets/email-password-fsklassp.age
secrets/email-password-fysi.age secrets/email-password-fysi.age
secrets/email-password-letos.age
secrets/email-password-meinhak99.age secrets/email-password-meinhak99.age
secrets/email-password-meinhaki.age
secrets/email-password-posteo.age secrets/email-password-posteo.age
secrets/fatteh-retiolum-privateKey-ed25519.age secrets/fatteh-retiolum-privateKey-ed25519.age
secrets/fatteh-retiolum-privateKey-rsa.age secrets/fatteh-retiolum-privateKey-rsa.age
@@ -19,6 +16,7 @@ secrets/ful-retiolum-privateKey-ed25519.age
secrets/ful-retiolum-privateKey-rsa.age secrets/ful-retiolum-privateKey-rsa.age
secrets/ful-root.age secrets/ful-root.age
secrets/fu-sftp-key.age secrets/fu-sftp-key.age
secrets/gemini-api-key.age
secrets/github-token-i3status-rust.age secrets/github-token-i3status-rust.age
secrets/grafana-password-admin.age secrets/grafana-password-admin.age
secrets/hetzner-storagebox-credentials.age secrets/hetzner-storagebox-credentials.age
@@ -30,6 +28,10 @@ secrets/kabsa-syncthing-key.age
secrets/kabsa-wireguard-aether-key.age secrets/kabsa-wireguard-aether-key.age
secrets/kabsa-wireguard-aether-psk.age secrets/kabsa-wireguard-aether-psk.age
secrets/kfm-password.age secrets/kfm-password.age
secrets/kibbeh-retiolum-privateKey-ed25519.age
secrets/kibbeh-retiolum-privateKey-rsa.age
secrets/kibbeh-syncthing-cert.age
secrets/kibbeh-syncthing-key.age
secrets/ledger-basicAuth.age secrets/ledger-basicAuth.age
secrets/makanek-retiolum-privateKey-ed25519.age secrets/makanek-retiolum-privateKey-ed25519.age
secrets/makanek-retiolum-privateKey-rsa.age secrets/makanek-retiolum-privateKey-rsa.age
@@ -39,10 +41,8 @@ secrets/manakish-syncthing-cert.age
secrets/manakish-syncthing-key.age secrets/manakish-syncthing-key.age
secrets/manakish-wireguard-aether-key.age secrets/manakish-wireguard-aether-key.age
secrets/manakish-wireguard-aether-psk.age secrets/manakish-wireguard-aether-psk.age
secrets/mastodon-token-autorenkalender.age
secrets/mastodon-token-celan.age secrets/mastodon-token-celan.age
secrets/mastodon-token-hesychius.age secrets/mastodon-token-hesychius.age
secrets/mastodon-token-logotheca.age
secrets/mastodon-token-nietzsche.age secrets/mastodon-token-nietzsche.age
secrets/mastodon-token-smyth.age secrets/mastodon-token-smyth.age
secrets/mastodon-token-tlgwotd.age secrets/mastodon-token-tlgwotd.age

View File

@@ -12,8 +12,10 @@ in {
./radio.nix ./radio.nix
./panoptikon.nix ./panoptikon.nix
./hledger.nix ./hledger.nix
./wallabag.nix
./alew.nix ./alew.nix
../../configs/monitoring.nix ../../configs/monitoring.nix
../../configs/mycelium.nix
../../configs/tor.nix ../../configs/tor.nix
../../configs/save-space.nix ../../configs/save-space.nix
../../configs/spacetime.nix ../../configs/spacetime.nix

View File

@@ -14,7 +14,7 @@
}; };
systemd.services.hledger-backup = { systemd.services.hledger-backup = {
enable = true; enable = false;
startAt = "hourly"; startAt = "hourly";
wants = ["network-online.target"]; wants = ["network-online.target"];
wantedBy = ["multi-user.target"]; wantedBy = ["multi-user.target"];

44
systems/ful/wallabag.nix Normal file
View File

@@ -0,0 +1,44 @@
{ pkgs, config, ... }:
let
domain = "pocket.kmein.de";
port = "8088";
dataPath = "/var/lib/wallabag";
in
{
services.nginx.virtualHosts.${domain} = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${port}";
proxyWebsockets = true;
};
extraConfig = ''
client_body_timeout 3000s;
client_header_timeout 3000s;
keepalive_timeout 3000s;
proxy_read_timeout 3000s;
proxy_connect_timeout 3000s;
proxy_send_timeout 3000s;
'';
};
services.restic.backups.niveum.paths = [ dataPath ];
virtualisation.oci-containers.containers."${domain}" = {
autoStart = true;
image = "wallabag/wallabag:2.6.12";
ports = [ "${port}:80" ];
volumes = [
"${dataPath}/data:/var/www/wallabag/data"
"${dataPath}/images:/var/www/wallabag/web/assets/images"
];
environment = {
SYMFONY__ENV__DOMAIN_NAME = "https://${domain}";
SYMFONY__ENV__FOSUSER_CONFIRMATION = "false";
PHP_MEMORY_LIMIT = "512M";
SYMFONY__ENV__SERVER_NAME = "Wallabag";
};
extraOptions = [ "--pull=always" ];
};
}

View File

@@ -1,13 +1,18 @@
{ {
config, config,
niveumPackages,
pkgs, pkgs,
lib, lib,
inputs,
... ...
}: let }:
let
# TODO wrap obsidian: obsidian --no-sandbox --ozone-platform=wayland --ozone-platform-hint=auto --enable-features=UseOzonePlatform,WaylandWindowDecorations %U
inherit (import ../../lib) retiolumAddresses; inherit (import ../../lib) retiolumAddresses;
in { in
{
imports = [ imports = [
./hardware-configuration.nix ../kibbeh/hardware-configuration.nix
../../configs/tlp.nix ../../configs/tlp.nix
../../configs/default.nix ../../configs/default.nix
../../configs/networkmanager.nix ../../configs/networkmanager.nix
@@ -20,8 +25,6 @@ in {
promptColours.success = "cyan"; promptColours.success = "cyan";
}; };
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/dracula.yaml";
nix.settings = { nix.settings = {
cores = 1; cores = 1;
max-jobs = 2; max-jobs = 2;
@@ -47,15 +50,15 @@ in {
wireguard-aether-psk.file = ../../secrets/kabsa-wireguard-aether-psk.age; wireguard-aether-psk.file = ../../secrets/kabsa-wireguard-aether-psk.age;
}; };
networking.wg-quick.interfaces.aether.address = ["192.168.178.203/24"]; networking.wg-quick.interfaces.aether.address = [ "192.168.178.203/24" ];
environment.systemPackages = [pkgs.zeroad]; environment.systemPackages = [ pkgs.zeroad ];
networking = { networking = {
hostName = "kabsa"; hostName = "kabsa";
wireless.interfaces = ["wlp3s0"]; wireless.interfaces = [ "wlp3s0" ];
retiolum = retiolumAddresses.kabsa; retiolum = retiolumAddresses.kabsa;
}; };
system.stateVersion = "19.03"; system.stateVersion = "23.11";
} }

View File

@@ -0,0 +1,97 @@
{
config,
pkgs,
niveumPackages,
...
}:
{
imports = [
./hardware-configuration.nix
../../configs/spacetime.nix
../../configs/admin-essentials.nix
../../configs/keyboard.nix
../../configs/sound.nix
../../configs/printing.nix
../../configs/nix.nix
../../configs/flix.nix
../../configs/fonts.nix
../../configs/mycelium.nix
../../configs/retiolum.nix
../../configs/sshd.nix
../../configs/sudo.nix
../../configs/zsh.nix
../../configs/tor.nix
];
age.secrets = {
retiolum-rsa = {
file = ../../secrets/kibbeh-retiolum-privateKey-rsa.age;
mode = "400";
owner = "tinc-retiolum";
group = "tinc-retiolum";
};
retiolum-ed25519 = {
file = ../../secrets/kibbeh-retiolum-privateKey-ed25519.age;
mode = "400";
owner = "tinc-retiolum";
group = "tinc-retiolum";
};
};
services.gnome.gnome-keyring.enable = true;
security.pam.services.lightdm.enableGnomeKeyring = true;
services.openssh.enable = true;
networking.hostName = "kibbeh";
networking.networkmanager.enable = true;
i18n.defaultLocale = "en_DK.UTF-8";
services.xserver.enable = true;
services.xserver.displayManager.lightdm.enable = true;
services.xserver.desktopManager.pantheon.enable = true;
# services.displayManager.autoLogin.enable = true;
# services.displayManager.autoLogin.user = config.users.users.me.name;
age.secrets = {
di-fm-key.file = ../../secrets/di-fm-key.age;
};
users.users.me = {
name = "kfm";
isNormalUser = true;
description = "ि";
extraGroups = [ "networkmanager" ];
password = "hackme";
packages = with pkgs; [
# packages TODO
firefox
thunderbird
alacritty
tor-browser-bundle-bin
zathura
okular
anki-bin
libreoffice
xournalpp
jellyfin-media-player
niveumPackages.mpv-tv
telegram-desktop
(niveumPackages.mpv-radio.override { di-fm-key-file = config.age.secrets.di-fm-key.path; })
niveumPackages.meteo
spotify
];
};
environment.systemPackages = with pkgs; [
htop
git
vim
tmux
(niveumPackages.vim.override { colorscheme = "base16-gruvbox-dark-medium"; })
];
system.stateVersion = "23.11";
}

View File

@@ -0,0 +1,55 @@
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot = {
initrd = {
availableKernelModules = [
"ehci_pci"
"ahci"
"usb_storage"
"sd_mod"
"sdhci_pci"
];
luks.devices."luks-16a8b3b0-5e0a-4d36-920c-eb6322a3c181".device =
"/dev/disk/by-uuid/16a8b3b0-5e0a-4d36-920c-eb6322a3c181";
luks.devices."luks-b3988d35-72a9-4e7c-992d-f500bb388554".device =
"/dev/disk/by-uuid/b3988d35-72a9-4e7c-992d-f500bb388554";
};
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/ecab6acb-66f1-41c9-8281-59c76cf8f0c6";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-uuid/8066-63C2";
fsType = "vfat";
};
};
swapDevices = [
{ device = "/dev/disk/by-uuid/8cebdb17-4f2e-4750-8e91-71aa942bdfde"; }
];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@@ -15,6 +15,7 @@ in {
./monitoring ./monitoring
./names.nix ./names.nix
./nextcloud.nix ./nextcloud.nix
../../configs/mycelium.nix
./radio-news.nix ./radio-news.nix
./scrabble.nix ./scrabble.nix
# ./onlyoffice.nix # ./onlyoffice.nix

View File

@@ -1,20 +1,45 @@
{ config, ... }:
let let
inherit (import ../../lib) sshPort; inherit (import ../../lib) sshPort;
domain = "https://code.kmein.de"; domain = "code.kmein.de";
in { in {
services.anubis = {
defaultOptions.settings = {
USER_DEFINED_DEFAULT = true;
};
instances = {
"gitea".settings = {
TARGET = "http://localhost:${toString config.services.gitea.settings.server.HTTP_PORT}";
USER_DEFINED_INSTANCE = true;
OG_PASSTHROUGH = true;
SERVE_ROBOTS_TXT = true;
};
};
};
users.users.nginx.extraGroups = [ config.services.anubis.instances."gitea".group ];
services.gitea = { services.gitea = {
enable = true; enable = true;
appName = "code.kmein.de"; appName = domain;
settings = { settings = {
server.ROOT_URL = domain; server.ROOT_URL = "https://${domain}";
server.DOMAIN = domain;
server.SSH_PORT = sshPort; server.SSH_PORT = sshPort;
service.DISABLE_REGISTRATION = true; service.DISABLE_REGISTRATION = true;
}; };
}; };
services.nginx.virtualHosts."code.kmein.de" = { services.nginx.virtualHosts.${domain} = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
locations."/".extraConfig = "proxy_pass http://localhost:3000;"; # locations."/".extraConfig = "proxy_pass http://localhost:3000;";
locations = {
"/" = {
proxyPass = "http://unix:${config.services.anubis.instances."gitea".settings.BIND}";
proxyWebsockets = true;
};
"/metrics".proxyPass = "http://unix:${config.services.anubis.instances."gitea".settings.METRICS_BIND}";
};
}; };
niveum.passport.services = [ niveum.passport.services = [

View File

@@ -47,7 +47,7 @@ in {
services.nextcloud = { services.nextcloud = {
enable = true; enable = true;
package = pkgs.nextcloud30; package = pkgs.nextcloud31;
https = true; https = true;

View File

@@ -1,6 +1,8 @@
{ {
config,
pkgs, pkgs,
lib, lib,
niveumPackages,
... ...
}: let }: let
inherit (import ../../lib) serveHtml; inherit (import ../../lib) serveHtml;
@@ -8,6 +10,30 @@
in { in {
services.nginx.virtualHosts."redaktion.r".locations."/".extraConfig = serveHtml ../../lib/radio-news.html pkgs; services.nginx.virtualHosts."redaktion.r".locations."/".extraConfig = serveHtml ../../lib/radio-news.html pkgs;
age.secrets = {
gemini-api-key.file = ../../secrets/gemini-api-key.age;
};
systemd.services.news-digest = {
enable = true;
wantedBy = ["multi-user.target"];
wants = ["network-online.target"];
serviceConfig.LoadCredential = [
"gemini-api-key:${config.age.secrets.gemini-api-key.path}"
];
startAt = "*:50";
script = ''
PATH=$PATH:${lib.makeBinPath [pkgs.gnused pkgs.curl pkgs.jq]}
GEMINI_API_KEY="$(cat "$CREDENTIALS_DIRECTORY/gemini-api-key")" ${niveumPackages.radio-news}/bin/radio-news | jq --arg from "$(date -u -Is | sed 's/+00:00/Z/')" --arg to "$(date -u -Is -d 'now + 30 minutes' | sed 's/+00:00/Z/')" '
{
from: $from,
to: $to,
text: .candidates[].content.parts[].text
}' | curl -s -X POST http://radio-news.r -H "Content-Type: application/json" -d @-
'';
};
niveum.passport.services = [ niveum.passport.services = [
{ {
title = "Retiolum Radio News"; title = "Retiolum Radio News";

View File

@@ -0,0 +1,210 @@
{ lib, pkgs, config, unstablePackages, ... }:
let
inherit (import ../../lib) kieran;
weechatHome = "/var/lib/weechat";
weechat-declarative =
pkgs.callPackage ../../packages/weechat-declarative.nix {
inherit unstablePackages;
};
in {
systemd.services.weechat = let
tmux = pkgs.writers.writeDash "tmux" ''
exec ${pkgs.tmux}/bin/tmux -f ${
pkgs.writeText "tmux.conf" ''
set-option -g prefix `
unbind-key C-b
bind ` send-prefix
set-option -g status off
set-option -g default-terminal screen-256color
#use session instead of windows
bind-key c new-session
bind-key p switch-client -p
bind-key n switch-client -n
bind-key C-s switch-client -l
''
} "$@"
'';
weechat = weechat-declarative.override {
config = {
scripts = [
pkgs.weechatScripts.weechat-autosort
pkgs.weechatScripts.colorize_nicks
# pkgs.weechatScripts.weechat-matrix
(pkgs.callPackage ../../packages/weechatScripts/hotlist2extern.nix
{ })
];
settings = let nick = "kmein";
in {
weechat = {
look.mouse = true;
look.prefix_align_max = 15;
color.chat_nick_colors =
lib.lists.subtractLists (lib.range 52 69 ++ lib.range 231 248)
(lib.range 31 254);
};
irc = {
look = {
server_buffer = "independent";
color_nicks_in_nicklist = true;
};
server_default = {
nicks = nick;
msg_part = "tschö mit ö";
msg_quit = "ciao kakao";
msg_kick = "warum machst du diese?";
realname = lib.head (lib.strings.split " " kieran.name);
};
server = {
hackint = {
autoconnect = true;
addresses = "irc.hackint.org/6697";
ipv6 = true;
tls = true;
autojoin = [ "#eloop" "#krebs" "#the_playlist" ];
sasl_mechanism = "plain";
sasl_username = nick;
sasl_password = "\${sec.data.hackint_sasl}";
};
libera = {
autoconnect = true;
addresses = "irc.libera.chat/6697";
tls = true;
autojoin = [ "#haskell" "#fysi" "#binaergewitter" "#vim" ];
sasl_mechanism = "plain";
sasl_username = nick;
sasl_password = "\${sec.data.libera_sasl}";
};
retiolum = {
autoconnect = true;
addresses = "irc.r";
tls = false;
autojoin = [ "#xxx" "#brockman" "#flix" ];
command = lib.concatStringsSep "\\;" [
"/oper admin aidsballs"
"/msg nickserv always-on true"
"/msg nickserv autoreplay-missed on"
"/msg nickserv auto-away"
];
sasl_mechanism = "plain";
sasl_username = nick;
sasl_password = "\${sec.data.retiolum_sasl}";
};
brockman = {
autoconnect = true;
addresses = "brockman.news/6667";
tls = false;
autojoin = [ "#cook" "#kmeinung" ];
sasl_username = nick;
sasl_password = "\${sec.data.brockman_sasl}";
sasl_mechanism = "plain";
};
};
};
logger.level.irc.news = 0;
plugins.var.perl.hotlist2extern = {
external_command_hotlist = "echo %X > ${weechatHome}/hotlist.txt";
external_command_hotlist_empty =
"echo -n %X > ${weechatHome}/hotlist.txt";
lowest_priority = "2";
use_title = "off";
delimiter = ",";
};
matrix.look.server_buffer = "merge_without_core";
matrix.server.nibbana = {
address = "nibbana.jp";
username = nick;
password = "\${sec.data.nibbana_account}";
autoconnect = true;
};
alias.cmd.mod = "/quote omode $channel +o $nick";
relay = {
port.weechat = 9000;
network.password = "\${sec.data.relay_password}";
};
filters = {
zerocovid = {
buffer = "irc.news.*";
tags = "*";
regex =
"[kc]orona|💉|🤒|😷|[kc]ovid|virus|lockdown|va[kc][sc]in|vaxx|mutante|mutation|impf|pandemi|κορ[ωο]ν[αο]ϊό|корона|expert|infe[ck]t|infizi|in[cz]iden[cz]|sars-cov|drosten|virolog|lauterbach|delta|omi[ck]ron|epidemi|booster|r-wert";
};
smart = {
buffer = "*";
tags = "irc_smart_filter";
regex = "*";
};
playlist_topic = {
buffer = "irc.*.#the_playlist";
tags = "irc_topic";
regex = "*";
};
brockman_notice = {
buffer = "irc.news.*";
tags = "irc_notice";
regex = "*";
};
bots = {
buffer = "irc.retiolum.*";
tags = [ "nick_gitlab" "nick_prometheus" ];
regex = "*";
};
people = {
buffer = "irc.*.*";
tags = map (name: "nick_${name}") [ "mod_p[matrix-fli" ];
regex = "*";
};
};
};
extraCommands = ''
/save
/connect -all
'';
# /matrix connect nibbana
};
};
in {
description = "Weechat bouncer";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
restartIfChanged = true;
path = [ pkgs.alacritty.terminfo ];
environment.WEECHAT_HOME = weechatHome;
# preStart = "${pkgs.coreutils}/bin/rm $WEECHAT_HOME/*.conf";
script = "${tmux} -2 new-session -d -s IM ${weechat}/bin/weechat";
preStop = "${tmux} kill-session -t IM";
serviceConfig = {
User = "weechat";
Group = "weechat";
RemainAfterExit = true;
Type = "oneshot";
};
};
users.groups.weechat = { };
users.extraUsers.weechat = {
useDefaultShell = true;
openssh.authorizedKeys.keys = kieran.sshKeys ++ [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC+KVDmYYH7mA8v81e9O3swXm3ZVYY9t4HP65ud61uXy weechat_android@kibbeh"
];
createHome = true;
group = "weechat";
home = "/var/lib/weechat";
isSystemUser = true;
packages = [ pkgs.tmux ];
};
age.secrets.weechat-sec = {
file = ../../secrets/weechat-sec.conf.age;
path = "/var/lib/weechat/sec.conf";
owner = "weechat";
group = "weechat";
mode = "440";
};
niveum.passport.services = [{
title = "weechat bouncer";
description = "keeps me logged in on IRC.";
}];
}

View File

@@ -12,8 +12,8 @@ in {
./hdmi.nix ./hdmi.nix
../../configs/default.nix ../../configs/default.nix
../../configs/tlp.nix ../../configs/tlp.nix
../../configs/wpa_supplicant.nix
../../configs/admin-essentials.nix ../../configs/admin-essentials.nix
../../configs/networkmanager.nix
../../configs/power-action.nix ../../configs/power-action.nix
]; ];

View File

@@ -12,6 +12,7 @@ in {
./gaslight.nix ./gaslight.nix
./hardware-configuration.nix ./hardware-configuration.nix
./nas.nix ./nas.nix
../../configs/mycelium.nix
./home-assistant.nix ./home-assistant.nix
../../configs/monitoring.nix ../../configs/monitoring.nix
../../configs/retiolum.nix ../../configs/retiolum.nix
@@ -81,6 +82,7 @@ in {
pkgs.vim pkgs.vim
pkgs.htop pkgs.htop
pkgs.ncmpcpp pkgs.ncmpcpp
pkgs.python3 # for sshuttle
]; ];
# since 22.05 timeout fails? # since 22.05 timeout fails?