mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
nixdirfmt
This commit is contained in:
parent
f39ede8001
commit
a7eb2e7a6f
8 changed files with 59 additions and 46 deletions
|
|
@ -25,11 +25,14 @@
|
|||
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;
|
||||
|
||||
system.stateVersion = "20.09";
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@
|
|||
|
||||
{
|
||||
programs.adb.enable = true;
|
||||
users.users.kat.extraGroups = ["adbusers"];
|
||||
users.users.kat.extraGroups = [ "adbusers" ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,14 +11,14 @@
|
|||
hardware.pulseaudio = {
|
||||
enable = true;
|
||||
daemon.config = {
|
||||
exit-idle-time = 5;
|
||||
resample-method = "speex-float-5";
|
||||
avoid-resampling = "true";
|
||||
flat-volumes = "no";
|
||||
default-sample-format = "s32le";
|
||||
default-sample-rate = 48000;
|
||||
alternate-sample-rate = 44100;
|
||||
default-sample-channels = 2;
|
||||
exit-idle-time = 5;
|
||||
resample-method = "speex-float-5";
|
||||
avoid-resampling = "true";
|
||||
flat-volumes = "no";
|
||||
default-sample-format = "s32le";
|
||||
default-sample-rate = 48000;
|
||||
alternate-sample-rate = 44100;
|
||||
default-sample-channels = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
coc-git
|
||||
vim-fugitive
|
||||
vim-startify
|
||||
base16-vim
|
||||
base16-vim
|
||||
];
|
||||
#extraPackages = with pkgs;
|
||||
# [ (python3.withPackages (ps: with ps; [ black flake8 ])) ];
|
||||
|
|
|
|||
|
|
@ -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}'";
|
||||
|
|
|
|||
|
|
@ -2,18 +2,21 @@
|
|||
|
||||
with pkgs.lib;
|
||||
|
||||
(mapAttrs (name: hosts:
|
||||
''
|
||||
#!${pkgs.runtimeShell}
|
||||
export PATH=
|
||||
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 &
|
||||
PID_LIST+=" $!"
|
||||
'') hosts}
|
||||
# FIXME: remove jobs from PIDLIST once they finish
|
||||
trap "kill $PID_LIST" SIGINT
|
||||
wait $PID_LIST
|
||||
'') groups)
|
||||
(mapAttrs (name: hosts: ''
|
||||
#!${pkgs.runtimeShell}
|
||||
export PATH=
|
||||
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 &
|
||||
PID_LIST+=" $!"
|
||||
'') hosts}
|
||||
# FIXME: remove jobs from PIDLIST once they finish
|
||||
trap "kill $PID_LIST" SIGINT
|
||||
wait $PID_LIST
|
||||
'') groups)
|
||||
// (mapAttrs (name: host: host.config.system.build.deployScript) hosts)
|
||||
|
|
|
|||
|
|
@ -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}"''
|
||||
|
|
@ -54,17 +56,19 @@ in {
|
|||
deploy.groups = [ "all" ];
|
||||
|
||||
system.build.deployScript = ''
|
||||
#!${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}
|
||||
nix copy ${
|
||||
if cfg.substitute then "-s" else ""
|
||||
} --no-check-sigs --to ssh://root@${cfg.ssh.host} ${config.system.build.toplevel}
|
||||
${secretsScript}
|
||||
ssh $NIX_SSHOPTS root@${cfg.ssh.host} "nix-env -p /nix/var/nix/profiles/system -i ${config.system.build.toplevel}"
|
||||
ssh $NIX_SSHOPTS root@${cfg.ssh.host} "/nix/var/nix/profiles/system/bin/switch-to-configuration $1"
|
||||
'';
|
||||
#!${pkgs.runtimeShell}
|
||||
set -xeo pipefail
|
||||
export PATH=${with pkgs; lib.makeBinPath [ coreutils openssh nix ]}
|
||||
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}
|
||||
${secretsScript}
|
||||
ssh $NIX_SSHOPTS root@${cfg.ssh.host} "nix-env -p /nix/var/nix/profiles/system -i ${config.system.build.toplevel}"
|
||||
ssh $NIX_SSHOPTS root@${cfg.ssh.host} "/nix/var/nix/profiles/system/bin/switch-to-configuration $1"
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue