Compare commits

..

No commits in common. "8102d1d00913847e52f5ea5a0648d8981769b383" and "a422110adfdf1642c34a912b895ebc5c528727a4" have entirely different histories.

23 changed files with 403 additions and 603 deletions

650
flake.lock generated

File diff suppressed because it is too large Load diff

View file

@ -20,10 +20,6 @@
reviewqueue.url = "github:jdonszelmann/review-queue";
compiler-construction-2021.url = "git+ssh://forgejo@git.donsz.nl/jana/eelco-visser-compiler-construction.git";
mifg.url = "git+ssh://forgejo@git.donsz.nl/jana/money.is.fckn.gay.git";
isadle.url = "git+ssh://forgejo@git.donsz.nl/jana/isadle.git";
# desktop/laptop
probe-rs-rules.url = "github:jneem/probe-rs-rules";
# server
raw-data.url = "git+ssh://forgejo@git.donsz.nl/jana/raw-data.git";
@ -34,7 +30,7 @@
# home
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
t.url = "github:jdonszelmann/t-rs";
dumpasm.url = "github:jdonszelmann/dumpasm";

View file

@ -19,7 +19,7 @@
host all all 10.0.0.0/24 trust
# and the local network
host all all 192.168.178.0/24 trust
host all all 192.168.0.0/24 trust
'';
settings = {
listen_addresses = "*";
@ -58,10 +58,6 @@
name = "immich";
ensureDBOwnership = true;
}
{
name = "homepage";
ensureDBOwnership = true;
}
];
ensureDatabases = map (i: i.name) ensureUsers;
};

View file

@ -146,6 +146,118 @@ in
};
};
systemd.services.promtail.serviceConfig.User = lib.mkForce "nginx";
services.promtail = {
enable = true;
configuration = {
server = {
http_listen_port = 3031;
grpc_listen_port = 0;
};
positions = {
filename = "/tmp/positions.yaml";
};
clients = [
{
url = "http://127.0.0.1:${toString config.services.loki.configuration.server.http_listen_port}/loki/api/v1/push";
}
];
scrape_configs = [
{
job_name = "nginx";
static_configs = [
{
targets = [ "localhost" ];
labels = {
job = "nginx";
host = "fili";
__path__ = "/var/log/nginx/json_access.log";
};
}
];
pipeline_stages = [
{
json = {
expressions = {
msec = "msec";
connection = "connection";
connection_requests = "connection_requests";
pid = "pid";
request_id = "request_id";
request_length = "request_length";
remote_addr = "remote_addr";
remote_user = "remote_user";
remote_port = "remote_port";
time_local = "time_local";
time_iso8601 = "time_iso8601";
request = "request";
request_uri = "request_uri";
args = "args";
status = "status";
body_bytes_sent = "body_bytes_sent";
bytes_sent = "bytes_sent";
http_referer = "http_referer";
http_user_agent = "http_user_agent";
http_x_forwarded_for = "http_x_forwarded_for";
http_host = "http_host";
server_name = "server_name";
request_time = "request_time";
upstream = "upstream";
upstream_connect_time = "upstream_connect_time";
upstream_header_time = "upstream_header_time";
upstream_response_time = "upstream_response_time";
upstream_response_length = "upstream_response_length";
upstream_cache_status = "upstream_cache_status";
ssl_protocol = "ssl_protocol";
ssl_cipher = "ssl_cipher";
scheme = "scheme";
request_method = "request_method";
server_protocol = "server_protocol";
pipe = "pipe";
gzip_ratio = "gzip_ratio";
http_cf_ray = "http_cf_ray";
};
};
}
{
timestamp = {
source = "msec";
format = "Unix";
};
}
# {
# geoip = {
# db = "/var/lib/geoip-databases/GeoLite2-City.mmdb";
# source = "remote_addr";
# db_type = "city";
# };
# }
# {
# pack = {
# labels = [ "geoip_country_name" ];
# };
# }
];
}
{
job_name = "journal";
journal = {
max_age = "12h";
labels = {
job = "systemd-journal";
host = "fili";
};
};
relabel_configs = [
{
source_labels = [ "__journal__systemd_unit" ];
target_label = "unit";
}
];
}
];
};
};
services.grafana = {
enable = false;

View file

@ -8,6 +8,5 @@ _: {
./compiler-construction-2021.nix
./mapfm-poster.nix
./money-is-fckn-gay.nix
./isadle.nix
];
}

View file

@ -1,10 +1,4 @@
{
flakes,
pkgs,
config,
secrets,
...
}:
{ flakes, pkgs, ... }:
let
cache = pkg: ''
location ~* \.(png|jpg|jpeg|gif|svg|ico|woff|woff2|ttf)$ {
@ -38,52 +32,15 @@ let
locations."/".return = return;
}
// ssl;
package = flakes.homepage.packages.${pkgs.system};
in
{
sops.secrets.homepage = {
sopsFile = "${secrets}/homepage.env";
};
systemd.services.homepage = {
description = "homepage";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
DynamicUser = "yes";
ExecStart = "${pkgs.bash}/bin/bash ${package.website}/bin/run";
Restart = "on-failure";
RestartSec = "5s";
EnvironmentFile = config.sops.secrets.homepage.path;
WorkingDirectory = "${package.website}";
StateDirectory = "homepage";
};
environment = {
BETTER_AUTH_URL = "https://donsz.nl";
DATABASE_LOCATION = "/var/lib/homepage/db.sqlite";
HOST = "localhost";
PORT = "11020";
};
};
services.nginx.virtualHosts = {
"donsz.nl" = {
forceSSL = true;
enableACME = true;
extraConfig = ''
${cache "${package.website}/homepage/client"}
'';
locations."/".proxyPass = "http://localhost:${toString 11020}";
};
services.nginx = {
virtualHosts = {
"donsz.nl" = site regular;
"jdonszelmann.nl" = site regular;
"blog.donsz.nl" = redirect "301 https://donsz.nl/blog";
"gay.donsz.nl" = site gay;
"jana.is.fckn.gay" = site gay;
};
};
# services.nginx = {
# virtualHosts = {
# "donsz.nl" = site regular;
# "jdonszelmann.nl" = site regular;
# "gay.donsz.nl" = site gay;
# "jana.is.fckn.gay" = site gay;
# };
# };
}

View file

@ -1,17 +0,0 @@
{ pkgs, flakes, ... }:
{
services.nginx = {
virtualHosts."isadle.donsz.nl" = {
forceSSL = true;
http2 = true;
enableACME = true;
locations."/" = {
root = flakes.isadle.packages.${pkgs.system}.isadle;
extraConfig = ''
autoindex on;
'';
};
};
};
}

View file

@ -1,15 +1,11 @@
{
pkgs,
config,
flakes,
...
{ pkgs
, config
, ...
}:
{
imports = [
./hardware-configuration.nix
./kanata.nix
flakes.probe-rs-rules.nixosModules.${pkgs.system}.default
];
boot.loader.systemd-boot.enable = true;
@ -41,14 +37,11 @@
variant = "";
};
users.groups.plugdev = { };
users.users.jana = {
extraGroups = [
"networkmanager"
"wheel"
"docker"
"plugdev"
];
packages = with pkgs; [ ];
};
@ -68,10 +61,9 @@
signal-desktop
nautilus
probe-rs-tools
adwaita-icon-theme
(pkgs.callPackage (
(pkgs.callPackage
(
{ stdenv }:
stdenv.mkDerivation {
name = "global-cursor-theme";
@ -87,13 +79,13 @@
EOF
'';
}
) { })
)
{ })
perf
rr
];
hardware.probe-rs.enable = true;
virtualisation.docker.enable = true;
services.xserver.enable = true;
@ -117,8 +109,6 @@
hardware.graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [
libva-vdpau-driver
intel-media-driver
@ -168,12 +158,10 @@
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
};
programs.nix-ld.enable = true;
# programs.mtr.enable = true;
# programs.gnupg.agent = {

View file

@ -6,7 +6,6 @@
niri-unstable,
raw-data,
p1n3appl3,
isadle,
pkgs,
...
}@inputs:
@ -21,6 +20,5 @@ in
pipethon = pipethon.packages.${system}.python;
raw-data = raw-data.packages.${system}.default;
p1n3appl3 = p1n3appl3.packages.${system};
isadle = isadle.packages.${system}.default;
}
// (import ./maple.nix inputs)

View file

@ -214,7 +214,7 @@
just
uv
llvmPackages.bintools
nodejs_22
nodejs
(writeShellScriptBin "nas" ''
mkdir -p ~/Documents/nas

View file

@ -168,18 +168,6 @@ inputs@{ machine, ... }:
keyword = "!no";
url = "https://search.nixos.org/options?query=%s";
}
{
keyword = "!ri";
url = "https://github.com/rust-lang/rust/issues/%s";
}
{
keyword = "!tf";
url = "https://rust.tf/%s";
}
{
keyword = "!dg";
url = "https://rustc-dev-guide.rust-lang.org/?search=%s";
}
# {
# name = "bank";

View file

@ -20,7 +20,6 @@ inputs@{ machine, ... }:
"cp-ser" = cp-media "ser" "shows";
"cp-ani" = cp-media "ani" "anime";
"ragdoll" = ragdoll;
"jjj" = jjj;
"dumpasm" = "${pkgs.custom.dumpasm}/bin/dumpasm";
"p" = calc;
"s" = "systemctl";

View file

@ -34,21 +34,4 @@
SSH_TMUX_SESSION_NAME="ssh-from-$(hostname)-$TMUX_SESSION_NAME"
tmux detach -E "kitten ssh -t ragdoll \"export TMUX_SESSION_NAME=$SSH_TMUX_SESSION_NAME; tmux attach -t $SSH_TMUX_SESSION_NAME || tmux new -e TMUX_SESSION_NAME=$SSH_TMUX_SESSION_NAME -s $SSH_TMUX_SESSION_NAME\"; exec tmux attach -t $TMUX_SESSION_NAME"
''}/bin/ragdoll";
jjj = "${pkgs.writeScriptBin "jjj" ''
cmd="\${"1:-show"}"
shift
selected=$(
jj log -r 'all()' --color=always \
| fzf \
--min-height=15 \
--cycle \
--ansi \
--prompt "jj $cmd> "
) || exit 0
rev=$(echo "$selected" | awk '{for(i=1;i<=NF;i++) if(length($i)>=7){print $i; exit}}')
jj "$cmd" -r "$rev" "$@"
''}/bin/jjj";
}

View file

@ -85,8 +85,7 @@ inputs@{ machine, ... }:
'';
# if(.contained_in('first_parent(@)'), label("git_head", "HEAD")),
status_summary = "'\n' ++ self.diff().summary() ++ '\n'";
space = "'\n\n\n'";
log_oneline_with_status_summary = "if(self.current_working_copy(), space) ++ log_oneline ++ if(self.current_working_copy() && self.diff().files().len() > 0, status_summary)";
log_oneline_with_status_summary = "log_oneline ++ if(self.current_working_copy() && self.diff().files().len() > 0, status_summary)";
};
aliases =
@ -168,15 +167,15 @@ inputs@{ machine, ... }:
];
t = tug;
d = [ "describe" ];
d = "describe";
dm = [
"describe"
"-m"
];
e = [ "edit" ];
s = [ "squash" ];
si = [ "squash -i" ];
sp = [ "split" ];
e = "edit";
s = "squash";
si = "squash -i";
sp = "split";
};
templates = {

View file

@ -364,7 +364,7 @@ inputs@{ machine, ... }:
};
"Mod+Period" = {
allow-when-locked = true;
action.spawn-sh = "playerctl next";
action.spawn-sh = "playerctl nest";
};
"Mod+Comma" = {
allow-when-locked = true;

View file

@ -30,10 +30,6 @@ vim.cmd([[
inoremap <silent> <F1> <CMD>FloatermToggle<CR>
nnoremap <silent> <F1> <CMD>FloatermToggle<CR>
tnoremap <silent> <F1> <C-\><C-n><CMD>FloatermToggle<CR>
inoremap <silent> <F9> <CMD>FloatermHide<CR>
nnoremap <silent> <F9> <CMD>FloatermHide<CR>
tnoremap <silent> <F9> <C-\><C-n><CMD>FloatermHide<CR>
]])
vim.keymap.set('n', 'gr', (function() builtin.lsp_references({}) end), {})
@ -111,7 +107,7 @@ vim.cmd([[
]])
vim.cmd([[
" let g:suda_smart_edit = 1
let g:suda_smart_edit = 1
filetype plugin indent on
]])

View file

@ -36,7 +36,7 @@ inputs@{ machine, ... }:
EDITOR = "nvim";
};
packages = with pkgs; [
packages = with pkgs-unstable; [
tree-sitter
(pkgs.stdenv.mkDerivation {
name = "editor-hax";
@ -83,7 +83,7 @@ inputs@{ machine, ... }:
clipboard.providers.wl-copy.enable = true;
performance = {
byteCompileLua.enable = false;
byteCompileLua.enable = true;
combinePlugins = {
enable = false;
@ -93,12 +93,12 @@ inputs@{ machine, ... }:
};
};
# extraLuaPackages = ps: [ ps.magick ];
extraLuaPackages = ps: [ ps.magick ];
extraPackages = [ pkgs.imagemagick ];
# package = (import inputs.unstable { inherit (pkgs) system; }).neovim-unwrapped;
# package = pkgs.neovim-unwrapped;
# package = with pkgs-unstable; neovim-unwrapped;
package = with pkgs-unstable; neovim-unwrapped;
colorschemes.onedark = {
enable = true;

View file

@ -39,7 +39,7 @@ def find_or_create_pane(window, args):
run(f"tmux send-keys -t {pane} Escape")
# note the space, this tells nvim not to save it in history
run(f"tmux send-keys -t {pane} F9 \": drop {args}\" Enter")
run(f"tmux send-keys -t {pane} \": drop {args}\" Enter")
run(f"tmux select-pane -t {pane} -Z")
else:
create_pane(args)

View file

@ -30,7 +30,7 @@ in
(luamap "n" "<leader>/" "${telescope}.current_buffer_fuzzy_find()")
# last used pickers/searches
(luamap "n" "<leader>p" "${telescope}.pickers()")
(luamap "n" "<leader>m" "${telescope}.marks()")
(luamap "n" "<leader>m" "${telescope}.search_history()")
# open buffers
(luamap "n" "<leader>b" "${telescope}.buffers({sort_mru = true})")
(luamap "n" "<leader><Tab>" "${telescope}.buffers({sort_mru = true})")

View file

@ -30,7 +30,7 @@ in
ansiesc.enable = true;
treesitter-textobjects = {
enable = true;
enable = false;
settings = {
lsp_interop.enable = true;
select = {
@ -168,13 +168,6 @@ in
};
};
marks = {
enable = true;
settings = {
cyclic = true;
};
};
rainbow-delimiters.enable = true;
lsp-format.enable = true;
fugitive.enable = true;
@ -184,7 +177,7 @@ in
nvim-autopairs.enable = true;
spider.enable = true;
origami = {
enable = false;
enable = true;
settings.autofold.enabled = false;
};
@ -806,7 +799,7 @@ in
telescope-ui-select-nvim
telescope-fzf-native-nvim
# vim-suda
vim-suda
render-markdown
telescope-file-browser
vim-astro

View file

@ -18,8 +18,8 @@ inputs@{ machine, ... }:
proxyJump = "fili";
};
ragdoll = {
hostname = "hexcat.nl";
port = 4455;
hostname = "192.168.178.138";
proxyJump = "fili";
};
"*" = {

View file

@ -46,12 +46,7 @@ in
home-config =
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
glib
(pkgs.writeShellScriptBin "xdg-open" ''
gio open "$@"
'')
];
home.packages = with pkgs; [ xdg-utils ];
xdg = {
enable = true;

View file

@ -1 +1 @@
Ptmux;_Gd=a,a=d,q=2\\
Ptmux;_Ga=d,q=2,d=a\\