From 41df7d18185c689811e9758ddab4673a30dee405 Mon Sep 17 00:00:00 2001 From: Jakub Stachurski Date: Wed, 11 Feb 2026 14:58:56 +0100 Subject: Migrate to stalwart for vdirsyncer and add motd. This adds rust-motd config and adds an executable that displays the motd. Additionally, it updates credentials for vdirsyncer. --- home-modules/services/vdirsyncer.nix | 6 +-- home-modules/theming.nix | 8 +++- modules/default.nix | 1 + modules/desktop/akonadi.nix | 6 +-- modules/motd.nix | 89 ++++++++++++++++++++++++++++++++++++ secrets/secrets.yaml | 8 ++-- 6 files changed, 106 insertions(+), 12 deletions(-) create mode 100644 modules/motd.nix diff --git a/home-modules/services/vdirsyncer.nix b/home-modules/services/vdirsyncer.nix index df76bc8..8afe2c8 100644 --- a/home-modules/services/vdirsyncer.nix +++ b/home-modules/services/vdirsyncer.nix @@ -10,7 +10,7 @@ in options.homesv.vdirsyncer = { enable = lib.mkEnableOption "Enable syncing via vdirsyncer"; user = lib.mkOption { default = config.home.username; }; - server = lib.mkOption { default = "https://webdav.wilkuu.xyz/dav.php"; }; + server = lib.mkOption { default = "https://mail.wilkuu.xyz/dav/"; }; }; config = lib.mkIf cfg.enable { sops.secrets.webdav_uname = { @@ -45,7 +45,7 @@ in [storage contacts_remote] type = "carddav" - auth = "digest" + auth = "basic" url = "${cfg.server}" username = "${config.sops.placeholder.webdav_uname}" password = "${config.sops.placeholder.webdav_pass}" @@ -64,7 +64,7 @@ in [storage calendar_remote] type = "caldav" - auth = "digest" + auth = "basic" url = "${cfg.server}" username = "${config.sops.placeholder.webdav_uname}" password = "${config.sops.placeholder.webdav_pass}" diff --git a/home-modules/theming.nix b/home-modules/theming.nix index ee6b13b..94af4ac 100644 --- a/home-modules/theming.nix +++ b/home-modules/theming.nix @@ -36,8 +36,12 @@ in qt = { enable = true; - platformTheme.name = "qtct"; - style.name = "kvantum"; + kde.settings = { + + }; + style.package = pkgs.catppuccin-qt5ct; + + # style.name = "kvantum"; }; xdg.configFile."Kvantum/kvantum.kvconfig".source = diff --git a/modules/default.nix b/modules/default.nix index 9ded08a..f18f380 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -12,6 +12,7 @@ ./vpn.nix ./remote-builder.nix ./nh.nix + ./motd.nix ]; nixpkgs.overlays = [ diff --git a/modules/desktop/akonadi.nix b/modules/desktop/akonadi.nix index d97f859..fb93913 100644 --- a/modules/desktop/akonadi.nix +++ b/modules/desktop/akonadi.nix @@ -2,8 +2,8 @@ { programs.kde-pim = { enable = true; - kmail = false; - merkuro = false; - kontact = false; + kmail = true; + merkuro = true; + kontact = true; }; } diff --git a/modules/motd.nix b/modules/motd.nix new file mode 100644 index 0000000..7f7e229 --- /dev/null +++ b/modules/motd.nix @@ -0,0 +1,89 @@ +{pkgs, config, lib, ...}: + let + banner_script = pkgs.writeShellScript "motd_banner.sh" '' + echo "This is a nice banner, property of wilkuu (wilkuu.xyz)" + echo -e "\n\tTODO: Put a banner here\t\n" + echo "Current hostname: ${config.networking.hostName}" + ''; + + # Code stolen from the nix store so I can finish motd_shell + motdConf = + pkgs.runCommand "motd.toml" + { + __structuredAttrs = true; + inherit (config.programs.rust-motd) order settings; + nativeBuildInputs = [ + pkgs.remarshal + pkgs.jq + ]; + } + '' + cat "$NIX_ATTRS_JSON_FILE" \ + | jq '.settings as $settings + | .order + | map({ key: ., value: $settings."\(.)" }) + | from_entries' -r \ + | json2toml /dev/stdin "$out" + ''; + + motd_shell = pkgs.writeShellScriptBin "motd_shell" '' + if [[ -n "$SHOW_MOTD" && -x /run/current-system/sw/bin/rust-motd ]]; then + unset SHOW_MOTD + ${pkgs.rust-motd}/bin/rust-motd ${motdConf} + fi + $1 + ''; + in { + environment.systemPackages = with pkgs; [ + rust-motd motd_shell + ]; + programs.rust-motd = { + enable = true; + order = [ + "banner" + "uptime" + "load_avg" + "filesystems" + "memory" + "last_run" + "global" + ]; + settings = { + banner = { + color = "light_magenta"; + # TODO: Make this nice + command = "bash ${banner_script}"; + }; + uptime = { + prefix = "Uptime: "; + }; + load_avg = { + format = '' + Load: [1m] [5m] [15m] + {one:.02} , {five:.02} , {fifteen:.02} +''; + }; + filesystems = { + root = "/"; + store = "/store2"; + ntfs = "/win_games"; + }; + memory = { + swap_pos = "beside"; + }; + last_run = {}; + }; + }; + security.pam.services.kitty = { + showMotd = true; + }; + security.pam.services.kitty-wrapper = { + showMotd = true; + }; + security.pam.services.login = { + showMotd = true; + }; + + + +} diff --git a/secrets/secrets.yaml b/secrets/secrets.yaml index 18e36d7..fea77a5 100644 --- a/secrets/secrets.yaml +++ b/secrets/secrets.yaml @@ -1,7 +1,7 @@ wilkuu: webdav: - username: ENC[AES256_GCM,data:NVdz+9U/EvOiHTLL8J9N4A==,iv:jEZCiHUgCPxuwhgBCDwns+QoCKOXX3fjHlQpCDm2Js0=,tag:hPOrHNMQsQ6YKicmucGlag==,type:str] - password: ENC[AES256_GCM,data:jtf7GGioSTHEaOndQK3SG5tPCpuI4QbhquegcWdQSMIl2lpt6z+lMZnFzA8x0jh3TridOn/J,iv:ZvFDEMY6V4W/ict0V7sLLt/c2oxM5UDCPpgpmkQIT7Q=,tag:AhmZxKGUiCufYVDXp+Mcxw==,type:str] + username: ENC[AES256_GCM,data:ejn6BeA=,iv:9tnfRsz+4hyQ3HnlqSjuTz3kXVqhxfLbxtfPTKR3s88=,tag:5s+QcyA+AumpqQxL4pdCOA==,type:str] + password: ENC[AES256_GCM,data:1LYRXqp0i86+ycCwNYUOSmb9uh84epVkv6tkUkwBnijvQv4ydsU=,iv:9fRm/s/UlrI6RpPfR9vwIsqJ2U+nF8qyWx4RgyrK6po=,tag:8FdWgIU4PztJTWXqjaMnnA==,type:str] remote: ssh: pub: ENC[AES256_GCM,data:U085pFFBMqd38eRXZKAYo8pjSiK9KUB1a/oXFEn5TKldH5vx3IBT+/c7VxG8O/W08sZlnHZxnjOKco3Klnmzpi+R+pAzTC7qe8hjk69JGbBKRKV0jp8gmNKM2o3cme8dsGuq,iv:gq271TCYh8akbMJTACOrwLuBVb6vUWkMQwQP088XBDI=,tag:9Vya17dym0VJxKRLRuBGAw==,type:str] @@ -26,7 +26,7 @@ sops: c1NBbDBUZVRQQ2p2aWp5dXB1eHAxcTQKcON/bYv2tyHr1q7jzgcWHlc8Ikp2/734 IttERY1sS+iwKVWkodqPPQ9s+/0te0BQ5jEc3vJf0Rcn0lDtfzzwsQ== -----END AGE ENCRYPTED FILE----- - lastmodified: "2025-11-05T20:11:43Z" - mac: ENC[AES256_GCM,data:Csq9wzz8XcuwL7z/Pra0iOcDurxC5DyAILBpKyZFRQ6o6HJuRQc/7Xk1PPSwrjzCJJjyJOYNtM0IzjxWoXn+8QE9dzytX+xMTiKXL+gzajeZuNn05ibMZi4/LmRBbW0eQAHB3YI2RZk7zj35aCNeKjETbUERHzgct1zFyuGfV/k=,iv:HvBVBEK/EokkDMgdru20JowiAnM4UHd21qJVhTIYQOw=,tag:MWy8lHOmpUywTFMJmLWP0A==,type:str] + lastmodified: "2026-02-05T17:54:41Z" + mac: ENC[AES256_GCM,data:LZh6P8DJoow3QWGXJj2qSC8hsKH/LEQ/YDezKCfWSp4FF13TltacsQt7hz6HVBcILEIIkTIcufQsbyWC/s9tiaAUrXNTkScy1P8AZOnum4SRC8fcODM8/XmkFnFiHWda2NnqpfRoP6/zCrMmc//7YH7vxQki3xe3nJj/TIG6kGs=,iv:T3j3ovFb7fhBLmORNh+R3QZvZZeUfFvd7oPplpDSxrY=,tag:LfGXx9rsMHF5eXqFFAh+vw==,type:str] unencrypted_suffix: _unencrypted version: 3.11.0 -- cgit v1.3.1