summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2021-07-29 13:27:27 +0200
committertv <tv@krebsco.de>2021-07-29 13:27:27 +0200
commitdfc3a69a141927a2ef9a13129496d1a84de8efeb (patch)
tree54e24720d18bfccbb638e10ab8076a5b9763addf
parent34c7d727afd14a82330dd6e53dee3591f01a5462 (diff)
parent1380200b30f2fd1dfce55a2ba28dc256fef951c6 (diff)
Merge remote-tracking branch 'prism/master'
-rw-r--r--krebs/3modules/krebs/default.nix1
-rw-r--r--krebs/5pkgs/simple/rss-bridge/default.nix6
-rw-r--r--krebs/nixpkgs-unstable.json8
-rw-r--r--krebs/nixpkgs.json8
-rw-r--r--lass/2configs/IM.nix54
-rw-r--r--lass/2configs/baseX.nix27
-rw-r--r--lass/2configs/radio.nix15
-rw-r--r--lass/2configs/xmonad.nix (renamed from lass/5pkgs/custom/xmonad-lass/default.nix)48
8 files changed, 92 insertions, 75 deletions
diff --git a/krebs/3modules/krebs/default.nix b/krebs/3modules/krebs/default.nix
index 37b939358..c05409fe9 100644
--- a/krebs/3modules/krebs/default.nix
+++ b/krebs/3modules/krebs/default.nix
@@ -70,6 +70,7 @@ in {
ip4.addr = "10.243.77.3";
aliases = [
"hotdog.r"
+ "agenda.r"
"build.r"
"build.hotdog.r"
"cgit.hotdog.r"
diff --git a/krebs/5pkgs/simple/rss-bridge/default.nix b/krebs/5pkgs/simple/rss-bridge/default.nix
index bbe5c1bdb..e0a927a1a 100644
--- a/krebs/5pkgs/simple/rss-bridge/default.nix
+++ b/krebs/5pkgs/simple/rss-bridge/default.nix
@@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "rss-bridge";
- version = "unstable-2021-01-10";
+ version = "unstable-2021-04-20";
src = fetchFromGitHub {
owner = "RSS-Bridge";
repo = "rss-bridge";
- rev = "98352845a14b9f2eb8925ad7a04a5f6cc6a5af06";
- sha256 = "1nv1f6f17cn057k9mydd3a0bmj2xa5k410fdq7nhw5b7msyxy2qv";
+ rev = "716f5ddc0e20c10cb77ded46380cc376913a92fd";
+ sha256 = "17aqmj7rz0ysk8nj4kbjvnsjdm47d0xsypfygzzk2vagxfz5w3p8";
};
patchPhase = ''
diff --git a/krebs/nixpkgs-unstable.json b/krebs/nixpkgs-unstable.json
index aaf66e428..967f0b426 100644
--- a/krebs/nixpkgs-unstable.json
+++ b/krebs/nixpkgs-unstable.json
@@ -1,9 +1,9 @@
{
"url": "https://github.com/NixOS/nixpkgs",
- "rev": "fbfb79400a08bf754e32b4d4fc3f7d8f8055cf94",
- "date": "2021-06-06T04:54:09-03:00",
- "path": "/nix/store/51dsmanfc179xy70kn2rl0qvg45cn6qr-nixpkgs",
- "sha256": "0pgyx1l1gj33g5i9kwjar7dc3sal2g14mhfljcajj8bqzzrbc3za",
+ "rev": "dd14e5d78e90a2ccd6007e569820de9b4861a6c2",
+ "date": "2021-07-24T08:14:16-04:00",
+ "path": "/nix/store/0z5nrrjzmjcicjhhdrqb9vgm56zxysk3-nixpkgs",
+ "sha256": "1zmhwx1qqgl1wrrb9mjkck508887rldrnragvximhd7jrh1ya3fb",
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false
diff --git a/krebs/nixpkgs.json b/krebs/nixpkgs.json
index 37cee6584..5086b8af3 100644
--- a/krebs/nixpkgs.json
+++ b/krebs/nixpkgs.json
@@ -1,9 +1,9 @@
{
"url": "https://github.com/NixOS/nixpkgs",
- "rev": "bad3ccd099ebe9a8aa017bda8500ab02787d90aa",
- "date": "2021-06-17T20:20:32+00:00",
- "path": "/nix/store/2m29isga2dff5x2dzyyr3dql9jpwf5kk-nixpkgs",
- "sha256": "07ik6rcfpcvj2zch3mzkxwxjs817iysbvsydkm85f14kn7gnyzp5",
+ "rev": "91903ceb294dbe63a696759bfba3d23ee667f2dc",
+ "date": "2021-07-26T09:21:28+02:00",
+ "path": "/nix/store/2v649741xdh1crybi2dm879bl60zrkhf-nixpkgs",
+ "sha256": "1hmpwi27r4q0lnspg7ylfzxakwz2fhl3r07vjvq5yalcdqwiain3",
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false
diff --git a/lass/2configs/IM.nix b/lass/2configs/IM.nix
index b79af3b49..5108f6bc1 100644
--- a/lass/2configs/IM.nix
+++ b/lass/2configs/IM.nix
@@ -1,29 +1,37 @@
with (import <stockholm/lib>);
-{ config, lib, pkgs, ... }:
+{ config, lib, pkgs, ... }: let
+ weechat = pkgs.weechat.override {
+ configure = { availablePlugins, ... }: with pkgs.weechatScripts; {
+ plugins = lib.attrValues (availablePlugins // {
+ python = availablePlugins.python.withPackages (_: [ weechat-matrix ]);
+ });
+ scripts = [ weechat-matrix ];
+ };
+ };
-{
- imports = [
- ./bitlbee.nix
- ];
+ tmux = pkgs.writeDashBin "tmux" ''
+ exec ${pkgs.tmux}/bin/tmux -f ${pkgs.writeText "tmux.conf" ''
+ set-option -g prefix `
+ unbind-key C-b
+ bind ` send-prefix
- systemd.services.chat = let
- tmux = pkgs.writeDash "tmux" ''
- exec ${pkgs.tmux}/bin/tmux -f ${pkgs.writeText "tmux.conf" ''
- set-option -g prefix `
- unbind-key C-b
- bind ` send-prefix
+ set-option -g status off
+ set-option -g default-terminal screen-256color
- set-option -g status off
- set-option -g default-terminal screen-256color
+ #use session instead of windows
+ bind-key c new-session
+ bind-key p switch-client -p
+ bind-key n switch-client -n
+ bind-key C-s switch-client -l
+ ''} "$@"
+ '';
- #use session instead of windows
- bind-key c new-session
- bind-key p switch-client -p
- bind-key n switch-client -n
- bind-key C-s switch-client -l
- ''} "$@"
- '';
- in {
+in {
+ imports = [
+ ./bitlbee.nix
+ ];
+ environment.systemPackages = [ tmux ];
+ systemd.services.chat = {
description = "chat environment setup";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
@@ -38,8 +46,8 @@ with (import <stockholm/lib>);
User = "lass";
RemainAfterExit = true;
Type = "oneshot";
- ExecStart = "${tmux} -2 new-session -d -s IM ${pkgs.weechat}/bin/weechat";
- ExecStop = "${tmux} kill-session -t IM";
+ ExecStart = "${tmux}/bin/tmux -2 new-session -d -s IM ${weechat}/bin/weechat";
+ ExecStop = "${tmux}/bin/tmux kill-session -t IM"; # TODO run save in weechat
};
};
}
diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix
index e92ddbcca..655e7912f 100644
--- a/lass/2configs/baseX.nix
+++ b/lass/2configs/baseX.nix
@@ -2,7 +2,6 @@
with import <stockholm/lib>;
let
user = config.krebs.build.user;
- xmonad-lass = pkgs.callPackage <stockholm/lass/5pkgs/custom/xmonad-lass> { inherit config; };
in {
imports = [
./mpv.nix
@@ -19,6 +18,7 @@ in {
security.rtkit.enable = true;
sound.enableOSSEmulation = false;
}
+ ./xmonad.nix
{
krebs.per-user.lass.packages = [
pkgs.sshuttle
@@ -120,30 +120,13 @@ in {
xkbVariant = "altgr-intl";
xkbOptions = "caps:escape";
libinput.enable = true;
- displayManager.lightdm.enable = true;
- displayManager.defaultSession = "none+xmonad";
- windowManager.session = [{
- name = "xmonad";
- start = ''
+ displayManager = {
+ lightdm.enable = true;
+ defaultSession = "none+xmonad";
+ sessionCommands = ''
${pkgs.xorg.xhost}/bin/xhost +LOCAL:
- ${pkgs.systemd}/bin/systemctl --user start xmonad
- exec ${pkgs.coreutils}/bin/sleep infinity
'';
- }];
- };
-
- systemd.user.services.xmonad = {
- environment = {
- DISPLAY = ":${toString config.services.xserver.display}";
- RXVT_SOCKET = "%t/urxvtd-socket";
- XMONAD_DATA_DIR = "/tmp";
- };
- serviceConfig = {
- SyslogIdentifier = "xmonad";
- ExecStart = "${xmonad-lass}/bin/xmonad";
- ExecStop = "${xmonad-lass}/bin/xmonad --shutdown";
};
- restartIfChanged = false;
};
nixpkgs.config.packageOverrides = super: {
diff --git a/lass/2configs/radio.nix b/lass/2configs/radio.nix
index a474b0ebc..b1e1ed4d9 100644
--- a/lass/2configs/radio.nix
+++ b/lass/2configs/radio.nix
@@ -225,7 +225,7 @@ in {
${pkgs.mpc_cli}/bin/mpc idle player > /dev/null
${pkgs.mpc_cli}/bin/mpc current -f %file%
done | while read track; do
- listeners=$(${pkgs.iproute}/bin/ss -Hno state established 'sport = :8000' | grep '^mptcp' | wc -l)
+ listeners=$(${pkgs.iproute}/bin/ss -Hno state established 'sport = :8000' | grep '^tcp' | wc -l)
echo "$(date -Is)" "$track" | tee -a "$HISTORY_FILE"
echo "$(tail -$LIMIT "$HISTORY_FILE")" > "$HISTORY_FILE"
${set_irc_topic} "playing: $track listeners: $listeners"
@@ -347,6 +347,19 @@ in {
locations."= /recent".extraConfig = ''
alias /tmp/played;
'';
+ locations."= /current".extraConfig = ''
+ proxy_pass http://localhost:8001;
+ '';
+ locations."= /skip".extraConfig = ''
+ proxy_pass http://localhost:8001;
+ '';
+ locations."= /good".extraConfig = ''
+ proxy_pass http://localhost:8001;
+ '';
+ extraConfig = ''
+ add_header 'Access-Control-Allow-Origin' '*';
+ add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
+ '';
};
virtualHosts."lassul.us".locations."= /the_playlist".extraConfig = let
html = pkgs.writeText "index.html" ''
diff --git a/lass/5pkgs/custom/xmonad-lass/default.nix b/lass/2configs/xmonad.nix
index 3b45552b3..099900d90 100644
--- a/lass/5pkgs/custom/xmonad-lass/default.nix
+++ b/lass/2configs/xmonad.nix
@@ -1,10 +1,13 @@
-{ config, pkgs, ... }:
-pkgs.writers.writeHaskellBin "xmonad" {
- libraries = with pkgs.haskellPackages; [
- extra
- xmonad-stockholm
- ];
-} /* haskell */ ''
+{ config, lib, pkgs, ... }:
+
+{
+ services.xserver.windowManager.xmonad = {
+ enable = true;
+ extraPackages = hs: [
+ hs.extra
+ hs.xmonad-stockholm
+ ];
+ config = /* haskell */ ''
{-# LANGUAGE LambdaCase #-}
@@ -48,6 +51,7 @@ import XMonad.Prompt.Window (windowPromptGoto, windowPromptBringCopy)
import XMonad.Util.EZConfig (additionalKeysP)
import XMonad.Util.NamedWindows (getName)
import XMonad.Util.Run (safeSpawn)
+import XMonad.Util.Ungrab (unGrab)
import XMonad.Stockholm.Shutdown (newShutdownEventHandler, shutdown)
import XMonad.Stockholm.Pager (defaultWindowColors, pager, MatchMethod(MatchPrefix), PagerConfig(..))
@@ -62,7 +66,9 @@ instance UrgencyHook LibNotifyUrgencyHook where
safeSpawn "${pkgs.libnotify}/bin/notify-send" [show name, "workspace " ++ idx]
myTerm :: FilePath
-myTerm = "${pkgs.rxvt_unicode-with-plugins}/bin/urxvtc"
+-- myTerm = "${pkgs.rxvt_unicode-with-plugins}/bin/urxvtc -e /run/current-system/sw/bin/xonsh"
+-- myTerm = "${pkgs.rxvt_unicode-with-plugins}/bin/urxvtc"
+myTerm = "/run/current-system/sw/bin/alacritty"
myFont :: String
myFont = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1"
@@ -109,19 +115,19 @@ floatHooks = composeAll
myKeyMap :: [([Char], X ())]
myKeyMap =
- [ ("M4-<F11>", spawn "${config.lass.screenlock.command}")
- , ("M4-C-p", spawn "${pkgs.scrot}/bin/scrot ~/public_html/scrot.png")
- , ("M4-p", spawn "${pkgs.pass}/bin/passmenu --type")
- , ("M4-S-p", spawn "${pkgs.otpmenu}/bin/otpmenu")
- , ("M4-o", spawn "${pkgs.brain}/bin/brainmenu --type")
- , ("M4-z", spawn "${pkgs.emot-menu}/bin/emoticons")
+ [ ("M4-C-p", forkFile "${pkgs.scrot}/bin/scrot" [ "~/public_html/scrot.png" ] Nothing )
+ , ("M4-p", forkFile "${pkgs.pass}/bin/passmenu" [ "--type" ] Nothing)
+ , ("M4-S-p", forkFile "${pkgs.otpmenu}/bin/otpmenu" [] Nothing)
+ , ("M4-o", forkFile "${pkgs.brain}/bin/brainmenu --type" [] Nothing)
+ , ("M4-z", forkFile "${pkgs.emot-menu}/bin/emoticons" [] Nothing)
+
+ , ("M4-S-q", restart "xmonad" True)
, ("<XF86AudioMute>", spawn "${pkgs.pulseaudioLight.out}/bin/pactl -- set-sink-mute @DEFAULT_SINK@ toggle")
, ("<XF86AudioRaiseVolume>", spawn "${pkgs.pulseaudioLight.out}/bin/pactl -- set-sink-volume @DEFAULT_SINK@ +4%")
, ("<XF86AudioLowerVolume>", spawn "${pkgs.pulseaudioLight.out}/bin/pactl -- set-sink-volume @DEFAULT_SINK@ -4%")
, ("<XF86MonBrightnessDown>", spawn "${pkgs.acpilight}/bin/xbacklight -time 0 -dec 1")
, ("<XF86MonBrightnessUp>", spawn "${pkgs.acpilight}/bin/xbacklight -time 0 -inc 1")
- , ("<XF86Launch1>", gridselectWorkspace gridConfig W.view)
, ("M4-C-k", spawn "${pkgs.xorg.xkill}/bin/xkill")
, ("M4-<Tab>", focusDown)
@@ -137,7 +143,8 @@ myKeyMap =
, ("M4-<Esc>", toggleWS)
, ("M4-S-<Enter>", spawn myTerm)
, ("M4-x", floatNext True >> spawn myTerm)
- , ("M4-c", floatNext True >> spawn "${pkgs.termite}/bin/termite")
+ , ("M4-c", spawn "/run/current-system/sw/bin/emacsclient -c")
+ -- , ("M4-c", unGrab)
, ("M4-f", floatNext True)
, ("M4-b", spawn "/run/current-system/sw/bin/klem")
@@ -171,6 +178,9 @@ myKeyMap =
, ("M4-<F9>", spawn "${pkgs.redshift}/bin/redshift -O 4000 -g 0.9:0.8:0.8")
, ("M4-<F10>", spawn "${pkgs.redshift}/bin/redshift -x")
+ , ("M4-<F11>", spawn "${config.lass.screenlock.command}")
+ , ("M4-<F12>", spawn "${pkgs.systemd}/bin/systemctl suspend -i")
+
, ("M4-u", spawn "${pkgs.xcalib}/bin/xcalib -invert -alter")
, ("M4-s", spawn "${pkgs.knav}/bin/knav")
@@ -183,7 +193,7 @@ myKeyMap =
forkFile :: FilePath -> [String] -> Maybe [(String, String)] -> X ()
forkFile path args env =
- xfork (executeFile path False args env) >> return ()
+ xfork (executeFile path True args env) >> return ()
myXPConfig :: XPConfig
myXPConfig = def
@@ -227,4 +237,6 @@ gridConfig = def
allWorkspaceNames :: W.StackSet i l a sid sd -> X [i]
allWorkspaceNames ws =
return $ map W.tag (W.hidden ws ++ (map W.workspace $ W.visible ws)) ++ [W.tag $ W.workspace $ W.current ws]
-''
+ '';
+ };
+}