summaryrefslogtreecommitdiffstats
path: root/tv/2configs
diff options
context:
space:
mode:
authorjeschli <jeschli@gmail.com>2018-10-26 12:25:40 +0200
committerjeschli <jeschli@gmail.com>2018-10-26 12:25:40 +0200
commita6670e5090dd71aacd7c7605b12d8d3410d25daa (patch)
tree8475a3cc3583d94959a1cc8b6effcd3b8c10a32a /tv/2configs
parentf6ad60a0c6cbac45e8ba715b24a7a37f8e2560dc (diff)
parent24f4e8dcf0eca55378fa018a9ed980625222653d (diff)
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'tv/2configs')
-rw-r--r--tv/2configs/backup.nix2
-rw-r--r--tv/2configs/bash/default.nix12
-rw-r--r--tv/2configs/default.nix1
-rw-r--r--tv/2configs/gitrepos.nix55
-rw-r--r--tv/2configs/urlwatch.nix25
-rw-r--r--tv/2configs/vim.nix1
-rw-r--r--tv/2configs/xp-332.nix45
-rw-r--r--tv/2configs/xserver/default.nix31
8 files changed, 119 insertions, 53 deletions
diff --git a/tv/2configs/backup.nix b/tv/2configs/backup.nix
index 14d381568..f8de72d00 100644
--- a/tv/2configs/backup.nix
+++ b/tv/2configs/backup.nix
@@ -26,7 +26,7 @@ with import <stockholm/lib>;
method = "pull";
src = { host = config.krebs.hosts.querel; path = "/home"; };
dst = { host = config.krebs.hosts.nomic; path = "/fs/ponyhof/bku/querel-home"; };
- startAt = "00:00";
+ startAt = "22:00";
};
wu-home-xu = {
method = "push";
diff --git a/tv/2configs/bash/default.nix b/tv/2configs/bash/default.nix
index 546b2e7b7..b75ad8bfc 100644
--- a/tv/2configs/bash/default.nix
+++ b/tv/2configs/bash/default.nix
@@ -33,11 +33,13 @@ with import <stockholm/lib>;
PS1="ssh-agent[$SSH_AGENT_PID] $PS1"
fi
- case ''${XMONAD_SPAWN_WORKSPACE-} in
- stockholm)
- cd ~/stockholm
- ;;
- esac
+ if test ''${SHLVL-1} = 1; then
+ case ''${XMONAD_SPAWN_WORKSPACE-} in
+ stockholm)
+ cd ~/stockholm
+ ;;
+ esac
+ fi
'';
};
}
diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix
index 2ccab3d09..d9ddc90d0 100644
--- a/tv/2configs/default.nix
+++ b/tv/2configs/default.nix
@@ -143,6 +143,7 @@ with import <stockholm/lib>;
environment.systemPackages = [
pkgs.get
pkgs.git
+ pkgs.git-crypt
pkgs.git-preview
pkgs.hashPassword
pkgs.htop
diff --git a/tv/2configs/gitrepos.nix b/tv/2configs/gitrepos.nix
index 74fb5215a..62c90d4e9 100644
--- a/tv/2configs/gitrepos.nix
+++ b/tv/2configs/gitrepos.nix
@@ -9,8 +9,19 @@ let {
enable = true;
cgit = {
settings = {
- root-title = "repositories at ${config.krebs.build.host.name}";
+ about-filter = pkgs.exec "krebs.cgit.about-filter" rec {
+ filename = "${pkgs.pythonPackages.markdown2}/bin/markdown2";
+ argv = [
+ filename
+ "--extras=fenced-code-blocks"
+ ];
+ envp = {};
+ };
+ readme = [
+ ":README.md"
+ ];
root-desc = "mostly krebs";
+ root-title = "repositories at ${config.krebs.build.host.name}";
};
};
repos = repos;
@@ -30,46 +41,33 @@ let {
public-repos = mapAttrs make-public-repo ({
} // mapAttrs (_: recursiveUpdate { cgit.section = "1. miscellaneous"; }) {
- cac-api = {
- cgit.desc = "CloudAtCost API command line interface";
- };
dic = {
cgit.desc = "dict.leo.org command line interface";
};
disko = {
cgit.desc = "declarative partitioning and formatting tool";
};
- get = {};
- hstool = {
- cgit.desc = "Haskell Development Environment ^_^";
+ fswm = {
+ cgit.desc = "simple full screen window manager";
};
htgen = {
cgit.desc = "toy HTTP server";
};
- kirk = {
- cgit.desc = "IRC tools";
- };
krops = {
cgit.desc = "deployment tools";
};
- load-env = {};
- loldns = {
- cgit.desc = "toy DNS server";
- };
- make-snapshot = {};
much = {};
netcup = {
cgit.desc = "netcup command line interface";
};
- nix-writers = {};
+ nix-writers = {
+ cgit.desc = "collection of package builders";
+ };
populate = {
cgit.desc = "source code installer";
};
q = {};
regfish = {};
- soundcloud = {
- cgit.desc = "SoundCloud command line interface";
- };
stockholm = {
cgit.desc = "NixOS configuration";
};
@@ -86,15 +84,32 @@ let {
xintmap = {};
xmonad-stockholm = {};
} // mapAttrs (_: recursiveUpdate { cgit.section = "4. museum"; }) {
+ cac-api = {
+ cgit.desc = "CloudAtCost API command line interface";
+ };
cgserver = {};
crude-mail-setup = {};
dot-xmonad = {};
hirc = {};
+ hstool = {
+ cgit.desc = "Haskell Development Environment ^_^";
+ };
+ kirk = {
+ cgit.desc = "IRC tools";
+ };
make-snapshot = {};
nixos-infest = {};
painload = {};
push = {};
with-tmpdir = {};
+ get = {};
+ load-env = {};
+ loldns = {
+ cgit.desc = "toy DNS server";
+ };
+ soundcloud = {
+ cgit.desc = "SoundCloud command line interface";
+ };
});
restricted-repos = mapAttrs make-restricted-repo (
@@ -138,7 +153,7 @@ let {
public = false;
hooks = hooks // {
post-receive = /* sh */ ''
- (${hooks.post-receive or ""})
+ (${hooks.post-receive or ":"})
${cgit-clear-cache}/bin/cgit-clear-cache
'';
};
diff --git a/tv/2configs/urlwatch.nix b/tv/2configs/urlwatch.nix
index aa71be777..77947dafa 100644
--- a/tv/2configs/urlwatch.nix
+++ b/tv/2configs/urlwatch.nix
@@ -1,6 +1,10 @@
-{ config, pkgs, ... }:
with import <stockholm/lib>;
-{
+{ config, pkgs, ... }: let
+ json = url: {
+ inherit url;
+ filter = "system:${pkgs.jq}/bin/jq .";
+ };
+in {
krebs.urlwatch = {
enable = true;
mailto = config.krebs.users.tv.mail;
@@ -13,18 +17,9 @@ with import <stockholm/lib>;
http://www.exim.org/
- # ref src/nixpkgs/pkgs/tools/admin/sec/default.nix
- {
- url = https://api.github.com/repos/simple-evcorr/sec/tags;
- filter = "system:${pkgs.jq}/bin/jq .";
- }
-
# ref src/nixpkgs/pkgs/tools/networking/urlwatch/default.nix
https://thp.io/2008/urlwatch/
- # 2014-12-20 ref src/nixpkgs/pkgs/tools/networking/tlsdate/default.nix
- https://api.github.com/repos/ioerror/tlsdate/tags
-
# 2015-02-18
# ref ~/src/nixpkgs/pkgs/tools/text/qprint/default.nix
http://www.fourmilab.ch/webtools/qprint/
@@ -50,7 +45,13 @@ with import <stockholm/lib>;
#http://hackage.haskell.org/package/web-page
# ref <stockholm/krebs/3modules>, services.openssh.knownHosts.github*
- https://api.github.com/meta
+ (json https://api.github.com/meta)
+
+ # 2014-12-20 ref src/nixpkgs/pkgs/tools/networking/tlsdate/default.nix
+ (json https://api.github.com/repos/ioerror/tlsdate/tags)
+
+ # ref src/nixpkgs/pkgs/tools/admin/sec/default.nix
+ (json https://api.github.com/repos/simple-evcorr/sec/tags)
# <stockholm/tv/2configs/xserver/xserver.conf.nix>
# is derived from `configFile` in:
diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix
index 400d179d0..2ac7f7518 100644
--- a/tv/2configs/vim.nix
+++ b/tv/2configs/vim.nix
@@ -15,6 +15,7 @@ let {
extra-runtimepath = concatMapStringsSep "," (pkg: "${pkg.rtp}") [
pkgs.vimPlugins.undotree
+ pkgs.vimPlugins.vim-elixir
(pkgs.vimUtils.buildVimPlugin {
name = "vim-syntax-jq";
src = pkgs.fetchgit {
diff --git a/tv/2configs/xp-332.nix b/tv/2configs/xp-332.nix
new file mode 100644
index 000000000..627401dc6
--- /dev/null
+++ b/tv/2configs/xp-332.nix
@@ -0,0 +1,45 @@
+with import <stockholm/lib>;
+{ config, pkgs, ... }: {
+
+ environment.etc."utsushi.conf".text = ''
+ [devices]
+ dev1.udi = esci:networkscan://EPSON79678C.fritz.box:1865
+ dev1.model = XP-332
+ dev1.vendor = EPSON
+ '';
+
+ hardware.sane = {
+ enable = true;
+ extraBackends = [
+ pkgs.utsushi
+ ];
+ };
+
+ krebs.nixpkgs.allowUnfreePredicate = pkg:
+ elem (parseDrvName pkg.name).name [ "imagescan-plugin-networkscan" ];
+
+ nixpkgs.overlays = singleton (self: super: {
+ utsushi = super.utsushi.override {
+ guiSupport = false;
+ jpegSupport = false;
+ networkSupport = true;
+ ocrSupport = false;
+ saneSupport = true;
+ tiffSupport = true;
+
+ logCategory = "ALL";
+ logLevel = "BRIEF";
+ };
+ });
+
+ services = {
+ printing = {
+ drivers = [
+ pkgs.epson-escpr
+ ];
+ enable = true;
+ };
+ saned.enable = true;
+ };
+
+}
diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix
index 6ef8a8768..dbfa804d2 100644
--- a/tv/2configs/xserver/default.nix
+++ b/tv/2configs/xserver/default.nix
@@ -41,9 +41,12 @@ in {
# refs <nixpkgs/nixos/modules/services/x11/desktop-managers>
desktopManager.session = mkForce [];
+ displayManager.lightdm.enable = mkForce false;
+ displayManager.job.execCmd = mkForce "derp";
+
enable = true;
- display = 11;
- tty = 11;
+ display = mkForce 11;
+ tty = mkForce 11;
synaptics = {
enable = true;
@@ -55,7 +58,7 @@ in {
systemd.services.display-manager.enable = false;
systemd.services.xmonad = {
- wantedBy = [ "multi-user.target" ];
+ wantedBy = [ "graphical.target" ];
requires = [ "xserver.service" ];
environment = {
DISPLAY = ":${toString config.services.xserver.display}";
@@ -101,21 +104,20 @@ in {
systemd.services.xserver = {
after = [
- "systemd-udev-settle.service"
- "local-fs.target"
"acpid.service"
+ "local-fs.target"
+ "systemd-udev-settle.service"
+ ];
+ wants = [
+ "systemd-udev-settle.service"
];
- reloadIfChanged = true;
+ restartIfChanged = false;
environment = {
- XKB_BINDIR = "${pkgs.xorg.xkbcomp}/bin"; # Needed for the Xkb extension.
- XORG_DRI_DRIVER_PATH = "/run/opengl-driver/lib/dri"; # !!! Depends on the driver selected at runtime.
- LD_LIBRARY_PATH = concatStringsSep ":" (
- [ "${pkgs.xorg.libX11}/lib" "${pkgs.xorg.libXext}/lib" ]
+ LD_LIBRARY_PATH = concatStringsSep ":" ([ "/run/opengl-driver/lib" ]
++ concatLists (catAttrs "libPath" config.services.xserver.drivers));
};
serviceConfig = {
SyslogIdentifier = "xserver";
- ExecReload = "${pkgs.coreutils}/bin/echo NOP";
ExecStart = toString [
"${pkgs.xorg.xorgserver}/bin/X"
":${toString config.services.xserver.display}"
@@ -123,17 +125,16 @@ in {
"-config ${import ./xserver.conf.nix args}"
"-logfile /dev/null -logverbose 0 -verbose 3"
"-nolisten tcp"
- "-xkbdir ${pkgs.xkeyboard_config}/etc/X11/xkb"
+ "-xkbdir ${config.services.xserver.xkbDir}"
];
};
};
systemd.services.urxvtd = {
- wantedBy = [ "multi-user.target" ];
- reloadIfChanged = true;
+ wantedBy = [ "graphical.target" ];
+ restartIfChanged = false;
serviceConfig = {
SyslogIdentifier = "urxvtd";
- ExecReload = "${pkgs.coreutils}/bin/echo NOP";
ExecStart = "${pkgs.rxvt_unicode}/bin/urxvtd";
Restart = "always";
RestartSec = "2s";