Organize flakes and cleanup things.
Update SSH keys Remove ISO 'VM' configuration
This commit is contained in:
+38
-28
@@ -12,6 +12,10 @@ let
|
||||
self.nixosConfigurations.radiantwavekiosk.config.system.build.diskoScript;
|
||||
in
|
||||
{
|
||||
############################################################
|
||||
# System configuration
|
||||
############################################################
|
||||
|
||||
nix.settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
@@ -23,6 +27,8 @@ in
|
||||
];
|
||||
|
||||
flake-registry = "";
|
||||
|
||||
connect-timeout = 0;
|
||||
};
|
||||
|
||||
nix.registry.nixpkgs = pkgs.lib.mkForce {
|
||||
@@ -32,19 +38,11 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
environment.variables.KIOSK_FLAKE = "${self}";
|
||||
nix.extraOptions = ''
|
||||
netrc-file = /etc/nix/netrc
|
||||
'';
|
||||
|
||||
virtualisation.vmVariant = {
|
||||
virtualisation.memorySize = 8096;
|
||||
virtualisation.diskSize = 100000;
|
||||
virtualisation.cores = 4;
|
||||
virtualisation.qemu.options = [
|
||||
# "-nic none"
|
||||
];
|
||||
virtualisation.forwardPorts = [
|
||||
{ from = "host"; host.port = 2222; guest.port = 22; }
|
||||
];
|
||||
};
|
||||
environment.variables.KIOSK_FLAKE = "${self}";
|
||||
|
||||
environment.etc."nix/netrc" = {
|
||||
text = ''
|
||||
@@ -53,29 +51,33 @@ in
|
||||
mode = "0400";
|
||||
};
|
||||
|
||||
nix.extraOptions = ''
|
||||
netrc-file = /etc/nix/netrc
|
||||
'';
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
systemd.services.NetworkManager-wait-online.enable = false;
|
||||
############################################################
|
||||
# User configuration
|
||||
############################################################
|
||||
|
||||
nix.settings.connect-timeout = 0;
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL4qWNZnYU5JaqR9c2qh6oFZktzVNBOx42PfDaGofCL6 cnclack@pm.me macbook"
|
||||
];
|
||||
|
||||
############################################################
|
||||
# Service configuration
|
||||
############################################################
|
||||
|
||||
services.openssh.enable = true;
|
||||
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB4vXx7sOOVAyxdS/N1LEI+L8wYICf+gbzs6Kz7K8Je5 cnclack@pm.me:Thinkpad"
|
||||
];
|
||||
systemd.services.NetworkManager-wait-online.enable = false;
|
||||
|
||||
systemd.services.zero-touch-install = {
|
||||
description = "Zero-Touch Kiosk Installation";
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
wants = [ ];
|
||||
after = [ "systemd-udev-settle.service" ];
|
||||
# Make sure we own tty1 exclusively - getty@tty1 will otherwise
|
||||
# try to spawn a login prompt on the same console.
|
||||
conflicts = [ "getty@tty1.service" ];
|
||||
after = [ "systemd-udev-settle.service" "getty@tty1.service" ];
|
||||
|
||||
path = with pkgs; [
|
||||
nix
|
||||
@@ -95,8 +97,17 @@ in
|
||||
DISKO_SCRIPT = "${diskoScript}";
|
||||
};
|
||||
|
||||
serviceConfig = {
|
||||
StandardInput = "tty";
|
||||
StandardOutput = "tty";
|
||||
StandardError = "tty";
|
||||
TTYPath = "/dev/tty1";
|
||||
TTYReset = true;
|
||||
TTYVHangup = true;
|
||||
TTYVTDisallocate = true;
|
||||
};
|
||||
|
||||
script = ''
|
||||
script = ''
|
||||
set -euo pipefail
|
||||
|
||||
echo "Running disko script..."
|
||||
@@ -114,10 +125,9 @@ script = ''
|
||||
|
||||
echo "============================================"
|
||||
echo " Installation complete!"
|
||||
echo " Rebooting in 5 seconds..."
|
||||
echo " Please shut down and remove the flash drive before restarting"
|
||||
echo "============================================"
|
||||
sleep 5
|
||||
systemctl reboot --force
|
||||
sleep 10000000
|
||||
'';
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user