diff --git a/flake.lock b/flake.lock index 3cc58f5..c07cced 100644 --- a/flake.lock +++ b/flake.lock @@ -99,24 +99,6 @@ "type": "github" } }, - "flake-utils_2": { - "inputs": { - "systems": "systems_3" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "ghostty": { "inputs": { "flake-compat": "flake-compat", @@ -279,38 +261,6 @@ "type": "github" } }, - "nixpkgs_2": { - "locked": { - "lastModified": 1769789167, - "narHash": "sha256-kKB3bqYJU5nzYeIROI82Ef9VtTbu4uA3YydSk/Bioa8=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "62c8382960464ceb98ea593cb8321a2cf8f9e3e5", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "readlater-bot": { - "inputs": { - "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_2" - }, - "locked": { - "lastModified": 1770458808, - "narHash": "sha256-Fs/DwFxitReM7PuN1aee8pcmRzST7wzX7WLeBK/lOAI=", - "path": "/home/thegeneralist/infofeeder-bot", - "type": "path" - }, - "original": { - "path": "/home/thegeneralist/infofeeder-bot", - "type": "path" - } - }, "root": { "inputs": { "agenix": "agenix", @@ -321,8 +271,7 @@ "homebrew-core": "homebrew-core", "nix-darwin": "nix-darwin", "nix-homebrew": "nix-homebrew", - "nixpkgs": "nixpkgs", - "readlater-bot": "readlater-bot" + "nixpkgs": "nixpkgs" } }, "rust-analyzer-src": { @@ -372,21 +321,6 @@ "type": "github" } }, - "systems_3": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "zig": { "inputs": { "flake-compat": [ diff --git a/flake.nix b/flake.nix index e72df1d..efe19b0 100644 --- a/flake.nix +++ b/flake.nix @@ -41,10 +41,6 @@ url = "github:nix-community/fenix"; inputs.nixpkgs.follows = "nixpkgs"; }; - - readlater-bot = { - url = "path:/home/thegeneralist/infofeeder-bot"; - }; }; outputs = diff --git a/hosts/thegeneralist-central/configuration.nix b/hosts/thegeneralist-central/configuration.nix index 80a08c2..88eff86 100644 --- a/hosts/thegeneralist-central/configuration.nix +++ b/hosts/thegeneralist-central/configuration.nix @@ -2,57 +2,24 @@ # your system. Help is available in the configuration.nix(5) man page, on # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). -{ - config, - pkgs, - inputs, - lib, - ... -}: +{ config, pkgs, inputs, ... }: { - imports = [ - ./hardware-configuration.nix - ./site.nix - ./cache - ./archive - ./forgejo - ]; + imports = [ ./hardware-configuration.nix ./site.nix ./cache ./archive ./forgejo ]; age.secrets.password.file = ./password.age; - age.secrets.readlaterBotToken.file = ./readlater-bot-token.age; - age.secrets.readlaterBotSyncToken.file = ./readlater-bot-sync-token.age; - age.secrets.readlaterBotUserId.file = ./readlater-bot-user-id.age; - age.secrets.readlaterBotToken.owner = "thegeneralist"; - age.secrets.readlaterBotToken.group = "users"; - age.secrets.readlaterBotToken.mode = "0400"; - age.secrets.readlaterBotSyncToken.owner = "thegeneralist"; - age.secrets.readlaterBotSyncToken.group = "users"; - age.secrets.readlaterBotSyncToken.mode = "0400"; - age.secrets.readlaterBotUserId.owner = "thegeneralist"; - age.secrets.readlaterBotUserId.group = "users"; - age.secrets.readlaterBotUserId.mode = "0400"; users.users = { thegeneralist = { isNormalUser = true; description = "thegeneralist"; - extraGroups = [ - "wheel" - "audio" - "video" - "input" - "scanner" - "docker" - ]; + extraGroups = [ "wheel" "audio" "video" "input" "scanner" "docker" ]; shell = pkgs.zsh; home = "/home/thegeneralist"; homeMode = "0750"; hashedPasswordFile = config.age.secrets.password.path; - openssh.authorizedKeys.keys = - let - inherit (import ../../keys.nix) thegeneralist; - in - [ thegeneralist ]; + openssh.authorizedKeys.keys = let + inherit (import ../../keys.nix) thegeneralist; + in [ thegeneralist ]; }; build = { @@ -61,11 +28,9 @@ extraGroups = [ "build" ]; shell = pkgs.zsh; hashedPasswordFile = config.age.secrets.password.path; - openssh.authorizedKeys.keys = - let - inherit (import ../../keys.nix) thegeneralist; - in - [ thegeneralist ]; + openssh.authorizedKeys.keys = let + inherit (import ../../keys.nix) thegeneralist; + in [ thegeneralist ]; }; }; @@ -80,49 +45,16 @@ }; age.secrets.hostkey.file = ./hostkey.age; - services.openssh.hostKeys = [ - { - type = "ed25519"; - path = config.age.secrets.hostkey.path; - } - ]; + services.openssh.hostKeys = [{ + type = "ed25519"; + path = config.age.secrets.hostkey.path; + }]; # Some programs services.libinput.enable = true; programs.firefox.enable = true; programs.zsh.enable = true; - services.readlater-bot = { - enable = true; - user = "thegeneralist"; - group = "users"; - tokenFile = config.age.secrets.readlaterBotToken.path; - settings = { - resources_path = "/home/thegeneralist/obsidian/02 Knowledge/03 Resources"; - read_later_path = "/home/thegeneralist/obsidian/10 Read Later.md"; - finished_path = "/home/thegeneralist/obsidian/20 Finished Reading.md"; - data_dir = "/var/lib/readlater-bot"; - retry_interval_seconds = 30; - sync = { - repo_path = "/home/thegeneralist/obsidian"; - token_file = config.age.secrets.readlaterBotSyncToken.path; - }; - }; - }; - - systemd.services.readlater-bot.preStart = lib.mkAfter '' - if [ -f /run/readlater-bot/config.toml ]; then - tmp="/run/readlater-bot/config.toml.tmp" - { - IFS= read -r first_line || true - printf '%s\n' "$first_line" - printf 'user_id = %s\n' "$(cat ${config.age.secrets.readlaterBotUserId.path})" - cat - } < /run/readlater-bot/config.toml > "$tmp" - mv "$tmp" /run/readlater-bot/config.toml - fi - ''; - # Set your time zone. time.timeZone = "Europe/Berlin"; diff --git a/hosts/thegeneralist-central/readlater-bot-sync-token.age b/hosts/thegeneralist-central/readlater-bot-sync-token.age deleted file mode 100644 index c04849b..0000000 --- a/hosts/thegeneralist-central/readlater-bot-sync-token.age +++ /dev/null @@ -1,5 +0,0 @@ -age-encryption.org/v1 --> ssh-ed25519 pp9qdQ twxKRYACgz/8cYRrOCxMoVg9kFXaYxWVnDC1q7g4m3M -HICOhz/phNPvmLrO/ILxoMb5Bbs7LAJ3wuPAq1PJXiQ ---- 0yPpaiiJXMaUBa+kBX/UOTMICRjKXMgjRk2E+WKgj+M -6Y'\ETcP;?j&+FP܁*Jm<ϖ~ ӘAI*l؊X'˃ \ No newline at end of file diff --git a/hosts/thegeneralist-central/readlater-bot-token.age b/hosts/thegeneralist-central/readlater-bot-token.age deleted file mode 100644 index 545bc06..0000000 --- a/hosts/thegeneralist-central/readlater-bot-token.age +++ /dev/null @@ -1,5 +0,0 @@ -age-encryption.org/v1 --> ssh-ed25519 pp9qdQ B8+s7rbKTCk2vfRVUyc8yV2HhkiUjv9petRiBRg9kgE -9po69JEGIQGXUIyjJj3BOMZGc5qDSbvug1HsO/EgDTE ---- n+cCCXuJP4oboSm74DRK9oh/OyHuPSdnX1+lH5xgn0E - If,(نSd^QhF{_܄4Հ Z(mub \ No newline at end of file diff --git a/hosts/thegeneralist-central/readlater-bot-user-id.age b/hosts/thegeneralist-central/readlater-bot-user-id.age deleted file mode 100644 index 48769b9..0000000 --- a/hosts/thegeneralist-central/readlater-bot-user-id.age +++ /dev/null @@ -1,5 +0,0 @@ -age-encryption.org/v1 --> ssh-ed25519 pp9qdQ JjYS0OmsdzkazhynwiYUWf6svuUu0ivXi7VrFdccez0 -0xelpQamzEYTN/TqbJ3kI1OhfZdBl2DhhgKv29qg8J4 ---- V0a84QEOAyVidy+5KoxJOwsj+XrmlMbg4+oLbHVK0FA -D'@0*aOَHܯmt,¢ЫbI \ No newline at end of file diff --git a/secrets.nix b/secrets.nix index c8ca474..d73e7ab 100644 --- a/secrets.nix +++ b/secrets.nix @@ -1,7 +1,6 @@ let inherit (import ./keys.nix) thegeneralist; -in -{ +in { "hosts/thegeneralist/hostkey.age".publicKeys = [ thegeneralist ]; "hosts/thegeneralist-central/hostkey.age".publicKeys = [ thegeneralist ]; @@ -12,12 +11,7 @@ in "hosts/thegeneralist-central/cache/key.age".publicKeys = [ thegeneralist ]; "hosts/thegeneralist-central/password.age".publicKeys = [ thegeneralist ]; "hosts/thegeneralist-central/forgejo/forgejo-runner-token.age".publicKeys = [ thegeneralist ]; - "hosts/thegeneralist-central/forgejo/forgejo-family-site-deploy-token.age".publicKeys = [ - thegeneralist - ]; - "hosts/thegeneralist-central/readlater-bot-token.age".publicKeys = [ thegeneralist ]; - "hosts/thegeneralist-central/readlater-bot-sync-token.age".publicKeys = [ thegeneralist ]; - "hosts/thegeneralist-central/readlater-bot-user-id.age".publicKeys = [ thegeneralist ]; + "hosts/thegeneralist-central/forgejo/forgejo-family-site-deploy-token.age".publicKeys = [ thegeneralist ]; "modules/linux/tailscale-marshall.age".publicKeys = [ thegeneralist ]; }