stuff slowly being added

This commit is contained in:
Anish L 2021-11-29 22:11:58 +10:00
parent f8edbfe092
commit 1bfe819a90
9 changed files with 118 additions and 18 deletions

View file

@ -130,7 +130,7 @@
base = [ core users.root nvim users.anish ]; # TODO make anish non gui
sealight = [ base ]; # matrix rsshub backup wireguard website
mossnet = [ base ]; # shaarli wallabag nextcloud taskwarrior headphones
graphical = [ base users.profiles.firefox users.profiles.desktop bluetooth ];
graphical = [ base users.profiles.firefox users.profiles.desktop bluetooth music sync];
curve = [ graphical ];
};
};

View file

@ -7,6 +7,7 @@
#profiles.users.profiles.desktop
profiles.users.profiles.email
profiles.users.profiles.cal
profiles.wireguard
profiles.mossnet-hosts
] ++ suites.curve;
@ -15,4 +16,23 @@
};
#bud.enable = true;
# enable adb
# TODO move this (it's for KaiOS WebIDE devShell?)
programs.adb.enable = true;
virtualisation.docker.enable = true; # temp for KaiOS hack
services.udev.extraRules = ''
# Qualcomm EDL
SUBSYSTEMS=="usb", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="9008", MODE="0666", GROUP="plugdev"
# Qualcomm Memory Debug
SUBSYSTEMS=="usb", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="9006", MODE="0666", GROUP="plugdev"
'';
boot.blacklistedKernelModules = [ "qcserial" ];
users.users.anish.extraGroups = ["adbusers" "docker" "plugdev"];
# enable wireguard tunnel
# privKey = "/run/secrets/curve-wg"; -> local config
# publicKey = "..."; -> shipped to server config
# IP = "10.0.69.2"; -> shipped to both configs
}

View file

@ -1,20 +1,28 @@
{ pkgs, ... }:
{ pkgs, lib, ... }:
{
environment.systemPackages = with pkgs; [
qjackctl
helm
surge
distrho
orca-c
carla
supercollider
dirt
#calf
sunvox
vcv-rack
reaper
renoise
lmms
#bespoke-synth
#ardour
#reaper
#renoise
helio-workstation
projectm # milkdrop visualizer
]
];
hardware.pulseaudio.enable = lib.mkForce false;
hardware.pulseaudio.enable = lib.mkForce false;
security.rtkit.enable = true;
services.pipewire = {
@ -22,20 +30,21 @@
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
config = {
pipewire."context.properties"."default.clock.rate" = "192000";
pipewire."context.properties"."default.clock.rate" = "48000";
pipewire-pulse."stream.properties"."resample.quality" = 15;
client."stream.properties"."resample.quality" = 15;
client-rt."stream.properties"."resample.quality" = 15;
};
media-session.config.bluez-monitor.properties = {
"bluez5.headset-roles" = [ "hsp_hs" "hsp_ag" ];
"bluez5.codecs" = [ "aac" "ldac" "aptx_hd" ];
};
#media-session.config.bluez-monitor.properties = {
# "bluez5.headset-roles" = [ "hsp_hs" "hsp_ag" ];
# "bluez5.codecs" = [ "aac" "ldac" "aptx_hd" ];
#};
};
systemd.services.bluethoot.serviceConfig.ExecStart = [
""
"${config.hardware.bluetooth.package}/libexec/bluetooth/bluetoothd --noplugin=sap"
];
#systemd.services.bluethoot.serviceConfig.ExecStart = [
# ""
# "${config.hardware.bluetooth.package}/libexec/bluetooth/bluetoothd --noplugin=sap"
#];
}

20
profiles/sync/default.nix Normal file
View file

@ -0,0 +1,20 @@
{pkgs, ...}:
{
systemd.services.kitaab-sync = {
serviceConfig.Type = "oneshot";
path = [
pkgs.git
];
script = ''
cd /home/anish/vimwiki/
git commit -am "syncing curve"
git push
'';
};
systemd.timers.kitaab-timer = {
wantedBy = [ "timers.target" ];
partOf = [ "kitaab-sync.service" ];
timerConfig.OnCalendar = [ "*-*-* *:00:00" ];
};
}

View file

@ -0,0 +1,30 @@
{ config, pkgs, lib, ... }:
{
# services.tailscale.enable = true;
networking.firewall.allowedUDPPorts = [ 60990 ];
age.secrets.curve-wg.file = "/etc/nixos/secrets/curve-wg.age";
age.secrets.curve-wg.owner = "anish";
networking.wireguard.interfaces = {
# TODO need some kind of module here to configure curve & box from hosts or something
wg0 = {
ips = [ "10.0.69.2/24" ];
listenPort = 60990; # to match firewall allowedUDPPorts (without this wg uses random port numbers)
privateKeyFile = "/run/secrets/curve-wg";
peers = [
# For a client configuration, one peer entry for the server will suffice.
{
publicKey = "c1J4p63rD3IlszugMZiki7UBV3YmDdqa3DU4UejXzAI=";
allowedIPs = [ "10.0.69.0/24" ];
# Set this to the server IP and port.
endpoint = "sealight.xyz:60990"; # ToDo: route to endpoint not automatically configured https://wiki.archlinux.org/index.php/WireGuard#Loop_routing https://discourse.nixos.org/t/solved-minimal-firewall-setup-for-wireguard-client/7577
# Send keepalives every 25 seconds. Important to keep NAT tables alive.
persistentKeepalive = 25;
}
];
};
};
}

10
secrets/curve-wg.age Normal file
View file

@ -0,0 +1,10 @@
age-encryption.org/v1
-> ssh-ed25519 E8y8hg ajjA98JsX1JBHd/6pPoTLCrMdkmgnviOZFTWUMtKfzk
+ekDAlEfkZ9G6oYfek6kBu0z1jbfQDQfH2ukwk4pvNU
-> ssh-ed25519 AiezdQ sZNx8/7RVk9XLvwxrbxjYb3q6uB8ny/DxktST7HMQSk
EdEXGSPGJ9j52llednOb8ViK3a+C+ru1weF7wOL3Lzk
-> B~GRUs-grease v) >0EI 7cA9 m&8
iYaE+kBtuRHNi7zc9xtWYnNs6ThyHNvSPYnY1SYsugftuao1wkXyFvRrd8wubj1k
Y4e50A
--- GAVr4RrSEgBxdamubXJNhRPXOeXccN7Nw5GqGLPwdWI
7Ž“x»¬â•¥$Š¹ú-¢*û^µ;§°<C2A7>~´é ÐNŠ{úXá=ZªÙ¦}¯Fð¯Û¼µñ󖼇Åó<C3B3>fÞ•ˆÇ<7F>c

View file

@ -8,6 +8,7 @@ in
{
"fastmail.age".publicKeys = allKeys;
"mossnet.age".publicKeys = allKeys;
"nextcloud-db.age".publicKeys = mossnet;
"nextcloud-admin.age".publicKeys = mossnet;
"curve-wg.age".publicKeys = allKeys;
#"nextcloud-db.age".publicKeys = mossnet;
#"nextcloud-admin.age".publicKeys = mossnet;
}

View file

@ -1,4 +1,4 @@
{ pkgs, config, ... }:
{ pkgs, config, lib, ... }:
{
# TODO modularize
@ -16,10 +16,18 @@
"\${XDG_BIN_HOME}"
];
};
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"ripcord"
"vcv-rack"
];
environment.systemPackages = with pkgs; [
# TODO move somewhere meaningful
tdesktop # TODO get rid of this once bridged on sealight
ripcord
sublime-music
calibre
nheko
newsflash
zeal

View file

@ -3,3 +3,5 @@ font_family Hermit
bold_font auto
italic_font auto
bold_italic_font auto
open_url_with default
mouse_map left click ungrabbed mouse_click_url_or_select