auto: bootstrapping sparky
This commit is contained in:
parent
34cf736bea
commit
2910b2d267
|
@ -255,11 +255,11 @@
|
|||
"nix-secrets": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1716822214,
|
||||
"narHash": "sha256-nzzfVOIWi/BM0n/1iEcEejvnaH5XeSxKavWjUG+jzrU=",
|
||||
"lastModified": 1716823135,
|
||||
"narHash": "sha256-2+nqAgrQ11TRNKsMR3eTRrBWfRKBSxEl500g8fL5WgI=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "4667b20b9504b01c3c6de4f32a89b78bf88416a9",
|
||||
"revCount": 63,
|
||||
"rev": "3685717aaa6091e50eb2018b9375b07cf33780a6",
|
||||
"revCount": 64,
|
||||
"type": "git",
|
||||
"url": "ssh://git@git.bitlab21.com/sam/nix-secrets.git"
|
||||
},
|
||||
|
|
|
@ -6,7 +6,6 @@ in
|
|||
imports = [
|
||||
./sops.nix
|
||||
./locale.nix
|
||||
inputs.impermanence.nixosModules.impermanence
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
|
|
|
@ -1,10 +1,25 @@
|
|||
{ inputs, config, lib, pkgs, outputs,... }:
|
||||
let
|
||||
# Disko setup
|
||||
fsType = "btrfs"; # one of ext4 or btrfs. Use btrfs if using impermanence
|
||||
dev = "/dev/vda"; # depends on target hardware
|
||||
encrypted = false; # currrently only applies to btrfs
|
||||
btrfsMountDevice = if encrypted then "/dev/mapper/crypted" else "/dev/root_vg/root";
|
||||
in
|
||||
{
|
||||
imports =
|
||||
[
|
||||
# Create users for this host
|
||||
../common/users/media
|
||||
|
||||
# Disk configuration
|
||||
inputs.disko.nixosModules.disko
|
||||
(import ../common/disks { device = dev; fsType = fsType; encrypted = encrypted; })
|
||||
|
||||
# Impermanence
|
||||
inputs.impermanence.nixosModules.impermanence
|
||||
(import ../common/disks/btrfs-impermanence.nix { btrfsMountDevice = btrfsMountDevice; lib = lib; })
|
||||
|
||||
# Import core options
|
||||
./hardware-configuration.nix
|
||||
../common/core
|
||||
|
|
|
@ -12,9 +12,9 @@ for the root user.
|
|||
read -p "Confirm host had been setup using the above steps...(yes|no): " confirm
|
||||
[ "$confirm" != "yes" ] && echo "Exiting" && exit 0
|
||||
|
||||
hostname="sparky"
|
||||
ip="192.168.122.193"
|
||||
config="bootstrap"
|
||||
read -p "Enter hostname of target: " hostname
|
||||
read -p "Enter IP of target: " ip
|
||||
read -p "Enter config to install on target: " config
|
||||
|
||||
# Delete key in known hosts if exists
|
||||
sed -i "/$ip/d" ~/.ssh/known_hosts
|
||||
|
|
Loading…
Reference in New Issue