From 078a23e415f2cfe17dff477608d405905c26c208 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 5 Dec 2015 23:09:39 +0100 Subject: We now have autofs in unstable --- bragi.nix | 1 - customized/autofs.nix | 120 -------------------------------------------------- 2 files changed, 121 deletions(-) delete mode 100644 customized/autofs.nix diff --git a/bragi.nix b/bragi.nix index 10f42e88..932eae6f 100644 --- a/bragi.nix +++ b/bragi.nix @@ -7,7 +7,6 @@ in rec { imports = [ ./bragi-hw.nix - ./customized/autofs.nix ./custom/zsh.nix ./users.nix ]; diff --git a/customized/autofs.nix b/customized/autofs.nix deleted file mode 100644 index f4a1059d..00000000 --- a/customized/autofs.nix +++ /dev/null @@ -1,120 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; - -let - - cfg = config.services.autofs; - - autoMaster = pkgs.writeText "auto.master" cfg.autoMaster; - -in - -{ - - ###### interface - - options = { - - services.autofs = { - - enable = mkOption { - default = false; - description = " - Mount filesystems on demand. Unmount them automatically. - You may also be interested in afuese. - "; - }; - - autoMaster = mkOption { - example = literalExample '' - autoMaster = let - mapConf = pkgs.writeText "auto" ''' - kernel -ro,soft,intr ftp.kernel.org:/pub/linux - boot -fstype=ext2 :/dev/hda1 - windoze -fstype=smbfs ://windoze/c - removable -fstype=ext2 :/dev/hdd - cd -fstype=iso9660,ro :/dev/hdc - floppy -fstype=auto :/dev/fd0 - server -rw,hard,intr / -ro myserver.me.org:/ \ - /usr myserver.me.org:/usr \ - /home myserver.me.org:/home - '''; - in ''' - /auto file:''${mapConf} - ''' - ''; - description = " - file contents of /etc/auto.master. See man auto.master - See man 5 auto.master and man 5 autofs. - "; - }; - - timeout = mkOption { - default = 600; - description = "Set the global minimum timeout, in seconds, until directories are unmounted"; - }; - - debug = mkOption { - default = false; - description = " - pass -d and -7 to automount and write log to /var/log/autofs - "; - }; - - }; - - }; - - - ###### implementation - - config = mkIf cfg.enable { - - environment.etc = singleton - { target = "auto.master"; - source = pkgs.writeText "auto.master" cfg.autoMaster; - }; - - boot.kernelModules = [ "autofs4" ]; - - jobs.autofs = - { description = "Filesystem automounter"; - - startOn = "started network-interfaces"; - stopOn = "stopping network-interfaces"; - - path = [ pkgs.nfs-utils pkgs.sshfsFuse ]; - - preStop = - '' - set -e; while :; do pkill -TERM automount; sleep 1; done - ''; - - # automount doesn't clean up when receiving SIGKILL. - # umount -l should unmount the directories recursively when they are no longer used - # It does, but traces are left in /etc/mtab. So unmount recursively.. - postStop = - '' - PATH=${pkgs.gnused}/bin:${pkgs.coreutils}/bin - exec &> /tmp/logss - # double quote for sed: - escapeSpaces(){ sed 's/ /\\\\040/g'; } - unescapeSpaces(){ sed 's/\\040/ /g'; } - sed -n 's@^\s*\(\([^\\ ]\|\\ \)*\)\s.*@\1@p' ${autoMaster} | sed 's/[\\]//' | while read mountPoint; do - sed -n "s@[^ ]\+\s\+\($(echo "$mountPoint"| escapeSpaces)[^ ]*\).*@\1@p" /proc/mounts | sort -r | unescapeSpaces| while read smountP; do - ${pkgs.utillinux}/bin/umount -l "$smountP" || true - done - done - ''; - - script = - '' - ${if cfg.debug then "exec &> /var/log/autofs" else ""} - exec ${pkgs.autofs5}/sbin/automount ${if cfg.debug then "-d" else ""} -f -t ${builtins.toString cfg.timeout} "${autoMaster}" ${if cfg.debug then "-l7" else ""} - ''; - }; - - }; - -} -- cgit v1.2.3 From 3e1099df284bd9349cd77e9304438f9d22e950b8 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 6 Dec 2015 01:45:42 +0100 Subject: trivmix bump --- custom/trivmix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom/trivmix b/custom/trivmix index d4091751..8b1cc0ea 160000 --- a/custom/trivmix +++ b/custom/trivmix @@ -1 +1 @@ -Subproject commit d40917517feeaffc3d8e90cf8e06004623b0c5ff +Subproject commit 8b1cc0ea290ef4b870107e82a50a168a5af05e02 -- cgit v1.2.3 From 651b0353d0e378bd76b827a6e6838310b8880bf7 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 6 Dec 2015 01:49:42 +0100 Subject: trivmix bump --- custom/trivmix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom/trivmix b/custom/trivmix index 8b1cc0ea..d30e060e 160000 --- a/custom/trivmix +++ b/custom/trivmix @@ -1 +1 @@ -Subproject commit 8b1cc0ea290ef4b870107e82a50a168a5af05e02 +Subproject commit d30e060e91d84718a79b3c2bcf925ff249f5b68d -- cgit v1.2.3 From 5693ade006044ec55856b9a2c4b13df44359f996 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 6 Dec 2015 02:28:11 +0100 Subject: nix rate limiting on bragi --- bragi.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bragi.nix b/bragi.nix index 932eae6f..c88df593 100644 --- a/bragi.nix +++ b/bragi.nix @@ -250,4 +250,10 @@ in rec { Group = users.extraUsers."thermoprint".group; }; }; + + nix = { + extraOptions = '' + binary-caches-parallel-connections = 10 + ''; + }; } -- cgit v1.2.3 From c7e9cf9ff1200b61f3023a4f0aaa5c0389b0f2bc Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 6 Dec 2015 02:28:26 +0100 Subject: cleanup --- bragi.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bragi.nix b/bragi.nix index c88df593..932d0cdf 100644 --- a/bragi.nix +++ b/bragi.nix @@ -242,14 +242,14 @@ in rec { home = "/var/lib/thermoprint"; }; - systemd.services."thermoprint" = { - serviceConfig = { - Type = "simple"; - ExecStart = ''${thermoprint-servant}/bin/thermoprint --database ${users.extraUsers."thermoprint".home}/database.sqlite /dev/usb/lp0''; - User = users.extraUsers."thermoprint".name; - Group = users.extraUsers."thermoprint".group; - }; + systemd.services."thermoprint" = { + serviceConfig = { + Type = "simple"; + ExecStart = ''${thermoprint-servant}/bin/thermoprint --database ${users.extraUsers."thermoprint".home}/database.sqlite /dev/usb/lp0''; + User = users.extraUsers."thermoprint".name; + Group = users.extraUsers."thermoprint".group; }; + }; nix = { extraOptions = '' -- cgit v1.2.3 From f22417c33823aaaae821219a2cd32f12511d0210 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 6 Dec 2015 02:43:07 +0100 Subject: trivmix bump --- custom/trivmix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom/trivmix b/custom/trivmix index d30e060e..8c0ee037 160000 --- a/custom/trivmix +++ b/custom/trivmix @@ -1 +1 @@ -Subproject commit d30e060e91d84718a79b3c2bcf925ff249f5b68d +Subproject commit 8c0ee03791ae6901e31b3b79cfe5a1279fb24396 -- cgit v1.2.3 From 27196899f9bdd43b7fd299aedf9b7ad6c75cf4ca Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 6 Dec 2015 02:45:36 +0100 Subject: trivmix bump --- custom/trivmix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom/trivmix b/custom/trivmix index 8c0ee037..782b5b37 160000 --- a/custom/trivmix +++ b/custom/trivmix @@ -1 +1 @@ -Subproject commit 8c0ee03791ae6901e31b3b79cfe5a1279fb24396 +Subproject commit 782b5b37976fce5e10b4e7df96bcc19c48fff0bf -- cgit v1.2.3 From 70c73bb8d7a68083f13466ddc4bcd382f52d8a06 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 6 Dec 2015 03:31:53 +0100 Subject: bump for new haskellPackages --- users/gkleen@bragi.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/users/gkleen@bragi.nix b/users/gkleen@bragi.nix index b67696a5..93ed41f6 100644 --- a/users/gkleen@bragi.nix +++ b/users/gkleen@bragi.nix @@ -30,7 +30,7 @@ }; myHaskellPackages = pkgs.recurseIntoAttrs ( pkgs.haskellPackages.override { - extension = self: super: let + overrides = self: super: let callPackage = pkgs.lib.callPackageWith ( pkgs // self ); in { attoparsecExpr = callPackage ../custom/attoparsec-expr.nix {}; @@ -40,7 +40,7 @@ }; } ); - adjmix = let trivmix = myHaskellPackages.trivmix; in + adjmix = let trivmix = callPackage ../custom/trivmix.nix {}; in pkgs.stdenv.mkDerivation { name = "adjmix"; buildCommand = '' -- cgit v1.2.3 From 787dc4d718d7a43685f307d0215c22728bbace32 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 6 Dec 2015 03:32:45 +0100 Subject: typo --- users/gkleen@bragi.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/gkleen@bragi.nix b/users/gkleen@bragi.nix index 93ed41f6..fe978b08 100644 --- a/users/gkleen@bragi.nix +++ b/users/gkleen@bragi.nix @@ -40,7 +40,7 @@ }; } ); - adjmix = let trivmix = callPackage ../custom/trivmix.nix {}; in + adjmix = let trivmix = myHaskellPackages.trivmix; in pkgs.stdenv.mkDerivation { name = "adjmix"; buildCommand = '' -- cgit v1.2.3 From 24e892bd43643d8194ec9e661a0d4bce9a714573 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 6 Dec 2015 03:35:18 +0100 Subject: more new haskell stuff --- users/gkleen@bragi.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/users/gkleen@bragi.nix b/users/gkleen@bragi.nix index fe978b08..a32fa0d1 100644 --- a/users/gkleen@bragi.nix +++ b/users/gkleen@bragi.nix @@ -33,9 +33,9 @@ overrides = self: super: let callPackage = pkgs.lib.callPackageWith ( pkgs // self ); in { - attoparsecExpr = callPackage ../custom/attoparsec-expr.nix {}; - shellMonad = callPackage ../custom/shell-monad.nix {}; - filelock = callPackage ../custom/filelock.nix {}; + # attoparsecExpr = callPackage ../custom/attoparsec-expr.nix {}; + # shellMonad = callPackage ../custom/shell-monad.nix {}; + # filelock = callPackage ../custom/filelock.nix {}; trivmix = callPackage ../custom/trivmix.nix {}; }; } -- cgit v1.2.3 From c1907d19c12cc07858d1efb502b1d8e94ce2e53b Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 6 Dec 2015 03:39:05 +0100 Subject: switch to new haskell --- custom/redo-wrapper.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom/redo-wrapper.nix b/custom/redo-wrapper.nix index 5b446636..3a3d7bbc 100644 --- a/custom/redo-wrapper.nix +++ b/custom/redo-wrapper.nix @@ -1,8 +1,8 @@ -{ stdenv, makeWrapper, haskellngPackages }: +{ stdenv, makeWrapper, haskellPackages }: let #redo = haskellPackages.callPackage ./redo.nix {}; - redo = stdenv.lib.overrideDerivation (haskellngPackages.redo) (attrs: { + redo = stdenv.lib.overrideDerivation (haskellPackages.redo) (attrs: { patches = attrs.patches ++ [./redo.patch]; }); in stdenv.mkDerivation { -- cgit v1.2.3