refactor: restructure project to remove profiles, users, ...

This commit is contained in:
Kat Inskip 2022-07-10 12:59:40 -07:00
parent cb3ae5f434
commit 53655a05fc
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
177 changed files with 544 additions and 2877 deletions

View file

@ -0,0 +1,18 @@
{ config, pkgs, lib, ... }:
{
programs.beets = {
enable = true;
package = pkgs.beets;
settings = {
directory = "~/media-share/music";
library = "~/.local/share/beets.db";
plugins = lib.concatStringsSep " " [
"mpdstats"
"mpdupdate"
"duplicates"
"chroma"
];
};
};
}

View file

@ -0,0 +1,9 @@
{ ... }:
{
imports = [
./mpd.nix
./beets.nix
./ncmpcpp.nix
];
}

46
home/services/mpd/mpd.nix Normal file
View file

@ -0,0 +1,46 @@
{ config, pkgs, ... }:
{
network.firewall = {
public.tcp.ports = [ 6600 32101 ];
private.tcp.ports = [ 6600 32101 ];
};
services.mpd = {
enable = true;
package = pkgs.mpd-youtube-dl;
network = {
startWhenNeeded = true;
listenAddress = "[::]";
};
musicDirectory = "/home/kat/media-share/music";
extraConfig = ''
max_output_buffer_size "32768"
audio_output {
type "fifo"
name "my_fifo"
path "/tmp/mpd.fifo"
format "44100:16:2"
}
audio_output {
type "pulse"
name "speaker"
}
audio_output {
bind_to_address "[::]"
type "httpd"
name "httpd-high"
encoder "opus"
bitrate "96000"
port "32101"
max_clients "4"
format "48000:16:2"
always_on "yes"
tags "yes"
}
'';
};
}

View file

@ -0,0 +1,53 @@
{ config, pkgs, ... }:
{
programs.ncmpcpp = {
enable = true;
mpdMusicDir = "/home/kat/media-share/music";
package = pkgs.ncmpcpp-kat;
settings = {
visualizer_data_source = "/tmp/mpd.fifo";
visualizer_output_name = "my_fifo";
visualizer_in_stereo = "yes";
visualizer_type = "spectrum";
visualizer_look = "+|";
user_interface = "alternative";
colors_enabled = "yes";
discard_colors_if_item_is_selected = "no";
header_window_color = "250";
volume_color = "250";
state_line_color = "cyan";
state_flags_color = "cyan";
alternative_ui_separator_color = "yellow";
statusbar_color = "yellow";
progressbar_color = "black";
progressbar_elapsed_color = "blue";
window_border_color = "yellow";
playlist_display_mode = "classic";
song_columns_list_format =
"(3f)[cyan]{n} (40)[default]{t|f} (25)[red]{a} (30)[blue]{b} (4f)[cyan]{l}";
now_playing_prefix = "$b";
song_list_format =
" $7%n$9 $8-$9 $6%a$9 $8-$9 $5%b$9 $R $8%t$9 ($4%l$9) ";
song_library_format = "{%n > }{%t}|{%f}";
song_status_format = "{%a - }{%t - }{%b}";
titles_visibility = "no";
header_visibility = "no";
statusbar_visibility = "no";
now_playing_suffix = "$/b";
progressbar_look = " ";
media_library_primary_tag = "album_artist";
search_engine_display_mode = "columns";
};
bindings = [
{
key = "+";
command = "add";
}
{
key = "-";
command = "load";
}
];
};
}

89
home/services/weechat.nix Normal file
View file

@ -0,0 +1,89 @@
{ config, lib, nixos, pkgs, tf, ... }:
{
kw.secrets.variables = {
matrix-pass = {
path = "social/matrix";
field = "password";
};
znc-pass = {
path = "social/irc/znc";
field = "password";
};
};
secrets.files.weechat-sec = {
text = ''
#
# weechat -- sec.conf
#
# WARNING: It is NOT recommended to edit this file by hand,
# especially if WeeChat is running.
#
# Use /set or similar command to change settings in WeeChat.
#
# For more info, see: https://weechat.org/doc/quickstart
#
[crypt]
cipher = aes256
hash_algo = sha512
salt = off
[data]
__passphrase__ = off
znc = "${tf.variables.znc-pass.ref}"
matrix = "${tf.variables.matrix-pass.ref}"
'';
owner = "kat";
group = "users";
};
home.file = {
".local/share/weechat/sec.conf".source = config.lib.file.mkOutOfStoreSymlink config.secrets.files.weechat-sec.path;
};
services.weechat.enable = true;
programs.weechat = {
enable = true;
scripts = with pkgs.weechatScripts; [
weechat-notify-send
];
config = {
irc = {
server = {
softnet = {
addresses = "znc.kittywit.ch/5001";
password = "kat@${nixos.networking.hostName}/softnet:\${sec.data.znc}";
ssl = true;
ssl_verify = false;
autoconnect = true;
};
liberachat = {
addresses = "znc.kittywit.ch/5001";
password = "kat@${nixos.networking.hostName}/liberachat:\${sec.data.znc}";
ssl = true;
ssl_verify = false;
autoconnect = true;
};
espernet = {
addresses = "znc.kittywit.ch/5001";
password = "kat@${nixos.networking.hostName}/espernet:\${sec.data.znc}";
ssl = true;
ssl_verify = false;
autoconnect = true;
};
};
};
matrix = {
server.kittywitch = {
address = "kittywit.ch";
device_name = "${nixos.networking.hostName}/weechat";
username = "kat";
password = "\${sec.data.matrix}";
};
};
};
};
}