don't try to mimic nixpkgs

This commit is contained in:
tv 2016-02-15 16:27:11 +01:00
parent 673853e092
commit 8f520b19b6
55 changed files with 103 additions and 306 deletions

View File

@ -9,10 +9,11 @@ export target_path ?= /var/src
evaluate = \ evaluate = \
nix-instantiate \ nix-instantiate \
--arg configuration ./$(LOGNAME)/1systems/$(system).nix \
--eval \ --eval \
--readonly-mode \ --readonly-mode \
--show-trace \ --show-trace \
-I nixos-config=./$(LOGNAME)/1systems/$(system).nix \
-I stockholm=. \
$(1) $(1)
execute = \ execute = \

View File

@ -1,86 +1,5 @@
{ configuration ? import (nixpkgs-path + "/nixos/lib/from-env.nix") "NIXOS_CONFIG" <nixos-config> import <nixpkgs/nixos/lib/eval-config.nix> {
, system ? builtins.currentSystem
, current-host-name ?
let v = builtins.getEnv "HOSTNAME"; in
if v != "" then v else builtins.readFile /proc/sys/kernel/hostname
, current-user-name ?
let v = builtins.getEnv "LOGNAME"; in
if v != "" then v else abort "undefined variable: LOGNAME"
, nixpkgs-path ?
if (builtins.tryEval <nixpkgs/krebs>).success
then <upstream-nixpkgs>
else <nixpkgs>
, StrictHostKeyChecking ? "yes"
}@args:
let stockholm = {
inherit krebs;
inherit users;
inherit lib;
inherit config options pkgs;
system = config.system.build.toplevel;
};
krebs = import ./krebs (args // { inherit lib stockholm; });
lib = let
nlib = import (slib.npath "lib");
klib = import (slib.kpath "4lib") { lib = nlib; };
slib = rec {
nspath = ns: p: ./. + "/${ns}/${p}";
npath = p: nixpkgs-path + "/${p}";
kpath = nspath "krebs";
upath = nspath current-user-name;
};
ulib = let p = slib.upath "4lib"; in
nlib.optionalAttrs (klib.dir.has-default-nix p)
(import p { lib = nlib // klib; });
in nlib // klib // slib // ulib // builtins;
inherit (eval configuration) config options pkgs;
base-module = { config, ... }: {
imports = builtins.filter lib.dir.has-default-nix (lib.concatLists [
(map (f: f "2configs") [ lib.upath ])
(map (f: f "3modules") [ lib.kpath lib.upath ])
(map (f: f "5pkgs") [ lib.kpath lib.upath ])
]);
krebs.lib = lib;
krebs.current.enable = true;
krebs.current.host = config.krebs.hosts.${current-host-name};
krebs.current.user = config.krebs.users.${current-user-name};
};
eval = config: import (lib.npath "nixos/lib/eval-config.nix") {
inherit system;
specialArgs = {
inherit lib;
};
modules = [ modules = [
base-module (import <nixpkgs/nixos/lib/from-env.nix> "NIXOS_CONFIG" <nixos-config>)
config
]; ];
}; }
# TODO move user namespaces' to users/, so no exception for krebs/ is needed
users =
lib.mapAttrs
(name: _: eval-all-systems (lib.nspath name "1systems"))
(lib.filterAttrs
(n: t: !lib.hasPrefix "." n && t == "directory" && n != "krebs")
(builtins.readDir ./.));
eval-all-systems = path:
lib.mapAttrs'
(n: _: (lib.nameValuePair (lib.removeSuffix ".nix" n)
(eval-system (path + "/${n}"))))
(builtins.readDir path);
eval-system = path: rec {
inherit (eval path) config options;
system = config.system.build.toplevel;
};
in stockholm

View File

@ -3,9 +3,13 @@ with lib;
let let
out = { out = {
options.krebs.lib = api; options.krebs.lib = api;
config = imp;
}; };
api = mkOption { api = mkOption {
default = {}; default = {};
type = types.attrs; type = types.attrs;
}; };
imp = {
krebs.lib = lib // import ../4lib { inherit lib; } // builtins;
};
in out in out

View File

@ -1,193 +1,8 @@
assert false; { config, lib, pkgs, ... }:
with config.krebs.lib;
{ current-host-name {
, current-user-name imports = [
, lib ./3modules
, stockholm ./5pkgs
, StrictHostKeyChecking ? "yes" ];
}: }
let out = {
inherit infest;
inherit init;
inherit nixos-install;
};
infest =
{ system ? current-host-name
, target ? system
}@args: let
config = get-config system;
in ''
#! /bin/sh
# krebs.infest
set -efu
${rootssh target ''
${builtins.readFile ./4lib/infest/prepare.sh}
${builtins.readFile ./4lib/infest/install-nix.sh}
''}
(${nixos-install args})
${rootssh target ''
${builtins.readFile ./4lib/infest/finalize.sh}
''}
'';
init =
{ system ? current-host-name
}@args: let
config = get-config system;
in ''
#! /bin/sh
# krebs.init
set -efu
system=${lib.shell.escape system}
secrets_dir=${config.krebs.build.source.dir.secrets.path}
key_type=ed25519
key_file=$secrets_dir/ssh.id_$key_type
key_comment=$system
if test -e "$key_file"; then
echo "Warning: privkey already exists: $key_file" >&2
else
ssh-keygen \
-C "$key_comment" \
-t "$key_type" \
-f "$key_file" \
-N ""
rm "$key_file.pub"
fi
pubkey=$(ssh-keygen -y -f "$key_file")
cat<<EOF
# put following into config.krebs.hosts.$system:
ssh.privkey.path = <secrets/ssh.$key_type>;
ssh.pubkey = $(echo $pubkey | jq -R .);
EOF
'';
nixos-install =
{ system ? current-host-name
, target ? system
}@args: let
in ''
#! /bin/sh
# krebs.nixos-install
(${populate (args // { root = "/mnt"; })})
${rootssh target ''
export PATH; PATH=/root/.nix-profile/bin:$PATH
src=$(type -p nixos-install)
cat_src() {
sed < "$src" "$(
{ sed < "$src" -n '
/^if ! test -e "\$mountPoint\/\$NIXOS_CONFIG/,/^fi$/=
/^nixpkgs=/=
/^NIX_PATH=/,/^$/{/./=}
# Disable: Copy the NixOS/Nixpkgs sources to the target as
# the initial contents of the NixOS channel.
/^srcs=/,/^ln -sfn /=
'
} | sed 's:$:s/^/#krebs#/:'
)"
}
# Location to insert `nix-install`
i=$(sed -n '/^echo "building the system configuration/=' "$src")
{
cat_src | sed -n "1,$i{p}"
cat ${doc (nix-install args)}
cat_src | sed -n "$i,\''${$i!p}"
} > nixos-install
chmod +x nixos-install
# Wrap inserted nix-install into chroot.
nix_env=$(cat_src | sed -n '
s:.*\(/nix/store/[a-z0-9]*-nix-[0-9.]\+/bin/nix-env\).*:\1:p;T;q
')
echo "nix-env is $nix_env" >&2
findpkg() {(
name=$1
path=$(find /nix/store \
-mindepth 1 -maxdepth 1 -type d -name '*-'"$name"'-*' \
| head -n 1 | sed s:^/mnt::)
if echo "$path" | grep .; then
echo "$name is $path" >&2
else
echo "Error: package not found: $name" >&2
exit 1
fi
)}
cacert=$(findpkg cacert)
coreutils=$(findpkg coreutils)
cp "$cacert"/etc/ssl/certs/ca-bundle.crt /mnt/root/SSL_CERT_FILE
env="$coreutils/bin/env SSL_CERT_FILE=/root/SSL_CERT_FILE"
sed -i '
s:^NIX_PATH=:chroot $mountPoint '"$env"' &:
s:^nix-env:'"$nix_env"':
' nixos-install
./nixos-install
''}
'';
doc = s:
let b = "EOF${builtins.hashString "sha256" s}"; in
''
<<\${b}
${s}
${b}
'';
get-config = system: let
config = stockholm.users.${current-user-name}.${system}.config
or (abort "unknown system: ${system}, user: ${current-user-name}");
in config;
nix-install =
{ system ? current-host-name
, target ? system
}:
let
config = get-config system;
nix-path =
lib.concatStringsSep ":"
(lib.mapAttrsToList (name: src: "${name}=${src.target-path}")
(config.krebs.build.source.dir //
config.krebs.build.source.git));
in ''
set -efu
NIX_PATH=${lib.shell.escape nix-path} \
nix-env \
--show-trace \
-f '<stockholm>' \
--argstr current-host-name ${lib.shell.escape current-host-name} \
--argstr current-user-name ${lib.shell.escape current-user-name} \
--profile ${lib.shell.escape config.krebs.build.profile} \
--set \
-A ${lib.escapeShellArg (lib.concatStringsSep "." [
"users"
config.krebs.build.user.name
config.krebs.build.host.name
"system"
])}
'';
rootssh = target: script:
let
flags = "-o StrictHostKeyChecking=${StrictHostKeyChecking}";
in
"ssh ${flags} root@${target} -T ${doc ''
set -efu
${script}
''}";
in out

View File

@ -7,6 +7,7 @@ let
ip = (head config.krebs.build.host.nets.internet.addrs4); ip = (head config.krebs.build.host.nets.internet.addrs4);
in { in {
imports = [ imports = [
../.
../2configs/os-templates/CAC-CentOS-7-64bit.nix ../2configs/os-templates/CAC-CentOS-7-64bit.nix
../2configs/base.nix ../2configs/base.nix
../2configs/retiolum.nix ../2configs/retiolum.nix

View File

@ -2,6 +2,7 @@
{ {
imports = [ imports = [
../.
<nixpkgs/nixos/modules/profiles/qemu-guest.nix> <nixpkgs/nixos/modules/profiles/qemu-guest.nix>
../2configs/base.nix ../2configs/base.nix
../2configs/git.nix ../2configs/git.nix

View File

@ -7,6 +7,7 @@ let
ip = (head config.krebs.build.host.nets.internet.addrs4); ip = (head config.krebs.build.host.nets.internet.addrs4);
in { in {
imports = [ imports = [
../.
../2configs/os-templates/CAC-CentOS-7-64bit.nix ../2configs/os-templates/CAC-CentOS-7-64bit.nix
../2configs/base.nix ../2configs/base.nix
../2configs/retiolum.nix ../2configs/retiolum.nix

View File

@ -3,6 +3,7 @@
with builtins; with builtins;
{ {
imports = [ imports = [
../.
../2configs/baseX.nix ../2configs/baseX.nix
../2configs/browsers.nix ../2configs/browsers.nix
../2configs/programs.nix ../2configs/programs.nix

View File

@ -2,6 +2,7 @@
{ {
imports = [ imports = [
../.
../2configs/baseX.nix ../2configs/baseX.nix
../2configs/programs.nix ../2configs/programs.nix
../2configs/bitcoin.nix ../2configs/bitcoin.nix

View File

@ -6,6 +6,7 @@ let
ip = (head config.krebs.build.host.nets.internet.addrs4); ip = (head config.krebs.build.host.nets.internet.addrs4);
in { in {
imports = [ imports = [
../.
../2configs/base.nix ../2configs/base.nix
../2configs/downloading.nix ../2configs/downloading.nix
../2configs/git.nix ../2configs/git.nix

View File

@ -3,6 +3,7 @@
with builtins; with builtins;
{ {
imports = [ imports = [
../.
../2configs/baseX.nix ../2configs/baseX.nix
../2configs/browsers.nix ../2configs/browsers.nix
../2configs/games.nix ../2configs/games.nix

View File

@ -50,12 +50,10 @@ with config.krebs.lib;
user = config.krebs.users.lass; user = config.krebs.users.lass;
source = mapAttrs (_: mkDefault) ({ source = mapAttrs (_: mkDefault) ({
nixos-config = "symlink:stockholm/lass/1systems/${config.krebs.build.host.name}.nix"; nixos-config = "symlink:stockholm/lass/1systems/${config.krebs.build.host.name}.nix";
nixpkgs = symlink:stockholm/nixpkgs;
secrets = "/home/lass/secrets/${config.krebs.build.host.name}"; secrets = "/home/lass/secrets/${config.krebs.build.host.name}";
#secrets-common = "/home/lass/secrets/common"; #secrets-common = "/home/lass/secrets/common";
stockholm = "/home/lass/stockholm"; stockholm = "/home/lass/stockholm";
stockholm-user = "symlink:stockholm/lass"; nixpkgs = {
upstream-nixpkgs = {
url = https://github.com/Lassulus/nixpkgs; url = https://github.com/Lassulus/nixpkgs;
rev = "d0e3cca04edd5d1b3d61f188b4a5f61f35cdf1ce"; rev = "d0e3cca04edd5d1b3d61f188b4a5f61f35cdf1ce";
dev = "/home/lass/src/nixpkgs"; dev = "/home/lass/src/nixpkgs";

View File

@ -1,6 +1,7 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with config.krebs.lib; with builtins;
with lib;
let let
cfg = config.lass.dnsmasq; cfg = config.lass.dnsmasq;

View File

@ -1,6 +1,7 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with config.krebs.lib; with builtins;
with lib;
let let
cfg = config.lass.newsbot-js; cfg = config.lass.newsbot-js;

7
lass/default.nix Normal file
View File

@ -0,0 +1,7 @@
_:
{
imports = [
../krebs
./3modules
];
}

View File

@ -11,6 +11,7 @@ let
in { in {
imports = imports =
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
../.
../2configs/fs/single-partition-ext4.nix ../2configs/fs/single-partition-ext4.nix
../2configs/tinc-basic-retiolum.nix ../2configs/tinc-basic-retiolum.nix
../2configs/smart-monitor.nix ../2configs/smart-monitor.nix

View File

@ -6,6 +6,7 @@ let
internal-ip = head config.krebs.build.host.nets.retiolum.addrs4; internal-ip = head config.krebs.build.host.nets.retiolum.addrs4;
in { in {
imports = [ imports = [
../.
../2configs/tinc-basic-retiolum.nix ../2configs/tinc-basic-retiolum.nix
../2configs/headless.nix ../2configs/headless.nix
../2configs/fs/simple-swap.nix ../2configs/fs/simple-swap.nix

View File

@ -20,6 +20,7 @@ let
in { in {
imports = imports =
[ [
../.
# TODO: unlock home partition via ssh # TODO: unlock home partition via ssh
../2configs/fs/single-partition-ext4.nix ../2configs/fs/single-partition-ext4.nix
../2configs/tinc-basic-retiolum.nix ../2configs/tinc-basic-retiolum.nix

View File

@ -6,6 +6,7 @@
{ {
imports = imports =
[ [
../.
../2configs/tinc-basic-retiolum.nix ../2configs/tinc-basic-retiolum.nix
../2configs/headless.nix ../2configs/headless.nix
../../krebs/3modules/Reaktor.nix ../../krebs/3modules/Reaktor.nix

View File

@ -6,6 +6,7 @@
{ {
imports = imports =
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
../.
../2configs/main-laptop.nix #< base-gui + zsh ../2configs/main-laptop.nix #< base-gui + zsh
# Krebs # Krebs

View File

@ -7,6 +7,7 @@
{ {
imports = imports =
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
../.
<nixpkgs/nixos/modules/profiles/qemu-guest.nix> <nixpkgs/nixos/modules/profiles/qemu-guest.nix>
../2configs/cgit-retiolum.nix ../2configs/cgit-retiolum.nix
]; ];

View File

@ -6,6 +6,7 @@
{ {
imports = imports =
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
../.
../2configs/base-gui.nix ../2configs/base-gui.nix
../2configs/tinc-basic-retiolum.nix ../2configs/tinc-basic-retiolum.nix
../2configs/fs/sda-crypto-root.nix ../2configs/fs/sda-crypto-root.nix

View File

@ -6,6 +6,7 @@
krebs.build.host = config.krebs.hosts.vbob; krebs.build.host = config.krebs.hosts.vbob;
imports = imports =
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
../.
<nixpkgs/nixos/modules/virtualisation/virtualbox-image.nix> <nixpkgs/nixos/modules/virtualisation/virtualbox-image.nix>
../2configs/main-laptop.nix #< base-gui ../2configs/main-laptop.nix #< base-gui

View File

@ -2,6 +2,7 @@
{ {
imports = imports =
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
../.
../2configs/main-laptop.nix ../2configs/main-laptop.nix
]; ];
krebs = { krebs = {

View File

@ -7,6 +7,7 @@ let
internal-ip = head config.krebs.build.host.nets.retiolum.addrs4; internal-ip = head config.krebs.build.host.nets.retiolum.addrs4;
in { in {
imports = [ imports = [
../.
# TODO: copy this config or move to krebs # TODO: copy this config or move to krebs
../../tv/2configs/hw/CAC.nix ../../tv/2configs/hw/CAC.nix
../../tv/2configs/fs/CAC-CentOS-7-64bit.nix ../../tv/2configs/fs/CAC-CentOS-7-64bit.nix

View File

@ -21,7 +21,7 @@ with config.krebs.lib;
target = mkDefault "root@${config.krebs.build.host.name}"; target = mkDefault "root@${config.krebs.build.host.name}";
user = config.krebs.users.makefu; user = config.krebs.users.makefu;
source = mapAttrs (_: mkDefault) { source = mapAttrs (_: mkDefault) {
upstream-nixpkgs = { nixpkgs = {
url = https://github.com/nixos/nixpkgs; url = https://github.com/nixos/nixpkgs;
rev = "77f8f35d57618c1ba456d968524f2fb2c3448295"; # unstable @ 2015-01-27, tested on wry rev = "77f8f35d57618c1ba456d968524f2fb2c3448295"; # unstable @ 2015-01-27, tested on wry
}; };
@ -30,8 +30,6 @@ with config.krebs.lib;
# Defaults for all stockholm users? # Defaults for all stockholm users?
nixos-config = "symlink:stockholm/${config.krebs.build.user.name}/1systems/${config.krebs.build.host.name}.nix"; nixos-config = "symlink:stockholm/${config.krebs.build.user.name}/1systems/${config.krebs.build.host.name}.nix";
nixpkgs = symlink:stockholm/nixpkgs;
stockholm-user = "symlink:stockholm/${config.krebs.build.user.name}";
}; };
}; };
}; };

8
makefu/default.nix Normal file
View File

@ -0,0 +1,8 @@
_:
{
imports = [
../krebs
./2configs
./3modules
];
}

View File

@ -7,7 +7,7 @@
{ {
imports = imports =
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
../.
../2configs/miefda.nix ../2configs/miefda.nix
../2configs/tlp.nix ../2configs/tlp.nix
../2configs/x220t.nix ../2configs/x220t.nix

6
miefda/default.nix Normal file
View File

@ -0,0 +1,6 @@
_:
{
imports = [
../krebs
];
}

View File

@ -9,6 +9,7 @@ with config.krebs.lib;
"7ae05edcdd14f6ace83ead9bf0d114e97c89a83a"; "7ae05edcdd14f6ace83ead9bf0d114e97c89a83a";
imports = [ imports = [
../.
../2configs/hw/x220.nix ../2configs/hw/x220.nix
../2configs/git.nix ../2configs/git.nix
../2configs/mail-client.nix ../2configs/mail-client.nix

View File

@ -1,6 +0,0 @@
{ system ? builtins.currentSystem }:
(import <stockholm> {
inherit system;
configuration = {};
}).pkgs

View File

View File

@ -1 +0,0 @@
../../upstream-nixpkgs/lib

View File

@ -1 +0,0 @@
import <stockholm>

View File

@ -1 +0,0 @@
../../../upstream-nixpkgs/nixos/lib

View File

@ -1 +0,0 @@
../../../upstream-nixpkgs/nixos/modules

1
root
View File

@ -1 +0,0 @@
../stockholm-user

View File

@ -2,6 +2,9 @@
let let
en = { enable = true;}; en = { enable = true;};
in { in {
imports = [
../.
];
krebs = { krebs = {
enable = true; enable = true;
build.user = config.krebs.users.shared; build.user = config.krebs.users.shared;

View File

@ -2,6 +2,7 @@
{ {
imports = [ imports = [
../.
../2configs/base.nix ../2configs/base.nix
{ {
boot.loader.grub = { boot.loader.grub = {

View File

@ -7,6 +7,7 @@ let
gw = "168.235.148.1"; gw = "168.235.148.1";
in { in {
imports = [ imports = [
../.
../2configs/base.nix ../2configs/base.nix
../2configs/os-templates/CAC-CentOS-6.5-64bit.nix ../2configs/os-templates/CAC-CentOS-6.5-64bit.nix
{ {

View File

@ -5,6 +5,7 @@ let
in { in {
imports = [ imports = [
../.
../2configs/base.nix ../2configs/base.nix
../2configs/os-templates/CAC-CentOS-7-64bit.nix ../2configs/os-templates/CAC-CentOS-7-64bit.nix
../2configs/temp/networking.nix ../2configs/temp/networking.nix

View File

@ -1,6 +1,9 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
imports = [
../.
];
programs.ssh.startAgent = true; programs.ssh.startAgent = true;
programs.ssh.startAgent = false; programs.ssh.startAgent = false;
} }

View File

@ -1,5 +1,8 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
{ {
imports = [
../.
];
krebs = { krebs = {
enable = true; enable = true;
build.user = config.krebs.users.shared; build.user = config.krebs.users.shared;

View File

@ -6,6 +6,7 @@ let
in in
{ {
imports = [ imports = [
../.
../2configs/base.nix ../2configs/base.nix
<nixpkgs/nixos/modules/profiles/qemu-guest.nix> <nixpkgs/nixos/modules/profiles/qemu-guest.nix>
../2configs/collectd-base.nix ../2configs/collectd-base.nix

View File

@ -16,7 +16,7 @@ with config.krebs.lib;
# TODO rename shared user to "krebs" # TODO rename shared user to "krebs"
krebs.build.user = mkDefault config.krebs.users.shared; krebs.build.user = mkDefault config.krebs.users.shared;
krebs.build.source = { krebs.build.source = {
upstream-nixpkgs = mkDefault { nixpkgs = mkDefault {
url = https://github.com/NixOS/nixpkgs; url = https://github.com/NixOS/nixpkgs;
rev = "77f8f35d57618c1ba456d968524f2fb2c3448295"; # for urlwatch-minidb rev = "77f8f35d57618c1ba456d968524f2fb2c3448295"; # for urlwatch-minidb
}; };
@ -24,8 +24,6 @@ with config.krebs.lib;
stockholm = mkDefault "${getEnv "HOME"}/stockholm"; stockholm = mkDefault "${getEnv "HOME"}/stockholm";
nixos-config = "symlink:stockholm/${config.krebs.build.user.name}/1systems/${config.krebs.build.host.name}.nix"; nixos-config = "symlink:stockholm/${config.krebs.build.user.name}/1systems/${config.krebs.build.host.name}.nix";
nixpkgs = symlink:stockholm/nixpkgs;
stockholm-user = "symlink:stockholm/${config.krebs.build.user.name}";
}; };
networking.hostName = config.krebs.build.host.name; networking.hostName = config.krebs.build.host.name;

7
shared/default.nix Normal file
View File

@ -0,0 +1,7 @@
_:
{
imports = [
../krebs
./3modules
];
}

View File

@ -6,6 +6,7 @@ with config.krebs.lib;
krebs.build.host = config.krebs.hosts.cd; krebs.build.host = config.krebs.hosts.cd;
imports = [ imports = [
../.
../2configs/hw/CAC-Developer-2.nix ../2configs/hw/CAC-Developer-2.nix
../2configs/fs/CAC-CentOS-7-64bit.nix ../2configs/fs/CAC-CentOS-7-64bit.nix
../2configs/exim-smarthost.nix ../2configs/exim-smarthost.nix

View File

@ -19,6 +19,7 @@ in
krebs.build.host = config.krebs.hosts.mkdir; krebs.build.host = config.krebs.hosts.mkdir;
imports = [ imports = [
../.
../2configs/hw/CAC-Developer-1.nix ../2configs/hw/CAC-Developer-1.nix
../2configs/fs/CAC-CentOS-7-64bit.nix ../2configs/fs/CAC-CentOS-7-64bit.nix
../2configs/exim-smarthost.nix ../2configs/exim-smarthost.nix

View File

@ -6,6 +6,7 @@ with config.krebs.lib;
krebs.build.host = config.krebs.hosts.nomic; krebs.build.host = config.krebs.hosts.nomic;
imports = [ imports = [
../.
../2configs/hw/AO753.nix ../2configs/hw/AO753.nix
../2configs/exim-retiolum.nix ../2configs/exim-retiolum.nix
../2configs/git.nix ../2configs/git.nix

View File

@ -19,6 +19,7 @@ in
krebs.build.host = config.krebs.hosts.rmdir; krebs.build.host = config.krebs.hosts.rmdir;
imports = [ imports = [
../.
../2configs/hw/CAC-Developer-1.nix ../2configs/hw/CAC-Developer-1.nix
../2configs/fs/CAC-CentOS-7-64bit.nix ../2configs/fs/CAC-CentOS-7-64bit.nix
../2configs/exim-smarthost.nix ../2configs/exim-smarthost.nix

View File

@ -6,6 +6,7 @@ with config.krebs.lib;
krebs.build.host = config.krebs.hosts.wu; krebs.build.host = config.krebs.hosts.wu;
imports = [ imports = [
../.
../2configs/hw/w110er.nix ../2configs/hw/w110er.nix
../2configs/exim-retiolum.nix ../2configs/exim-retiolum.nix
../2configs/git.nix ../2configs/git.nix

View File

@ -10,6 +10,7 @@
krebs.build.host = config.krebs.hosts.xu-qemu0; krebs.build.host = config.krebs.hosts.xu-qemu0;
imports = [ imports = [
../.
<nixpkgs/nixos/modules/profiles/qemu-guest.nix> <nixpkgs/nixos/modules/profiles/qemu-guest.nix>
]; ];

View File

@ -6,6 +6,7 @@ with config.krebs.lib;
krebs.build.host = config.krebs.hosts.xu; krebs.build.host = config.krebs.hosts.xu;
imports = [ imports = [
../.
../2configs/hw/x220.nix ../2configs/hw/x220.nix
../2configs/exim-retiolum.nix ../2configs/exim-retiolum.nix
../2configs/git.nix ../2configs/git.nix

View File

@ -9,12 +9,10 @@ with config.krebs.lib;
user = config.krebs.users.tv; user = config.krebs.users.tv;
source = mapAttrs (_: mkDefault) ({ source = mapAttrs (_: mkDefault) ({
nixos-config = "symlink:stockholm/tv/1systems/${config.krebs.build.host.name}.nix"; nixos-config = "symlink:stockholm/tv/1systems/${config.krebs.build.host.name}.nix";
nixpkgs = symlink:stockholm/nixpkgs;
secrets = "/home/tv/secrets/${config.krebs.build.host.name}"; secrets = "/home/tv/secrets/${config.krebs.build.host.name}";
secrets-common = "/home/tv/secrets/common"; secrets-common = "/home/tv/secrets/common";
stockholm = "/home/tv/stockholm"; stockholm = "/home/tv/stockholm";
stockholm-user = "symlink:stockholm/tv"; nixpkgs = {
upstream-nixpkgs = {
url = https://github.com/NixOS/nixpkgs; url = https://github.com/NixOS/nixpkgs;
rev = "77f8f35d57618c1ba456d968524f2fb2c3448295"; rev = "77f8f35d57618c1ba456d968524f2fb2c3448295";
dev = "/home/tv/nixpkgs"; dev = "/home/tv/nixpkgs";

9
tv/default.nix Normal file
View File

@ -0,0 +1,9 @@
_:
{
imports = [
../krebs
./2configs
./3modules
./5pkgs
];
}