Compare commits

...

20 commits

Author SHA1 Message Date
c14c0b6f67 flake: update lock file 2024-06-29 11:18:11 +08:00
e905ce2b06 home: avoid xresources 2024-06-29 06:45:12 +08:00
b51d4531b0 fixup! home/{firefox,thunderbird}: remove ifd 2024-06-28 08:52:44 +08:00
fb973bc9bd fixup! home: alacritty -> foot 2024-06-28 08:52:34 +08:00
3ed58a0463
flake: update lock file 2024-06-24 11:40:52 +08:00
356363909b
home/{firefox,thunderbird}: remove ifd 2024-06-23 22:56:16 +08:00
8cc84e0794
scripts: runCommandNoCCLocal -> runCommandLocal 2024-06-23 22:56:15 +08:00
1115737759
scripts: add meta.mainProgram 2024-06-23 22:56:15 +08:00
fa99555c12
home: alacritty -> foot 2024-06-23 22:56:15 +08:00
7b5fea2c98
overlays: drop prismlauncher offline mode 2024-06-23 22:56:15 +08:00
7b615740b6
home/gtk: fix font on gnome 2024-06-23 22:56:15 +08:00
b9d57f9d2f
nixos: frp -> cloudflared 2024-06-23 22:56:15 +08:00
abdf90a4b2
scripts: use makeScope 2024-06-23 22:56:15 +08:00
18daffc71b
home/starship: remove ifd 2024-06-23 22:56:14 +08:00
d1e28a69d7
home/mpv: revert wrapper workaround 2024-06-23 22:56:14 +08:00
97a70beb55
fixup! treewide: remove unused files 2024-06-23 22:56:14 +08:00
522b1b6728
flake: add devShells 2024-06-23 22:56:14 +08:00
bad9b9d54a
nixos: dont use keycloak master realm 2024-06-23 22:56:14 +08:00
f998c7c0d5
home: remove colorschemes 2024-06-23 22:56:14 +08:00
9f88130b47
flake: update lock file 2024-06-23 22:56:14 +08:00
34 changed files with 295 additions and 406 deletions

View file

@ -5,7 +5,6 @@
...
}: {
imports = map (n: ../../../../home/applications/${n}) [
"alacritty"
"go"
"mpv"
"nix"
@ -32,11 +31,4 @@
dockutil
gawk
];
# macOS don't have fontconfig
programs = let
monospace = "JetBrainsMono Nerd Font";
in {
alacritty.settings.font.normal.family = monospace;
};
}

View file

@ -21,6 +21,7 @@
skhd = {
enable = true;
skhdConfig = ''
# FIXME
cmd - return : open -n ${pkgs.alacritty}/Applications/Alacritty.app
cmd - 1 : yabai -m space --focus 1 # Focus space

View file

@ -10,11 +10,11 @@
]
},
"locked": {
"lastModified": 1717970544,
"narHash": "sha256-YX43aaegfqjXaZ3S+z0JI7SKOEE1Afqm/I9FBIezJ7A=",
"lastModified": 1719619905,
"narHash": "sha256-i8Cbi+176SUig3BEHYQ38cb2c+zWSnG0Kg2G1TLosDM=",
"owner": "ezKEa",
"repo": "aagl-gtk-on-nix",
"rev": "85c380e4e80fbc21d25165626ad2897cbb11af4d",
"rev": "5869e0b884c95bc8791fcf30162d009a0d6267ba",
"type": "github"
},
"original": {
@ -33,11 +33,11 @@
]
},
"locked": {
"lastModified": 1718252558,
"narHash": "sha256-Yph5ocpdI3a1Ib+V9BQ4/0YyO4UVn8J0WeAvOLYGaGk=",
"lastModified": 1719288828,
"narHash": "sha256-jDKNistAmctLXTJvX8+ALJB2JgXqJHxkCoV+WkmqKhE=",
"owner": "berberman",
"repo": "flakes",
"rev": "73949fb5964f243ff9c28887bfc99c2fe12407c3",
"rev": "a050b5751c88e01135d20fe6c7d7ced20d623bcc",
"type": "github"
},
"original": {
@ -53,11 +53,11 @@
]
},
"locked": {
"lastModified": 1718078026,
"narHash": "sha256-LbQabH6h86ZzTvDnaZHmMwedRZNB2jYtUQzmoqWQoJ8=",
"lastModified": 1719249093,
"narHash": "sha256-0q1haa3sw6GbmJ+WhogMnducZGjEaCa/iR6hF2vq80I=",
"owner": "ipetkov",
"repo": "crane",
"rev": "a3f0c63eed74a516298932b9b1627dd80b9c3892",
"rev": "9791c77eb7e98b8d8ac5b0305d47282f994411ca",
"type": "github"
},
"original": {
@ -73,11 +73,11 @@
]
},
"locked": {
"lastModified": 1718242063,
"narHash": "sha256-n3AWItJ4a94GT0cray/eUV7tt3mulQ52L+lWJN9d1E8=",
"lastModified": 1719582740,
"narHash": "sha256-s4WsLu2L8EzF5Hg2TkelFLVhKGL108AySnlw8voPe5U=",
"owner": "nix-community",
"repo": "disko",
"rev": "832a9f2c81ff3485404bd63952eadc17bf7ccef2",
"rev": "115311bc395f24c1b553338fec4b3aa28cbf5ae2",
"type": "github"
},
"original": {
@ -168,11 +168,11 @@
]
},
"locked": {
"lastModified": 1718243258,
"narHash": "sha256-abBpj2VU8p6qlRzTU8o22q68MmOaZ4v8zZ4UlYl5YRU=",
"lastModified": 1719588253,
"narHash": "sha256-A03i8xiVgP14DCmV5P7VUv37eodCjY4e1iai0b2EuuM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "8d5e27b4807d25308dfe369d5a923d87e7dbfda3",
"rev": "7e68e55d2e16d3a1e92a679430728c35a30fd24e",
"type": "github"
},
"original": {
@ -183,11 +183,11 @@
},
"impermanence": {
"locked": {
"lastModified": 1717932370,
"narHash": "sha256-7C5lCpiWiyPoIACOcu2mukn/1JRtz6HC/1aEMhUdcw0=",
"lastModified": 1719091691,
"narHash": "sha256-AxaLX5cBEcGtE02PeGsfscSb/fWMnyS7zMWBXQWDKbE=",
"owner": "nix-community",
"repo": "impermanence",
"rev": "27979f1c3a0d3b9617a3563e2839114ba7d48d3f",
"rev": "23c1f06316b67cb5dabdfe2973da3785cfe9c34a",
"type": "github"
},
"original": {
@ -221,11 +221,11 @@
]
},
"locked": {
"lastModified": 1718218065,
"narHash": "sha256-fKC7Ryg3AYykDrS2ilS1VqA8/9B2m3yFZcshK+7tIEc=",
"lastModified": 1718782018,
"narHash": "sha256-8SBmf7Sx5xMLzL4VGEU0fe8cuq0yMumdkXgOPXXD3Bo=",
"owner": "nix-community",
"repo": "lanzaboote",
"rev": "7cb05fab896bd542c0ca4260d74d9d664cd7b56e",
"rev": "6fa7bc0522f71d3906a3788bbd80c344cd9c4523",
"type": "github"
},
"original": {
@ -250,11 +250,11 @@
]
},
"locked": {
"lastModified": 1712745718,
"narHash": "sha256-pAPGjjPEC5Y3DeuqSlDgFRPAZStA1doWowOvmPY7jvk=",
"lastModified": 1718491861,
"narHash": "sha256-nnKZRkwXoCtGN8Rgv6FcHttX1JOPWQt2y7yY4Bz/hWk=",
"owner": "Guanran928",
"repo": "nvim",
"rev": "3fbc02368d9d554ac2918e48112fbc25957fb03a",
"rev": "49f55400d06fa113e4b4ae5a6fa97a6d83c59983",
"type": "github"
},
"original": {
@ -270,11 +270,11 @@
]
},
"locked": {
"lastModified": 1718345812,
"narHash": "sha256-FJhA+YFsOFrAYe6EaiTEfomNf7jeURaPiG5/+a3DRSc=",
"lastModified": 1719128254,
"narHash": "sha256-I7jMpq0CAOZA/i70+HDQO/ulLttyQu/K70cSESiMX7A=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "ff988d78f2f55641efacdf9a585d2937f7e32a9b",
"rev": "50581970f37f06a4719001735828519925ef8310",
"type": "github"
},
"original": {
@ -352,11 +352,11 @@
]
},
"locked": {
"lastModified": 1718401149,
"narHash": "sha256-THXbbmhDZjEnc+372GYl3JpXKkkuo7nhShv66Reklsk=",
"lastModified": 1719610737,
"narHash": "sha256-CUs7aehu5w/ikdY6L6Spyw9i6y9elELADhma9ngzBus=",
"owner": "jacekszymanski",
"repo": "nixcasks",
"rev": "d35924a6bd7c8a34f31e885754a5564ea06ab833",
"rev": "1d2ef7c6c6c6c87bdd4a92d4899bc988eb6d9444",
"type": "github"
},
"original": {
@ -367,11 +367,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1718349360,
"narHash": "sha256-SuPne4BMqh9/IkKIAG47Cu5qfmntAaqlHdX1yuFoDO0=",
"lastModified": 1719552654,
"narHash": "sha256-PX3msbC5KdwCDnucGtir3qzlzv+1fuiU4tk17nljFIE=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "ae5c8dcc4d0182d07d75df2dc97112de822cb9d6",
"rev": "3980e7816c99d9e4da7a7b762e5b294055b73b2f",
"type": "github"
},
"original": {
@ -397,11 +397,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1718276985,
"narHash": "sha256-u1fA0DYQYdeG+5kDm1bOoGcHtX0rtC7qs2YA2N1X++I=",
"lastModified": 1719468428,
"narHash": "sha256-vN5xJAZ4UGREEglh3lfbbkIj+MPEYMuqewMn4atZFaQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3f84a279f1a6290ce154c5531378acc827836fbb",
"rev": "1e3deb3d8a86a870d925760db1a5adecc64d329d",
"type": "github"
},
"original": {
@ -413,11 +413,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1718229064,
"narHash": "sha256-ZFav8A9zPNfjZg/wrxh1uZeMJHELRfRgFP+meq01XYk=",
"lastModified": 1719234068,
"narHash": "sha256-1AjSIedDC/aERt24KsCUftLpVppW61S7awfjGe7bMio=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5c2ec3a5c2ee9909904f860dadc19bc12cd9cc44",
"rev": "90bd1b26e23760742fdcb6152369919098f05417",
"type": "github"
},
"original": {
@ -468,11 +468,11 @@
},
"nur": {
"locked": {
"lastModified": 1718400242,
"narHash": "sha256-gLX2eyWb8lVxwI5Uv0F5WKb+YwvlDYnI+sSQB2xMqhw=",
"lastModified": 1719624082,
"narHash": "sha256-RpeJO2UN+XP1fiA6gPKwvW6+gw9m09lDuWdg67g+Zds=",
"owner": "nix-community",
"repo": "NUR",
"rev": "d50ea2706590f0edce9f49d8990dbcf82cdb66ec",
"rev": "e7597af73696a7217e6fa5cacf1da240a2a42165",
"type": "github"
},
"original": {
@ -523,11 +523,11 @@
]
},
"locked": {
"lastModified": 1717664902,
"narHash": "sha256-7XfBuLULizXjXfBYy/VV+SpYMHreNRHk9nKMsm1bgb4=",
"lastModified": 1719259945,
"narHash": "sha256-F1h+XIsGKT9TkGO3omxDLEb/9jOOsI6NnzsXFsZhry4=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "cc4d466cb1254af050ff7bdf47f6d404a7c646d1",
"rev": "0ff4381bbb8f7a52ca4a851660fc7a437a4c6e07",
"type": "github"
},
"original": {
@ -573,19 +573,16 @@
},
"rust-overlay": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1718331519,
"narHash": "sha256-6Ru37wS8uec626nHVIh6hSpCYB7eNc3RPFa2U//bhw4=",
"lastModified": 1719627476,
"narHash": "sha256-LBfULF+2sCaWmkjmj1LkkGrAS/E9ZdXU1A5wWKjt9p0=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "419e7fae2731f41dd9b3e34dfe8802be68558b92",
"rev": "5be53be9e5c766fc72fc5d65ba8a566cc0c3217f",
"type": "github"
},
"original": {
@ -620,11 +617,11 @@
]
},
"locked": {
"lastModified": 1718137936,
"narHash": "sha256-psA+1Q5fPaK6yI3vzlLINNtb6EeXj111zQWnZYyJS9c=",
"lastModified": 1719268571,
"narHash": "sha256-pcUk2Fg5vPXLUEnFI97qaB8hto/IToRfqskFqsjvjb8=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "c279dec105dd53df13a5e57525da97905cc0f0d6",
"rev": "c2ea1186c0cbfa4d06d406ae50f3e4b085ddc9b3",
"type": "github"
},
"original": {
@ -640,11 +637,11 @@
]
},
"locked": {
"lastModified": 1718239576,
"narHash": "sha256-Afdz9oCQf8VCGXUhI8KxdJg9gc+fepZK//mYsijfhFw=",
"lastModified": 1719449101,
"narHash": "sha256-rRrz763KKi6GnSZF4WF34kpJ9eMXR3AOPOWN/7hO1Zs=",
"owner": "nix-community",
"repo": "srvos",
"rev": "d6280e5c12c4ddb26f0807387777786c66e4c552",
"rev": "e938f07e5cd9d11576d3860b68c117932c161006",
"type": "github"
},
"original": {
@ -675,11 +672,11 @@
]
},
"locked": {
"lastModified": 1718271476,
"narHash": "sha256-35hUMmFesmchb+u7heKHLG5B6c8fBOcSYo0jj0CHLes=",
"lastModified": 1719243788,
"narHash": "sha256-9T9mSY35EZSM1KAwb7K9zwQ78qTlLjosZgtUGnw4rn4=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "e75ba0a6bb562d2ce275db28f6a36a2e4fd81391",
"rev": "065a23edceff48f948816b795ea8cc6c0dee7cdf",
"type": "github"
},
"original": {

View file

@ -141,7 +141,6 @@
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
scss-reset = {
url = "github:andreymatin/scss-reset";
@ -162,6 +161,16 @@
### nix {run,shell,build}
packages = import ./pkgs pkgs;
### nix develop
devShells.default = pkgs.mkShell {
packages = with pkgs; [
alejandra
colmena
git
sops
];
};
})
// (let
mkNixOS = system: modules:

View file

@ -1,23 +0,0 @@
{
lib,
pkgs,
...
}: {
programs.alacritty = {
enable = true;
settings = {
import = [
"${pkgs.vimPlugins.tokyonight-nvim}/extras/alacritty/tokyonight_night.toml"
];
cursor.style = "beam";
font.size = 10;
# workaround for scaling in X11
env.WINIT_X11_SCALE_FACTOR = "1";
# for zellij on macOS
window.option_as_alt = lib.mkIf pkgs.stdenv.hostPlatform.isDarwin "Both";
};
};
}

View file

@ -1,9 +0,0 @@
{pkgs, ...}: {
home.sessionVariables = {
NIXOS_OZONE_WL = "1"; # let electron applications use wayland
};
home.packages = with pkgs; [
wl-clipboard
];
}

View file

@ -1,8 +0,0 @@
{pkgs, ...}: {
home.packages = with pkgs; [pwvucontrol];
# remove csd window buttons
# https://github.com/localsend/localsend/blob/2457acd8a7412723b174672d174e4853dccd7d99/app/linux/my_application.cc#L45
home.sessionVariables.GTK_CSD = 0;
dconf.settings."org/gnome/desktop/wm/preferences"."button-layout" = "icon,appmenu:";
}

View file

@ -8,7 +8,6 @@
fcitx5.addons =
(with pkgs; [
libsForQt5.fcitx5-chinese-addons
fcitx5-tokyonight
])
++ (with inputs.berberman.packages.${pkgs.stdenv.hostPlatform.system}; [
fcitx5-pinyin-moegirl
@ -17,7 +16,6 @@
};
xdg.configFile."fcitx5/conf/classicui.conf".text = ''
Theme=Tokyonight-Storm
Vertical Candidate List=True
PreferTextIcon=True
'';

View file

@ -1,19 +1,16 @@
{pkgs, ...}: {
programs.firefox = {
enable = true;
profiles."default" = {
extraConfig = ''
${builtins.readFile (pkgs.fetchurl {
# FIXME: IFD
url = "https://raw.githubusercontent.com/arkenfox/user.js/126.1/user.js";
hash = "sha256-XRtG0iLKh8uqbeX7Rc2H6VJwZYJoNZPBlAfZEfrSCP4=";
})}
${builtins.readFile ./user-overrides.js}
'';
package = pkgs.firefox.override {
extraPrefsFiles = [
"${pkgs.arkenfox-userjs}/user.cfg"
(pkgs.runCommandLocal "userjs" {} ''
install -Dm644 ${./user-overrides.js} $out
substituteInPlace $out \
--replace-fail "user_pref" "defaultPref"
'')
];
};
};
home.sessionVariables = {
MOZ_USE_XINPUT2 = "1";
profiles."default" = {};
};
}

View file

@ -3,7 +3,6 @@
enable = true;
interactiveShellInit = ''
set fish_greeting
source ${pkgs.vimPlugins.tokyonight-nvim}/extras/fish/tokyonight_night.fish
'';
plugins = [
{

View file

@ -0,0 +1,9 @@
{
programs.foot = {
enable = true;
settings = {
main.font = "monospace:size=10";
cursor.style = "beam";
};
};
}

View file

@ -17,18 +17,14 @@
slang = "eng,en";
};
# FIXME: https://github.com/nix-community/home-manager/pull/5524
package = pkgs.mpv-unwrapped.wrapper {
mpv = pkgs.mpv-unwrapped;
scripts =
(with pkgs.mpvScripts; [
thumbfast
sponsorblock
modernx-zydezu
])
++ lib.optionals pkgs.stdenv.hostPlatform.isLinux (with pkgs.mpvScripts; [
mpris
]);
};
scripts =
(with pkgs.mpvScripts; [
thumbfast
sponsorblock
modernx-zydezu
])
++ lib.optionals pkgs.stdenv.hostPlatform.isLinux (with pkgs.mpvScripts; [
mpris
]);
};
}

View file

@ -7,7 +7,7 @@
enable = true;
package = pkgs.rofi-wayland;
font = "monospace";
terminal = lib.getExe pkgs.alacritty;
terminal = lib.getExe pkgs.foot;
};
home.packages = with pkgs; [rofi-power-menu];

View file

@ -1,11 +1,9 @@
{
pkgs,
lib,
...
}: {
{pkgs, ...}: {
programs.starship = {
enable = true;
# FIXME: IFD
settings = lib.importTOML "${pkgs.starship}/share/starship/presets/nerd-font-symbols.toml";
};
home.sessionVariables = {
"STARSHIP_CONFIG" = "${pkgs.starship}/share/starship/presets/nerd-font-symbols.toml";
};
}

View file

@ -109,7 +109,7 @@
### Execute other stuff
# Launch applications
"${modifier}+Return" = "exec alacritty";
"${modifier}+Return" = "exec ${lib.getExe pkgs.foot}";
"${modifier}+w" = "exec ${pkgs.xdg-utils}/bin/xdg-open http:";
"${modifier}+e" = "exec ${pkgs.xdg-utils}/bin/xdg-open ~";

View file

@ -1,13 +1,12 @@
{pkgs, ...}: {
{
programs.thunderbird = {
enable = true;
profiles.default = {
isDefault = true;
extraConfig = ''
${builtins.readFile (pkgs.fetchurl {
# FIXME: IFD
${builtins.readFile (builtins.fetchurl {
url = "https://raw.githubusercontent.com/HorlogeSkynet/thunderbird-user.js/d6b18302e46349d9924c8a76951bae6efca51501/user.js";
hash = "sha256-66B1yLQkQnydAUXD7KGt32OhWSYcdWX+BUozrgW9uAg=";
sha256 = "sha256-66B1yLQkQnydAUXD7KGt32OhWSYcdWX+BUozrgW9uAg=";
})}
${builtins.readFile ./user-overrides.js}
'';

View file

@ -6,9 +6,6 @@
# Unsure about the syntax for defining keybindings in Nix (refer to line 16)
xdg.configFile."zellij/config.kdl".text = lib.mkForce ''
// TODO: Text selection is not displayed due to the use of the same color as
// my terminal background.
theme "tokyo-night-dark"
simplified_ui true
pane_frames false
default_layout "compact"

View file

@ -54,6 +54,5 @@
programs.adb.enable = true;
# fucking hell
# FIXME: IFD
programs.anime-game-launcher.enable = true;
}

View file

@ -0,0 +1,64 @@
(default) {
encode zstd gzip
header {
# https://observatory.mozilla.org/analyze/ny4.dev
# https://infosec.mozilla.org/guidelines/web_security
# https://caddyserver.com/docs/caddyfile/directives/header#examples
?Content-Security-Policy "default-src https: blob: 'unsafe-eval' 'unsafe-inline'; object-src 'none'"
?Permissions-Policy interest-Hpcohort=()
?Strict-Transport-Security max-age=31536000;
?X-Content-Type-Options nosniff
?X-Frame-Options DENY
}
handle_path /robots.txt {
file_server * {
root /var/www/robots/robots.txt
}
}
}
http://mastodon.ny4.dev:80 {
import default
handle_path /system/* {
file_server * {
root /var/lib/mastodon/public-system
}
}
handle /api/v1/streaming/* {
reverse_proxy unix//run/mastodon-streaming/streaming-1.socket {
header_up X-Forwarded-Proto "https"
}
}
route * {
file_server * {
root @mastodon@/public
pass_thru
}
reverse_proxy * unix//run/mastodon-web/web.socket {
header_up X-Forwarded-Proto "https"
}
}
handle_errors {
root * @mastodon@/public
rewrite 500.html
file_server
}
}
http://matrix.ny4.dev:80 {
import default
reverse_proxy /_matrix/* unix//run/matrix-synapse/synapse.sock
reverse_proxy /_synapse/client/* unix//run/matrix-synapse/synapse.sock
reverse_proxy /health unix//run/matrix-synapse/synapse.sock
}
http://syncv3.ny4.dev:80 {
import default
reverse_proxy unix//run/matrix-sliding-sync/sync.sock
}

View file

@ -21,3 +21,4 @@ Homelab, hosting random stuff through tailscale and rathole.
- [ ] tpm luks unlocking
- [ ] nouveau -> nvidia
- [x] networkmanager -> iwd
- [ ] jellyfin hardware acceleration

View file

@ -2,7 +2,6 @@
pkgs,
lib,
config,
inputs,
...
}: {
imports = [
@ -43,8 +42,9 @@
"mastodon/environment" = {
restartUnits = ["mastodon-web.service"];
};
"frp/environment" = {
restartUnits = ["frp.service"];
"cloudflared/secret" = {
restartUnits = ["cloudflared-tunnel-6222a3e0-98da-4325-be19-0f86a7318a41.service"];
owner = config.systemd.services."cloudflared-tunnel-6222a3e0-98da-4325-be19-0f86a7318a41".serviceConfig.User;
};
};
};
@ -57,70 +57,42 @@
openFirewall = true;
};
services.frp = {
services.cloudflared = {
enable = true;
role = "client";
settings = {
serverAddr = "18.177.132.61"; # TODO: can I use a domain name?
serverPort = 7000;
auth.method = "token";
auth.token = "{{ .Envs.FRP_AUTH_TOKEN }}";
proxies = [
{
name = "synapse";
type = "tcp";
remotePort = 8600;
plugin = {
type = "unix_domain_socket";
unixPath = "/run/matrix-synapse/synapse.sock";
};
}
{
name = "syncv3";
type = "tcp";
remotePort = 8700;
plugin = {
type = "unix_domain_socket";
unixPath = "/run/matrix-sliding-sync/sync.sock";
};
}
{
name = "mastodon-web";
type = "tcp";
remotePort = 8900;
plugin = {
type = "unix_domain_socket";
unixPath = "/run/mastodon-web/web.socket";
};
}
{
name = "mastodon-streaming";
type = "tcp";
remotePort = 9000;
plugin = {
type = "unix_domain_socket";
unixPath = "/run/mastodon-streaming/streaming-1.socket";
};
}
{
name = "mastodon-system";
type = "tcp";
remotePort = 9100;
plugin = {
# FIXME:
type = "static_file";
localPath = "/var/lib/mastodon/public-system";
};
}
];
tunnels = {
"6222a3e0-98da-4325-be19-0f86a7318a41" = {
credentialsFile = config.sops.secrets."cloudflared/secret".path;
default = "http_status:404";
ingress = {
# TODO: is this safe?
# browser <-> cloudflare cdn <-> cloudflared <-> caddy <-> mastodon
# ^ no tls in this part?
"mastodon.ny4.dev" = "http://localhost:80";
"matrix.ny4.dev" = "http://localhost:80";
"syncv3.ny4.dev" = "http://localhost:80";
};
};
};
};
systemd.services.frp.serviceConfig = {
EnvironmentFile = [config.sops.secrets."frp/environment".path];
services.caddy = {
enable = true;
configFile = pkgs.substituteAll {
src = ./Caddyfile;
inherit (pkgs) mastodon;
};
};
systemd.services.caddy.serviceConfig = {
SupplementaryGroups = ["mastodon" "matrix-synapse"];
};
systemd.tmpfiles.settings = {
"10-www" = {
"/var/www/robots/robots.txt".C.argument = toString ../lightsail-tokyo/robots.txt;
};
};
services.postgresql = {
enable = true;
settings = {
@ -173,12 +145,7 @@
eula = true;
openFirewall = true;
package = pkgs.callPackage "${inputs.nixpkgs}/pkgs/games/minecraft-servers/derivation.nix" {
version = "1.21";
sha1 = "450698d1863ab5180c25d7c804ef0fe6369dd1ba";
url = "https://piston-data.mojang.com/v1/objects/450698d1863ab5180c25d7c804ef0fe6369dd1ba/server.jar";
jre_headless = pkgs.javaPackages.compiler.openjdk21.headless;
};
package = pkgs.minecraftServers.vanilla-1-21;
# Aikar's flag
# https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/
@ -268,7 +235,7 @@
{
idp_id = "keycloak";
idp_name = "id.ny4.dev";
issuer = "https://id.ny4.dev/realms/master";
issuer = "https://id.ny4.dev/realms/ny4";
client_id = "synapse";
client_secret_path = config.sops.secrets."synapse/oidc".path;
scopes = ["openid" "profile"];
@ -323,7 +290,7 @@
# OIDC_CLIENT_SECRET # EnvironmentFile
OIDC_DISCOVERY = "true";
OIDC_DISPLAY_NAME = "id.ny4.dev";
OIDC_ISSUER = "https://id.ny4.dev/realms/master";
OIDC_ISSUER = "https://id.ny4.dev/realms/ny4";
OIDC_REDIRECT_URI = "https://${WEB_DOMAIN}/auth/auth/openid_connect/callback";
OIDC_SCOPE = "openid,profile,email";
OIDC_SECURITY_ASSUME_EMAIL_IS_VERIFIED = "true";

View file

@ -1,12 +1,12 @@
synapse:
secret: ENC[AES256_GCM,data:H7bHbreE4NmpqXHpkPQ5AkwGOAs97YcQhQZIr5zgK1mgHMTGSbMP57elWMyMAQ3+wCy7x9Jx0H2omrdQh39iG32XoVyyMMoVMQ0OCgFa4O77DHdgG+wrWl7VLWNY,iv:cFbMEqJQG482ShZlpoxRhk7z/y5216WucXfJbkMxuxU=,tag:7iUyMlu2yStLLdkC/V9/DQ==,type:str]
oidc: ENC[AES256_GCM,data:vGQcPcUfbv6II6buEMKELc1+xZ5XccpEeCy3vZx4fdk=,iv:ORok/FXZ9SA54zD1+OhyFnZAPhGpMpTetWYgge2QSwQ=,tag:7DxrruTbenUfI/V6hGYBaw==,type:str]
oidc: ENC[AES256_GCM,data:ihiMcrrYvPrNDJ13p6/FbINgh5wxv2vyOYxg0sthipM=,iv:+aESWZLI7/4HWjV7QT94py+zGLbTl+VoSsWdiGNHkjU=,tag:yxxZeDOtzFegCQGQT2HCgA==,type:str]
syncv3:
environment: ENC[AES256_GCM,data:xVBXP3+w38T700OYu6XL1R1I0NWzcKeORWk5GE2lkWS+kooplcQb/wbov40H+DB522cRzCRutMXmrvGVWO86kIH/jT5tq5iWrdxbSKjTxA==,iv:6rtSdSMYtGnZl8WMmqxaCxbDG7SXhKy0LCXJJkorTvU=,tag:3PE5R31oU3ClL7elK/ca0g==,type:str]
mastodon:
environment: ENC[AES256_GCM,data:cEGz8ZEPUmtPXyJx5oB1xOUvya7lSCW4vQKCp6F6WpgakZdrarez0cOzM8VsfNe3lFe6VQ==,iv:17k4EWB4v/79ApfKw5e8FyqJ1zKEn9xxewkrsRbya9A=,tag:dJjVjhEQGjSrxD9FO2hYEw==,type:str]
frp:
environment: ENC[AES256_GCM,data:TLVqVpVMTFzvs8JS31cPhhqeLRGcUOQBeGENvBd8e1RRt2mQY5VTP8lQYrgtXMRGMHLu0ByPjmL8aFZRlukBc77wAIhtETo238Hn62vJz3I=,iv:kMRF5BAzvhKWtKQyPSIWGeSjgmcEfvcbCJa9wQxSjjU=,tag:DViCejZvRo4cqJosE28lsA==,type:str]
environment: ENC[AES256_GCM,data:9RjpYXbGo8lBsXKg71Vbp2iTJlvXEGhn8hTl37o8G1E28JWF5Io7+evfqUv+N7QfSk1zbA==,iv:ejfe7f941QB7iiREXx1T9Vej43cW/S9nr03P5lkw9Yg=,tag:odI7xsxoPGBrxd0GnCsnOg==,type:str]
cloudflared:
secret: ENC[AES256_GCM,data:QXIl0MqreqPH4LP7IQdA5qQCQdizjFixbOHjqQi/3RjYDt9zt0OejW9rIYnkIRyVj4hnkJBqd1ov/VgdSoNmy/iafIgwqwgsMH0e4R9J6n255p3JG3XBmiYry89xXvQ1SXyzWdUF6p3qgevwzjZnKYyYHT9TbLWc/BkTyyA8g1EGg0O1WfDXhq7u9kOPV4CaU1UX1MMpvZQnsV389PJEWYuK,iv:ASGw5dGOuukRREZ8vMLw5hgZmJhDZSJxDqvfWaxXKJk=,tag:75jf48BEDd4uHkb+2LV5Tg==,type:str]
sops:
kms: []
gcp_kms: []
@ -31,8 +31,8 @@ sops:
bGQ1cytGR09Dd2JoaU5CSW1DL1FVR0kK8F2DoJcnd+T+eQ9h39DtaAGCSpS4wXVJ
hOZBh9fDeue1PwMWufDJ6KGeR0atPbUjn2w0dquvLEdBjt3Un9rFcA==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-06-20T08:12:17Z"
mac: ENC[AES256_GCM,data:kkQnNrldWFWCORK4eeVDg4fUQ/FNUPjxHpZb9i+okxlTHpYOPLHf1oDWpOTvUyIE7gHPkU0Knb7bD5OL3g/40O2/MjXzNTNWBws94NNRrY2Z6V6ixSI58tNT2NRSFqQFcDHx8Cvte+7rJoElN15Ejh3a4Pmm+ID70iSQu7mdFAI=,iv:jCTsHhY2HQjE3GvG0S/twSojuyX9e4LfhHTxRY3k8Tg=,tag:x2PkHgYi0XheTqC95BTGHA==,type:str]
lastmodified: "2024-06-21T07:19:43Z"
mac: ENC[AES256_GCM,data:pKWUM3uhmtrwTOlR2jZauWsGSY1d//z+cojpWLFAAKedGjotLB6cmektyAVRHhw3waiM4WR5+BNZ6ghp7qBrM0z2WanJCdSmXqdyxJEydUC9CCFXZG+7SmIZS+7+/LsqejzdYSAMf9DijN74E1EJVS5F0mHhw8QuRmDy3wU789M=,iv:IrOm1Maz8os9Q/ez+TbOxOTr1zwB1loDVHcPbN8kMvg=,tag:AAKp3OH/s2c7u8lp6vkLVg==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1

View file

@ -6,7 +6,9 @@
}
}
(header) {
(default) {
encode zstd gzip
header {
# https://observatory.mozilla.org/analyze/ny4.dev
# https://infosec.mozilla.org/guidelines/web_security
@ -18,13 +20,7 @@
?X-Content-Type-Options nosniff
?X-Frame-Options DENY
}
}
(compression) {
encode zstd gzip
}
(robots) {
handle_path /robots.txt {
file_server * {
root /var/www/robots/robots.txt
@ -32,12 +28,6 @@
}
}
(default) {
import header
import compression
import robots
}
www.ny4.dev {
import default
redir https://ny4.dev
@ -91,13 +81,6 @@ pixiv.ny4.dev {
reverse_proxy unix//run/pixivfe/pixiv.sock
}
matrix.ny4.dev {
import default
reverse_proxy /_matrix/* localhost:8600
reverse_proxy /_synapse/client/* localhost:8600
reverse_proxy /health localhost:8600
}
syncv3.ny4.dev {
import default
reverse_proxy localhost:8700
@ -114,31 +97,6 @@ element.ny4.dev {
file_server
}
mastodon.ny4.dev {
import default
handle_path /system/* {
reverse_proxy localhost:9100
}
handle /api/v1/streaming/* {
reverse_proxy localhost:9000
}
route * {
file_server * {
root @mastodon@/public
pass_thru
}
reverse_proxy * localhost:8900
}
handle_errors {
root * @mastodon@/public
rewrite 500.html
file_server
}
}
git.ny4.dev {
import default
reverse_proxy unix//run/forgejo/forgejo.sock

View file

@ -39,9 +39,6 @@
"searx/environment" = {
restartUnits = ["searx.service"];
};
"frp/environment" = {
restartUnits = ["frp.service"];
};
};
templates = {
@ -61,18 +58,8 @@
};
### Services
networking.firewall.allowedUDPPorts = [
# hysteria
443
];
networking.firewall.allowedTCPPorts = [
# caddy
80
443
# frp
7000
];
networking.firewall.allowedUDPPorts = [443]; # hysteria
networking.firewall.allowedTCPPorts = [80 443]; # caddy
systemd.tmpfiles.settings = {
"10-www" = {
@ -89,12 +76,12 @@
"element" = pkgs.element-web.override {
element-web-unwrapped = pkgs.element-web-unwrapped.overrideAttrs (oldAttrs: {
version = "1.11.69-rc.1";
version = "1.11.70-rc.0";
src = oldAttrs.src.overrideAttrs {
outputHash = "sha256-vL21wTI9qeIhrFdbI0WsehVy0ZLBj9rayuQnTPC7k8g=";
outputHash = "sha256-LnPqwXczECH7XnVvGnoUQpZct2jmGEFVpJ1nTewAHC8=";
};
offlineCache = oldAttrs.offlineCache.overrideAttrs {
outputHash = "sha256-nZWclW2tEq7vPRPG5zzhYfExVnmPxYDm8DxME5w5ORI=";
outputHash = "sha256-yAAZXnxrBGuTWUJcL6Su0F5H2D5MNg9PUU7Uj8XT8N8=";
};
});
@ -118,20 +105,6 @@
];
};
services.frp = {
enable = true;
role = "server";
settings = {
bindPort = 7000;
auth.method = "token";
auth.token = "{{ .Envs.FRP_AUTH_TOKEN }}";
};
};
systemd.services.frp.serviceConfig = {
EnvironmentFile = [config.sops.secrets."frp/environment".path];
};
# `journalctl -u murmur.service | grep Password`
services.murmur = {
enable = true;
@ -196,12 +169,12 @@
services.keycloak = {
enable = true;
settings = {
cache = "local";
hostname = "id.ny4.dev";
http-host = "127.0.0.1";
http-port = 8800;
proxy = "edge";
hostname-strict-backchannel = true;
hostname = "id.ny4.dev";
cache = "local";
# proxy-headers = "xforwarded"; # FIXME: Key material not provided to setup HTTPS.
};
database.passwordFile = toString (pkgs.writeText "password" "keycloak");
};

View file

@ -4,8 +4,6 @@ searx:
environment: ENC[AES256_GCM,data:Chtb7yhooCMU+Hfnqdgwpd1w5gI2LZm4cz8d3YRgznjveO/4HOZ54XMdQVDoiC6ukojHfEUxl+3qIG1wi/s29rhxJekHLtWgJ++OUQKW,iv:viGQRoWbaSlRoovBV01Vl/d17eRVeM8CQUHYRWrflNQ=,tag:2QMYVCXON129pRpW3oOQXg==,type:str]
pixivfe:
environment: ENC[AES256_GCM,data:/Q/rShBXlXkWOOP+7OhKtKTSrp2zNizMaAOyKfWbKgJMHTjNfmMtRuGKRez9KXM5MDIMIF9iJSQ=,iv:whIAkaWiZcZT4HfmJw4qA+fbQ9zHFp+kTuHxQDE3XoU=,tag:FroLTMtNwGlvZw3osftj3A==,type:str]
frp:
environment: ENC[AES256_GCM,data:6XWjUPuJt6fPiIO7mrMjIoR0VHsiy77GqJu/CXVqMEi+EEmXgUN2l6m5vTkttmZICXb5M9ANpdTYOB3nEwCYBJvmFe8kFIZ77rYRVt3C4l0=,iv:5UHJQTanNvk5BsZzH0JeGKP8sDFjTIuc7sGRcReF1+4=,tag:sBYa9RFaMGrh6HZudqZVVA==,type:str]
sops:
kms: []
gcp_kms: []
@ -30,8 +28,8 @@ sops:
R1ZMMG1jWnljNWl5Nk5MU3RCMlFPYjgKL1ScxzF0D1R18H+oe6dlxUGlL9myHEr3
3HBPoapKCSQ/cT7Xma4bsWD1AVJIf1Ak+MeCs9ItGwKAcnd9JYZ9KA==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-06-20T08:14:22Z"
mac: ENC[AES256_GCM,data:hqCsHztVoTvRoJ+HyODPrYJKwCWusLzap0tVRxnQlAaqIp1ln9AyxLRuQetDkF5nN97S0BW1z1Uf910wlAe5VxsENrIDMYeUq1PnbQ2ijLttGOnLJVS0aJgcFqNOir2tbflH3fbzDCiSmrT+xQ8ytgX+MEtXpxH7OlVFohjXBCo=,iv:ztALlEtd9cGBY0Sx9yzSngNMaHX3kgkRMTruXDXXVHQ=,tag:hztHafyj4nu3npWyBPhxGw==,type:str]
lastmodified: "2024-06-21T07:19:35Z"
mac: ENC[AES256_GCM,data:1zG5at1zfjbnnHcZ1Vy7aJxMjaZpE9aL3QlAaxyQ7GYle05z/4PqIdampd7p1WrMWNWqkxkUFazTCpQF9faR0qbnZ2zyOWk45ZtBGZSEhvHRFke6JjwPv4fi35ozHL4JiuP76kGivegvR2OgQ7NH6HJBoZgEqduu+YISJlrvJVs=,iv:p/v8BnUmOCYsaXtUeaVq5MKLk69as3XkQsG688tYkiE=,tag:if6U/qbzrNdYaqLcQbGe6Q==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1

View file

@ -6,9 +6,9 @@
./xdg-mime.nix
]
++ map (n: ../../../../../home/applications/${n}) [
"alacritty"
"fcitx5"
"firefox"
"foot"
"go"
"mpv"
"nautilus"

View file

@ -26,12 +26,12 @@
# Make GTK listen to fontconfig
dconf.settings = {
"org/gnome/desktop/wm/preferences" = {
"titlebar-font" = "Sans Bold";
"titlebar-font" = "Sans Bold 11";
};
"org/gnome/desktop/interface" = {
"font-name" = "Sans";
"document-font-name" = "Sans";
"monospace-font-name" = "Monospace";
"font-name" = "Sans 11";
"document-font-name" = "Sans 11";
"monospace-font-name" = "Monospace 10";
};
};

View file

@ -8,7 +8,6 @@
name = "Adwaita";
package = pkgs.gnome.adwaita-icon-theme;
size = 24;
x11.enable = true;
gtk.enable = true;
};

View file

@ -4,9 +4,58 @@ let
patches = (old.patches or []) ++ patches;
});
in {
patches = _final: prev:
{}
// import ./nautilus.nix {inherit addPatches prev;}
// import ./prismlauncher.nix {inherit addPatches prev;}
// import ./sway.nix {inherit addPatches prev;};
patches = _final: prev: {
gnome =
prev.gnome
// {
# https://aur.archlinux.org/pkgbase/nautilus-typeahead
nautilus = prev.gnome.nautilus.overrideAttrs {
src = prev.fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "albertvaka";
repo = "nautilus";
rev = "f5f593bf36c41756a29d5112a10cf7ec70b8eafb";
hash = "sha256-PfkCY2gQ8jfPIgTRC9Xzxh4N3f2oB339Hym5RCbKwkw=";
};
# Enable type-ahead behavior by default
postPatch = ''
awk -i inplace '/type-ahead-search/{c++;} c==1 && /true/{sub("true", "false"); c++;} 1' data/org.gnome.nautilus.gschema.xml
'';
};
};
sway-unwrapped = addPatches prev.sway-unwrapped [
# text_input: Implement input-method popups
# https://github.com/swaywm/sway/pull/7226
(prev.fetchpatch rec {
name = "0001-text_input-Implement-input-method-popups.patch";
url = "https://aur.archlinux.org/cgit/aur.git/plain/${name}?h=sway-im&id=b8434b3ad9e8c6946dbf7b14b0f7ef5679452b94";
hash = "sha256-A+rBaWMWs616WllVoo21AJaf9lxg/oCG0b9tHLfuJII=";
})
(prev.fetchpatch rec {
name = "0002-chore-fractal-scale-handle.patch";
url = "https://aur.archlinux.org/cgit/aur.git/plain/${name}?h=sway-im&id=b8434b3ad9e8c6946dbf7b14b0f7ef5679452b94";
hash = "sha256-YOFm0A4uuRSuiwnvF9xbp8Wl7oGicFGnq61vLegqJ0E=";
})
(prev.fetchpatch rec {
name = "0003-chore-left_pt-on-method-popup.patch";
url = "https://aur.archlinux.org/cgit/aur.git/plain/${name}?h=sway-im&id=b8434b3ad9e8c6946dbf7b14b0f7ef5679452b94";
hash = "sha256-PzhQBRpyB1WhErn05UBtBfaDW5bxnQLRKWu8jy7dEiM=";
})
# Tray D-Bus Menu
# https://github.com/swaywm/sway/pull/6249
(prev.fetchpatch {
name = "0001-Tray-Implement-dbusmenu.patch";
url = "https://github.com/NickHu/sway/commit/0fc5d7aed84415a77b718ca9dc3c0b3ad2c05b02.patch";
hash = "sha256-1KuGZGwyGJK8KO4OngS+tWKV/3Yu++bCNnp+xTrlGoY=";
})
(prev.fetchpatch {
name = "0002-Tray-dont-invoke-dbus-menu-when-tray-is-disabled.patch";
url = "https://github.com/NickHu/sway/commit/03c14421354e54332e12f78d029dcaa9919fd161.patch";
hash = "sha256-GhBlCnk7aB6s57wV1FNOPAt6s0oJxLgf2bMw+8ktn8A=";
})
];
};
}

View file

@ -1,21 +0,0 @@
{prev, ...}: {
gnome =
prev.gnome
// {
# https://aur.archlinux.org/pkgbase/nautilus-typeahead
nautilus = prev.gnome.nautilus.overrideAttrs {
src = prev.fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "albertvaka";
repo = "nautilus";
rev = "f5f593bf36c41756a29d5112a10cf7ec70b8eafb";
hash = "sha256-PfkCY2gQ8jfPIgTRC9Xzxh4N3f2oB339Hym5RCbKwkw=";
};
# Enable type-ahead behavior by default
postPatch = ''
awk -i inplace '/type-ahead-search/{c++;} c==1 && /true/{sub("true", "false"); c++;} 1' data/org.gnome.nautilus.gschema.xml
'';
};
};
}

View file

@ -1,14 +0,0 @@
{
addPatches,
prev,
...
}: {
prismlauncher = addPatches prev.prismlauncher [
# Offline mode for Prism Launcher
# https://github.com/Misterio77/nix-config/blob/main/overlays/offline-mode-prism-launcher.diff
(prev.fetchpatch {
url = "https://raw.githubusercontent.com/Misterio77/nix-config/ac1d7bbcafb6be75e94448c7ae7a94d460e3129d/overlays/offline-mode-prism-launcher.diff";
hash = "sha256-vMcAvhD0Ms4Tvwpzs/YfORc8ki7MNMurdJJ/yswfxFM=";
})
];
}

View file

@ -1,38 +0,0 @@
{
addPatches,
prev,
...
}: {
sway-unwrapped = addPatches prev.sway-unwrapped [
# text_input: Implement input-method popups
# https://github.com/swaywm/sway/pull/7226
(prev.fetchpatch rec {
name = "0001-text_input-Implement-input-method-popups.patch";
url = "https://aur.archlinux.org/cgit/aur.git/plain/${name}?h=sway-im&id=b8434b3ad9e8c6946dbf7b14b0f7ef5679452b94";
hash = "sha256-A+rBaWMWs616WllVoo21AJaf9lxg/oCG0b9tHLfuJII=";
})
(prev.fetchpatch rec {
name = "0002-chore-fractal-scale-handle.patch";
url = "https://aur.archlinux.org/cgit/aur.git/plain/${name}?h=sway-im&id=b8434b3ad9e8c6946dbf7b14b0f7ef5679452b94";
hash = "sha256-YOFm0A4uuRSuiwnvF9xbp8Wl7oGicFGnq61vLegqJ0E=";
})
(prev.fetchpatch rec {
name = "0003-chore-left_pt-on-method-popup.patch";
url = "https://aur.archlinux.org/cgit/aur.git/plain/${name}?h=sway-im&id=b8434b3ad9e8c6946dbf7b14b0f7ef5679452b94";
hash = "sha256-PzhQBRpyB1WhErn05UBtBfaDW5bxnQLRKWu8jy7dEiM=";
})
# Tray D-Bus Menu
# https://github.com/swaywm/sway/pull/6249
(prev.fetchpatch {
name = "0001-Tray-Implement-dbusmenu.patch";
url = "https://github.com/NickHu/sway/commit/0fc5d7aed84415a77b718ca9dc3c0b3ad2c05b02.patch";
hash = "sha256-1KuGZGwyGJK8KO4OngS+tWKV/3Yu++bCNnp+xTrlGoY=";
})
(prev.fetchpatch {
name = "0002-Tray-dont-invoke-dbus-menu-when-tray-is-disabled.patch";
url = "https://github.com/NickHu/sway/commit/03c14421354e54332e12f78d029dcaa9919fd161.patch";
hash = "sha256-GhBlCnk7aB6s57wV1FNOPAt6s0oJxLgf2bMw+8ktn8A=";
})
];
}

View file

@ -1,13 +1,14 @@
# NOTE: 301: All packages are migrated to `github:Guanran928/nur-packages`,
# only keeping some packages that only fits for personal use.
pkgs: {
scripts = rec {
pkgs: let
inherit (pkgs) lib;
in {
scripts = lib.makeScope pkgs.newScope (self: {
# util
makeScript = pkgs.callPackage ./scripts/makeScript.nix {};
makeScript = self.callPackage ./scripts/makeScript.nix {};
# scripts
# TODO: Do I really have to inherit `makeScript` for every script?
lofi = pkgs.callPackage ./scripts/lofi.nix {inherit makeScript;};
screenshot = pkgs.callPackage ./scripts/screenshot.nix {inherit makeScript;};
};
lofi = self.callPackage ./scripts/lofi.nix {};
screenshot = self.callPackage ./scripts/screenshot.nix {};
});
}

View file

@ -1,7 +1,7 @@
{
lib,
runtimeShell,
runCommandNoCCLocal,
runCommandLocal,
makeBinaryWrapper,
}: {
name,
@ -9,9 +9,10 @@
runtimeInputs ? [],
}:
# FIXME: incorrect argv0
runCommandNoCCLocal name {
runCommandLocal name {
inherit src;
nativeBuildInputs = [makeBinaryWrapper];
meta.mainProgram = name;
} ''
install -Dm755 $src $out/bin/.$name
makeBinaryWrapper ${runtimeShell} $out/bin/$name \