This commit is contained in:
iFargle 2023-09-22 14:24:13 +09:00
parent 8fed6d80e4
commit 0cdc6cfb60
4 changed files with 57 additions and 58 deletions

View file

@ -65,7 +65,8 @@ if [[ $REPLY =~ ^[Yy]$ ]]; then
sudo nixos-install --no-root-password --flake ".#$TARGET_HOST" sudo nixos-install --no-root-password --flake ".#$TARGET_HOST"
# Rsync nix-config to the target install. # Rsync nix-config to the target install.
rsync -a --delete "/tmp/nixos/git/" "/mnt/etc/nixos/git/" sudo mkdir -p "/mnt/etc/nixos"
sudo rsync -a --delete "/tmp/nixos/git/" "/mnt/etc/nixos/git/"
pushd "/mnt/etc/nixos/git/" pushd "/mnt/etc/nixos/git/"
popd popd

View file

@ -1,7 +1,7 @@
{ config, lib, pkgs, modulesPath, desktop, username, ... }: { { config, lib, pkgs, modulesPath, desktop, username, ... }: {
imports = [ imports = [
# This machine won't be using secureboot # This machine won't be using secureboot
../../common/modules/bootloader.nix ../../common/modules/secureboot.nix
./disks.nix ./disks.nix
]; ];
nixpkgs.config.allowUnfree = false; nixpkgs.config.allowUnfree = false;

View file

@ -2,15 +2,14 @@
boot.loader.grub.device = "/dev/sda"; boot.loader.grub.device = "/dev/sda";
boot.initrd.luks.devices."sda2".device = "/dev/sda2"; boot.initrd.luks.devices."sda2".device = "/dev/sda2";
disko.devices = { disko.devices.disk.sda = {
disk = {
sda = {
device = "/dev/sda"; device = "/dev/sda";
content = { content = {
type = "table"; type = "table";
format = "gpt"; format = "gpt";
partitions = [ partitions = [
{ {
type = "partition";
name = "BOOT"; name = "BOOT";
start = "0%"; start = "0%";
end = "550MiB"; end = "550MiB";
@ -24,17 +23,18 @@
}; };
} # partition 1 } # partition 1
{ {
name = "ROOT"; type = "partition";
name = "LUKS";
start = "550MiB"; start = "550MiB";
end = "100%"; end = "100%";
content = { content = {
type = "luks"; type = "luks";
name = "LUKS-ROOT"; name = "LUKS-ROOT";
extraOpenArgs = [ "--allow-discards" ]; extraOpenArgs = [ "--allow-discards" ];
settings.keyFile = "/tmp/secret.key"; # settings.keyFile = "/tmp/secret.key";
content = { content = {
type = "btrfs"; type = "btrfs";
extraArgs = [ "-f" ]; # extraArgs = [ "-f" ];
subvolumes = { subvolumes = {
"/root" = { "/root" = {
mountpoint = "/"; mountpoint = "/";
@ -54,7 +54,5 @@
} # partition 2 } # partition 2
]; # partitions ]; # partitions
}; # content }; # content
}; # sda }; # disko.devices.disk.sda
}; # disk
}; # disko.devices
} # root } # root