Compare commits

..

7 commits

13 changed files with 106 additions and 119 deletions

View file

@ -208,19 +208,17 @@
}; };
}; };
"lightsail-tokyo" = { defaults.imports = [
imports = [
./nixos/profiles/core ./nixos/profiles/core
./hosts/lightsail-tokyo
]; ];
"lightsail-tokyo" = {
imports = [./hosts/lightsail-tokyo];
deployment.targetHost = "tyo0.ny4.dev"; deployment.targetHost = "tyo0.ny4.dev";
}; };
"blacksteel" = { "blacksteel" = {
imports = [ imports = [./hosts/blacksteel];
./nixos/profiles/core
./hosts/blacksteel
];
deployment.targetHost = "blacksteel"; # thru tailscale deployment.targetHost = "blacksteel"; # thru tailscale
}; };
}; };

View file

@ -2,13 +2,6 @@
### home-manager ### home-manager
home-manager.users.guanranwang = import ./home; home-manager.users.guanranwang = import ./home;
# xserver
services.xserver = {
enable = true;
excludePackages = with pkgs; [xterm];
displayManager.startx.enable = true;
};
# gnome keyring # gnome keyring
programs.seahorse.enable = true; programs.seahorse.enable = true;

View file

@ -2,7 +2,6 @@
imports = [ imports = [
inputs.nixpkgs.nixosModules.notDetected inputs.nixpkgs.nixosModules.notDetected
inputs.nixos-hardware.nixosModules.lenovo-legion-y530-15ich inputs.nixos-hardware.nixosModules.lenovo-legion-y530-15ich
inputs.nixos-sensible.nixosModules.zram
]; ];
services.hdapsd.enable = false; services.hdapsd.enable = false;

View file

@ -11,7 +11,6 @@
inputs.nixos-hardware.nixosModules.common-hidpi inputs.nixos-hardware.nixosModules.common-hidpi
inputs.nixos-hardware.nixosModules.common-pc-laptop inputs.nixos-hardware.nixosModules.common-pc-laptop
inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd
inputs.nixos-sensible.nixosModules.zram
]; ];
services.thermald.enable = true; services.thermald.enable = true;

View file

@ -87,11 +87,6 @@ pixiv.ny4.dev {
reverse_proxy unix//run/pixivfe/pixiv.sock reverse_proxy unix//run/pixivfe/pixiv.sock
} }
syncv3.ny4.dev {
import default
reverse_proxy localhost:8700
}
id.ny4.dev { id.ny4.dev {
import default import default
reverse_proxy localhost:8800 reverse_proxy localhost:8800
@ -107,3 +102,8 @@ git.ny4.dev {
import default import default
reverse_proxy unix//run/forgejo/forgejo.sock reverse_proxy unix//run/forgejo/forgejo.sock
} }
rss.ny4.dev {
import default
reverse_proxy localhost:9300
}

View file

@ -1,14 +1,13 @@
{ {
modulesPath,
lib, lib,
config, config,
inputs, inputs,
modulesPath,
pkgs, pkgs,
... ...
}: { }: {
imports = [ imports = [
"${modulesPath}/virtualisation/amazon-image.nix" "${modulesPath}/virtualisation/amazon-image.nix"
inputs.nixos-sensible.nixosModules.zram
../../nixos/profiles/server ../../nixos/profiles/server
./anti-feature.nix ./anti-feature.nix
]; ];
@ -39,6 +38,9 @@
"searx/environment" = { "searx/environment" = {
restartUnits = ["searx.service"]; restartUnits = ["searx.service"];
}; };
"miniflux/credentials" = {
restartUnits = ["miniflux.service"];
};
}; };
}; };
@ -197,80 +199,58 @@
services = let services = let
getDesc = pkg: pkg.meta.description; getDesc = pkg: pkg.meta.description;
in [ mapAttrsToList' = lib.mapAttrsToList (name: value: {"${name}" = value;}); # also sorts the thing alphabetically
{ in
"Services" = [ mapAttrsToList' {
{ "Services" = mapAttrsToList' {
"SearXNG" = { "SearXNG" = {
description = getDesc pkgs.searxng; description = getDesc pkgs.searxng;
href = "https://searx.ny4.dev"; href = "https://searx.ny4.dev/";
}; };
}
{
"Wastebin" = { "Wastebin" = {
description = getDesc pkgs.wastebin; description = getDesc pkgs.wastebin;
href = "https://pb.ny4.dev"; href = "https://pb.ny4.dev/";
}; };
}
{
"Ntfy" = { "Ntfy" = {
description = getDesc pkgs.ntfy; description = getDesc pkgs.ntfy;
href = "https://ntfy.ny4.dev/"; href = "https://ntfy.ny4.dev/";
}; };
}
{
"Mumble" = { "Mumble" = {
description = "${getDesc pkgs.mumble} (Connect with tyo0.ny4.dev:64738)"; description = "${getDesc pkgs.mumble} (Connect with tyo0.ny4.dev:64738)";
}; };
} };
]; "Private stuff" = mapAttrsToList' {
}
{
"Private stuff" = [
{
"Mastodon" = rec { "Mastodon" = rec {
description = getDesc pkgs.mastodon; description = getDesc pkgs.mastodon;
href = "https://mastodon.ny4.dev/"; href = "https://mastodon.ny4.dev/";
widget.type = "mastodon"; widget.type = "mastodon";
widget.url = href; widget.url = href;
}; };
}
{
"Matrix" = { "Matrix" = {
description = getDesc pkgs.element-web; description = getDesc pkgs.element-web;
href = "https://element.ny4.dev/"; href = "https://element.ny4.dev/";
}; };
}
{
"PixivFE" = { "PixivFE" = {
description = "A privacy respecting frontend for Pixiv."; description = getDesc inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.pixivfe;
href = "https://pixiv.ny4.dev"; href = "https://pixiv.ny4.dev";
}; };
}
{
"Uptime Kuma" = { "Uptime Kuma" = {
description = getDesc pkgs.uptime-kuma; description = getDesc pkgs.uptime-kuma;
href = "https://uptime.ny4.dev/"; href = "https://uptime.ny4.dev/";
}; };
}
{
"Forgejo" = { "Forgejo" = {
description = getDesc pkgs.forgejo; description = getDesc pkgs.forgejo;
href = "https://git.ny4.dev/"; href = "https://git.ny4.dev/";
}; };
} };
]; "Links" = mapAttrsToList' {
} "Blog".href = "https://blog.ny4.dev/";
{ "Forgejo".href = "https://git.ny4.dev/nyancat";
"Links" = [ "GitHub".href = "https://github.com/Guanran928";
{"Blog".href = "https://blog.ny4.dev/";} "Mastodon".herf = "https://mastodon.ny4.dev/@nyancat";
{"GitHub".href = "https://github.com/Guanran928";} "Matrix".href = "https://matrix.to/#/@nyancat:ny4.dev";
{"Mastodon".herf = "https://mastodon.ny4.dev/@nyancat";} };
{"Matrix".href = "https://matrix.to/#/@root:ny4.dev";} };
{"Forgejo".href = "https://git.ny4.dev/nyancat";}
];
}
];
}; };
services.forgejo = { services.forgejo = {
@ -278,7 +258,6 @@
database.type = "postgres"; database.type = "postgres";
settings = { settings = {
server = { server = {
# TODO: whats the difference between this and fcgi+unix
DOMAIN = "git.ny4.dev"; DOMAIN = "git.ny4.dev";
PROTOCOL = "http+unix"; PROTOCOL = "http+unix";
ROOT_URL = "https://git.ny4.dev/"; ROOT_URL = "https://git.ny4.dev/";
@ -290,6 +269,15 @@
}; };
}; };
services.miniflux = {
enable = true;
adminCredentialsFile = config.sops.secrets."miniflux/credentials".path;
config = {
LISTEN_ADDR = "127.0.0.1:9300";
BASE_URL = "https://rss.ny4.dev";
};
};
### Prevents me from bankrupt ### Prevents me from bankrupt
# https://fmk.im/p/shutdown-aws/ # https://fmk.im/p/shutdown-aws/
services.vnstat.enable = true; services.vnstat.enable = true;

View file

@ -4,6 +4,8 @@ searx:
environment: ENC[AES256_GCM,data:Chtb7yhooCMU+Hfnqdgwpd1w5gI2LZm4cz8d3YRgznjveO/4HOZ54XMdQVDoiC6ukojHfEUxl+3qIG1wi/s29rhxJekHLtWgJ++OUQKW,iv:viGQRoWbaSlRoovBV01Vl/d17eRVeM8CQUHYRWrflNQ=,tag:2QMYVCXON129pRpW3oOQXg==,type:str] environment: ENC[AES256_GCM,data:Chtb7yhooCMU+Hfnqdgwpd1w5gI2LZm4cz8d3YRgznjveO/4HOZ54XMdQVDoiC6ukojHfEUxl+3qIG1wi/s29rhxJekHLtWgJ++OUQKW,iv:viGQRoWbaSlRoovBV01Vl/d17eRVeM8CQUHYRWrflNQ=,tag:2QMYVCXON129pRpW3oOQXg==,type:str]
pixivfe: pixivfe:
environment: ENC[AES256_GCM,data:/Q/rShBXlXkWOOP+7OhKtKTSrp2zNizMaAOyKfWbKgJMHTjNfmMtRuGKRez9KXM5MDIMIF9iJSQ=,iv:whIAkaWiZcZT4HfmJw4qA+fbQ9zHFp+kTuHxQDE3XoU=,tag:FroLTMtNwGlvZw3osftj3A==,type:str] environment: ENC[AES256_GCM,data:/Q/rShBXlXkWOOP+7OhKtKTSrp2zNizMaAOyKfWbKgJMHTjNfmMtRuGKRez9KXM5MDIMIF9iJSQ=,iv:whIAkaWiZcZT4HfmJw4qA+fbQ9zHFp+kTuHxQDE3XoU=,tag:FroLTMtNwGlvZw3osftj3A==,type:str]
miniflux:
credentials: ENC[AES256_GCM,data:vYd964LCV4NCZxbuIhdXznsl7n6jMPIFjWvo0tTTm4V3la93MN4DYLUPy4U=,iv:gqBCf7uqigTxdLs8oSd/KkNb56luUDrtrAOxxUuJgUE=,tag:LzniGyWeZxHrpQAaEOQP8A==,type:str]
sops: sops:
kms: [] kms: []
gcp_kms: [] gcp_kms: []
@ -28,8 +30,8 @@ sops:
R1ZMMG1jWnljNWl5Nk5MU3RCMlFPYjgKL1ScxzF0D1R18H+oe6dlxUGlL9myHEr3 R1ZMMG1jWnljNWl5Nk5MU3RCMlFPYjgKL1ScxzF0D1R18H+oe6dlxUGlL9myHEr3
3HBPoapKCSQ/cT7Xma4bsWD1AVJIf1Ak+MeCs9ItGwKAcnd9JYZ9KA== 3HBPoapKCSQ/cT7Xma4bsWD1AVJIf1Ak+MeCs9ItGwKAcnd9JYZ9KA==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2024-07-09T11:50:11Z" lastmodified: "2024-07-10T17:25:33Z"
mac: ENC[AES256_GCM,data:kzxia2Bygi0YR24/dJfKZR3jF99IhIGGIZFJnIo5kp7/PZfQE2EbgD5yTFrSX9+Ur5u8a169UVEtveJ+uR59bX3DsjZDPRSWRMmWJodLcZifx+oSSGmhYufC61D3pVa+Jv2mwKf8UTKdb2oQtk/8bNrMuonedX8hPz+wZJQyMD0=,iv:VxBeb5QTaF5snKNtc51XFtwAdydnOyX8CGhxBjyBTQ0=,tag:vQEJJubHv3dRazmr1bAcnQ==,type:str] mac: ENC[AES256_GCM,data:R8V7uckbpDjzukq7W0Tjj3yYCTynU4Ih0C8HiKIf1RQjS0XscJ/3dU5fhalJuODdBNi3aAar0qiX4MJsNexanQxltjJGj01pcHNrM1KUnOPoxmYR8oK64fecQDp8sWahXWfqFFurCsVg1ZHTJM1tMNgbjGDIcTSxZcto/1N3Zwc=,iv:eQge+cAxipyd7kFY7elVATHsymg/JFh9CCYItkkPn0I=,tag:LBR9nNW6RqekGqnLxfyB9w==,type:str]
pgp: [] pgp: []
unencrypted_suffix: _unencrypted unencrypted_suffix: _unencrypted
version: 3.9.0 version: 3.9.0

View file

@ -1,7 +1,8 @@
{ {
pkgs,
config,
lib, lib,
config,
inputs,
pkgs,
... ...
}: let }: let
cfg = config.services.pixivfe; cfg = config.services.pixivfe;
@ -9,10 +10,7 @@ in {
options.services.pixivfe = { options.services.pixivfe = {
enable = lib.mkEnableOption "PixivFE, a privacy respecting frontend for Pixiv"; enable = lib.mkEnableOption "PixivFE, a privacy respecting frontend for Pixiv";
# package = lib.mkPackageOption pkgs "pixivfe" {}; package = lib.mkPackageOption inputs.self.packages.${pkgs.stdenv.hostPlatform.system} "pixivfe" {};
package = lib.mkOption {
default = pkgs.callPackage ./pixivfe-pkg.nix {};
};
openFirewall = lib.mkEnableOption "open ports in the firewall needed for the daemon to function"; openFirewall = lib.mkEnableOption "open ports in the firewall needed for the daemon to function";

View file

@ -19,6 +19,7 @@
impermanence.nixosModules.impermanence impermanence.nixosModules.impermanence
lanzaboote.nixosModules.lanzaboote lanzaboote.nixosModules.lanzaboote
nixos-sensible.nixosModules.default nixos-sensible.nixosModules.default
nixos-sensible.nixosModules.zram
nur.nixosModules.nur nur.nixosModules.nur
self.nixosModules.default self.nixosModules.default
sops-nix.nixosModules.sops sops-nix.nixosModules.sops

View file

@ -1,7 +1,7 @@
{lib, ...}: { {lib, ...}: {
sops.secrets = builtins.mapAttrs (_name: value: value // {sopsFile = ./secrets.yaml;}) { sops.secrets = builtins.mapAttrs (_name: value: value // {sopsFile = ./secrets.yaml;}) {
"wireless/wangxiaobo".path = "/var/lib/iwd/wangxiaobo.psk"; "wireless/wangxiaobo".path = "/var/lib/iwd/wangxiaobo.psk";
"wireless/OpenWrt".path = "/var/lib/iwd/OpenWrt.psk"; "wireless/ImmortalWrt".path = "/var/lib/iwd/ImmortalWrt.psk";
}; };
networking.wireless.iwd.enable = lib.mkDefault true; networking.wireless.iwd.enable = lib.mkDefault true;

View file

@ -1,6 +1,6 @@
wireless: wireless:
wangxiaobo: ENC[AES256_GCM,data:D9m+JRZ2Tw1a4mukW+WU3QLYIRiTiRkGz1ddD7zvkctbuYg+BZXtRgDR0FOIn586t0DsgA1wBDEN/WWiLRTrArgWTHiv7OsOa1NI7+BuL1cFb1TNbk04zbtc6cCOpDBH8qivx0jdZIqrJ5JzIaeZ9T78tj1jMmp3pyt3RiEcZLqxjnPiJhJVaZ8iUNDTvuX3DpsmqybYiLO+Hz7qvIHwM1euc/vyraZ2SR/y5DjTjwVK1jiAs3glPy2oYayVhv+RPs/AHVDnslbtPxGrPhRXxZT3t9LnBw+I0VgrdKUl39ym38PurGnVoBJ7EUVWl3SUPQjnDfQI/XQiDyI3DZ8uA5MGwlR9mny5N/ojs+q7J/k4YiSThCasA5tA24SNRZQWI9lFevoortU+is9FTTGkfzgrrcuURDs6E3ShbbHgn4tvHPhB87J1mP9D7UMIFFfVyvqp5fRgBMHcrEA8xln2xvvQdRDDj/JJYIj3ex8PpTqvAi1EwnAFWhBgqIchcHRFcfQRWOsR7h8M1UQpnge85UZfePMropq5zJ3TSF4AKa2A4UqhgkvLm8qrMI1lvsEnH4TMoyV5Z59T4sPd4Eb3FV26wey6DTdw6cCuywh0AQ==,iv:nbD9EcQYaAf4XwvTLKRy+IjTkV7aHsHK+gBD/Ooc/l8=,tag:VHD3X0ONH4YTp/BTcnpLDQ==,type:str] wangxiaobo: ENC[AES256_GCM,data:D9m+JRZ2Tw1a4mukW+WU3QLYIRiTiRkGz1ddD7zvkctbuYg+BZXtRgDR0FOIn586t0DsgA1wBDEN/WWiLRTrArgWTHiv7OsOa1NI7+BuL1cFb1TNbk04zbtc6cCOpDBH8qivx0jdZIqrJ5JzIaeZ9T78tj1jMmp3pyt3RiEcZLqxjnPiJhJVaZ8iUNDTvuX3DpsmqybYiLO+Hz7qvIHwM1euc/vyraZ2SR/y5DjTjwVK1jiAs3glPy2oYayVhv+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 dEN1cEJFZU82bVFRVlVqcTIzckRHQjgKHgRyq4UOcZyiFnK9fq1NLtxRktFCs3V8
EQhl+CPWTRZTZkttJ5MclGlvTNbiH3Iy9syKns6qvOw75wqtXIdIWQ== EQhl+CPWTRZTZkttJ5MclGlvTNbiH3Iy9syKns6qvOw75wqtXIdIWQ==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2024-07-09T22:04:02Z" lastmodified: "2024-07-10T08:37:51Z"
mac: ENC[AES256_GCM,data:m3EXpaGra4uT0m2w9B8D6p03PBXeYWn4AiStPtdN15/JwvTRsJvYeOE4CirZvDT3nq7ne/8j/62Z7sCkb7t8W48MfjrnvAYRFJvKT2hSmJnzqXH6446Srel88BfVmiMdcts4OvAea3Dg4oTMMIn5d2L+rIT8zuPY208tqo4vCPY=,iv:LI5WRb46DZLSL9rndXDo/xzDzXUArRANBqrEx8bmGIc=,tag:2K3vKFmb88Zjru1miwR7Dw==,type:str] mac: ENC[AES256_GCM,data:M892yzbmOSiDdifD1kRreBR/+JwMneIZjvCXC90osBogFEmUtf9W6M3xeYmbTobgE/chy9O9yn6CVDt9OucU+sT7o2oUpbOHVulJnwstBuUJGQAEwhyolQP5YRiGRxQzdPG6dqLUkKlsi44pm4dNtDLHFPE0j1wA0PD1fhrH4Y0=,iv:P+ne5UD5F62NW0xYndCDEzR0e7qo0COwDY0iNb2bKUo=,tag:uZfOsrZuSMYdY2zqFhqiyw==,type:str]
pgp: [] pgp: []
unencrypted_suffix: _unencrypted unencrypted_suffix: _unencrypted
version: 3.9.0 version: 3.9.0

View file

@ -1,13 +1,18 @@
# NOTE: 301: All packages are migrated to `github:Guanran928/nur-packages`, # NOTE: 301: All packages are migrated to `github:Guanran928/nur-packages`,
# only keeping some packages that only fits for personal use. # only keeping some packages that only fits for personal use.
pkgs: let pkgs: let
inherit (pkgs) lib; inherit (pkgs) lib callPackage;
in { in {
scripts = lib.makeScope pkgs.newScope (self: { # https://github.com/NixOS/nixpkgs/pull/308720
pixivfe = callPackage ./pixivfe.nix {};
scripts = lib.makeScope pkgs.newScope (self: let
inherit (self) callPackage;
in {
# util # util
makeScript = self.callPackage ./scripts/makeScript.nix {}; makeScript = callPackage ./scripts/makeScript.nix {};
# scripts # scripts
lofi = self.callPackage ./scripts/lofi.nix {}; lofi = callPackage ./scripts/lofi.nix {};
}); });
} }

View file

@ -18,18 +18,22 @@ buildGoModule rec {
vendorHash = "sha256-QapDR964Tn+RxXdkGqCQXacdmlSapF841Y84n4d/6VI="; vendorHash = "sha256-QapDR964Tn+RxXdkGqCQXacdmlSapF841Y84n4d/6VI=";
ldflags = ["-s" "-w"]; ldflags = [
"-s"
"-w"
];
nativeBuildInputs = [makeBinaryWrapper]; nativeBuildInputs = [makeBinaryWrapper];
# PixivFE require files from source code
postInstall = '' postInstall = ''
mkdir -p $out/share/pixivfe
cp -r ./views/ $out/share/pixivfe/views
wrapProgram $out/bin/pixivfe \ wrapProgram $out/bin/pixivfe \
--chdir ${src} --chdir $out/share/pixivfe
''; '';
meta = { meta = {
description = "A privacy respecting frontend for Pixiv"; description = "Privacy respecting frontend for Pixiv";
homepage = "https://codeberg.org/VnPower/PixivFE"; homepage = "https://codeberg.org/VnPower/PixivFE";
license = lib.licenses.agpl3Only; license = lib.licenses.agpl3Only;
mainProgram = "pixivfe"; mainProgram = "pixivfe";