From 4223a36be6fb629cbcc25bc4aa223137ae8ec525 Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Mon, 13 Feb 2023 19:44:04 +0100 Subject: [PATCH] nitter: Extract from webserver config --- agenix/hosts/sail/config.nix | 4 ++ agenix/hosts/sail/nitter/config.age | Bin 0 -> 2178 bytes container/webserver/config.nix | 10 ---- flake.lock | 46 ++++++------------ flake.nix | 2 +- home/programs/nvim/plugins.nix | 30 ++++++------ secret/container/webserver/config/nitter.conf | Bin 1750 -> 0 bytes secrets.nix | 2 + system/hosts/sail.nix | 2 + system/nixos/nitter.nix | 25 ++++++++++ 10 files changed, 65 insertions(+), 56 deletions(-) create mode 100644 agenix/hosts/sail/nitter/config.age delete mode 100644 secret/container/webserver/config/nitter.conf create mode 100644 system/nixos/nitter.nix diff --git a/agenix/hosts/sail/config.nix b/agenix/hosts/sail/config.nix index 681c843..a06b003 100644 --- a/agenix/hosts/sail/config.nix +++ b/agenix/hosts/sail/config.nix @@ -65,5 +65,9 @@ owner = "freshrss"; group = "freshrss"; }; + + nitter-config = { + file = ./nitter/config.age; + }; }; } diff --git a/agenix/hosts/sail/nitter/config.age b/agenix/hosts/sail/nitter/config.age new file mode 100644 index 0000000000000000000000000000000000000000..3a1de01db2c873d4a4f1c148761182610f24e734 GIT binary patch literal 2178 zcmV-|2z~cqXJsvAZewzJaCB*JZZ2{?aHfJDJ zWo}MuXi0EWS~yTfY&LOvbyjS8LNRG=c0*-RWolU~bW>GXV=-ZGcu@*fR543!XF_m7 zO>}KbFi=fwK~iNkOL;|OZDDM8T4_ggP;z=?FIRC!STG7LJ|J^*Xf0)AGBq_ZIUr7A zRy1gLAaiJVPFQ9%OEpArb1z|cSxIt5Ia5VdGi!BWMr&GRQb{XkS$1wRLvD9>3S~$! zNOCbZNo6%~dQCSqS}<#JQgt&|YG!m|Wp+qXRAy3IN>XJ_ZDvhD3N1b$BseW+a%Ew2 zWeQhqOh$4uZ*oCoYYuW<_#&SZ;G~O)v^hdRSI+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crA3~Ve*_fO*UWG0W5U`-myhz*y&NH#4`ZbyX!y3DbqleMrdJh zp5Ljs>&+I!>B5E!(b#L2vvQbl$zP`&iW_3SxWXY*m^}cvJD{ns`9(?dv@!mH>Ri&5 z0{`54RA1ti*|b7iQ>^!tGA|gY77oX3dY5>JC?T@_0qRn^obfg$?8**PsL3+yfE!W_ z5|(c9G+kh9oI;f8`P%XQ<5dw#>$gHK<(VP&-3iN;<4pRWX2>2V>`d->2bbI;}1NJEvQFXQAr7NSB87KYV@I78SlbpaI2G-FV{)?;x=NH&$SJFs$ zrz4~r06eDoYFYI>?41=fFf`vKLkq)SZ8q}! z@_;Kv9+z=#WNrSRJJnWJ+|Qz6$tT_`QVQq8YFZH1V5aAlfIi4-O{)Zt*`$m}zOr}P z6i*5trfKU>&u!oL$)RnAf4ZlG_ng3IENp@va3Lcpo4K|`Ye;WM6!P$4eS1eoQN*Xu z4RzIyTmlpy`Fxohco6biD$R&HS^N5?54t(>c+7Oiv;662k6RoI#z!@AqE>dI$#QLY zym%TWvs6f)RV^r-f3+%i;4?tE%FC#${Zzf3>HNfp{z+kv6F1E6xZ__z)Sp25qYqpw zRh|X~%i+einbi>}=2@VXF-fw|wMvaKFP4!B1%F=E=;ajfRBIm`wXD$eLY!0ew6}HO Ek6}{#TL1t6 literal 0 HcmV?d00001 diff --git a/container/webserver/config.nix b/container/webserver/config.nix index 046bae6..664637a 100644 --- a/container/webserver/config.nix +++ b/container/webserver/config.nix @@ -4,8 +4,6 @@ systemd.tmpfiles.rules = [ "d /etc/container-webserver/weewx 0755 421 421" "d /etc/container-webserver/weewx/html 0755 421 421" - - "d /etc/container-webserver/nitter 0755 0 0" ]; # mosquitto @@ -32,12 +30,4 @@ uid = 421; gid = 421; }; - - # nitter - environment.etc."container-webserver/nitter/nitter.conf" = { - source = ../../secret/container/webserver/config/nitter.conf; - mode = "0644"; - uid = 0; - gid = 0; - }; } diff --git a/flake.lock b/flake.lock index 2875f47..d29aa90 100644 --- a/flake.lock +++ b/flake.lock @@ -163,11 +163,11 @@ }, "locked": { "dir": "contrib", - "lastModified": 1676135764, - "narHash": "sha256-hsvokBMpst2PNY5s4kK5ioLUPgrZCFTmqzlAzWhg2tU=", + "lastModified": 1676252776, + "narHash": "sha256-6vpNG1aB+DGHTBBpklhmNT1Tky5DM/ZtHN3ctl6aN7I=", "owner": "neovim", "repo": "neovim", - "rev": "3a5dddf24f9d4d8959194b0cd3c6a7dd0cbd73ae", + "rev": "89722ddfac51b0f7cbe5f4b0914e19ee9e8fdfd6", "type": "github" }, "original": { @@ -181,14 +181,16 @@ "inputs": { "flake-compat": "flake-compat", "neovim-flake": "neovim-flake", - "nixpkgs": "nixpkgs" + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { - "lastModified": 1676233127, - "narHash": "sha256-EKLnvQdjoBKkdIpDjEqRALOllHg3AM+RY5huPznYE9U=", + "lastModified": 1676291237, + "narHash": "sha256-qx3TDAcmMyvyDspuwUwTlx2aIPQTn0WcdYYew4cV0tc=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "f015d467df1180e3e2da5e09f5d04271a48899a0", + "rev": "62d20126a63eb03bf8184d4730a971fcd155f747", "type": "github" }, "original": { @@ -204,11 +206,11 @@ ] }, "locked": { - "lastModified": 1676190193, - "narHash": "sha256-+bXn1COcfy/qyHfo6QbqVVThg6aCqdAvfhozvpLJpIE=", + "lastModified": 1676276771, + "narHash": "sha256-CdVeyMH+8UpIA0lCBtze5qc8Yf5Im0NdeuR2IpZil8c=", "owner": "nifoc", "repo": "nix-overlay", - "rev": "c69dc56c00cf8236491737a958285f94b2d6c256", + "rev": "6b7d1020e3c241c7d3c76a70bc1a77e4c9640977", "type": "github" }, "original": { @@ -219,27 +221,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1671983799, - "narHash": "sha256-Z2Ro6hFPZHkBqkVXY5/aBUzxi5xizQGvuHQ9+T5B/ks=", + "lastModified": 1676150441, + "narHash": "sha256-Nfeua9Ua/dGHOQpzOjLtkyMyW/ysQCvZJ9Dd74QQSNk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "fad51abd42ca17a60fc1d4cb9382e2d79ae31836", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1675940568, - "narHash": "sha256-epG6pOT9V0kS+FUqd7R6/CWkgnZx2DMT5Veqo+y6G3c=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "6ccc4a59c3f1b56d039d93da52696633e641bc71", + "rev": "6d87734c880d704f6ee13e5c0fe835b98918c34e", "type": "github" }, "original": { @@ -257,7 +243,7 @@ "home-manager": "home-manager", "neovim-nightly-overlay": "neovim-nightly-overlay", "nifoc-overlay": "nifoc-overlay", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs" } }, "utils": { diff --git a/flake.nix b/flake.nix index 551e266..ba810b0 100644 --- a/flake.nix +++ b/flake.nix @@ -20,7 +20,7 @@ neovim-nightly-overlay = { url = "github:nix-community/neovim-nightly-overlay"; - inputs.nixpkgs.url = "github:nixos/nixpkgs?rev=fad51abd42ca17a60fc1d4cb9382e2d79ae31836"; + inputs.nixpkgs.follows = "nixpkgs"; }; arion = { diff --git a/home/programs/nvim/plugins.nix b/home/programs/nvim/plugins.nix index bdd0e39..4dde299 100644 --- a/home/programs/nvim/plugins.nix +++ b/home/programs/nvim/plugins.nix @@ -91,12 +91,12 @@ rec { }; leap-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { pname = "leap.nvim"; - version = "2023-02-10"; + version = "2023-02-13"; src = pkgs.fetchFromGitHub { owner = "ggandor"; repo = "leap.nvim"; - rev = "7140feed70a5911b8c8a7eb9c218d198772f69cf"; - sha256 = "0k5g95nlawv3r9farc7qgfdbvyvsy3w3rfysjfhrc37jvdz5ykhv"; + rev = "1367a095f336c6c7ccda8c6747b57048fc5e008d"; + sha256 = "1h6q53h6cqbbsqyjs70hkqi7bcra8hbrym6iib6bsh1101w4a8h7"; fetchSubmodules = false; }; }; @@ -112,12 +112,12 @@ rec { }; }; nvim-treesitter = pkgs.vimPlugins.nvim-treesitter.overrideAttrs (_: { - version = "2023-02-12"; + version = "2023-02-13"; src = pkgs.fetchFromGitHub { owner = "nvim-treesitter"; repo = "nvim-treesitter"; - rev = "2c2430d42f30d1aef8715aed933272c9a6898f4e"; - sha256 = "0ypwcgkm1igk5flc5hf1rsf6ckz76pks33c562s8478ppbicnlwy"; + rev = "ad9ae9e7def54fee446c3e186ed0a0d44cca7b90"; + sha256 = "14vdlr7wl1389mfmlsy383d5v283h9ak0w1dhba39ll3i2nj731d"; fetchSubmodules = false; }; }); @@ -291,12 +291,12 @@ rec { }; comment-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { pname = "comment.nvim"; - version = "2023-01-18"; + version = "2023-02-13"; src = pkgs.fetchFromGitHub { owner = "numtostr"; repo = "comment.nvim"; - rev = "eab2c83a0207369900e92783f56990808082eac2"; - sha256 = "0kin87qixkbib55763bd38xrbcgw4nx2rdklg3lmjgkd9w05jjzd"; + rev = "418d3117dab2f54c4340ea73e0070dd78fc81753"; + sha256 = "0qmkj4xchl3q26pzf6x8ssm97ax72vav4jcq4410mf7xiahwcl1d"; fetchSubmodules = false; }; }; @@ -478,12 +478,12 @@ rec { }; nvim-treesitter-textobjects = pkgs.vimUtils.buildVimPluginFrom2Nix { pname = "nvim-treesitter-textobjects"; - version = "2023-02-10"; + version = "2023-02-12"; src = pkgs.fetchFromGitHub { owner = "nvim-treesitter"; repo = "nvim-treesitter-textobjects"; - rev = "13edf91f47c91b390bb00e1df2f7cc1ca250af3a"; - sha256 = "19c140aw8ksak2k0s6ww2dk7qh3p2rjhwbi56wjaf2282x4g9181"; + rev = "37e3c7b32b653f24d7aa2fa087a9c5a67ef07786"; + sha256 = "1xjqzqblw89z6jk3g98bc10yc9xmdr8h1pblv1vg4jsdsdn0iwjd"; fetchSubmodules = false; }; }; @@ -555,12 +555,12 @@ rec { }; gitsigns-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { pname = "gitsigns.nvim"; - version = "2023-02-10"; + version = "2023-02-13"; src = pkgs.fetchFromGitHub { owner = "lewis6991"; repo = "gitsigns.nvim"; - rev = "f29f0b22fd66c910b892aae3bc18a4872c002738"; - sha256 = "0cizfyivvfgv72wxw543l6h2giais7bsgmvxrpcks8zmgmvlq0zq"; + rev = "a5caac26768af80b7c57b919f77b3fed3d7424d0"; + sha256 = "1wd6pxkq7pm0mzgns2r04v8m9snxr4va6rfgr8zf4g1ifyfyh8gk"; fetchSubmodules = false; }; }; diff --git a/secret/container/webserver/config/nitter.conf b/secret/container/webserver/config/nitter.conf deleted file mode 100644 index 57994fafd033ceabcc12e7208c70e8186c2fd093..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1750 zcmV;{1}XUfM@dveQdv+`0R9rD2f`)Y1_efie`V`KH?iqArf0JHjbaExTlV`9i!lHa zWK0t`fF7z;WDLRD*AHe2BpP?nRj8rCEe9U^O@8lcsJQ5n+U-0hO;udv9is0RvtH5M zYVR*IakJDIWrPE_Ld){0^@>LQe|&rCT25FM4~xItHSPa?V#qqts}svA@E3|%=q!^) z?R4s%JzADI4Y+oaeBifk^TK&2_UrQsVXkf&V`YG{5ae@2o-~f>9p_4d0-Xl@wlT86 z=+H6H8Vi<{&hcv~d>fEr@{;GizyEZtZK)Ueb4v_cSoocshUegbrr{a~HN2LH2WA(P z?K**y=fPRnf{qc%x~15Pw|VPtIbE;ShR+A@q=KT3-GPrcw~DOdH-FG`G*n$)0PIk* zXXX~lwBL(2x*!!Ibrc`T+%%xwP>whx*IN4&+P!f4M{xK$@kwJL-sk8+O}`N6MY}P!bYel~Q#AZY*`=qQ75ZVfs)i+yc%#MJ zcmgTR(zh-#H9pk;WQdQstI- zAMAZCLJb;?kLFIi>aLT*4%iuZHuHpz*Hhn25&WzYqZZU{#40ICu}Lu5#(Nzw&Qv=k zM_UOF$}XP)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66toIi!fCzuisbV|83QQMAXHvV%*Tc0>gY&EKq{dmG-1qrm8tA s^QMD*G#mdbOWCHV^{d|In}$y#opL!k34)7tM$&&vb=bhS?^1|^HtnKrfdBvi diff --git a/secrets.nix b/secrets.nix index 5cfdceb..75a4544 100644 --- a/secrets.nix +++ b/secrets.nix @@ -21,4 +21,6 @@ in "agenix/hosts/sail/freshrss/userPassword.age".publicKeys = sail; "agenix/hosts/sail/freshrss/databasePassword.age".publicKeys = sail; + + "agenix/hosts/sail/nitter/config.age".publicKeys = sail; } diff --git a/system/hosts/sail.nix b/system/hosts/sail.nix index 70eea7f..cbe76cc 100644 --- a/system/hosts/sail.nix +++ b/system/hosts/sail.nix @@ -22,6 +22,8 @@ in (import ../nixos/mastodon.nix (args // { inherit secret; })) + ../nixos/nitter.nix + ../nixos/synapse.nix ../nixos/websites.nix diff --git a/system/nixos/nitter.nix b/system/nixos/nitter.nix new file mode 100644 index 0000000..ce7f7a1 --- /dev/null +++ b/system/nixos/nitter.nix @@ -0,0 +1,25 @@ +{ config, ... }: + +{ + virtualisation.arion.projects.nitter.settings = { + services = { + nitter = { + service = { + image = "zedeus/nitter:latest"; + container_name = "nitter"; + restart = "unless-stopped"; + ports = [ "127.0.0.1:8001:8080" ]; + environment = { + "TZ" = "Europe/Berlin"; + }; + volumes = [ + "${config.age.secrets.nitter-config.path}:/src/nitter.conf:ro" + ]; + labels = { + "com.centurylinklabs.watchtower.enable" = "true"; + }; + }; + }; + }; + }; +}