summaryrefslogtreecommitdiffstats
path: root/lass
diff options
context:
space:
mode:
Diffstat (limited to 'lass')
-rw-r--r--lass/1systems/radio/source.nix6
-rw-r--r--lass/2configs/baseX.nix65
-rw-r--r--lass/2configs/fetchWallpaper.nix2
-rw-r--r--lass/2configs/fonts.nix14
-rw-r--r--lass/2configs/mail.nix12
-rw-r--r--lass/2configs/pipewire.nix19
-rw-r--r--lass/2configs/realwallpaper.nix3
-rw-r--r--lass/2configs/services/radio/default.nix2
-rw-r--r--lass/2configs/services/radio/news.nix29
-rw-r--r--lass/2configs/themes.nix13
-rw-r--r--lass/2configs/weron/client.nix20
-rw-r--r--lass/2configs/weron/signaler.nix13
-rw-r--r--lass/2configs/xmonad.nix2
13 files changed, 110 insertions, 90 deletions
diff --git a/lass/1systems/radio/source.nix b/lass/1systems/radio/source.nix
new file mode 100644
index 000000000..4acdb0c26
--- /dev/null
+++ b/lass/1systems/radio/source.nix
@@ -0,0 +1,6 @@
+{ lib, pkgs, test, ... }: let
+ npkgs = lib.importJSON ../../../krebs/nixpkgs-unstable.json;
+in if test then {} else {
+ nixpkgs.git.ref = lib.mkForce npkgs.rev;
+ nixpkgs-unstable = lib.mkForce { file = "/var/empty"; };
+}
diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix
index 79777429a..bb01d3dcd 100644
--- a/lass/2configs/baseX.nix
+++ b/lass/2configs/baseX.nix
@@ -14,6 +14,7 @@ in {
./tmux.nix
./xmonad.nix
./themes.nix
+ ./fonts.nix
{
users.users.mainUser.packages = [
pkgs.sshuttle
@@ -26,15 +27,15 @@ in {
options.lass.fonts = {
regular = mkOption {
type = types.str;
- default = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1";
+ default = "xft:Iosevka Term SS15:style=regular";
};
bold = mkOption {
type = types.str;
- default = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1";
+ default = "xft:Iosevka Term SS15:style=bold";
};
italic = mkOption {
type = types.str;
- default = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1";
+ default = "xft:Iosevka Term SS15:style=italic";
};
};
config.krebs.xresources.resources.X = ''
@@ -98,64 +99,8 @@ in {
${pkgs.flameshot}/bin/flameshot gui
${pkgs.klem}/bin/klem
'')
- ];
-
- fonts = {
- fontDir.enable = true;
- enableGhostscriptFonts = true;
-
- fonts = with pkgs; [
- xorg.fontschumachermisc
- inconsolata
- noto-fonts
- (iosevka.override {
- # https://typeof.net/Iosevka/customizer
- privateBuildPlan = {
- family = "Iosevka";
- spacing = "term";
- serifs = "slab";
- no-ligation = true;
-
- variants.design = {
- capital-j = "serifless";
- a = "double-storey-tailed";
- b = "toothless-corner";
- d = "toothless-corner-serifless";
- f = "flat-hook-tailed";
- g = "earless-corner";
- i = "hooky";
- j = "serifless";
- l = "tailed";
- m = "earless-corner-double-arch";
- n = "earless-corner-straight";
- p = "earless-corner";
- q = "earless-corner";
- r = "earless-corner";
- u = "toothless-rounded";
- y = "cursive-flat-hook";
-
- one = "no-base-long-top-serif";
- two = "straight-neck";
- three = "flat-top";
- four = "open";
- six = "open-contour";
- seven = "straight-serifless";
- eight = "two-circles";
- nine = "open-contour";
- tilde = "low";
- asterisk = "hex-low";
- number-sign = "upright";
- at = "short";
- dollar = "open";
- percent = "dots";
- question = "corner-flat-hooked";
- };
- };
- set = "kookiefonts";
- })
- ];
- };
+ ];
services.udev.extraRules = ''
SUBSYSTEM=="backlight", ACTION=="add", \
diff --git a/lass/2configs/fetchWallpaper.nix b/lass/2configs/fetchWallpaper.nix
index 381df494d..781dad032 100644
--- a/lass/2configs/fetchWallpaper.nix
+++ b/lass/2configs/fetchWallpaper.nix
@@ -5,7 +5,7 @@ let
in {
krebs.fetchWallpaper = {
enable = true;
- url = "prism/realwallpaper-krebs-stars-berlin.png";
+ url = "http://wallpaper.r/realwallpaper-krebs-stars-berlin.png";
};
}
diff --git a/lass/2configs/fonts.nix b/lass/2configs/fonts.nix
new file mode 100644
index 000000000..3d047e513
--- /dev/null
+++ b/lass/2configs/fonts.nix
@@ -0,0 +1,14 @@
+{ config, lib, pkgs, ... }:
+{
+ fonts = {
+ fontDir.enable = true;
+ enableGhostscriptFonts = true;
+
+ fonts = with pkgs; [
+ xorg.fontschumachermisc
+ inconsolata
+ noto-fonts
+ (iosevka-bin.override { variant = "ss15"; })
+ ];
+ };
+}
diff --git a/lass/2configs/mail.nix b/lass/2configs/mail.nix
index 0adef8f8c..bf8904b89 100644
--- a/lass/2configs/mail.nix
+++ b/lass/2configs/mail.nix
@@ -124,15 +124,6 @@ let
'';
muttrc = pkgs.writeText "muttrc" ''
- # gpg
- source ${pkgs.neomutt}/share/doc/neomutt/samples/gpg.rc
- set pgp_use_gpg_agent = yes
- set pgp_sign_as = 0xDC2A43EF4F11E854B44D599A89E82952976A7E4D
- set crypt_autosign = no
- set crypt_replyencrypt = yes
- set crypt_verify_sig = yes
- set pgp_verify_command = "gpg --no-verbose --batch --output - --verify %s %f"
-
# read html mails
auto_view text/html
@@ -187,8 +178,7 @@ let
until ${pkgs.muchsync}/bin/muchsync -F lass@green.r; do
sleep 1
done
- ''}<enter> \
- 'run muchsync to green.r'
+ ''}<enter>
#killed
bind index d noop
diff --git a/lass/2configs/pipewire.nix b/lass/2configs/pipewire.nix
index ec5a67b6e..da9408669 100644
--- a/lass/2configs/pipewire.nix
+++ b/lass/2configs/pipewire.nix
@@ -22,15 +22,14 @@
pulse.enable = true;
jack.enable = true;
};
-
- systemd.services.wireplumber = {
- environment = {
- HOME = "/var/lib/wireplumber";
- DISPLAY = ":0";
- };
- path = [
- pkgs.dbus
- ];
- serviceConfig.StateDirectory = "wireplumber";
+ environment.etc = {
+ "wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
+ bluez_monitor.properties = {
+ ["bluez5.enable-sbc-xq"] = true,
+ ["bluez5.enable-msbc"] = true,
+ ["bluez5.enable-hw-volume"] = true,
+ ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
+ }
+ '';
};
}
diff --git a/lass/2configs/realwallpaper.nix b/lass/2configs/realwallpaper.nix
index a82e1d010..d81642da1 100644
--- a/lass/2configs/realwallpaper.nix
+++ b/lass/2configs/realwallpaper.nix
@@ -19,8 +19,7 @@ in {
}
'';
serverAliases = [
- hostname
- "${hostname}.r"
+ "wallpaper.r"
];
locations."/realwallpaper/".extraConfig = ''
index on;
diff --git a/lass/2configs/services/radio/default.nix b/lass/2configs/services/radio/default.nix
index a511196fd..16ef31b6f 100644
--- a/lass/2configs/services/radio/default.nix
+++ b/lass/2configs/services/radio/default.nix
@@ -82,7 +82,7 @@ in {
users.users = {
"${name}" = rec {
inherit name;
- createHome = lib.mkForce false;
+ createHome = true;
group = name;
uid = pkgs.stockholm.lib.genid_uint31 name;
description = "radio manager";
diff --git a/lass/2configs/services/radio/news.nix b/lass/2configs/services/radio/news.nix
index 0dc711e6c..62f7f548c 100644
--- a/lass/2configs/services/radio/news.nix
+++ b/lass/2configs/services/radio/news.nix
@@ -1,6 +1,31 @@
{ config, lib, pkgs, ... }:
let
+ tts = pkgs.writers.writeBashBin "tts" ''
+ set -efu
+
+ offset=0
+ OUTPUT=$(mktemp -d)
+ trap 'rm -rf "$OUTPUT"' EXIT
+ SPEAKER=$[ $RANDOM % 900 ]
+ while read line; do
+ echo "$line" |
+ ${pkgs.larynx}/bin/larynx \
+ --model ${pkgs.fetchzip {
+ url = "https://github.com/rhasspy/piper/releases/download/v0.0.2/voice-en-us-libritts-high.tar.gz";
+ hash = "sha256-jCoK4p0O7BuF0nr6Sfj40tpivCvU5M3GHKQRg1tfIO8=";
+ stripRoot = false;
+ }}/en-us-libritts-high.onnx \
+ -s "$SPEAKER" \
+ -f "$OUTPUT"/"$offset".wav
+
+ ((offset+=1))
+ done
+
+ ${pkgs.sox}/bin/sox "$OUTPUT"/*.wav "$OUTPUT"/all.wav
+ cat "$OUTPUT"/all.wav
+ '';
+
send_to_radio = pkgs.writers.writeDashBin "send_to_radio" ''
${pkgs.vorbis-tools}/bin/oggenc - |
${pkgs.cyberlocker-tools}/bin/cput news.ogg
@@ -41,16 +66,16 @@ in
systemd.services.newsshow = {
path = [
newsshow
+ tts
send_to_radio
gc_news
get_current_news
- pkgs.curl
pkgs.retry
];
script = ''
set -efu
retry -t 5 -d 10 -- newsshow |
- retry -t 5 -d 10 -- curl -fSsG http://tts.r/api/tts --data-urlencode 'text@-' |
+ retry -t 5 -d 10 -- tts |
retry -t 5 -d 10 -- send_to_radio
'';
startAt = "*:00:00";
diff --git a/lass/2configs/themes.nix b/lass/2configs/themes.nix
index eb1a53987..e9f83deea 100644
--- a/lass/2configs/themes.nix
+++ b/lass/2configs/themes.nix
@@ -15,6 +15,7 @@
${pkgs.coreutils}/bin/chown lass:users /var/theme/current_theme
${pkgs.xorg.xrdb}/bin/xrdb -merge /var/theme/config/xresources
${pkgs.procps}/bin/pkill -HUP xsettingsd
+ ${pkgs.glib}/bin/gsettings set org.gnome.desktop.interface gtk-theme "$(cat /var/theme/config/gtk-theme)"
else
echo "theme $1 not found"
fi
@@ -37,17 +38,25 @@ in {
];
environment.systemPackages = [
switch-theme
+ pkgs.dracula-theme
+ pkgs.gnome3.adwaita-icon-theme
];
environment.etc = {
+ "themes/light/gtk-theme".text = ''
+ Adwaita
+ '';
"themes/light/xsettings.conf".text = ''
- Net/ThemeName "Adwaita"
+ Net/ThemeName "Adwaita"
'';
"themes/light/xresources".text = ''
*background: #ffffff
*foreground: #000000
'';
+ "themes/dark/gtk-theme".text = ''
+ Dracula
+ '';
"themes/dark/xsettings.conf".text = ''
- Net/ThemeName "Adwaita-dark"
+ Net/ThemeName "Dracula"
'';
"themes/dark/xresources".text = ''
*background: #000000
diff --git a/lass/2configs/weron/client.nix b/lass/2configs/weron/client.nix
new file mode 100644
index 000000000..55bc8a0da
--- /dev/null
+++ b/lass/2configs/weron/client.nix
@@ -0,0 +1,20 @@
+{ config, lib, pkgs, ... }:
+{
+ systemd.services.weron = {
+ wantedBy = [ "multi-user.target" ];
+ environment = {
+ WERON_RADDR = "ws://lassul.us:23420/";
+ };
+ serviceConfig = {
+ ExecStart = pkgs.writers.writeDash "weron" ''
+ ${pkgs.weron}/bin/weron vpn ip \
+ --community krebs \
+ --password aidsballs \
+ --key aidsballs \
+ --ips 10.249.1.0/24 \
+ --verbose 7 \
+ --dev weron
+ '';
+ };
+ };
+}
diff --git a/lass/2configs/weron/signaler.nix b/lass/2configs/weron/signaler.nix
new file mode 100644
index 000000000..9e817583b
--- /dev/null
+++ b/lass/2configs/weron/signaler.nix
@@ -0,0 +1,13 @@
+{ config, lib, pkgs, ... }:
+{
+ systemd.services.weron-signaler = {
+ wantedBy = [ "multi-user.target" ];
+ environment = {
+ };
+ serviceConfig = {
+ ExecStart = ''${pkgs.weron}/bin/weron signaler --verbose=7 --laddr ":23420"'';
+ };
+ };
+
+ networking.firewall.allowedTCPPorts = [ 23420 ];
+}
diff --git a/lass/2configs/xmonad.nix b/lass/2configs/xmonad.nix
index 1789725d1..e2d9cff5d 100644
--- a/lass/2configs/xmonad.nix
+++ b/lass/2configs/xmonad.nix
@@ -68,7 +68,7 @@ myTerm :: FilePath
myTerm = "/run/current-system/sw/bin/alacritty"
myFont :: String
-myFont = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1"
+myFont = "${config.lass.fonts.regular}"
main :: IO ()
main = do
[cgit] Unable to lock slot /tmp/cgit/f0200000.lock: No such file or directory (2)