nixdirfmt

This commit is contained in:
kat witch 2021-03-16 18:42:10 +00:00
parent f39ede8001
commit a7eb2e7a6f
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
8 changed files with 59 additions and 46 deletions

View file

@ -25,10 +25,13 @@
networking.useDHCP = false;
networking.interfaces.enp34s0.useDHCP = true;
networking.firewall.allowPing = true;
networking.firewall.allowedTCPPorts = [ 80 445 139 9091 5000 32101 ]; # smb transmission mkchromecast
networking.firewall.allowedTCPPorts =
[ 80 445 139 9091 5000 32101 ]; # smb transmission mkchromecast
networking.firewall.allowedUDPPorts = [ 137 138 4010 ]; # smb scream
networking.firewall.allowedUDPPortRanges = [
{ from = 32768; to = 60999; } # dnla
networking.firewall.allowedUDPPortRanges = [{
from = 32768;
to = 60999;
} # dnla
];
services.avahi.enable = true;

View file

@ -27,7 +27,8 @@
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 = " $6%a$9 $8-$9 $5%b$9 $R $7%n:$8 $8%t$9 ($4%l$9) ";
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";
@ -35,6 +36,8 @@
statusbar_visibility = "no";
now_playing_suffix = "$/b";
progressbar_look = " ";
media_library_primary_tag = "album_artist";
search_engine_display_mode = "columns";
};
};
programs.beets = {
@ -56,6 +59,8 @@
network.startWhenNeeded = true;
musicDirectory = "/home/kat/media-share/music";
extraConfig = ''
max_output_buffer_size "32768"
audio_output {
type "fifo"
name "my_fifo"
@ -66,7 +71,7 @@
audio_output {
type "pulse"
name "speaker"
}
audio_output {

View file

@ -75,9 +75,7 @@
command = "systemctl --user restart mako";
always = true;
}
{
command = "mkchromecast -t";
}
{ command = "mkchromecast -t"; }
{
command =
"${pkgs.swayidle}/bin/swayidle -w before-sleep '${lockCommand}'";

View file

@ -2,11 +2,14 @@
with pkgs.lib;
(mapAttrs (name: hosts:
''
(mapAttrs (name: hosts: ''
#!${pkgs.runtimeShell}
export PATH=
nix build --no-link ${concatMapStringsSep " " (host: builtins.unsafeDiscardStringContext host.config.system.build.toplevel.drvPath) hosts}
nix build --no-link ${
concatMapStringsSep " " (host:
builtins.unsafeDiscardStringContext
host.config.system.build.toplevel.drvPath) hosts
}
${concatMapStrings (host: ''
echo "deploying ${host.config.networking.hostName}..."
${host.config.system.build.deployScript} $1 &

View file

@ -6,7 +6,9 @@ let
cfg = config.deploy;
secretsScript = concatMapStrings (file:
''
ssh $NIX_SSHOPTS root@${cfg.ssh.host} "mkdir -p ${toString file.out.dir}
ssh $NIX_SSHOPTS -T root@${cfg.ssh.host} "mkdir -p ${
toString file.out.dir
}
cat > ${file.path}
chmod ${file.mode} ${file.path}
chown ${file.owner}:${file.group} ${file.path}"''
@ -57,8 +59,10 @@ in {
#!${pkgs.runtimeShell}
set -xeo pipefail
export PATH=${with pkgs; lib.makeBinPath [ coreutils openssh nix ]}
export NIX_SSHOPTS="$NIX_SSHOPTS -p${toString cfg.ssh.port} -T"
nix build ${ builtins.unsafeDiscardStringContext config.system.build.toplevel.drvPath} -o result-${config.networking.hostName}
export NIX_SSHOPTS="$NIX_SSHOPTS -p${toString cfg.ssh.port}"
nix build ${
builtins.unsafeDiscardStringContext config.system.build.toplevel.drvPath
} -o result-${config.networking.hostName}
nix copy ${
if cfg.substitute then "-s" else ""
} --no-check-sigs --to ssh://root@${cfg.ssh.host} ${config.system.build.toplevel}