diff --git a/config/hosts/samhain/configuration.nix b/config/hosts/samhain/configuration.nix index 8d31feda..35c00b9f 100644 --- a/config/hosts/samhain/configuration.nix +++ b/config/hosts/samhain/configuration.nix @@ -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"; diff --git a/config/profiles/gui/home/music.nix b/config/profiles/gui/home/music.nix index 8d2fa807..6e306872 100644 --- a/config/profiles/gui/home/music.nix +++ b/config/profiles/gui/home/music.nix @@ -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 { diff --git a/config/profiles/gui/nixos/adb.nix b/config/profiles/gui/nixos/adb.nix index 7d59f0c1..88a5d298 100644 --- a/config/profiles/gui/nixos/adb.nix +++ b/config/profiles/gui/nixos/adb.nix @@ -2,5 +2,5 @@ { programs.adb.enable = true; - users.users.kat.extraGroups = ["adbusers"]; + users.users.kat.extraGroups = [ "adbusers" ]; } diff --git a/config/profiles/gui/nixos/sound.nix b/config/profiles/gui/nixos/sound.nix index c971ecdf..3fbcd6d0 100644 --- a/config/profiles/gui/nixos/sound.nix +++ b/config/profiles/gui/nixos/sound.nix @@ -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; }; }; }; diff --git a/config/profiles/kat/home/vim/default.nix b/config/profiles/kat/home/vim/default.nix index ac67a67e..7c35a51e 100644 --- a/config/profiles/kat/home/vim/default.nix +++ b/config/profiles/kat/home/vim/default.nix @@ -18,7 +18,7 @@ coc-git vim-fugitive vim-startify - base16-vim + base16-vim ]; #extraPackages = with pkgs; # [ (python3.withPackages (ps: with ps; [ black flake8 ])) ]; diff --git a/config/profiles/sway/home/sway.nix b/config/profiles/sway/home/sway.nix index 64da4fc2..49bffbc2 100644 --- a/config/profiles/sway/home/sway.nix +++ b/config/profiles/sway/home/sway.nix @@ -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}'"; diff --git a/lib/deploy.nix b/lib/deploy.nix index fbb4a87b..decce55f 100644 --- a/lib/deploy.nix +++ b/lib/deploy.nix @@ -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) diff --git a/modules/nixos/deploy/default.nix b/modules/nixos/deploy/default.nix index b09e5014..b9175fec 100644 --- a/modules/nixos/deploy/default.nix +++ b/modules/nixos/deploy/default.nix @@ -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" + ''; }; }