summaryrefslogtreecommitdiffstats
path: root/tv/2configs
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2022-12-12 16:45:39 +0100
committerlassulus <lassulus@lassul.us>2022-12-12 16:45:39 +0100
commit1775e867524d47b5055034bedadc7a96a4c7da6f (patch)
tree0073823803b051c31491937a621ca53e65adbb9c /tv/2configs
parentea72339343115c141b432a4f6cd97cfbb0eb1223 (diff)
parent54ddded30dfc02c53baf33c078fafdd9aaf3c70d (diff)
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'tv/2configs')
-rw-r--r--tv/2configs/backup.nix5
-rw-r--r--tv/2configs/bash/default.nix23
l---------tv/2configs/bash/lib1
-rw-r--r--tv/2configs/binary-cache/default.nix2
l---------tv/2configs/binary-cache/lib1
-rw-r--r--tv/2configs/br.nix2
-rw-r--r--tv/2configs/default.nix5
-rw-r--r--tv/2configs/exim-retiolum.nix7
-rw-r--r--tv/2configs/exim-smarthost.nix7
-rw-r--r--tv/2configs/gitconfig.nix7
-rw-r--r--tv/2configs/gitrepos.nix7
-rw-r--r--tv/2configs/htop.nix7
-rw-r--r--tv/2configs/hw/AO753.nix7
l---------tv/2configs/hw/lib1
-rw-r--r--tv/2configs/hw/w110er.nix5
-rw-r--r--tv/2configs/hw/x220.nix6
-rw-r--r--tv/2configs/imgur.nix3
l---------tv/2configs/lib1
-rw-r--r--tv/2configs/nginx/default.nix7
-rw-r--r--tv/2configs/nginx/krebs-pages.nix13
l---------tv/2configs/nginx/lib1
-rw-r--r--tv/2configs/nginx/public_html.nix7
-rw-r--r--tv/2configs/pki/default.nix2
l---------tv/2configs/pki/lib1
-rw-r--r--tv/2configs/ppp.nix2
-rw-r--r--tv/2configs/pulse.nix6
l---------tv/2configs/repo-sync/lib1
-rw-r--r--tv/2configs/repo-sync/wiki.nix5
-rw-r--r--tv/2configs/retiolum.nix7
-rw-r--r--tv/2configs/ssh.nix7
-rw-r--r--tv/2configs/sshd.nix2
-rw-r--r--tv/2configs/urlwatch.nix2
-rw-r--r--tv/2configs/vim.nix7
-rw-r--r--tv/2configs/xdg.nix7
-rw-r--r--tv/2configs/xp-332.nix2
-rw-r--r--tv/2configs/xserver/Xmodmap.nix2
-rw-r--r--tv/2configs/xserver/default.nix5
l---------tv/2configs/xserver/lib1
-rw-r--r--tv/2configs/xserver/sxiv.nix2
-rw-r--r--tv/2configs/xserver/urxvt.nix2
-rw-r--r--tv/2configs/xserver/xserver.conf.nix5
41 files changed, 76 insertions, 117 deletions
diff --git a/tv/2configs/backup.nix b/tv/2configs/backup.nix
index a5e0cf4c7..c8ab73b50 100644
--- a/tv/2configs/backup.nix
+++ b/tv/2configs/backup.nix
@@ -1,6 +1,5 @@
-{ config, lib, ... }:
-with import <stockholm/lib>;
-{
+with import ./lib;
+{ config, pkgs, ... }: {
krebs.backup.plans = {
} // mapAttrs (_: recursiveUpdate {
snapshots = {
diff --git a/tv/2configs/bash/default.nix b/tv/2configs/bash/default.nix
index 92e2499a9..e38566b78 100644
--- a/tv/2configs/bash/default.nix
+++ b/tv/2configs/bash/default.nix
@@ -1,8 +1,5 @@
-{ config, lib, pkgs, ... }:
-
-with import <stockholm/lib>;
-
-{
+with import ./lib;
+{ config, pkgs, ... }: {
programs.bash = {
interactiveShellInit = /* sh */ ''
HISTCONTROL='erasedups:ignorespace'
@@ -17,8 +14,20 @@ with import <stockholm/lib>;
case $UID in
${shell.escape (toString config.krebs.users.tv.uid)})
- if test ''${SHLVL-1} = 1; then
- case ''${XMONAD_SPAWN_WORKSPACE-} in
+ if test ''${SHLVL-1} = 1 && test -n "''${DISPLAY-}"; then
+ _CURRENT_DESKTOP_NAME=''${_CURRENT_DESKTOP_NAME-$(
+ ${pkgs.xorg.xprop}/bin/xprop -notype -root \
+ 32i _NET_CURRENT_DESKTOP \
+ 8s _NET_DESKTOP_NAMES \
+ |
+ ${pkgs.gnused}/bin/sed -r 's/.* = //;s/"//g;s/, /\a/g' |
+ {
+ read -r _NET_CURRENT_DESKTOP
+ IFS=$'\a' read -ra _NET_DESKTOP_NAMES
+ echo "''${_NET_DESKTOP_NAMES[$_NET_CURRENT_DESKTOP]}"
+ }
+ )}
+ case $_CURRENT_DESKTOP_NAME in
stockholm)
cd ~/stockholm
;;
diff --git a/tv/2configs/bash/lib b/tv/2configs/bash/lib
new file mode 120000
index 000000000..dc598c56d
--- /dev/null
+++ b/tv/2configs/bash/lib
@@ -0,0 +1 @@
+../lib \ No newline at end of file
diff --git a/tv/2configs/binary-cache/default.nix b/tv/2configs/binary-cache/default.nix
index 58791f4f6..66d740715 100644
--- a/tv/2configs/binary-cache/default.nix
+++ b/tv/2configs/binary-cache/default.nix
@@ -1,4 +1,4 @@
-{ config, lib, pkgs, ... }: with import <stockholm/lib>;
+{ config, lib, pkgs, ... }: with import ./lib;
{
environment.etc."binary-cache.pubkey".text =
config.krebs.build.host.binary-cache.pubkey;
diff --git a/tv/2configs/binary-cache/lib b/tv/2configs/binary-cache/lib
new file mode 120000
index 000000000..dc598c56d
--- /dev/null
+++ b/tv/2configs/binary-cache/lib
@@ -0,0 +1 @@
+../lib \ No newline at end of file
diff --git a/tv/2configs/br.nix b/tv/2configs/br.nix
index e6a46e903..4a8db2e38 100644
--- a/tv/2configs/br.nix
+++ b/tv/2configs/br.nix
@@ -1,4 +1,4 @@
-with import <stockholm/lib>;
+with import ./lib;
{ config, pkgs, ... }: {
imports = [
diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix
index c9047023e..9babb92c2 100644
--- a/tv/2configs/default.nix
+++ b/tv/2configs/default.nix
@@ -1,6 +1,5 @@
-with import <stockholm/lib>;
+with import ./lib;
{ config, pkgs, ... }: {
-
boot.tmpOnTmpfs = true;
krebs.enable = true;
@@ -38,7 +37,7 @@ with import <stockholm/lib>;
{
i18n.defaultLocale = mkDefault "C.UTF-8";
security.sudo.extraConfig = ''
- Defaults env_keep+="SSH_CLIENT XMONAD_SPAWN_WORKSPACE"
+ Defaults env_keep+="SSH_CLIENT _CURRENT_DESKTOP_NAME"
Defaults mailto="${config.krebs.users.tv.mail}"
Defaults !lecture
'';
diff --git a/tv/2configs/exim-retiolum.nix b/tv/2configs/exim-retiolum.nix
index 3d4ada46b..fefc6dd24 100644
--- a/tv/2configs/exim-retiolum.nix
+++ b/tv/2configs/exim-retiolum.nix
@@ -1,8 +1,5 @@
-{ config, lib, pkgs, ... }:
-
-with import <stockholm/lib>;
-
-{
+with import ./lib;
+{ config, pkgs, ... }: {
environment.systemPackages = [
pkgs.eximlog
];
diff --git a/tv/2configs/exim-smarthost.nix b/tv/2configs/exim-smarthost.nix
index 4a0dcf616..e905536df 100644
--- a/tv/2configs/exim-smarthost.nix
+++ b/tv/2configs/exim-smarthost.nix
@@ -1,8 +1,5 @@
-{ config, lib, pkgs, ... }:
-
-with import <stockholm/lib>;
-
-{
+with import ./lib;
+{ config, pkgs, ... }: {
environment.systemPackages = [
pkgs.eximlog
];
diff --git a/tv/2configs/gitconfig.nix b/tv/2configs/gitconfig.nix
index 771a4b2a4..fb9b78e6a 100644
--- a/tv/2configs/gitconfig.nix
+++ b/tv/2configs/gitconfig.nix
@@ -1,8 +1,5 @@
-{ config, pkgs, ... }:
-
-with import <stockholm/lib>;
-
-{
+with import ./lib;
+{ config, pkgs, ... }: {
environment.etc.gitconfig.text = ''
[alias]
patch = !${pkgs.git}/bin/git --no-pager diff --no-color
diff --git a/tv/2configs/gitrepos.nix b/tv/2configs/gitrepos.nix
index 4fba5fe7b..d8e7755fe 100644
--- a/tv/2configs/gitrepos.nix
+++ b/tv/2configs/gitrepos.nix
@@ -1,8 +1,5 @@
-{ config, lib, pkgs, ... }:
-
-with import <stockholm/lib>;
-
-let {
+with import ./lib;
+{ config, pkgs, ... }: let {
body = {
diff --git a/tv/2configs/htop.nix b/tv/2configs/htop.nix
index e78caeb5f..09372980f 100644
--- a/tv/2configs/htop.nix
+++ b/tv/2configs/htop.nix
@@ -1,8 +1,5 @@
-{ pkgs, ... }:
-
-with import <stockholm/lib>;
-
-{
+with import ./lib;
+{ pkgs, ... }: {
nixpkgs.config.packageOverrides = super: {
htop = pkgs.symlinkJoin {
name = "htop";
diff --git a/tv/2configs/hw/AO753.nix b/tv/2configs/hw/AO753.nix
index dd6fcfe67..b998fcf7c 100644
--- a/tv/2configs/hw/AO753.nix
+++ b/tv/2configs/hw/AO753.nix
@@ -1,8 +1,5 @@
-{ config, lib, pkgs, ... }:
-
-with import <stockholm/lib>;
-
-{
+with import ./lib;
+{ config, pkgs, ... }: {
imports = [
../smartd.nix
diff --git a/tv/2configs/hw/lib b/tv/2configs/hw/lib
new file mode 120000
index 000000000..dc598c56d
--- /dev/null
+++ b/tv/2configs/hw/lib
@@ -0,0 +1 @@
+../lib \ No newline at end of file
diff --git a/tv/2configs/hw/w110er.nix b/tv/2configs/hw/w110er.nix
index 09dd9a49d..bf749a98a 100644
--- a/tv/2configs/hw/w110er.nix
+++ b/tv/2configs/hw/w110er.nix
@@ -1,6 +1,5 @@
-{ pkgs, ... }: let
- lib = import <stockholm/lib>;
-in {
+with import ./lib;
+{ pkgs, ... }: {
imports = [
../smartd.nix
{
diff --git a/tv/2configs/hw/x220.nix b/tv/2configs/hw/x220.nix
index c3ec7b40e..ee3c7dc04 100644
--- a/tv/2configs/hw/x220.nix
+++ b/tv/2configs/hw/x220.nix
@@ -1,7 +1,5 @@
-{ config, pkgs, ... }: let
- lib = import <stockholm/lib>;
-in
-{
+with import ./lib;
+{ config, pkgs, ... }: {
imports = [
../smartd.nix
{
diff --git a/tv/2configs/imgur.nix b/tv/2configs/imgur.nix
index 1df67f939..e22122761 100644
--- a/tv/2configs/imgur.nix
+++ b/tv/2configs/imgur.nix
@@ -1,6 +1,5 @@
-with import <stockholm/lib>;
+with import ./lib;
{ config, pkgs, ... }: {
-
services.nginx.virtualHosts."ni.r" = {
locations."/image" = {
extraConfig = /* nginx */ ''
diff --git a/tv/2configs/lib b/tv/2configs/lib
new file mode 120000
index 000000000..dc598c56d
--- /dev/null
+++ b/tv/2configs/lib
@@ -0,0 +1 @@
+../lib \ No newline at end of file
diff --git a/tv/2configs/nginx/default.nix b/tv/2configs/nginx/default.nix
index efea3a844..6844df99b 100644
--- a/tv/2configs/nginx/default.nix
+++ b/tv/2configs/nginx/default.nix
@@ -1,8 +1,5 @@
-{ config, lib, ... }:
-
-with import <stockholm/lib>;
-
-{
+with import ./lib;
+{ config, ... }: {
services.nginx = {
enableReload = true;
diff --git a/tv/2configs/nginx/krebs-pages.nix b/tv/2configs/nginx/krebs-pages.nix
deleted file mode 100644
index 4dd643db7..000000000
--- a/tv/2configs/nginx/krebs-pages.nix
+++ /dev/null
@@ -1,13 +0,0 @@
-{ config, pkgs, ... }:
-{
- services.nginx = {
- virtualHosts.krebs-pages = {
- serverAliases = [
- "krebs.${config.krebs.build.host.name}.r"
- ];
- extraConfig = ''
- root ${pkgs.krebs-pages};
- '';
- };
- };
-}
diff --git a/tv/2configs/nginx/lib b/tv/2configs/nginx/lib
new file mode 120000
index 000000000..dc598c56d
--- /dev/null
+++ b/tv/2configs/nginx/lib
@@ -0,0 +1 @@
+../lib \ No newline at end of file
diff --git a/tv/2configs/nginx/public_html.nix b/tv/2configs/nginx/public_html.nix
index 43d7189ef..c2403cd8d 100644
--- a/tv/2configs/nginx/public_html.nix
+++ b/tv/2configs/nginx/public_html.nix
@@ -1,8 +1,5 @@
-{ config, lib, ... }:
-
-with import <stockholm/lib>;
-
-{
+with import ./lib;
+{ config, ... }: {
services.nginx = {
enable = true;
virtualHosts.default = {
diff --git a/tv/2configs/pki/default.nix b/tv/2configs/pki/default.nix
index 51a5c716f..415755b16 100644
--- a/tv/2configs/pki/default.nix
+++ b/tv/2configs/pki/default.nix
@@ -1,4 +1,4 @@
-with import <stockholm/lib>;
+with import ./lib;
{ config, pkgs, ... }: let
certFile = config.environment.etc."ssl/certs/ca-certificates.crt".source;
diff --git a/tv/2configs/pki/lib b/tv/2configs/pki/lib
new file mode 120000
index 000000000..dc598c56d
--- /dev/null
+++ b/tv/2configs/pki/lib
@@ -0,0 +1 @@
+../lib \ No newline at end of file
diff --git a/tv/2configs/ppp.nix b/tv/2configs/ppp.nix
index c801401b2..24d2831c4 100644
--- a/tv/2configs/ppp.nix
+++ b/tv/2configs/ppp.nix
@@ -1,5 +1,5 @@
+with import ./lib;
{ config, pkgs, ... }: let
- lib = import <stockholm/lib>;
cfg = {
pin = "@${toString <secrets/o2.pin>}";
ttys.ppp = "/dev/ttyACM0";
diff --git a/tv/2configs/pulse.nix b/tv/2configs/pulse.nix
index 513a0eb17..7a07e8154 100644
--- a/tv/2configs/pulse.nix
+++ b/tv/2configs/pulse.nix
@@ -1,7 +1,5 @@
-{ config, lib, pkgs, ... }:
-
-with import <stockholm/lib>;
-let
+with import ./lib;
+{ config, pkgs, ... }: let
pkg = pkgs.pulseaudio;
runDir = "/run/pulse";
diff --git a/tv/2configs/repo-sync/lib b/tv/2configs/repo-sync/lib
new file mode 120000
index 000000000..dc598c56d
--- /dev/null
+++ b/tv/2configs/repo-sync/lib
@@ -0,0 +1 @@
+../lib \ No newline at end of file
diff --git a/tv/2configs/repo-sync/wiki.nix b/tv/2configs/repo-sync/wiki.nix
index 913439906..515e731c4 100644
--- a/tv/2configs/repo-sync/wiki.nix
+++ b/tv/2configs/repo-sync/wiki.nix
@@ -1,6 +1,5 @@
-{ config, pkgs, ... }: let
- lib = import <stockholm/lib>;
-in {
+with import ./lib;
+{ config, pkgs, ... }: {
krebs.repo-sync.enable = true;
krebs.repo-sync.repos.wiki.branches.hotdog = {
origin.url = "http://cgit.hotdog.r/wiki";
diff --git a/tv/2configs/retiolum.nix b/tv/2configs/retiolum.nix
index 3c3b2adf0..de77de381 100644
--- a/tv/2configs/retiolum.nix
+++ b/tv/2configs/retiolum.nix
@@ -1,8 +1,5 @@
-{ config, lib, pkgs, ... }:
-
-with import <stockholm/lib>;
-
-{
+with import ./lib;
+{ config, pkgs, ... }: {
krebs.tinc.retiolum = {
enable = true;
connectTo = filter (ne config.krebs.build.host.name) [
diff --git a/tv/2configs/ssh.nix b/tv/2configs/ssh.nix
index 84d247362..ad828813d 100644
--- a/tv/2configs/ssh.nix
+++ b/tv/2configs/ssh.nix
@@ -1,8 +1,5 @@
-{ config, pkgs, ... }:
-
-with import <stockholm/lib>;
-
-{
+with import ./lib;
+{ config, pkgs, ... }: {
# Override NixOS's "Allow DSA keys for now."
environment.etc."ssh/ssh_config".text = mkForce ''
AddressFamily ${if config.networking.enableIPv6 then "any" else "inet"}
diff --git a/tv/2configs/sshd.nix b/tv/2configs/sshd.nix
index 79af5b01f..4da8c8216 100644
--- a/tv/2configs/sshd.nix
+++ b/tv/2configs/sshd.nix
@@ -1,4 +1,4 @@
-with import <stockholm/lib>;
+with import ./lib;
{ config, ... }: let
cfg.host = config.krebs.build.host;
in {
diff --git a/tv/2configs/urlwatch.nix b/tv/2configs/urlwatch.nix
index 619b04459..7ba364ff3 100644
--- a/tv/2configs/urlwatch.nix
+++ b/tv/2configs/urlwatch.nix
@@ -1,4 +1,4 @@
-with import <stockholm/lib>;
+with import ./lib;
{ config, pkgs, ... }: let
exec = filename: args: url: {
inherit url;
diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix
index e296a0c8e..b8819ee36 100644
--- a/tv/2configs/vim.nix
+++ b/tv/2configs/vim.nix
@@ -1,7 +1,5 @@
-{ config, lib, pkgs, ... }:
-
-with import <stockholm/lib>;
-let {
+with import ./lib;
+{ config, pkgs, ... }: let {
body = {
environment.systemPackages = [
vim-wrapper
@@ -79,6 +77,7 @@ let {
set showmatch
set timeoutlen=0
set ttimeoutlen=0
+ set ttymouse=sgr
set undodir=${dirs.undodir}
set undofile
set undolevels=1000000
diff --git a/tv/2configs/xdg.nix b/tv/2configs/xdg.nix
index 18bac9b38..b7c14af5a 100644
--- a/tv/2configs/xdg.nix
+++ b/tv/2configs/xdg.nix
@@ -1,8 +1,5 @@
-{ config, lib, pkgs, ... }:
-
-with import <stockholm/lib>;
-
-{
+with import ./lib;
+{ config, pkgs, ... }: {
environment.variables.XDG_RUNTIME_DIR = "/run/xdg/$LOGNAME";
systemd.tmpfiles.rules = let
diff --git a/tv/2configs/xp-332.nix b/tv/2configs/xp-332.nix
index a97fb3679..51fd1ae8c 100644
--- a/tv/2configs/xp-332.nix
+++ b/tv/2configs/xp-332.nix
@@ -1,4 +1,4 @@
-with import <stockholm/lib>;
+with import ./lib;
{ config, pkgs, ... }: {
environment.etc."utsushi.conf".text = ''
diff --git a/tv/2configs/xserver/Xmodmap.nix b/tv/2configs/xserver/Xmodmap.nix
index 8e8e3dfdd..8e555e927 100644
--- a/tv/2configs/xserver/Xmodmap.nix
+++ b/tv/2configs/xserver/Xmodmap.nix
@@ -1,6 +1,6 @@
{ config, pkgs, ... }:
-with import <stockholm/lib>;
+with import ./lib;
pkgs.writeText "Xmodmap" ''
!keycode 66 = Caps_Lock
diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix
index 8bedb0e81..f534b557e 100644
--- a/tv/2configs/xserver/default.nix
+++ b/tv/2configs/xserver/default.nix
@@ -1,6 +1,5 @@
-{ config, pkgs, ... }@args:
-with import <stockholm/lib>;
-let
+with import ./lib;
+{ config, pkgs, ... }@args: let
cfg = {
cacheDir = cfg.dataDir;
configDir = "/var/empty";
diff --git a/tv/2configs/xserver/lib b/tv/2configs/xserver/lib
new file mode 120000
index 000000000..dc598c56d
--- /dev/null
+++ b/tv/2configs/xserver/lib
@@ -0,0 +1 @@
+../lib \ No newline at end of file
diff --git a/tv/2configs/xserver/sxiv.nix b/tv/2configs/xserver/sxiv.nix
index 10e450da4..eb862f887 100644
--- a/tv/2configs/xserver/sxiv.nix
+++ b/tv/2configs/xserver/sxiv.nix
@@ -1,4 +1,4 @@
-with import <stockholm/lib>;
+with import ./lib;
{ config, pkgs, ... }: let
cfg.user = config.krebs.build.user;
in {
diff --git a/tv/2configs/xserver/urxvt.nix b/tv/2configs/xserver/urxvt.nix
index 2d504e165..3502c6356 100644
--- a/tv/2configs/xserver/urxvt.nix
+++ b/tv/2configs/xserver/urxvt.nix
@@ -1,4 +1,4 @@
-with import <stockholm/lib>;
+with import ./lib;
{ config, pkgs, ... }: let
cfg.user = config.krebs.build.user;
in {
diff --git a/tv/2configs/xserver/xserver.conf.nix b/tv/2configs/xserver/xserver.conf.nix
index 99038e5fc..3fdfebf1b 100644
--- a/tv/2configs/xserver/xserver.conf.nix
+++ b/tv/2configs/xserver/xserver.conf.nix
@@ -1,6 +1,5 @@
-{ config, lib, pkgs, ... }:
-
-with import <stockholm/lib>;
+with import ./lib;
+{ config, pkgs, ... }:
let
cfg = config.services.xserver;