From fa38155eec9563dc9dc620a77900d87b97443cfe Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 15 Jul 2017 18:57:16 +0200 Subject: ma: move systems to subdir, init source --- makefu/1systems/iso/config.nix | 55 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 makefu/1systems/iso/config.nix (limited to 'makefu/1systems/iso') diff --git a/makefu/1systems/iso/config.nix b/makefu/1systems/iso/config.nix new file mode 100644 index 000000000..c679241e5 --- /dev/null +++ b/makefu/1systems/iso/config.nix @@ -0,0 +1,55 @@ +{ config, pkgs, lib, ... }: + +with import ; +{ + imports = [ + ../. + + + ../2configs/tools/core.nix + ]; + # TODO: NIX_PATH and nix.nixPath are being set by default.nix right now + # cd ~/stockholm ; nix-build -A config.system.build.isoImage -I nixos-config=makefu/1systems/iso.nix -I secrets=/home/makefu/secrets/iso /var/src/nixpkgs/nixos + krebs.build.host = config.krebs.hosts.iso; + krebs.hidden-ssh.enable = true; + environment.systemPackages = with pkgs; [ + aria2 + ddrescue + ]; + environment.extraInit = '' + EDITOR=vim + ''; + # iso-specific + boot.kernelParams = [ "copytoram" ]; + services.openssh = { + enable = true; + hostKeys = [ + { bits = 8192; type = "ed25519"; path = "/etc/ssh/ssh_host_ed25519_key"; } + ]; + }; + # enable ssh in the iso boot process + systemd.services.sshd.wantedBy = lib.mkForce [ "multi-user.target" ]; + # hack `tee` behavior + nixpkgs.config.packageOverrides = super: { + irc-announce = super.callPackage { + pkgs = pkgs // { + coreutils = pkgs.symlinkJoin { + name = "coreutils-hack"; + paths = [ + pkgs.coreutils + (pkgs.writeDashBin "tee" '' + if test "$1" = /dev/stderr; then + while read -r line; do + echo "$line" + echo "$line" >&2 + done + else + ${super.coreutils}/bin/tee "$@" + fi + '') + ]; + }; + }; + }; + }; +} -- cgit v1.2.3 From 7704f80890c75f65c2906ecc17cdd89761d308ad Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 15 Jul 2017 19:01:02 +0200 Subject: ma: replace path to 2configs, init source.nix --- makefu/1systems/iso/config.nix | 4 ++-- makefu/1systems/iso/source.nix | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 makefu/1systems/iso/source.nix (limited to 'makefu/1systems/iso') diff --git a/makefu/1systems/iso/config.nix b/makefu/1systems/iso/config.nix index c679241e5..f863321bd 100644 --- a/makefu/1systems/iso/config.nix +++ b/makefu/1systems/iso/config.nix @@ -3,10 +3,10 @@ with import ; { imports = [ - ../. + - ../2configs/tools/core.nix + ]; # TODO: NIX_PATH and nix.nixPath are being set by default.nix right now # cd ~/stockholm ; nix-build -A config.system.build.isoImage -I nixos-config=makefu/1systems/iso.nix -I secrets=/home/makefu/secrets/iso /var/src/nixpkgs/nixos diff --git a/makefu/1systems/iso/source.nix b/makefu/1systems/iso/source.nix new file mode 100644 index 000000000..e200dbfd2 --- /dev/null +++ b/makefu/1systems/iso/source.nix @@ -0,0 +1,3 @@ +import { + name="iso"; +} -- cgit v1.2.3