From 383091ba2b7f953e2bffe7d203cba009f951951c Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 4 Sep 2018 09:47:08 +0200 Subject: ma share/gum-client: init --- makefu/2configs/share/gum-client.nix | 23 +++++++++++++++++++++++ makefu/2configs/share/gum.nix | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 makefu/2configs/share/gum-client.nix diff --git a/makefu/2configs/share/gum-client.nix b/makefu/2configs/share/gum-client.nix new file mode 100644 index 000000000..be9ab026b --- /dev/null +++ b/makefu/2configs/share/gum-client.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, ... }: + +let + automount_opts = + [ "x-systemd.automount" + "noauto" "x-systemd.idle-timeout=600" + "x-systemd.device-timeout=5s" + "x-systemd.mount-timeout=5s" + ]; + host = "nextgum"; #TODO +in { + fileSystems."/media/download" = { + device = "//${host}/download"; + fsType = "cifs"; + options = automount_opts ++ + [ "credentials=/var/src/secrets/download.smb" + "file_mode=0775" + "dir_mode=0775" + "uid=9001" + ]; + }; + +} diff --git a/makefu/2configs/share/gum.nix b/makefu/2configs/share/gum.nix index f5942a0f7..cc59ce3cc 100644 --- a/makefu/2configs/share/gum.nix +++ b/makefu/2configs/share/gum.nix @@ -10,7 +10,7 @@ in { # description = "smb guest user"; # home = "/var/empty"; # }; - + environment.systemPackages = [ pkgs.samba ]; users.users.download.uid = genid "download"; services.samba = { enable = true; -- cgit v1.2.3 From 964ab6ccebb18838148300a4d6641f832f3717e7 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 8 Sep 2018 12:01:42 +0200 Subject: ma krops.nix: fix stockholm.file --- makefu/krops.nix | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/makefu/krops.nix b/makefu/krops.nix index 5ce430ad2..3b5f3df9c 100644 --- a/makefu/krops.nix +++ b/makefu/krops.nix @@ -1,14 +1,14 @@ -{ config ? config, name }: let +{ config ? config, name, target ? name }: let krops = builtins.fetchGit { url = https://cgit.krebsco.de/krops/; rev = "4e466eaf05861b47365c5ef46a31a188b70f3615"; }; nixpkgs-src = lib.importJSON ./nixpkgs.json; - lib = import "${krops}/lib"; - # TODO document why pkgs should be used like this + lib = import "${krops}/lib"; pkgs = import "${krops}/pkgs" {}; - hostSource = { + + host-src = { secure = false; full = false; torrent = false; @@ -26,15 +26,17 @@ # + do_sqlite3 ruby: 55a952be5b5 # + exfat-nofuse bump: ee6a5296a35 # + uhub/sqlite: 5dd7610401747 - nixpkgs.git = { - ref = nixpkgs-src.rev; - url = nixpkgs-src.url; + nixpkgs = if test || host-src.full then { + git.ref = nixpkgs-src.rev; + git.url = nixpkgs-src.url; + } else { + file = "/home/makefu/store/${nixpkgs-src.rev}"; }; nixos-config.symlink = "stockholm/makefu/1systems/${name}/config.nix"; - stockholm.file = toString ; + stockholm.file = toString ./..; secrets = if test then { - file = toString (./. + "/0tests/data/secrets"); + file = toString ./0tests/data/secrets; } else { pass = { dir = "${lib.getEnv "HOME"}/.secrets-pass"; @@ -42,9 +44,9 @@ }; }; } - (lib.mkIf (hostSource.torrent) { + (lib.mkIf (host-src.torrent) { torrent-secrets = if test then { - file = ./. + "/makefu/0tests/data/secrets"; + file = toString ./0tests/data/secrets; } else { pass = { dir = "${lib.getEnv "HOME"}/.secrets-pass"; @@ -52,13 +54,13 @@ }; }; }) - (lib.mkIf ( hostSource.musnix ) { + (lib.mkIf ( host-src.musnix ) { musnix.git = { url = https://github.com/musnix/musnix.git; ref = "master"; # follow the musnix channel, lets see how this works out }; }) - (lib.mkIf ( hostSource.hw ) { + (lib.mkIf ( host-src.hw ) { nixos-hardware.git = { url = https://github.com/nixos/nixos-hardware.git; ref = "30fdd53"; @@ -70,7 +72,7 @@ in { # usage: $(nix-build --no-out-link --argstr name HOSTNAME -A deploy) deploy = pkgs.krops.writeDeploy "${name}-deploy" { source = source { test = false; }; - target = "root@${name}/var/src"; + target = "root@${target}/var/src"; }; # usage: $(nix-build --no-out-link --argstr name HOSTNAME -A test) -- cgit v1.2.3