summaryrefslogtreecommitdiffstats
path: root/makefu/1systems/shack-autoinstall/config.nix
diff options
context:
space:
mode:
authorjeschli <jeschli@gmail.com>2018-09-25 19:56:06 +0200
committerjeschli <jeschli@gmail.com>2018-09-25 19:56:06 +0200
commit8834d1a9ff6eddfc36e3ad07b7f93805b3212b3f (patch)
tree9ce300976ec88d90e5c5c9030111d890dcf5683e /makefu/1systems/shack-autoinstall/config.nix
parentf922d5947acc3151619ec06962197a800d3138eb (diff)
parenta374a452112ba962ab90e45b6b0f27b3a1330e4f (diff)
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'makefu/1systems/shack-autoinstall/config.nix')
-rw-r--r--makefu/1systems/shack-autoinstall/config.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/makefu/1systems/shack-autoinstall/config.nix b/makefu/1systems/shack-autoinstall/config.nix
new file mode 100644
index 000000000..d53c411c0
--- /dev/null
+++ b/makefu/1systems/shack-autoinstall/config.nix
@@ -0,0 +1,49 @@
+{ config, pkgs, lib, ... }:
+
+with import <stockholm/lib>;
+let
+ disk = "/dev/sda";
+in {
+ 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.extraInit = ''
+ EDITOR=vim
+ '';
+ # iso-specific
+ boot.kernelParams = [ "copytoram" ];
+
+
+ environment.systemPackages = [
+ pkgs.parted
+ ( pkgs.writeScriptBin "shack-install" ''
+ #! /bin/sh
+ echo "go ahead and try NIX_PATH=/root/.nix-defexpr/channels/ nixos-install"
+ '')
+ ];
+
+ systemd.services.wpa_supplicant.wantedBy = lib.mkForce [ "multi-user.target" ];
+
+ networking.wireless = {
+ enable = true;
+ networks.shack.psk = "welcome2shack";
+ };
+
+
+ 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" ];
+}