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

6 Commits

Author SHA1 Message Date
github-actions[bot]
4d50c655fe flake.lock: Update
Flake lock file updates:

• Updated input 'home-manager':
    'github:nix-community/home-manager/bd65bc3cde04c16755955630b344bc9e35272c56?narHash=sha256-dinzAqCjenWDxuy%2BMqUQq0I4zUSfaCvN9rzuCmgMZJY%3D' (2025-01-08)
  → 'github:nix-community/home-manager/254d47082e23dbf72fdeca1da6fe1da420f478d8?narHash=sha256-eCc0/Q4bPpe4/AS%2BuzIrHLJcR6BxPQ69q2kD0/Qe6rU%3D' (2025-02-14)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/4e96537f163fad24ed9eb317798a79afc85b51b7?narHash=sha256-GFzPxJzTd1rPIVD4IW%2BGwJlyGwBDV1Tj5FLYwDQQ9sM%3D' (2025-01-26)
  → 'github:NixOS/nixpkgs/0b73e36b1962620a8ac551a37229dd8662dac5c8?narHash=sha256-wjWLzdM7PIq4ZAe7k3vyjtgVJn6b0UeodtRFlM/6W5U%3D' (2025-02-13)
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/eb12bf57742db460e2f6b12918911deacc103812?narHash=sha256-hc4cRhHPrCVaMHqVCT%2BCcJX0BZdYRwFP99UHyiR948g%3D' (2025-01-27)
  → 'github:NixOS/nixpkgs/1dcdd535fef84d4671129a10e7072d56dca9a4d3?narHash=sha256-6QWdUgz2O2Mm%2BpYx/AYB4Rot5/s1OR1C6bt30TI81yY%3D' (2025-02-16)
• Updated input 'nur':
    'github:nix-community/NUR/5d8189fe2c0655a93b081f4b7b892236b2500507?narHash=sha256-MsqFDA4e0PnYuxlCn1gpIl6C1fWyPLY2ND1/Jr8yrCY%3D' (2025-01-27)
  → 'github:nix-community/NUR/0d565194b2868f76c3ebf0f1126b1921d1a4e352?narHash=sha256-kfqBQH3ZvTviLJRHJTfHze536WTfmtWc57yvXPaXetY%3D' (2025-02-16)
• Updated input 'nur/nixpkgs':
    'github:nixos/nixpkgs/852ff1d9e153d8875a83602e03fdef8a63f0ecf8?narHash=sha256-Zf0hSrtzaM1DEz8//%2BXs51k/wdSajticVrATqDrfQjg%3D' (2025-01-26)
  → 'github:nixos/nixpkgs/2ff53fe64443980e139eaa286017f53f88336dd0?narHash=sha256-%2B/bYK3DbPxMIvSL4zArkMX0LQvS7rzBKXnDXLfKyRVc%3D' (2025-02-13)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/27bb917a41480b6ceee8e42d32dfcc9ecc6fa6c6?narHash=sha256-ZSXR/po/slqpsk3JLVjXbE04Vqrb4k7yCGHjyMj3tOk%3D' (2025-01-27)
  → 'github:oxalica/rust-overlay/3dbc0ce1c0690b83cfb9a9a51fbe90c3bc8f9916?narHash=sha256-UN9hRKRE1eLU8C0cioTZubaCZQTA8NDc8/4vCpS5pS0%3D' (2025-02-15)
• Updated input 'scripts':
    'github:kmein/scripts/a5e82301679770856815798e15a6a563cfd669fc?narHash=sha256-uqQwN5harXGqhpL8HDjEtxOje2HSTW0PFOAOi5KEsGc%3D' (2024-09-23)
  → 'github:kmein/scripts/cff9c7018724476b6acf5d4adde484d5f6b32ec2?narHash=sha256-r2ZWWzuc/NzY2CgfnCrxyOd4ofvsNWNJso2Z/PfphP8%3D' (2025-02-05)
• Updated input 'stockholm':
    'github:krebs/stockholm/c45109b564345a9aedb3577b3a3150a4fabb5403?narHash=sha256-OrLWVsigZljnHNA5HRty6D/8IF4ge4WzHjmimYzxD%2BQ%3D' (2025-01-27)
  → 'github:krebs/stockholm/8d0538bf86e4f9df4f5cc358a1760b255be797e9?narHash=sha256-tQZ8sXCU6yvC0ut/%2BezRUSd89Nbyqqn0JVCjYDwcqQA%3D' (2025-02-11)
• Updated input 'stylix':
    'github:danth/stylix/bcbd472edc8ed15624a378ce513b1e001d77594a?narHash=sha256-Jt0F1wY2AcgQdSfOE1%2BB0YnBYDgFYXJKDyEIa6/2VFk%3D' (2025-01-26)
  → 'github:danth/stylix/dfa4128b453d424c9fe3ef919776e722c0b766cb?narHash=sha256-mU%2BaYnob%2B7Ycu/tU9oFoweIJwdjLj0uxcp%2BI1czH4DM%3D' (2025-02-12)
2025-02-16 01:00:26 +00: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
16 changed files with 478 additions and 67 deletions

View File

@@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
system: [makanek,manakish,kabsa,zaatar,ful,fatteh]
system: [makanek,manakish,kabsa,zaatar,ful,fatteh,kibbeh]
steps:
- uses: actions/checkout@v3
- name: Install QEMU (ARM)

View File

@@ -52,6 +52,22 @@ in {
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
take = pkgs.writers.writeDash "take" ''
mkdir "$1" && cd "$1"

View File

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

View File

@@ -126,22 +126,6 @@ in {
};
};
}
{
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 = {
@@ -255,6 +239,11 @@ in {
./watson.nix
./wallpaper.nix
./zsh.nix
{
home-manager.users.me.home.file.".zshrc".text = ''
# nothing to see here
'';
}
./tor.nix
./stw-berlin.nix
./mastodon-bot.nix

View File

@@ -126,7 +126,7 @@ in {
fontconfig.defaultFonts = rec {
monospace = ["Noto Sans Mono"] ++ emoji;
serif = ["Noto Serif" "Noto Naskh Arabic" "Noto Serif Devanagari"];
sansSerif = ["Noto Sans Display" "Noto Naskh Arabic" "Noto Sans Hebrew" "Noto Sans Devanagari" "Noto Sans CJK JP" "Noto Sans Coptic"];
sansSerif = ["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"];
};
# xelatex fails with woff files

View File

@@ -15,6 +15,7 @@
avestan = ../lib/keyboards/avestan;
gothic = ../lib/keyboards/gothic;
farsi = { code = "ir"; variant = "qwerty"; };
syriac = { code = "sy"; variant = "syc_phonetic"; };
sanskrit = { code = "in"; variant = "san-kagapa"; };
gujarati = {code = "in"; variant = "guj-kagapa"; };
urdu = {code = "in"; variant = "urd-phonetic"; };

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
];
}

View File

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

54
flake.lock generated
View File

@@ -658,11 +658,11 @@
]
},
"locked": {
"lastModified": 1736373539,
"narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=",
"lastModified": 1739570999,
"narHash": "sha256-eCc0/Q4bPpe4/AS+uzIrHLJcR6BxPQ69q2kD0/Qe6rU=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "bd65bc3cde04c16755955630b344bc9e35272c56",
"rev": "254d47082e23dbf72fdeca1da6fe1da420f478d8",
"type": "github"
},
"original": {
@@ -1113,11 +1113,11 @@
},
"nixpkgs-unstable_2": {
"locked": {
"lastModified": 1738005445,
"narHash": "sha256-hc4cRhHPrCVaMHqVCT+CcJX0BZdYRwFP99UHyiR948g=",
"lastModified": 1739667012,
"narHash": "sha256-6QWdUgz2O2Mm+pYx/AYB4Rot5/s1OR1C6bt30TI81yY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "eb12bf57742db460e2f6b12918911deacc103812",
"rev": "1dcdd535fef84d4671129a10e7072d56dca9a4d3",
"type": "github"
},
"original": {
@@ -1235,11 +1235,11 @@
},
"nixpkgs_7": {
"locked": {
"lastModified": 1737885640,
"narHash": "sha256-GFzPxJzTd1rPIVD4IW+GwJlyGwBDV1Tj5FLYwDQQ9sM=",
"lastModified": 1739484910,
"narHash": "sha256-wjWLzdM7PIq4ZAe7k3vyjtgVJn6b0UeodtRFlM/6W5U=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4e96537f163fad24ed9eb317798a79afc85b51b7",
"rev": "0b73e36b1962620a8ac551a37229dd8662dac5c8",
"type": "github"
},
"original": {
@@ -1251,11 +1251,11 @@
},
"nixpkgs_8": {
"locked": {
"lastModified": 1737885589,
"narHash": "sha256-Zf0hSrtzaM1DEz8//+Xs51k/wdSajticVrATqDrfQjg=",
"lastModified": 1739446958,
"narHash": "sha256-+/bYK3DbPxMIvSL4zArkMX0LQvS7rzBKXnDXLfKyRVc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "852ff1d9e153d8875a83602e03fdef8a63f0ecf8",
"rev": "2ff53fe64443980e139eaa286017f53f88336dd0",
"type": "github"
},
"original": {
@@ -1399,11 +1399,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1738006222,
"narHash": "sha256-MsqFDA4e0PnYuxlCn1gpIl6C1fWyPLY2ND1/Jr8yrCY=",
"lastModified": 1739667383,
"narHash": "sha256-kfqBQH3ZvTviLJRHJTfHze536WTfmtWc57yvXPaXetY=",
"owner": "nix-community",
"repo": "NUR",
"rev": "5d8189fe2c0655a93b081f4b7b892236b2500507",
"rev": "0d565194b2868f76c3ebf0f1126b1921d1a4e352",
"type": "github"
},
"original": {
@@ -1572,11 +1572,11 @@
]
},
"locked": {
"lastModified": 1737944843,
"narHash": "sha256-ZSXR/po/slqpsk3JLVjXbE04Vqrb4k7yCGHjyMj3tOk=",
"lastModified": 1739586408,
"narHash": "sha256-UN9hRKRE1eLU8C0cioTZubaCZQTA8NDc8/4vCpS5pS0=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "27bb917a41480b6ceee8e42d32dfcc9ecc6fa6c6",
"rev": "3dbc0ce1c0690b83cfb9a9a51fbe90c3bc8f9916",
"type": "github"
},
"original": {
@@ -1630,11 +1630,11 @@
]
},
"locked": {
"lastModified": 1727122803,
"narHash": "sha256-uqQwN5harXGqhpL8HDjEtxOje2HSTW0PFOAOi5KEsGc=",
"lastModified": 1738746564,
"narHash": "sha256-r2ZWWzuc/NzY2CgfnCrxyOd4ofvsNWNJso2Z/PfphP8=",
"owner": "kmein",
"repo": "scripts",
"rev": "a5e82301679770856815798e15a6a563cfd669fc",
"rev": "cff9c7018724476b6acf5d4adde484d5f6b32ec2",
"type": "github"
},
"original": {
@@ -1650,11 +1650,11 @@
"nixpkgs": "nixpkgs_9"
},
"locked": {
"lastModified": 1737969857,
"narHash": "sha256-OrLWVsigZljnHNA5HRty6D/8IF4ge4WzHjmimYzxD+Q=",
"lastModified": 1739285100,
"narHash": "sha256-tQZ8sXCU6yvC0ut/+ezRUSd89Nbyqqn0JVCjYDwcqQA=",
"owner": "krebs",
"repo": "stockholm",
"rev": "c45109b564345a9aedb3577b3a3150a4fabb5403",
"rev": "8d0538bf86e4f9df4f5cc358a1760b255be797e9",
"type": "github"
},
"original": {
@@ -1716,11 +1716,11 @@
"tinted-tmux": "tinted-tmux"
},
"locked": {
"lastModified": 1737924417,
"narHash": "sha256-Jt0F1wY2AcgQdSfOE1+B0YnBYDgFYXJKDyEIa6/2VFk=",
"lastModified": 1739392863,
"narHash": "sha256-mU+aYnob+7Ycu/tU9oFoweIJwdjLj0uxcp+I1czH4DM=",
"owner": "danth",
"repo": "stylix",
"rev": "bcbd472edc8ed15624a378ce513b1e001d77594a",
"rev": "dfa4128b453d424c9fe3ef919776e722c0b766cb",
"type": "github"
},
"original": {

View File

@@ -111,6 +111,7 @@
tabula = "root@tabula";
kabsa = "root@kabsa";
fatteh = "root@fatteh";
kibbeh = "root@kibbeh";
};
in
lib.attrsets.nameValuePair "deploy-${hostname}" {
@@ -227,7 +228,15 @@
specialArgs = niveumSpecialArgs system;
modules = [
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
retiolum.nixosModules.retiolum
];

Submodule secrets updated: d5ff5eef81...04f66a7296

View File

@@ -1,13 +1,10 @@
secrets/alertmanager-token-reporters.age
secrets/cifs-credentials-hu-berlin.age
secrets/cifs-credentials-zodiac.age
secrets/di-fm-key.age
secrets/email-password-cock.age
secrets/email-password-dslalewa.age
secrets/email-password-fsklassp.age
secrets/email-password-fysi.age
secrets/email-password-letos.age
secrets/email-password-meinhak99.age
secrets/email-password-meinhaki.age
secrets/email-password-posteo.age
secrets/fatteh-retiolum-privateKey-ed25519.age
secrets/fatteh-retiolum-privateKey-rsa.age
@@ -30,6 +27,10 @@ secrets/kabsa-syncthing-key.age
secrets/kabsa-wireguard-aether-key.age
secrets/kabsa-wireguard-aether-psk.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/makanek-retiolum-privateKey-ed25519.age
secrets/makanek-retiolum-privateKey-rsa.age
@@ -39,10 +40,8 @@ secrets/manakish-syncthing-cert.age
secrets/manakish-syncthing-key.age
secrets/manakish-wireguard-aether-key.age
secrets/manakish-wireguard-aether-psk.age
secrets/mastodon-token-autorenkalender.age
secrets/mastodon-token-celan.age
secrets/mastodon-token-hesychius.age
secrets/mastodon-token-logotheca.age
secrets/mastodon-token-nietzsche.age
secrets/mastodon-token-smyth.age
secrets/mastodon-token-tlgwotd.age

View File

@@ -20,8 +20,6 @@ in {
promptColours.success = "cyan";
};
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/dracula.yaml";
nix.settings = {
cores = 1;
max-jobs = 2;

View File

@@ -0,0 +1,107 @@
{ 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/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;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
services.openssh.enable = true;
boot.initrd.luks.devices."luks-b3988d35-72a9-4e7c-992d-f500bb388554".device =
"/dev/disk/by-uuid/b3988d35-72a9-4e7c-992d-f500bb388554";
networking.hostName = "kibbeh";
networking.networkmanager.enable = true;
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8";
LC_MEASUREMENT = "de_DE.UTF-8";
LC_MONETARY = "de_DE.UTF-8";
LC_NAME = "de_DE.UTF-8";
LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8";
LC_TELEPHONE = "de_DE.UTF-8";
LC_TIME = "de_DE.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
(niveumPackages.vim.override { colorscheme = "base16-gruvbox-dark-medium"; })
];
system.stateVersion = "23.11";
}

View File

@@ -0,0 +1,43 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/ecab6acb-66f1-41c9-8281-59c76cf8f0c6";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-16a8b3b0-5e0a-4d36-920c-eb6322a3c181".device = "/dev/disk/by-uuid/16a8b3b0-5e0a-4d36-920c-eb6322a3c181";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/8066-63C2";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/8cebdb17-4f2e-4750-8e91-71aa942bdfde"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s25.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wwp0s29u1u4i6.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

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.";
}];
}