summaryrefslogtreecommitdiffstats
path: root/makefu/1systems/iso/config.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2017-07-16 12:05:35 +0200
committerlassulus <lassulus@lassul.us>2017-07-16 12:05:35 +0200
commitcd7c0971ccc9023f63feb75d4abe514fdc03a079 (patch)
tree704c47afe8cd43a36f36f251cd53b340ec5ec4da /makefu/1systems/iso/config.nix
parentb91a4c4b0f0958cdc5e7c0d60523326083f275d4 (diff)
parent0e0ad14c373a038e6d347017f5efe172c7409793 (diff)
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'makefu/1systems/iso/config.nix')
-rw-r--r--makefu/1systems/iso/config.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/makefu/1systems/iso/config.nix b/makefu/1systems/iso/config.nix
new file mode 100644
index 000000000..f863321bd
--- /dev/null
+++ b/makefu/1systems/iso/config.nix
@@ -0,0 +1,55 @@
+{ config, pkgs, lib, ... }:
+
+with import <stockholm/lib>;
+{
+ imports = [
+ <stockholm/makefu>
+ <nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix>
+ <nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
+ <stockholm/makefu/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 <stockholm/krebs/5pkgs/simple/irc-announce> {
+ 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
+ '')
+ ];
+ };
+ };
+ };
+ };
+}