summaryrefslogtreecommitdiffstats
path: root/tv/2configs
diff options
context:
space:
mode:
Diffstat (limited to 'tv/2configs')
-rw-r--r--tv/2configs/backup.nix40
-rw-r--r--tv/2configs/default.nix9
-rw-r--r--tv/2configs/pulse.nix32
-rw-r--r--tv/2configs/xserver/default.nix1
4 files changed, 35 insertions, 47 deletions
diff --git a/tv/2configs/backup.nix b/tv/2configs/backup.nix
index 51d3bb8a..ce937a74 100644
--- a/tv/2configs/backup.nix
+++ b/tv/2configs/backup.nix
@@ -2,41 +2,17 @@
with lib;
{
krebs.backup.plans = addNames {
- xu-test-cd = {
+ wu-home-xu = {
method = "push";
-
- src = { host = config.krebs.hosts.xu; path = "/tmp/xu-test"; };
- dst = { host = config.krebs.hosts.cd; path = "/tmp/backups/xu-test"; };
-
- #startAt = "0,6,12,18:00";
- startAt = "minutely";
+ src = { host = config.krebs.hosts.wu; path = "/home"; };
+ dst = { host = config.krebs.hosts.xu; path = "/bku/wu-home"; };
+ startAt = "05:00";
snapshots = {
- minutely = { format = "%Y-%m-%dT%H:%M"; retain = 5; };
- hourly = { format = "%Y-%m-%dT%H"; retain = 4; };
- daily = { format = "%Y-%m-%d"; retain = 7; };
- weekly = { format = "%YW%W"; retain = 4; };
- monthly = { format = "%Y-%m"; retain = 12; };
- yearly = { format = "%Y"; };
+ daily = { format = "%Y-%m-%d"; retain = 7; };
+ weekly = { format = "%YW%W"; retain = 4; };
+ monthly = { format = "%Y-%m"; retain = 12; };
+ yearly = { format = "%Y"; };
};
};
- #xu-test-wu = {
- # method = "push";
- # dst = { user = tv; host = wu; path = "/krebs/backup/xu-test"; };
- #};
- cd-test-xu = {
- method = "pull";
- src = { host = config.krebs.hosts.cd; path = "/tmp/cd-test"; };
- dst = { host = config.krebs.hosts.xu; path = "/tmp/backups/cd-test"; };
- startAt = "minutely";
- snapshots = {
- minutely = { format = "%Y-%m-%dT%H:%M"; retain = 5; };
- hourly = { format = "%Y-%m-%dT%H"; retain = 4; };
- daily = { format = "%Y-%m-%d"; retain = 7; };
- weekly = { format = "%YW%W"; retain = 4; };
- monthly = { format = "%Y-%m"; retain = 12; };
- yearly = { format = "%Y"; };
- };
- };
-
};
}
diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix
index c300633b..d3a1778f 100644
--- a/tv/2configs/default.nix
+++ b/tv/2configs/default.nix
@@ -11,7 +11,7 @@ with lib;
source = {
git.nixpkgs = {
url = mkDefault https://github.com/NixOS/nixpkgs;
- rev = mkDefault "c44a593aa43bba6a0708f6f36065a514a5110613";
+ rev = mkDefault "b7ff0301d6f26bd8419e888fd0e129f3dc8bd328";
target-path = mkDefault "/var/src/nixpkgs";
};
dir.secrets = {
@@ -142,7 +142,12 @@ with lib;
'';
};
- programs.ssh.startAgent = false;
+ programs.ssh = {
+ extraConfig = ''
+ UseRoaming no
+ '';
+ startAgent = false;
+ };
}
{
diff --git a/tv/2configs/pulse.nix b/tv/2configs/pulse.nix
index 3db3532d..e1894ca6 100644
--- a/tv/2configs/pulse.nix
+++ b/tv/2configs/pulse.nix
@@ -1,5 +1,6 @@
{ config, lib, pkgs, ... }:
+with lib;
let
pkg = pkgs.pulseaudioLight;
runDir = "/run/pulse";
@@ -35,36 +36,43 @@ let
in
{
- systemd.tmpfiles.rules = [
- "d ${runDir} 0750 pulse pulse - -"
- "d ${runDir}/home 0700 pulse pulse - -"
- ];
-
- system.activationScripts.pulseaudio-hack = ''
- ln -fns ${clientConf} /etc/pulse/client.conf
- '';
-
environment = {
etc = {
"asound.conf".source = alsaConf;
- #"pulse/client.conf" = lib.mkForce { source = clientConf; };
+ # XXX mkForce is not strong enough (and neither is mkOverride) to create
+ # /etc/pulse/client.conf, see pulseaudio-hack below for a solution.
+ #"pulse/client.conf" = mkForce { source = clientConf; };
+ #"pulse/client.conf".source = mkForce clientConf;
"pulse/default.pa".source = configFile;
};
- systemPackages = [ pkg ];
+ systemPackages = [
+ pkg
+ ] ++ optionals config.services.xserver.enable [
+ pkgs.pavucontrol
+ ];
};
# Allow PulseAudio to get realtime priority using rtkit.
security.rtkit.enable = true;
+ system.activationScripts.pulseaudio-hack = ''
+ ln -fns ${clientConf} /etc/pulse/client.conf
+ '';
+
systemd.services.pulse = {
wantedBy = [ "sound.target" ];
before = [ "sound.target" ];
environment = {
PULSE_RUNTIME_PATH = "${runDir}/home";
- #DISPLAY = ":${toString config.services.xserver.display}";
};
serviceConfig = {
ExecStart = "${pkg}/bin/pulseaudio";
+ ExecStartPre = pkgs.writeScript "pulse-start" ''
+ #! /bin/sh
+ install -o pulse -g pulse -m 0750 -d ${runDir}
+ install -o pulse -g pulse -m 0700 -d ${runDir}/home
+ '';
+ PermissionsStartOnly = "true";
User = "pulse";
};
};
diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix
index facde4e7..5cd17aa1 100644
--- a/tv/2configs/xserver/default.nix
+++ b/tv/2configs/xserver/default.nix
@@ -37,7 +37,6 @@ let
pkgs.ff
pkgs.gitAndTools.qgit
pkgs.mpv
- pkgs.pavucontrol
pkgs.slock
pkgs.sxiv
pkgs.xsel