summaryrefslogtreecommitdiffstats
path: root/tv/2configs
diff options
context:
space:
mode:
Diffstat (limited to 'tv/2configs')
-rw-r--r--tv/2configs/backup.nix12
-rw-r--r--tv/2configs/br.nix49
-rw-r--r--tv/2configs/default.nix6
-rw-r--r--tv/2configs/gitrepos.nix4
4 files changed, 52 insertions, 19 deletions
diff --git a/tv/2configs/backup.nix b/tv/2configs/backup.nix
index 46e3f70f..f76fb2e0 100644
--- a/tv/2configs/backup.nix
+++ b/tv/2configs/backup.nix
@@ -52,12 +52,6 @@ with import <stockholm/lib>;
dst = { host = config.krebs.hosts.zu; path = "/bku/xu-home"; };
startAt = "06:20";
};
- xu-pull-cd-home = {
- method = "pull";
- src = { host = config.krebs.hosts.cd; path = "/home"; };
- dst = { host = config.krebs.hosts.xu; path = "/bku/cd-home"; };
- startAt = "07:00";
- };
xu-pull-ni-ejabberd = {
method = "pull";
src = { host = config.krebs.hosts.ni; path = "/var/ejabberd"; };
@@ -76,12 +70,6 @@ with import <stockholm/lib>;
dst = { host = config.krebs.hosts.xu; path = "/bku/zu-home"; };
startAt = "05:00";
};
- zu-pull-cd-home = {
- method = "pull";
- src = { host = config.krebs.hosts.cd; path = "/home"; };
- dst = { host = config.krebs.hosts.zu; path = "/bku/cd-home"; };
- startAt = "06:30";
- };
zu-pull-ni-ejabberd = {
method = "pull";
src = { host = config.krebs.hosts.ni; path = "/var/ejabberd"; };
diff --git a/tv/2configs/br.nix b/tv/2configs/br.nix
new file mode 100644
index 00000000..c7eb20e9
--- /dev/null
+++ b/tv/2configs/br.nix
@@ -0,0 +1,49 @@
+with import <stockholm/lib>;
+{ config, pkgs, ... }: {
+
+ imports = [
+ <nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix>
+ ];
+
+ krebs.nixpkgs.allowUnfreePredicate = pkg: any (flip hasPrefix pkg.name) [
+ "brother-udev-rule-type1-"
+ "brscan4-"
+ "mfcl2700dnlpr-"
+ ];
+
+ hardware.sane = {
+ enable = true;
+ brscan4 = {
+ enable = true;
+ netDevices = {
+ bra = {
+ model = "MFCL2700DN";
+ ip = "10.23.1.214";
+ };
+ };
+ };
+ };
+
+ services.saned.enable = true;
+
+ # usage: scanimage -d "$(find-scanner bra)" --batch --format=tiff --resolution 150 -x 211 -y 298
+ environment.systemPackages = [
+ (pkgs.writeDashBin "find-scanner" ''
+ set -efu
+ name=$1
+ ${pkgs.sane-backends}/bin/scanimage -f '%m %d
+ ' \
+ | ${pkgs.gawk}/bin/awk -v dev="*$name" '$1 == dev { print $2; exit }' \
+ | ${pkgs.gnugrep}/bin/grep .
+ '')
+ ];
+
+ services.printing = {
+ enable = true;
+ drivers = [
+ pkgs.mfcl2700dncupswrapper
+ ];
+ };
+
+ systemd.services.cups.serviceConfig.PrivateTmp = true;
+}
diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix
index 241a16b2..9ad0253a 100644
--- a/tv/2configs/default.nix
+++ b/tv/2configs/default.nix
@@ -90,11 +90,7 @@ with import <stockholm/lib>;
environment.variables = {
NIX_PATH = mkForce (concatStringsSep ":" [
"secrets=/var/src/stockholm/null"
- "nixpkgs-overlays=${pkgs.runCommand "nixpkgs-overlays" {} ''
- mkdir $out
- ln -s /home/tv/stockholm/krebs/5pkgs $out/krebs
- ln -s /home/tv/stockholm/tv/5pkgs $out/tv
- ''}"
+ "nixpkgs-overlays=${config.tv.nixpkgs-overlays}"
"/var/src"
]);
};
diff --git a/tv/2configs/gitrepos.nix b/tv/2configs/gitrepos.nix
index b6480f35..bbb1d412 100644
--- a/tv/2configs/gitrepos.nix
+++ b/tv/2configs/gitrepos.nix
@@ -100,10 +100,10 @@ let {
);
irc-announce = args: pkgs.git-hooks.irc-announce (recursiveUpdate {
- channel = "#retiolum";
+ channel = "#krebs";
# TODO make nick = config.krebs.build.host.name the default
nick = config.krebs.build.host.name;
- server = "ni.r";
+ server = "irc.r";
verbose = true;
} args);