feat: finalize initial modules, some qol changes

This commit is contained in:
Leon Schwarzäugl 2025-04-15 17:59:20 +02:00
parent 27679d38fd
commit e8c405b3f1
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
45 changed files with 632 additions and 470 deletions

View file

@ -236,6 +236,7 @@ When setting this option normally, the password would normally be written world-
nixpkgs.url = "github:nixos/nixpkgs?rev=5f385baff93c728400d2c4ec8c9b0745b8f9e5b6"; nixpkgs.url = "github:nixos/nixpkgs?rev=5f385baff93c728400d2c4ec8c9b0745b8f9e5b6";
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.11"; nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.11";
nixpkgs-stable24_11.url = "github:NixOS/nixpkgs/nixos-24.11";
systems.url = "github:nix-systems/default-linux"; systems.url = "github:nix-systems/default-linux";
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
@ -1528,7 +1529,7 @@ This machine mainly acts as an external sync helper. It manages the following th
isLinux = true; isLinux = true;
isBtrfs = false; isBtrfs = false;
flakePath = "/root/.dotfiles"; flakePath = "/root/.dotfiles";
server = { modules.server = {
forgejo = true; forgejo = true;
ankisync = true; ankisync = true;
}; };
@ -3047,8 +3048,6 @@ This program sets up a new NixOS host remotely. It also takes care of secret man
:CUSTOM_ID: h:1eabdc59-8832-44ca-a22b-11f848ab150a :CUSTOM_ID: h:1eabdc59-8832-44ca-a22b-11f848ab150a
:END: :END:
This program builds a configuration locally.
#+begin_src shell :tangle scripts/swarsel-rebuild.sh #+begin_src shell :tangle scripts/swarsel-rebuild.sh
set -eo pipefail set -eo pipefail
@ -3164,8 +3163,6 @@ This program builds a configuration locally.
:CUSTOM_ID: h:fbd8aaf2-9dca-4ca3-aca1-19d0d188a435 :CUSTOM_ID: h:fbd8aaf2-9dca-4ca3-aca1-19d0d188a435
:END: :END:
This program sets up a new NixOS host locally.
#+begin_src shell :tangle scripts/swarsel-install.sh #+begin_src shell :tangle scripts/swarsel-install.sh
set -eo pipefail set -eo pipefail
@ -3367,8 +3364,6 @@ This program sets up a new NixOS host locally.
:CUSTOM_ID: h:c98a7615-e5da-4f47-8ed1-2b2ea65519e9 :CUSTOM_ID: h:c98a7615-e5da-4f47-8ed1-2b2ea65519e9
:END: :END:
This program sets up a new NixOS host locally.
#+begin_src shell :tangle scripts/swarsel-postinstall.sh #+begin_src shell :tangle scripts/swarsel-postinstall.sh
set -eo pipefail set -eo pipefail
@ -3462,8 +3457,6 @@ This program sets up a new NixOS host locally.
:CUSTOM_ID: h:5ad99997-e54c-4f0b-9ab7-15f76b1e16e1 :CUSTOM_ID: h:5ad99997-e54c-4f0b-9ab7-15f76b1e16e1
:END: :END:
This script allows for quick git branch switching.
#+begin_src nix :tangle pkgs/t2ts/default.nix #+begin_src nix :tangle pkgs/t2ts/default.nix
{ name, writeShellApplication, ... }: { name, writeShellApplication, ... }:
@ -3482,8 +3475,6 @@ This script allows for quick git branch switching.
:CUSTOM_ID: h:5ad99997-e54c-4f0b-9ab7-15f76b1e16e1 :CUSTOM_ID: h:5ad99997-e54c-4f0b-9ab7-15f76b1e16e1
:END: :END:
This script allows for quick git branch switching.
#+begin_src nix :tangle pkgs/ts2t/default.nix #+begin_src nix :tangle pkgs/ts2t/default.nix
{ name, writeShellApplication, ... }: { name, writeShellApplication, ... }:
@ -3502,8 +3493,6 @@ This script allows for quick git branch switching.
:CUSTOM_ID: h:7806b129-a4a5-4d10-af27-6cbeafbcb294 :CUSTOM_ID: h:7806b129-a4a5-4d10-af27-6cbeafbcb294
:END: :END:
This script allows for quick git branch switching.
#+begin_src nix :tangle pkgs/vershell/default.nix #+begin_src nix :tangle pkgs/vershell/default.nix
{ name, writeShellApplication, ... }: { name, writeShellApplication, ... }:
@ -3522,8 +3511,6 @@ This script allows for quick git branch switching.
:CUSTOM_ID: h:9fda7829-09a4-4b8f-86f6-08b078ab2874 :CUSTOM_ID: h:9fda7829-09a4-4b8f-86f6-08b078ab2874
:END: :END:
This script allows for quick git branch switching.
#+begin_src nix :tangle pkgs/eontimer/default.nix #+begin_src nix :tangle pkgs/eontimer/default.nix
{ lib { lib
, python3 , python3
@ -3720,6 +3707,33 @@ AppImage version of mgba in which the lua scripting works.
#+end_src #+end_src
**** sshrm
This programs simply runs ssh-keygen on the last host that I tried to ssh into. I need this frequently when working with cloud-init usually.
#+begin_src shell :tangle scripts/sshrm.sh
HISTFILE="$HOME"/.histfile
last_ssh_cmd=$(grep -E "ssh " "$HISTFILE" | sed -E 's/^: [0-9]+:[0-9]+;//' | grep "^ssh " | tail -1)
host=$(echo "$last_ssh_cmd" | sed -E 's/.*ssh ([^@ ]+@)?([^ ]+).*/\2/')
if [[ -n $host ]]; then
echo "Removing SSH host key for: $host"
ssh-keygen -R "$host"
else
echo "No valid SSH command found in history."
fi
#+end_src
#+begin_src nix :tangle pkgs/sshrm/default.nix
{ self, name, writeShellApplication, openssh }:
writeShellApplication {
inherit name;
runtimeInputs = [ openssh ];
text = builtins.readFile "${self}/scripts/${name}.sh";
}
#+end_src
*** Overlays (additions, overrides, nixpkgs-stable) *** Overlays (additions, overrides, nixpkgs-stable)
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h:5e3e21e0-57af-4dad-b32f-6400af9b7aab :CUSTOM_ID: h:5e3e21e0-57af-4dad-b32f-6400af9b7aab
@ -3772,6 +3786,13 @@ When adding a new entry here, do not forget to add it in the default output of t
}; };
}; };
nixpkgs-stable24_05 = final: _: {
stable24_05 = import inputs.nixpkgs-stable {
inherit (final) system;
config.allowUnfree = true;
};
};
zjstatus = _: prev: { zjstatus = _: prev: {
zjstatus = inputs.zjstatus.packages.${prev.system}.default; zjstatus = inputs.zjstatus.packages.${prev.system}.default;
}; };
@ -3784,6 +3805,7 @@ When adding a new entry here, do not forget to add it in the default output of t
(additions final prev) (additions final prev)
// (modifications final prev) // (modifications final prev)
// (nixpkgs-stable final prev) // (nixpkgs-stable final prev)
// (nixpkgs-stable24_05 final prev)
// (zjstatus final prev) // (zjstatus final prev)
// (inputs.vbc-nix.overlays.default final prev) // (inputs.vbc-nix.overlays.default final prev)
// (inputs.nur.overlays.default final prev) // (inputs.nur.overlays.default final prev)
@ -3921,7 +3943,6 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
storeOptimize = lib.mkDefault true; storeOptimize = lib.mkDefault true;
time = lib.mkDefault true; time = lib.mkDefault true;
users = lib.mkDefault true; users = lib.mkDefault true;
};
server = { server = {
general = lib.mkDefault true; general = lib.mkDefault true;
packages = lib.mkDefault true; packages = lib.mkDefault true;
@ -3943,7 +3964,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
monitoring = lib.mkDefault true; monitoring = lib.mkDefault true;
emacs = lib.mkDefault true; emacs = lib.mkDefault true;
freshrss = lib.mkDefault true; freshrss = lib.mkDefault true;
};
}; };
}; };
}; };
@ -3968,7 +3989,6 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
storeOptimize = lib.mkDefault true; storeOptimize = lib.mkDefault true;
time = lib.mkDefault true; time = lib.mkDefault true;
users = lib.mkDefault true; users = lib.mkDefault true;
};
server = { server = {
general = lib.mkDefault true; general = lib.mkDefault true;
packages = lib.mkDefault true; packages = lib.mkDefault true;
@ -3981,6 +4001,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
}; };
}; };
}; };
};
} }
@ -6182,13 +6203,13 @@ Here we just define some aliases for rebuilding the system, and we allow some in
in in
{ {
options.swarselsystems = { options.swarselsystems = {
server.general = lib.mkEnableOption "general setting on server"; modules.server.general = lib.mkEnableOption "general setting on server";
shellAliases = lib.mkOption { shellAliases = lib.mkOption {
type = lib.types.attrsOf lib.types.str; type = lib.types.attrsOf lib.types.str;
default = { }; default = { };
}; };
}; };
config = lib.mkIf config.swarselsystems.server.general { config = lib.mkIf config.swarselsystems.modules.server.general {
environment.shellAliases = lib.recursiveUpdate environment.shellAliases = lib.recursiveUpdate
{ {
npswitch = "cd ${flakePath}; git pull; sudo nixos-rebuild --flake .#$(hostname) switch; cd -;"; npswitch = "cd ${flakePath}; git pull; sudo nixos-rebuild --flake .#$(hostname) switch; cd -;";
@ -6222,8 +6243,8 @@ Here we just define some aliases for rebuilding the system, and we allow some in
#+begin_src nix :tangle modules/nixos/server/packages.nix #+begin_src nix :tangle modules/nixos/server/packages.nix
{ lib, config, pkgs, ... }: { lib, config, pkgs, ... }:
{ {
options.swarselsystems.server.packages = lib.mkEnableOption "enable packages on server"; options.swarselsystems.modules.server.packages = lib.mkEnableOption "enable packages on server";
config = lib.mkIf config.swarselsystems.server.packages { config = lib.mkIf config.swarselsystems.modules.server.packages {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
gnupg gnupg
nix-index nix-index
@ -6244,8 +6265,8 @@ Here we just define some aliases for rebuilding the system, and we allow some in
#+begin_src nix :tangle modules/nixos/server/sops.nix #+begin_src nix :tangle modules/nixos/server/sops.nix
{ config, lib, ... }: { config, lib, ... }:
{ {
options.swarselsystems.server.sops = lib.mkEnableOption "enable sops on server"; options.swarselsystems.modules.server.sops = lib.mkEnableOption "enable sops on server";
config = lib.mkIf config.swarselsystems.server.sops { config = lib.mkIf config.swarselsystems.modules.server.sops {
sops = { sops = {
age.sshKeyPaths = lib.mkDefault [ "/etc/ssh/sops" ]; age.sshKeyPaths = lib.mkDefault [ "/etc/ssh/sops" ];
defaultSopsFile = lib.mkDefault "${config.swarselsystems.flakePath}/secrets/winters/secrets.yaml"; defaultSopsFile = lib.mkDefault "${config.swarselsystems.flakePath}/secrets/winters/secrets.yaml";
@ -6263,8 +6284,8 @@ Here we just define some aliases for rebuilding the system, and we allow some in
#+begin_src nix :tangle modules/nixos/server/nfs.nix #+begin_src nix :tangle modules/nixos/server/nfs.nix
{ lib, config, pkgs, ... }: { lib, config, pkgs, ... }:
{ {
options.swarselsystems.server.nfs = lib.mkEnableOption "enable nfs on server"; options.swarselsystems.modules.server.nfs = lib.mkEnableOption "enable nfs on server";
config = lib.mkIf config.swarselsystems.server.nfs { config = lib.mkIf config.swarselsystems.modules.server.nfs {
services = { services = {
# add a user with sudo smbpasswd -a <user> # add a user with sudo smbpasswd -a <user>
samba = { samba = {
@ -6323,8 +6344,8 @@ Here we just define some aliases for rebuilding the system, and we allow some in
#+begin_src nix :tangle modules/nixos/server/nginx.nix #+begin_src nix :tangle modules/nixos/server/nginx.nix
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
{ {
options.swarselsystems.server.nginx = lib.mkEnableOption "enable nginx on server"; options.swarselsystems.modules.server.nginx = lib.mkEnableOption "enable nginx on server";
config = lib.mkIf config.swarselsystems.server.nginx { config = lib.mkIf config.swarselsystems.modules.server.nginx {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
lego lego
]; ];
@ -6370,8 +6391,8 @@ Here we just define some aliases for rebuilding the system, and we allow some in
#+begin_src nix :tangle modules/nixos/server/ssh.nix #+begin_src nix :tangle modules/nixos/server/ssh.nix
{ self, lib, config, ... }: { self, lib, config, ... }:
{ {
options.swarselsystems.server.ssh = lib.mkEnableOption "enable ssh on server"; options.swarselsystems.modules.server.ssh = lib.mkEnableOption "enable ssh on server";
config = lib.mkIf config.swarselsystems.server.ssh { config = lib.mkIf config.swarselsystems.modules.server.ssh {
services.openssh = { services.openssh = {
enable = true; enable = true;
}; };
@ -6398,8 +6419,8 @@ Here we just define some aliases for rebuilding the system, and we allow some in
#+begin_src nix :tangle modules/nixos/server/kavita.nix #+begin_src nix :tangle modules/nixos/server/kavita.nix
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
{ {
options.swarselsystems.server.kavita = lib.mkEnableOption "enable kavita on server"; options.swarselsystems.modules.server.kavita = lib.mkEnableOption "enable kavita on server";
config = lib.mkIf config.swarselsystems.server.kavita { config = lib.mkIf config.swarselsystems.modules.server.kavita {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
calibre calibre
]; ];
@ -6449,8 +6470,8 @@ Here we just define some aliases for rebuilding the system, and we allow some in
#+begin_src nix :tangle modules/nixos/server/jellyfin.nix #+begin_src nix :tangle modules/nixos/server/jellyfin.nix
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
{ {
options.swarselsystems.server.jellyfin = lib.mkEnableOption "enable jellyfin on server"; options.swarselsystems.modules.server.jellyfin = lib.mkEnableOption "enable jellyfin on server";
config = lib.mkIf config.swarselsystems.server.jellyfin { config = lib.mkIf config.swarselsystems.modules.server.jellyfin {
users.users.jellyfin = { users.users.jellyfin = {
extraGroups = [ "video" "render" "users" ]; extraGroups = [ "video" "render" "users" ];
}; };
@ -6505,8 +6526,8 @@ Here we just define some aliases for rebuilding the system, and we allow some in
secretsDirectory = builtins.toString inputs.nix-secrets; secretsDirectory = builtins.toString inputs.nix-secrets;
in in
{ {
options.swarselsystems.server.navidrome = lib.mkEnableOption "enable navidrome on server"; options.swarselsystems.modules.server.navidrome = lib.mkEnableOption "enable navidrome on server";
config = lib.mkIf config.swarselsystems.server.navidrome { config = lib.mkIf config.swarselsystems.modules.server.navidrome {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
pciutils pciutils
alsa-utils alsa-utils
@ -6608,8 +6629,8 @@ Here we just define some aliases for rebuilding the system, and we allow some in
#+begin_src nix :tangle modules/nixos/server/spotifyd.nix #+begin_src nix :tangle modules/nixos/server/spotifyd.nix
{ lib, config, ... }: { lib, config, ... }:
{ {
options.swarselsystems.server.spotifyd = lib.mkEnableOption "enable spotifyd on server"; options.swarselsystems.modules.server.spotifyd = lib.mkEnableOption "enable spotifyd on server";
config = lib.mkIf config.swarselsystems.server.spotifyd { config = lib.mkIf config.swarselsystems.modules.server.spotifyd {
users.groups.spotifyd = { users.groups.spotifyd = {
gid = 65136; gid = 65136;
}; };
@ -6651,8 +6672,8 @@ Here we just define some aliases for rebuilding the system, and we allow some in
#+begin_src nix :tangle modules/nixos/server/mpd.nix #+begin_src nix :tangle modules/nixos/server/mpd.nix
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
{ {
options.swarselsystems.server.mpd = lib.mkEnableOption "enable mpd on server"; options.swarselsystems.modules.server.mpd = lib.mkEnableOption "enable mpd on server";
config = lib.mkIf config.swarselsystems.server.mpd { config = lib.mkIf config.swarselsystems.modules.server.mpd {
users = { users = {
groups = { groups = {
mpd = { }; mpd = { };
@ -6711,7 +6732,7 @@ Here we just define some aliases for rebuilding the system, and we allow some in
#+begin_src nix :tangle modules/nixos/server/pipewire.nix #+begin_src nix :tangle modules/nixos/server/pipewire.nix
{ lib, config, ... }: { lib, config, ... }:
{ {
config = lib.mkIf (config?swarselsystems.server.mpd || config?swarselsystems.server.navidrome) { config = lib.mkIf (config?swarselsystems.modules.server.mpd || config?swarselsystems.modules.server.navidrome) {
security.rtkit.enable = true; # this is required for pipewire real-time access security.rtkit.enable = true; # this is required for pipewire real-time access
@ -6750,8 +6771,8 @@ Here we just define some aliases for rebuilding the system, and we allow some in
''; '';
in in
{ {
options.swarselsystems.server.matrix = lib.mkEnableOption "enable matrix on server"; options.swarselsystems.modules.server.matrix = lib.mkEnableOption "enable matrix on server";
config = lib.mkIf config.swarselsystems.server.matrix { config = lib.mkIf config.swarselsystems.modules.server.matrix {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
matrix-synapse matrix-synapse
lottieconverter lottieconverter
@ -7072,8 +7093,8 @@ Here we just define some aliases for rebuilding the system, and we allow some in
#+begin_src nix :tangle modules/nixos/server/nextcloud.nix #+begin_src nix :tangle modules/nixos/server/nextcloud.nix
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
{ {
options.swarselsystems.server.nextcloud = lib.mkEnableOption "enable nextcloud on server"; options.swarselsystems.modules.server.nextcloud = lib.mkEnableOption "enable nextcloud on server";
config = lib.mkIf config.swarselsystems.server.nextcloud { config = lib.mkIf config.swarselsystems.modules.server.nextcloud {
sops.secrets.nextcloudadminpass = { sops.secrets.nextcloudadminpass = {
owner = "nextcloud"; owner = "nextcloud";
@ -7126,8 +7147,8 @@ Here we just define some aliases for rebuilding the system, and we allow some in
#+begin_src nix :tangle modules/nixos/server/immich.nix #+begin_src nix :tangle modules/nixos/server/immich.nix
{ lib, config, ... }: { lib, config, ... }:
{ {
options.swarselsystems.server.immich = lib.mkEnableOption "enable immich on server"; options.swarselsystems.modules.server.immich = lib.mkEnableOption "enable immich on server";
config = lib.mkIf config.swarselsystems.server.immich { config = lib.mkIf config.swarselsystems.modules.server.immich {
users.users.immich = { users.users.immich = {
extraGroups = [ "video" "render" "users" ]; extraGroups = [ "video" "render" "users" ];
@ -7184,8 +7205,8 @@ Here we just define some aliases for rebuilding the system, and we allow some in
#+begin_src nix :tangle modules/nixos/server/paperless.nix #+begin_src nix :tangle modules/nixos/server/paperless.nix
{ lib, config, ... }: { lib, config, ... }:
{ {
options.swarselsystems.server.paperless = lib.mkEnableOption "enable paperless on server"; options.swarselsystems.modules.server.paperless = lib.mkEnableOption "enable paperless on server";
config = lib.mkIf config.swarselsystems.server.paperless { config = lib.mkIf config.swarselsystems.modules.server.paperless {
users.users.paperless = { users.users.paperless = {
extraGroups = [ "users" ]; extraGroups = [ "users" ];
@ -7243,8 +7264,8 @@ Here we just define some aliases for rebuilding the system, and we allow some in
#+begin_src nix :tangle modules/nixos/server/transmission.nix #+begin_src nix :tangle modules/nixos/server/transmission.nix
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
{ {
options.swarselsystems.server.transmission = lib.mkEnableOption "enable transmission and friends on server"; options.swarselsystems.modules.server.transmission = lib.mkEnableOption "enable transmission and friends on server";
config = lib.mkIf config.swarselsystems.server.transmission { config = lib.mkIf config.swarselsystems.modules.server.transmission {
# this user/group section is probably unneeded # this user/group section is probably unneeded
users = { users = {
@ -7389,8 +7410,8 @@ Here we just define some aliases for rebuilding the system, and we allow some in
workHostName = lib.swarselsystems.getSecret "${secretsDirectory}/work/worklaptop-hostname"; workHostName = lib.swarselsystems.getSecret "${secretsDirectory}/work/worklaptop-hostname";
in in
{ {
options.swarselsystems.server.syncthing = lib.mkEnableOption "enable syncthing on server"; options.swarselsystems.modules.server.syncthing = lib.mkEnableOption "enable syncthing on server";
config = lib.mkIf config.swarselsystems.server.syncthing { config = lib.mkIf config.swarselsystems.modules.server.syncthing {
users.users.syncthing = { users.users.syncthing = {
extraGroups = [ "users" ]; extraGroups = [ "users" ];
@ -7510,8 +7531,8 @@ Once this is finished, it will house a restic client that manages automatic back
#+begin_src nix :tangle modules/nixos/server/restic.nix #+begin_src nix :tangle modules/nixos/server/restic.nix
{ lib, config, ... }: { lib, config, ... }:
{ {
options.swarselsystems.server.restic = lib.mkEnableOption "enable restic backups on server"; options.swarselsystems.modules.server.restic = lib.mkEnableOption "enable restic backups on server";
config = lib.mkIf config.swarselsystems.server.restic { config = lib.mkIf config.swarselsystems.modules.server.restic {
# TODO # TODO
@ -7529,8 +7550,8 @@ This section exposes several metrics that I use to check the health of my server
#+begin_src nix :tangle modules/nixos/server/monitoring.nix #+begin_src nix :tangle modules/nixos/server/monitoring.nix
{ self, lib, config, ... }: { self, lib, config, ... }:
{ {
options.swarselsystems.server.monitoring = lib.mkEnableOption "enable monitoring on server"; options.swarselsystems.modules.server.monitoring = lib.mkEnableOption "enable monitoring on server";
config = lib.mkIf config.swarselsystems.server.monitoring { config = lib.mkIf config.swarselsystems.modules.server.monitoring {
sops.secrets = { sops.secrets = {
grafanaadminpass = { grafanaadminpass = {
@ -7656,7 +7677,7 @@ This section exposes several metrics that I use to check the health of my server
sslVerify = false; sslVerify = false;
scrapeUri = "http://localhost/nginx_status"; scrapeUri = "http://localhost/nginx_status";
}; };
nextcloud = lib.mkIf config.swarselsystems.server.nextcloud { nextcloud = lib.mkIf config.swarselsystems.modules.server.nextcloud {
enable = true; enable = true;
port = 9205; port = 9205;
url = "https://stash.swarsel.win/ocs/v2.php/apps/serverinfo/api/v1/info"; url = "https://stash.swarsel.win/ocs/v2.php/apps/serverinfo/api/v1/info";
@ -7706,8 +7727,8 @@ This is a WIP Jenkins instance. It is used to automatically build a new system w
#+begin_src nix :tangle modules/nixos/server/jenkins.nix #+begin_src nix :tangle modules/nixos/server/jenkins.nix
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
{ {
options.swarselsystems.server.jenkins = lib.mkEnableOption "enable jenkins on server"; options.swarselsystems.modules.server.jenkins = lib.mkEnableOption "enable jenkins on server";
config = lib.mkIf config.swarselsystems.server.jenkins { config = lib.mkIf config.swarselsystems.modules.server.jenkins {
services.jenkins = { services.jenkins = {
enable = true; enable = true;
@ -7752,8 +7773,8 @@ This was an approach of hosting an RSS server from within emacs. That would have
#+begin_src nix :tangle modules/nixos/server/emacs.nix #+begin_src nix :tangle modules/nixos/server/emacs.nix
{ lib, config, ... }: { lib, config, ... }:
{ {
options.swarselsystems.server.emacs = lib.mkEnableOption "enable emacs server on server"; options.swarselsystems.modules.server.emacs = lib.mkEnableOption "enable emacs server on server";
config = lib.mkIf config.swarselsystems.server.emacs { config = lib.mkIf config.swarselsystems.modules.server.emacs {
networking.firewall.allowedTCPPorts = [ 9812 ]; networking.firewall.allowedTCPPorts = [ 9812 ];
@ -7780,8 +7801,8 @@ It serves both a Greader API at https://signpost.swarsel.win/api/greader.php, as
#+begin_src nix :tangle modules/nixos/server/freshrss.nix #+begin_src nix :tangle modules/nixos/server/freshrss.nix
{ lib, config, ... }: { lib, config, ... }:
{ {
options.swarselsystems.server.freshrss = lib.mkEnableOption "enable freshrss on server"; options.swarselsystems.modules.server.freshrss = lib.mkEnableOption "enable freshrss on server";
config = lib.mkIf config.swarselsystems.server.freshrss { config = lib.mkIf config.swarselsystems.modules.server.freshrss {
users.users.freshrss = { users.users.freshrss = {
extraGroups = [ "users" ]; extraGroups = [ "users" ];
@ -7825,8 +7846,8 @@ It serves both a Greader API at https://signpost.swarsel.win/api/greader.php, as
#+begin_src nix :tangle modules/nixos/server/forgejo.nix #+begin_src nix :tangle modules/nixos/server/forgejo.nix
{ lib, config, ... }: { lib, config, ... }:
{ {
options.swarselsystems.server.forgejo = lib.mkEnableOption "enable forgejo on server"; options.swarselsystems.modules.server.forgejo = lib.mkEnableOption "enable forgejo on server";
config = lib.mkIf config.swarselsystems.server.forgejo { config = lib.mkIf config.swarselsystems.modules.server.forgejo {
networking.firewall.allowedTCPPorts = [ 3000 ]; networking.firewall.allowedTCPPorts = [ 3000 ];
@ -7880,8 +7901,8 @@ It serves both a Greader API at https://signpost.swarsel.win/api/greader.php, as
#+begin_src nix :tangle modules/nixos/server/ankisync.nix #+begin_src nix :tangle modules/nixos/server/ankisync.nix
{ lib, config, ... }: { lib, config, ... }:
{ {
options.swarselsystems.server.ankisync = lib.mkEnableOption "enable ankisync on server"; options.swarselsystems.modules.server.ankisync = lib.mkEnableOption "enable ankisync on server";
config = lib.mkIf config.swarselsystems.server.ankisync { config = lib.mkIf config.swarselsystems.modules.server.ankisync {
networking.firewall.allowedTCPPorts = [ 22701 ]; networking.firewall.allowedTCPPorts = [ 22701 ];
@ -7975,6 +7996,13 @@ This opens a few gaming ports and installs the steam configuration suite for gam
{ {
options.swarselsystems.modules.optional.gaming = lib.mkEnableOption "optional gaming settings"; options.swarselsystems.modules.optional.gaming = lib.mkEnableOption "optional gaming settings";
config = lib.mkIf config.swarselsystems.modules.optional.gaming { config = lib.mkIf config.swarselsystems.modules.optional.gaming {
programs.steam = {
enable = true;
package = pkgs.steam;
extraCompatPackages = [
pkgs.proton-ge-bin
];
};
specialisation = { specialisation = {
gaming.configuration = { gaming.configuration = {
networking = { networking = {
@ -7993,13 +8021,6 @@ This opens a few gaming ports and installs the steam configuration suite for gam
}; };
}; };
programs.steam = {
enable = true;
package = pkgs.steam;
extraCompatPackages = [
pkgs.proton-ge-bin
];
};
hardware.xone.enable = true; hardware.xone.enable = true;
@ -8023,8 +8044,8 @@ This opens a few gaming ports and installs the steam configuration suite for gam
This sets the VirtualBox configuration. Guest should not be enabled if not direly needed, it will make rebuilds unbearably slow. I only use this privately to run an old editor that does not run well under wine, so I put it into it's own specialisation. This sets the VirtualBox configuration. Guest should not be enabled if not direly needed, it will make rebuilds unbearably slow. I only use this privately to run an old editor that does not run well under wine, so I put it into it's own specialisation.
#+begin_src nix :tangle modules/nixos/optional/virtualbox.nix #+begin_src nix :tangle modules/nixos/optional/virtualbox.nix
{ lib, config, pkgs, ... }: { lib, config, pkgs, ... }:
{ {
options.swarselsystems.modules.optional.virtualbox = lib.mkEnableOption "optional VBox settings"; options.swarselsystems.modules.optional.virtualbox = lib.mkEnableOption "optional VBox settings";
config = lib.mkIf config.swarselsystems.modules.optional.virtualbox { config = lib.mkIf config.swarselsystems.modules.optional.virtualbox {
specialisation = { specialisation = {
@ -8040,12 +8061,17 @@ This sets the VirtualBox configuration. Guest should not be enabled if not direl
}; };
}; };
# run an older kernel to provide compatibility with windows vm # run an older kernel to provide compatibility with windows vm
boot.kernelPackages = lib.mkForce pkgs.linuxPackages; boot = {
kernelPackages = lib.mkForce pkgs.stable24_05.linuxPackages;
# kernelParams = [
# "amd_iommu=on"
# ];
};
}; };
}; };
}; };
} }
#+end_src #+end_src
**** VmWare **** VmWare
@ -8811,9 +8837,9 @@ Programming languages and default lsp's are defined here: [[#h:0e7e8bea-ec58-499
This holds packages that I can use as provided, or with small modifications (as in the =texlive= package that needs special configuration). This holds packages that I can use as provided, or with small modifications (as in the =texlive= package that needs special configuration).
#+begin_src nix :tangle modules/home/common/packages.nix #+begin_src nix :tangle modules/home/common/packages.nix
{ lib, config, pkgs, ... }: { lib, config, pkgs, ... }:
{ {
options.swarselsystems.modules.packages = lib.mkEnableOption "packages settings"; options.swarselsystems.modules.packages = lib.mkEnableOption "packages settings";
config = lib.mkIf config.swarselsystems.modules.packages { config = lib.mkIf config.swarselsystems.modules.packages {
home.packages = with pkgs; [ home.packages = with pkgs; [
@ -8855,6 +8881,7 @@ This holds packages that I can use as provided, or with small modifications (as
fuse fuse
ventoy ventoy
poppler_utils poppler_utils
vdhcoapp
# nix # nix
alejandra alejandra
@ -8911,7 +8938,7 @@ This holds packages that I can use as provided, or with small modifications (as
# general utilities # general utilities
unrar unrar
samba # samba
cifs-utils cifs-utils
zbar # qr codes zbar # qr codes
readline readline
@ -8992,7 +9019,7 @@ This holds packages that I can use as provided, or with small modifications (as
noto-fonts-cjk-sans noto-fonts-cjk-sans
]; ];
}; };
} }
#+end_src #+end_src
***** Self-defined ***** Self-defined
@ -9031,6 +9058,7 @@ This is just a separate container for derivations defined in [[#h:64a5cc16-6b16-
swarsel-bootstrap swarsel-bootstrap
swarsel-displaypower swarsel-displaypower
swarselzellij swarselzellij
sshrm
rustdesk-vbc rustdesk-vbc
]; ];
@ -9763,6 +9791,7 @@ The theme is handled by stylix.
zsh is the most convenient shell for me and it happens to be super neat to configure within home manager. zsh is the most convenient shell for me and it happens to be super neat to configure within home manager.
Here we set some aliases (some of them should be shellApplications instead) as well as some zsh plugins like =fzf-tab=. Here we set some aliases (some of them should be shellApplications instead) as well as some zsh plugins like =fzf-tab=.
Concerning the shell extensions, =zle <widget-name>= will run an existing widget and =zle -N <function_name>= will make a function available for use. The =my-= functions all remove =.= =/= and =:= from the =WORDCHARS= so that functions will stop there.
#+begin_src nix :tangle modules/home/common/zsh.nix #+begin_src nix :tangle modules/home/common/zsh.nix
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
@ -9840,40 +9869,48 @@ Here we set some aliases (some of them should be shellApplications instead) as w
} }
]; ];
initExtra = '' initExtra = ''
bindkey "^[[1;5D" backward-word my-forward-word() {
bindkey "^[[1;5C" forward-word local WORDCHARS=$WORDCHARS
WORDCHARS="''${WORDCHARS//:}"
WORDCHARS="''${WORDCHARS//\/}"
WORDCHARS="''${WORDCHARS//.}"
zle backward-word
}
zle -N my-forward-word
# ctrl + right
bindkey "^[[1;5C" my-forward-word
# shift + right
bindkey "^[[1;2D" forward-word
my-backward-word() {
local WORDCHARS=$WORDCHARS
WORDCHARS="''${WORDCHARS//:}"
WORDCHARS="''${WORDCHARS//\/}"
WORDCHARS="''${WORDCHARS//.}"
zle forward-word
}
zle -N my-backward-word
# ctrl + left
bindkey "^[[1;5D" -mybackward-word
# shift + left
bindkey "^[[1;2C" backward-word
my-backward-delete-word() { my-backward-delete-word() {
# Copy the global WORDCHARS variable to a local variable. That way any
# modifications are scoped to this function only
local WORDCHARS=$WORDCHARS local WORDCHARS=$WORDCHARS
# Use bash string manipulation to remove `:` so our delete will stop at it
WORDCHARS="''${WORDCHARS//:}" WORDCHARS="''${WORDCHARS//:}"
# Use bash string manipulation to remove `/` so our delete will stop at it
WORDCHARS="''${WORDCHARS//\/}" WORDCHARS="''${WORDCHARS//\/}"
# Use bash string manipulation to remove `.` so our delete will stop at it
WORDCHARS="''${WORDCHARS//.}" WORDCHARS="''${WORDCHARS//.}"
# zle <widget-name> will run an existing widget.
zle backward-delete-word zle backward-delete-word
} }
zle -N my-backward-delete-word zle -N my-backward-delete-word
# ctrl + del
bindkey '^H' my-backward-delete-word bindkey '^H' my-backward-delete-word
# This will be our `ctrl+alt+w` command # shift + del
my-backward-delete-whole-word() { bindkey '^?' backward-delete-word
# Copy the global WORDCHARS variable to a local variable. That way any
# modifications are scoped to this function only
local WORDCHARS=$WORDCHARS
# Use bash string manipulation to add `:` to WORDCHARS if it's not present
# already.
[[ ! $WORDCHARS == *":"* ]] && WORDCHARS="$WORDCHARS"":"
# zle <widget-name> will run that widget.
zle backward-delete-word
}
# `zle -N` will create a new widget that we can use on the command line
zle -N my-backward-delete-whole-word
# bind this new widget to `ctrl+alt+w`
bindkey '^W' my-backward-delete-whole-word
''; '';
}; };
}; };
@ -10746,7 +10783,7 @@ I used to build the firefox addon =bypass-paywalls-clean= myself here, but the m
id = 0; id = 0;
isDefault = true; isDefault = true;
settings = { settings = {
"browser.startup.homepage" = "https://outlook.office.com|https://satellite.vbc.ac.at|https://bitbucket.vbc.ac.at|https://github.com"; "browser.startup.homepage" = "https://lobste.rs";
}; };
} }
config.swarselsystems.firefox; config.swarselsystems.firefox;
@ -11309,9 +11346,7 @@ Currently, I am too lazy to explain every option here, but most of it is very se
seat * hide_cursor 2000 seat * hide_cursor 2000
exec kanshi
exec_always kill -1 $(pidof kanshi) exec_always kill -1 $(pidof kanshi)
exec swayosd-server
bindswitch --locked lid:on exec kanshictl switch lidclosed bindswitch --locked lid:on exec kanshictl switch lidclosed
bindswitch --locked lid:off exec kanshictl switch lidopen bindswitch --locked lid:off exec kanshictl switch lidopen
@ -11584,6 +11619,7 @@ The rest of the settings is at [[#h:fb3f3e01-7df4-4b06-9e91-aa9cac61a431][gaming
home.packages = with pkgs; [ home.packages = with pkgs; [
lutris lutris
wine wine
protonplus
winetricks winetricks
libudev-zero libudev-zero
dwarfs dwarfs
@ -11672,6 +11708,7 @@ The rest of the settings is at [[#h:bbf2ecb6-c8ff-4462-b5d5-d45b28604ddf][work]]
"dc" "dc"
"cl" "cl"
"ws" "ws"
"work"
]; ];
programs = { programs = {
@ -11761,6 +11798,15 @@ The rest of the settings is at [[#h:bbf2ecb6-c8ff-4462-b5d5-d45b28604ddf][work]]
id = 3; id = 3;
} }
config.swarselsystems.firefox; config.swarselsystems.firefox;
work = lib.recursiveUpdate
{
inherit isDefault;
id = 4;
settings = {
"browser.startup.homepage" = "https://outlook.office.com|https://satellite.vbc.ac.at|https://bitbucket.vbc.ac.at|https://github.com";
};
}
config.swarselsystems.firefox;
}; };
}; };
@ -11914,6 +11960,12 @@ The rest of the settings is at [[#h:bbf2ecb6-c8ff-4462-b5d5-d45b28604ddf][work]]
icon = "firefox"; icon = "firefox";
in in
{ {
firefox_work = {
name = "Firefox (work)";
genericName = "Firefox work";
exec = "firefox -p work";
inherit terminal categories icon;
};
firefox_dc = { firefox_dc = {
name = "Firefox (dc)"; name = "Firefox (dc)";
genericName = "Firefox dc"; genericName = "Firefox dc";
@ -15259,30 +15311,49 @@ bindurl ^http(s)?://lobste\.rs c hint -Jc [class="u-url"],[class="comments_label
bindurl ^http(s)?://www\.google\.com gi composite focusinput -l ; text.end_of_line bindurl ^http(s)?://www\.google\.com gi composite focusinput -l ; text.end_of_line
" Work " Work
command tab_or_tabopen jsb -p (async () => { let tabs = await browser.tabs.query({}); let tab = tabs.find(t => t.url.includes(JS_ARG)); if (tab) {browser.tabs.update(tab.id, { active: true });} else {tri.excmds.tabopen(JS_ARG);}})() command tab_or_tabopen jsb -p (async () => {
let tabs = await browser.tabs.query({});
let tab = tabs.find(t => t.url.includes(JS_ARG));
if (tab) {
browser.tabs.update(tab.id, { active: true });
} else {
tri.excmds.tabopen(JS_ARG);
}
})()
bind gwa tab_or_tabopen apic-impimba-1.m.imp.ac.at command tab_or_tabopen_local jsb -p (async () => {
bind gwA tab_or_tabopen artifactory.imp.ac.at const currentWindow = await browser.windows.getCurrent();
bind gwb tab_or_tabopen bitbucket.vbc.ac.at const tabs = await browser.tabs.query({ windowId: currentWindow.id });
bind gwc tab_or_tabopen vbc.atlassian.net/wiki const tab = tabs.find(t => t.url.includes(JS_ARG));
bind gwd tab_or_tabopen datadomain-impimba-2.imp.ac.at if (tab) {
bind gwe tab_or_tabopen exivity.vbc.ac.at browser.tabs.update(tab.id, { active: true });
bind gwg tab_or_tabopen github.com } else {
bind gwG tab_or_tabopen goc.egi.eu tri.excmds.tabopen(JS_ARG);
bind gwh tab_or_tabopen jupyterhub.vbc.ac.at }
bind gwH tab_or_tabopen test-jupyterhub.vbc.ac.at })()
bind gwj tab_or_tabopen jenkins.vbc.ac.at
bind gwJ tab_or_tabopen test-jenkins.vbc.ac.at bind gwa tab_or_tabopen_local apic-impimba-1.m.imp.ac.at
bind gwl tab_or_tabopen lucid.app bind gwA tab_or_tabopen_local artifactory.imp.ac.at
bind gwm tab_or_tabopen monitoring.vbc.ac.at/grafana bind gwb tab_or_tabopen_local bitbucket.vbc.ac.at
bind gwM tab_or_tabopen monitoring.vbc.ac.at/prometheus bind gwc tab_or_tabopen_local vbc.atlassian.net/wiki
bind gwn tab_or_tabopen netbox.vbc.ac.at bind gwd tab_or_tabopen_local datadomain-impimba-2.imp.ac.at
bind gwN tab_or_tabopen nap.imp.ac.at bind gwe tab_or_tabopen_local exivity.vbc.ac.at
bind gwo tab_or_tabopen outlook.office.com bind gwg tab_or_tabopen_local github.com
bind gws tab_or_tabopen satellite.vbc.ac.at bind gwG tab_or_tabopen_local goc.egi.eu
bind gwt tab_or_tabopen tower.vbc.ac.at bind gwh tab_or_tabopen_local jupyterhub.vbc.ac.at
bind gwv tab_or_tabopen vc-impimba-1.m.imp.ac.at/ui bind gwH tab_or_tabopen_local test-jupyterhub.vbc.ac.at
bind gwx tab_or_tabopen xclarity.vbc.ac.at bind gwj tab_or_tabopen_local jenkins.vbc.ac.at
bind gwJ tab_or_tabopen_local test-jenkins.vbc.ac.at
bind gwl tab_or_tabopen_local lucid.app
bind gwm tab_or_tabopen_local monitoring.vbc.ac.at/grafana
bind gwM tab_or_tabopen_local monitoring.vbc.ac.at/prometheus
bind gwn tab_or_tabopen_local netbox.vbc.ac.at
bind gwN tab_or_tabopen_local nap.imp.ac.at
bind gwo tab_or_tabopen_local outlook.office.com
bind gws tab_or_tabopen_local satellite.vbc.ac.at
bind gwt tab_or_tabopen_local tower.vbc.ac.at
bind gwv tab_or_tabopen_local vc-impimba-1.m.imp.ac.at/ui
bind gwx tab_or_tabopen_local xclarity.vbc.ac.at
" Search in page " Search in page
set findcase smart set findcase smart

View file

@ -12,7 +12,7 @@
detect-private-keys.enable = true; detect-private-keys.enable = true;
end-of-file-fixer.enable = true; end-of-file-fixer.enable = true;
fix-byte-order-marker.enable = true; fix-byte-order-marker.enable = true;
flake-checker.enable = true; flake-checker.enable = false;
forbid-new-submodules.enable = true; forbid-new-submodules.enable = true;
mixed-line-endings.enable = true; mixed-line-endings.enable = true;
nixpkgs-fmt.enable = true; nixpkgs-fmt.enable = true;

17
flake.lock generated
View file

@ -1006,6 +1006,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-stable24_11": {
"locked": {
"lastModified": 1744309437,
"narHash": "sha256-QZnNHM823am8apCqKSPdtnzPGTy2ZB4zIXOVoBp5+W0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f9ebe33a928b5d529c895202263a5ce46bdf12f7",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable_2": { "nixpkgs-stable_2": {
"locked": { "locked": {
"lastModified": 1741600792, "lastModified": 1741600792,
@ -1375,6 +1391,7 @@
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_5",
"nixpkgs-stable": "nixpkgs-stable_2", "nixpkgs-stable": "nixpkgs-stable_2",
"nixpkgs-stable24_11": "nixpkgs-stable24_11",
"nswitch-rcm-nix": "nswitch-rcm-nix", "nswitch-rcm-nix": "nswitch-rcm-nix",
"nur": "nur", "nur": "nur",
"pre-commit-hooks": "pre-commit-hooks_2", "pre-commit-hooks": "pre-commit-hooks_2",

View file

@ -15,6 +15,7 @@
nixpkgs.url = "github:nixos/nixpkgs?rev=5f385baff93c728400d2c4ec8c9b0745b8f9e5b6"; nixpkgs.url = "github:nixos/nixpkgs?rev=5f385baff93c728400d2c4ec8c9b0745b8f9e5b6";
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.11"; nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.11";
nixpkgs-stable24_11.url = "github:NixOS/nixpkgs/nixos-24.11";
systems.url = "github:nix-systems/default-linux"; systems.url = "github:nix-systems/default-linux";
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";

View file

@ -86,7 +86,7 @@ in
isLinux = true; isLinux = true;
isBtrfs = false; isBtrfs = false;
flakePath = "/root/.dotfiles"; flakePath = "/root/.dotfiles";
server = { modules.server = {
forgejo = true; forgejo = true;
ankisync = true; ankisync = true;
}; };

View file

@ -26,6 +26,7 @@
swarsel-bootstrap swarsel-bootstrap
swarsel-displaypower swarsel-displaypower
swarselzellij swarselzellij
sshrm
rustdesk-vbc rustdesk-vbc
]; ];

View file

@ -140,7 +140,7 @@
id = 0; id = 0;
isDefault = true; isDefault = true;
settings = { settings = {
"browser.startup.homepage" = "https://outlook.office.com|https://satellite.vbc.ac.at|https://bitbucket.vbc.ac.at|https://github.com"; "browser.startup.homepage" = "https://lobste.rs";
}; };
} }
config.swarselsystems.firefox; config.swarselsystems.firefox;

View file

@ -42,6 +42,7 @@
fuse fuse
ventoy ventoy
poppler_utils poppler_utils
vdhcoapp
# nix # nix
alejandra alejandra
@ -98,7 +99,7 @@
# general utilities # general utilities
unrar unrar
samba # samba
cifs-utils cifs-utils
zbar # qr codes zbar # qr codes
readline readline

View file

@ -392,9 +392,7 @@
seat * hide_cursor 2000 seat * hide_cursor 2000
exec kanshi
exec_always kill -1 $(pidof kanshi) exec_always kill -1 $(pidof kanshi)
exec swayosd-server
bindswitch --locked lid:on exec kanshictl switch lidclosed bindswitch --locked lid:on exec kanshictl switch lidclosed
bindswitch --locked lid:off exec kanshictl switch lidopen bindswitch --locked lid:off exec kanshictl switch lidopen

View file

@ -73,40 +73,48 @@ in
} }
]; ];
initExtra = '' initExtra = ''
bindkey "^[[1;5D" backward-word my-forward-word() {
bindkey "^[[1;5C" forward-word local WORDCHARS=$WORDCHARS
WORDCHARS="''${WORDCHARS//:}"
WORDCHARS="''${WORDCHARS//\/}"
WORDCHARS="''${WORDCHARS//.}"
zle backward-word
}
zle -N my-forward-word
# ctrl + right
bindkey "^[[1;5C" my-forward-word
# shift + right
bindkey "^[[1;2D" forward-word
my-backward-word() {
local WORDCHARS=$WORDCHARS
WORDCHARS="''${WORDCHARS//:}"
WORDCHARS="''${WORDCHARS//\/}"
WORDCHARS="''${WORDCHARS//.}"
zle forward-word
}
zle -N my-backward-word
# ctrl + left
bindkey "^[[1;5D" -mybackward-word
# shift + left
bindkey "^[[1;2C" backward-word
my-backward-delete-word() { my-backward-delete-word() {
# Copy the global WORDCHARS variable to a local variable. That way any
# modifications are scoped to this function only
local WORDCHARS=$WORDCHARS local WORDCHARS=$WORDCHARS
# Use bash string manipulation to remove `:` so our delete will stop at it
WORDCHARS="''${WORDCHARS//:}" WORDCHARS="''${WORDCHARS//:}"
# Use bash string manipulation to remove `/` so our delete will stop at it
WORDCHARS="''${WORDCHARS//\/}" WORDCHARS="''${WORDCHARS//\/}"
# Use bash string manipulation to remove `.` so our delete will stop at it
WORDCHARS="''${WORDCHARS//.}" WORDCHARS="''${WORDCHARS//.}"
# zle <widget-name> will run an existing widget.
zle backward-delete-word zle backward-delete-word
} }
zle -N my-backward-delete-word zle -N my-backward-delete-word
# ctrl + del
bindkey '^H' my-backward-delete-word bindkey '^H' my-backward-delete-word
# This will be our `ctrl+alt+w` command # shift + del
my-backward-delete-whole-word() { bindkey '^?' backward-delete-word
# Copy the global WORDCHARS variable to a local variable. That way any
# modifications are scoped to this function only
local WORDCHARS=$WORDCHARS
# Use bash string manipulation to add `:` to WORDCHARS if it's not present
# already.
[[ ! $WORDCHARS == *":"* ]] && WORDCHARS="$WORDCHARS"":"
# zle <widget-name> will run that widget.
zle backward-delete-word
}
# `zle -N` will create a new widget that we can use on the command line
zle -N my-backward-delete-whole-word
# bind this new widget to `ctrl+alt+w`
bindkey '^W' my-backward-delete-whole-word
''; '';
}; };
}; };

View file

@ -7,6 +7,7 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
lutris lutris
wine wine
protonplus
winetricks winetricks
libudev-zero libudev-zero
dwarfs dwarfs

View file

@ -46,6 +46,7 @@ in
"dc" "dc"
"cl" "cl"
"ws" "ws"
"work"
]; ];
programs = { programs = {
@ -135,6 +136,15 @@ in
id = 3; id = 3;
} }
config.swarselsystems.firefox; config.swarselsystems.firefox;
work = lib.recursiveUpdate
{
inherit isDefault;
id = 4;
settings = {
"browser.startup.homepage" = "https://outlook.office.com|https://satellite.vbc.ac.at|https://bitbucket.vbc.ac.at|https://github.com";
};
}
config.swarselsystems.firefox;
}; };
}; };
@ -288,6 +298,12 @@ in
icon = "firefox"; icon = "firefox";
in in
{ {
firefox_work = {
name = "Firefox (work)";
genericName = "Firefox work";
exec = "firefox -p work";
inherit terminal categories icon;
};
firefox_dc = { firefox_dc = {
name = "Firefox (dc)"; name = "Firefox (dc)";
genericName = "Firefox dc"; genericName = "Firefox dc";

View file

@ -2,6 +2,13 @@
{ {
options.swarselsystems.modules.optional.gaming = lib.mkEnableOption "optional gaming settings"; options.swarselsystems.modules.optional.gaming = lib.mkEnableOption "optional gaming settings";
config = lib.mkIf config.swarselsystems.modules.optional.gaming { config = lib.mkIf config.swarselsystems.modules.optional.gaming {
programs.steam = {
enable = true;
package = pkgs.steam;
extraCompatPackages = [
pkgs.proton-ge-bin
];
};
specialisation = { specialisation = {
gaming.configuration = { gaming.configuration = {
networking = { networking = {
@ -20,13 +27,6 @@
}; };
}; };
programs.steam = {
enable = true;
package = pkgs.steam;
extraCompatPackages = [
pkgs.proton-ge-bin
];
};
hardware.xone.enable = true; hardware.xone.enable = true;

View file

@ -15,7 +15,12 @@
}; };
}; };
# run an older kernel to provide compatibility with windows vm # run an older kernel to provide compatibility with windows vm
boot.kernelPackages = lib.mkForce pkgs.linuxPackages; boot = {
kernelPackages = lib.mkForce pkgs.stable24_05.linuxPackages;
# kernelParams = [
# "amd_iommu=on"
# ];
};
}; };
}; };
}; };

View file

@ -1,7 +1,7 @@
{ lib, config, ... }: { lib, config, ... }:
{ {
options.swarselsystems.server.ankisync = lib.mkEnableOption "enable ankisync on server"; options.swarselsystems.modules.server.ankisync = lib.mkEnableOption "enable ankisync on server";
config = lib.mkIf config.swarselsystems.server.ankisync { config = lib.mkIf config.swarselsystems.modules.server.ankisync {
networking.firewall.allowedTCPPorts = [ 22701 ]; networking.firewall.allowedTCPPorts = [ 22701 ];

View file

@ -1,7 +1,7 @@
{ lib, config, ... }: { lib, config, ... }:
{ {
options.swarselsystems.server.emacs = lib.mkEnableOption "enable emacs server on server"; options.swarselsystems.modules.server.emacs = lib.mkEnableOption "enable emacs server on server";
config = lib.mkIf config.swarselsystems.server.emacs { config = lib.mkIf config.swarselsystems.modules.server.emacs {
networking.firewall.allowedTCPPorts = [ 9812 ]; networking.firewall.allowedTCPPorts = [ 9812 ];

View file

@ -1,7 +1,7 @@
{ lib, config, ... }: { lib, config, ... }:
{ {
options.swarselsystems.server.forgejo = lib.mkEnableOption "enable forgejo on server"; options.swarselsystems.modules.server.forgejo = lib.mkEnableOption "enable forgejo on server";
config = lib.mkIf config.swarselsystems.server.forgejo { config = lib.mkIf config.swarselsystems.modules.server.forgejo {
networking.firewall.allowedTCPPorts = [ 3000 ]; networking.firewall.allowedTCPPorts = [ 3000 ];

View file

@ -1,7 +1,7 @@
{ lib, config, ... }: { lib, config, ... }:
{ {
options.swarselsystems.server.freshrss = lib.mkEnableOption "enable freshrss on server"; options.swarselsystems.modules.server.freshrss = lib.mkEnableOption "enable freshrss on server";
config = lib.mkIf config.swarselsystems.server.freshrss { config = lib.mkIf config.swarselsystems.modules.server.freshrss {
users.users.freshrss = { users.users.freshrss = {
extraGroups = [ "users" ]; extraGroups = [ "users" ];

View file

@ -1,7 +1,7 @@
{ lib, config, ... }: { lib, config, ... }:
{ {
options.swarselsystems.server.immich = lib.mkEnableOption "enable immich on server"; options.swarselsystems.modules.server.immich = lib.mkEnableOption "enable immich on server";
config = lib.mkIf config.swarselsystems.server.immich { config = lib.mkIf config.swarselsystems.modules.server.immich {
users.users.immich = { users.users.immich = {
extraGroups = [ "video" "render" "users" ]; extraGroups = [ "video" "render" "users" ];

View file

@ -1,7 +1,7 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
{ {
options.swarselsystems.server.jellyfin = lib.mkEnableOption "enable jellyfin on server"; options.swarselsystems.modules.server.jellyfin = lib.mkEnableOption "enable jellyfin on server";
config = lib.mkIf config.swarselsystems.server.jellyfin { config = lib.mkIf config.swarselsystems.modules.server.jellyfin {
users.users.jellyfin = { users.users.jellyfin = {
extraGroups = [ "video" "render" "users" ]; extraGroups = [ "video" "render" "users" ];
}; };

View file

@ -1,7 +1,7 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
{ {
options.swarselsystems.server.jenkins = lib.mkEnableOption "enable jenkins on server"; options.swarselsystems.modules.server.jenkins = lib.mkEnableOption "enable jenkins on server";
config = lib.mkIf config.swarselsystems.server.jenkins { config = lib.mkIf config.swarselsystems.modules.server.jenkins {
services.jenkins = { services.jenkins = {
enable = true; enable = true;

View file

@ -1,7 +1,7 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
{ {
options.swarselsystems.server.kavita = lib.mkEnableOption "enable kavita on server"; options.swarselsystems.modules.server.kavita = lib.mkEnableOption "enable kavita on server";
config = lib.mkIf config.swarselsystems.server.kavita { config = lib.mkIf config.swarselsystems.modules.server.kavita {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
calibre calibre
]; ];

View file

@ -11,8 +11,8 @@ let
''; '';
in in
{ {
options.swarselsystems.server.matrix = lib.mkEnableOption "enable matrix on server"; options.swarselsystems.modules.server.matrix = lib.mkEnableOption "enable matrix on server";
config = lib.mkIf config.swarselsystems.server.matrix { config = lib.mkIf config.swarselsystems.modules.server.matrix {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
matrix-synapse matrix-synapse
lottieconverter lottieconverter

View file

@ -1,7 +1,7 @@
{ self, lib, config, ... }: { self, lib, config, ... }:
{ {
options.swarselsystems.server.monitoring = lib.mkEnableOption "enable monitoring on server"; options.swarselsystems.modules.server.monitoring = lib.mkEnableOption "enable monitoring on server";
config = lib.mkIf config.swarselsystems.server.monitoring { config = lib.mkIf config.swarselsystems.modules.server.monitoring {
sops.secrets = { sops.secrets = {
grafanaadminpass = { grafanaadminpass = {
@ -127,7 +127,7 @@
sslVerify = false; sslVerify = false;
scrapeUri = "http://localhost/nginx_status"; scrapeUri = "http://localhost/nginx_status";
}; };
nextcloud = lib.mkIf config.swarselsystems.server.nextcloud { nextcloud = lib.mkIf config.swarselsystems.modules.server.nextcloud {
enable = true; enable = true;
port = 9205; port = 9205;
url = "https://stash.swarsel.win/ocs/v2.php/apps/serverinfo/api/v1/info"; url = "https://stash.swarsel.win/ocs/v2.php/apps/serverinfo/api/v1/info";

View file

@ -1,7 +1,7 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
{ {
options.swarselsystems.server.mpd = lib.mkEnableOption "enable mpd on server"; options.swarselsystems.modules.server.mpd = lib.mkEnableOption "enable mpd on server";
config = lib.mkIf config.swarselsystems.server.mpd { config = lib.mkIf config.swarselsystems.modules.server.mpd {
users = { users = {
groups = { groups = {
mpd = { }; mpd = { };

View file

@ -3,8 +3,8 @@ let
secretsDirectory = builtins.toString inputs.nix-secrets; secretsDirectory = builtins.toString inputs.nix-secrets;
in in
{ {
options.swarselsystems.server.navidrome = lib.mkEnableOption "enable navidrome on server"; options.swarselsystems.modules.server.navidrome = lib.mkEnableOption "enable navidrome on server";
config = lib.mkIf config.swarselsystems.server.navidrome { config = lib.mkIf config.swarselsystems.modules.server.navidrome {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
pciutils pciutils
alsa-utils alsa-utils

View file

@ -1,7 +1,7 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
{ {
options.swarselsystems.server.nextcloud = lib.mkEnableOption "enable nextcloud on server"; options.swarselsystems.modules.server.nextcloud = lib.mkEnableOption "enable nextcloud on server";
config = lib.mkIf config.swarselsystems.server.nextcloud { config = lib.mkIf config.swarselsystems.modules.server.nextcloud {
sops.secrets.nextcloudadminpass = { sops.secrets.nextcloudadminpass = {
owner = "nextcloud"; owner = "nextcloud";

View file

@ -1,7 +1,7 @@
{ lib, config, pkgs, ... }: { lib, config, pkgs, ... }:
{ {
options.swarselsystems.server.nfs = lib.mkEnableOption "enable nfs on server"; options.swarselsystems.modules.server.nfs = lib.mkEnableOption "enable nfs on server";
config = lib.mkIf config.swarselsystems.server.nfs { config = lib.mkIf config.swarselsystems.modules.server.nfs {
services = { services = {
# add a user with sudo smbpasswd -a <user> # add a user with sudo smbpasswd -a <user>
samba = { samba = {

View file

@ -1,7 +1,7 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
{ {
options.swarselsystems.server.nginx = lib.mkEnableOption "enable nginx on server"; options.swarselsystems.modules.server.nginx = lib.mkEnableOption "enable nginx on server";
config = lib.mkIf config.swarselsystems.server.nginx { config = lib.mkIf config.swarselsystems.modules.server.nginx {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
lego lego
]; ];

View file

@ -1,7 +1,7 @@
{ lib, config, pkgs, ... }: { lib, config, pkgs, ... }:
{ {
options.swarselsystems.server.packages = lib.mkEnableOption "enable packages on server"; options.swarselsystems.modules.server.packages = lib.mkEnableOption "enable packages on server";
config = lib.mkIf config.swarselsystems.server.packages { config = lib.mkIf config.swarselsystems.modules.server.packages {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
gnupg gnupg
nix-index nix-index

View file

@ -1,7 +1,7 @@
{ lib, config, ... }: { lib, config, ... }:
{ {
options.swarselsystems.server.paperless = lib.mkEnableOption "enable paperless on server"; options.swarselsystems.modules.server.paperless = lib.mkEnableOption "enable paperless on server";
config = lib.mkIf config.swarselsystems.server.paperless { config = lib.mkIf config.swarselsystems.modules.server.paperless {
users.users.paperless = { users.users.paperless = {
extraGroups = [ "users" ]; extraGroups = [ "users" ];

View file

@ -1,6 +1,6 @@
{ lib, config, ... }: { lib, config, ... }:
{ {
config = lib.mkIf (config?swarselsystems.server.mpd || config?swarselsystems.server.navidrome) { config = lib.mkIf (config?swarselsystems.modules.server.mpd || config?swarselsystems.modules.server.navidrome) {
security.rtkit.enable = true; # this is required for pipewire real-time access security.rtkit.enable = true; # this is required for pipewire real-time access

View file

@ -1,7 +1,7 @@
{ lib, config, ... }: { lib, config, ... }:
{ {
options.swarselsystems.server.restic = lib.mkEnableOption "enable restic backups on server"; options.swarselsystems.modules.server.restic = lib.mkEnableOption "enable restic backups on server";
config = lib.mkIf config.swarselsystems.server.restic { config = lib.mkIf config.swarselsystems.modules.server.restic {
# TODO # TODO

View file

@ -4,13 +4,13 @@ let
in in
{ {
options.swarselsystems = { options.swarselsystems = {
server.general = lib.mkEnableOption "general setting on server"; modules.server.general = lib.mkEnableOption "general setting on server";
shellAliases = lib.mkOption { shellAliases = lib.mkOption {
type = lib.types.attrsOf lib.types.str; type = lib.types.attrsOf lib.types.str;
default = { }; default = { };
}; };
}; };
config = lib.mkIf config.swarselsystems.server.general { config = lib.mkIf config.swarselsystems.modules.server.general {
environment.shellAliases = lib.recursiveUpdate environment.shellAliases = lib.recursiveUpdate
{ {
npswitch = "cd ${flakePath}; git pull; sudo nixos-rebuild --flake .#$(hostname) switch; cd -;"; npswitch = "cd ${flakePath}; git pull; sudo nixos-rebuild --flake .#$(hostname) switch; cd -;";

View file

@ -1,7 +1,7 @@
{ config, lib, ... }: { config, lib, ... }:
{ {
options.swarselsystems.server.sops = lib.mkEnableOption "enable sops on server"; options.swarselsystems.modules.server.sops = lib.mkEnableOption "enable sops on server";
config = lib.mkIf config.swarselsystems.server.sops { config = lib.mkIf config.swarselsystems.modules.server.sops {
sops = { sops = {
age.sshKeyPaths = lib.mkDefault [ "/etc/ssh/sops" ]; age.sshKeyPaths = lib.mkDefault [ "/etc/ssh/sops" ];
defaultSopsFile = lib.mkDefault "${config.swarselsystems.flakePath}/secrets/winters/secrets.yaml"; defaultSopsFile = lib.mkDefault "${config.swarselsystems.flakePath}/secrets/winters/secrets.yaml";

View file

@ -1,7 +1,7 @@
{ lib, config, ... }: { lib, config, ... }:
{ {
options.swarselsystems.server.spotifyd = lib.mkEnableOption "enable spotifyd on server"; options.swarselsystems.modules.server.spotifyd = lib.mkEnableOption "enable spotifyd on server";
config = lib.mkIf config.swarselsystems.server.spotifyd { config = lib.mkIf config.swarselsystems.modules.server.spotifyd {
users.groups.spotifyd = { users.groups.spotifyd = {
gid = 65136; gid = 65136;
}; };

View file

@ -1,7 +1,7 @@
{ self, lib, config, ... }: { self, lib, config, ... }:
{ {
options.swarselsystems.server.ssh = lib.mkEnableOption "enable ssh on server"; options.swarselsystems.modules.server.ssh = lib.mkEnableOption "enable ssh on server";
config = lib.mkIf config.swarselsystems.server.ssh { config = lib.mkIf config.swarselsystems.modules.server.ssh {
services.openssh = { services.openssh = {
enable = true; enable = true;
}; };

View file

@ -4,8 +4,8 @@ let
workHostName = lib.swarselsystems.getSecret "${secretsDirectory}/work/worklaptop-hostname"; workHostName = lib.swarselsystems.getSecret "${secretsDirectory}/work/worklaptop-hostname";
in in
{ {
options.swarselsystems.server.syncthing = lib.mkEnableOption "enable syncthing on server"; options.swarselsystems.modules.server.syncthing = lib.mkEnableOption "enable syncthing on server";
config = lib.mkIf config.swarselsystems.server.syncthing { config = lib.mkIf config.swarselsystems.modules.server.syncthing {
users.users.syncthing = { users.users.syncthing = {
extraGroups = [ "users" ]; extraGroups = [ "users" ];

View file

@ -1,7 +1,7 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
{ {
options.swarselsystems.server.transmission = lib.mkEnableOption "enable transmission and friends on server"; options.swarselsystems.modules.server.transmission = lib.mkEnableOption "enable transmission and friends on server";
config = lib.mkIf config.swarselsystems.server.transmission { config = lib.mkIf config.swarselsystems.modules.server.transmission {
# this user/group section is probably unneeded # this user/group section is probably unneeded
users = { users = {

View file

@ -40,6 +40,13 @@ let
}; };
}; };
nixpkgs-stable24_05 = final: _: {
stable24_05 = import inputs.nixpkgs-stable {
inherit (final) system;
config.allowUnfree = true;
};
};
zjstatus = _: prev: { zjstatus = _: prev: {
zjstatus = inputs.zjstatus.packages.${prev.system}.default; zjstatus = inputs.zjstatus.packages.${prev.system}.default;
}; };
@ -52,6 +59,7 @@ in
(additions final prev) (additions final prev)
// (modifications final prev) // (modifications final prev)
// (nixpkgs-stable final prev) // (nixpkgs-stable final prev)
// (nixpkgs-stable24_05 final prev)
// (zjstatus final prev) // (zjstatus final prev)
// (inputs.vbc-nix.overlays.default final prev) // (inputs.vbc-nix.overlays.default final prev)
// (inputs.nur.overlays.default final prev) // (inputs.nur.overlays.default final prev)

6
pkgs/sshrm/default.nix Normal file
View file

@ -0,0 +1,6 @@
{ self, name, writeShellApplication, openssh }:
writeShellApplication {
inherit name;
runtimeInputs = [ openssh ];
text = builtins.readFile "${self}/scripts/${name}.sh";
}

View file

@ -12,7 +12,6 @@
storeOptimize = lib.mkDefault true; storeOptimize = lib.mkDefault true;
time = lib.mkDefault true; time = lib.mkDefault true;
users = lib.mkDefault true; users = lib.mkDefault true;
};
server = { server = {
general = lib.mkDefault true; general = lib.mkDefault true;
packages = lib.mkDefault true; packages = lib.mkDefault true;
@ -34,7 +33,7 @@
monitoring = lib.mkDefault true; monitoring = lib.mkDefault true;
emacs = lib.mkDefault true; emacs = lib.mkDefault true;
freshrss = lib.mkDefault true; freshrss = lib.mkDefault true;
};
}; };
}; };
}; };

View file

@ -12,7 +12,6 @@
storeOptimize = lib.mkDefault true; storeOptimize = lib.mkDefault true;
time = lib.mkDefault true; time = lib.mkDefault true;
users = lib.mkDefault true; users = lib.mkDefault true;
};
server = { server = {
general = lib.mkDefault true; general = lib.mkDefault true;
packages = lib.mkDefault true; packages = lib.mkDefault true;
@ -25,5 +24,6 @@
}; };
}; };
}; };
};
} }

View file

@ -30,30 +30,49 @@ bindurl ^http(s)?://lobste\.rs c hint -Jc [class="u-url"],[class="comments_label
bindurl ^http(s)?://www\.google\.com gi composite focusinput -l ; text.end_of_line bindurl ^http(s)?://www\.google\.com gi composite focusinput -l ; text.end_of_line
" Work " Work
command tab_or_tabopen jsb -p (async () => { let tabs = await browser.tabs.query({}); let tab = tabs.find(t => t.url.includes(JS_ARG)); if (tab) {browser.tabs.update(tab.id, { active: true });} else {tri.excmds.tabopen(JS_ARG);}})() command tab_or_tabopen jsb -p (async () => {
let tabs = await browser.tabs.query({});
let tab = tabs.find(t => t.url.includes(JS_ARG));
if (tab) {
browser.tabs.update(tab.id, { active: true });
} else {
tri.excmds.tabopen(JS_ARG);
}
})()
bind gwa tab_or_tabopen apic-impimba-1.m.imp.ac.at command tab_or_tabopen_local jsb -p (async () => {
bind gwA tab_or_tabopen artifactory.imp.ac.at const currentWindow = await browser.windows.getCurrent();
bind gwb tab_or_tabopen bitbucket.vbc.ac.at const tabs = await browser.tabs.query({ windowId: currentWindow.id });
bind gwc tab_or_tabopen vbc.atlassian.net/wiki const tab = tabs.find(t => t.url.includes(JS_ARG));
bind gwd tab_or_tabopen datadomain-impimba-2.imp.ac.at if (tab) {
bind gwe tab_or_tabopen exivity.vbc.ac.at browser.tabs.update(tab.id, { active: true });
bind gwg tab_or_tabopen github.com } else {
bind gwG tab_or_tabopen goc.egi.eu tri.excmds.tabopen(JS_ARG);
bind gwh tab_or_tabopen jupyterhub.vbc.ac.at }
bind gwH tab_or_tabopen test-jupyterhub.vbc.ac.at })()
bind gwj tab_or_tabopen jenkins.vbc.ac.at
bind gwJ tab_or_tabopen test-jenkins.vbc.ac.at bind gwa tab_or_tabopen_local apic-impimba-1.m.imp.ac.at
bind gwl tab_or_tabopen lucid.app bind gwA tab_or_tabopen_local artifactory.imp.ac.at
bind gwm tab_or_tabopen monitoring.vbc.ac.at/grafana bind gwb tab_or_tabopen_local bitbucket.vbc.ac.at
bind gwM tab_or_tabopen monitoring.vbc.ac.at/prometheus bind gwc tab_or_tabopen_local vbc.atlassian.net/wiki
bind gwn tab_or_tabopen netbox.vbc.ac.at bind gwd tab_or_tabopen_local datadomain-impimba-2.imp.ac.at
bind gwN tab_or_tabopen nap.imp.ac.at bind gwe tab_or_tabopen_local exivity.vbc.ac.at
bind gwo tab_or_tabopen outlook.office.com bind gwg tab_or_tabopen_local github.com
bind gws tab_or_tabopen satellite.vbc.ac.at bind gwG tab_or_tabopen_local goc.egi.eu
bind gwt tab_or_tabopen tower.vbc.ac.at bind gwh tab_or_tabopen_local jupyterhub.vbc.ac.at
bind gwv tab_or_tabopen vc-impimba-1.m.imp.ac.at/ui bind gwH tab_or_tabopen_local test-jupyterhub.vbc.ac.at
bind gwx tab_or_tabopen xclarity.vbc.ac.at bind gwj tab_or_tabopen_local jenkins.vbc.ac.at
bind gwJ tab_or_tabopen_local test-jenkins.vbc.ac.at
bind gwl tab_or_tabopen_local lucid.app
bind gwm tab_or_tabopen_local monitoring.vbc.ac.at/grafana
bind gwM tab_or_tabopen_local monitoring.vbc.ac.at/prometheus
bind gwn tab_or_tabopen_local netbox.vbc.ac.at
bind gwN tab_or_tabopen_local nap.imp.ac.at
bind gwo tab_or_tabopen_local outlook.office.com
bind gws tab_or_tabopen_local satellite.vbc.ac.at
bind gwt tab_or_tabopen_local tower.vbc.ac.at
bind gwv tab_or_tabopen_local vc-impimba-1.m.imp.ac.at/ui
bind gwx tab_or_tabopen_local xclarity.vbc.ac.at
" Search in page " Search in page
set findcase smart set findcase smart

11
scripts/sshrm.sh Normal file
View file

@ -0,0 +1,11 @@
HISTFILE="$HOME"/.histfile
last_ssh_cmd=$(grep -E "ssh " "$HISTFILE" | sed -E 's/^: [0-9]+:[0-9]+;//' | grep "^ssh " | tail -1)
host=$(echo "$last_ssh_cmd" | sed -E 's/.*ssh ([^@ ]+@)?([^ ]+).*/\2/')
if [[ -n $host ]]; then
echo "Removing SSH host key for: $host"
ssh-keygen -R "$host"
else
echo "No valid SSH command found in history."
fi