test
This commit is contained in:
parent
8fed6d80e4
commit
0cdc6cfb60
4 changed files with 57 additions and 58 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -2,59 +2,57 @@
|
||||||
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 = {
|
device = "/dev/sda";
|
||||||
sda = {
|
content = {
|
||||||
device = "/dev/sda";
|
type = "table";
|
||||||
content = {
|
format = "gpt";
|
||||||
type = "table";
|
partitions = [
|
||||||
format = "gpt";
|
{
|
||||||
partitions = [
|
type = "partition";
|
||||||
{
|
name = "BOOT";
|
||||||
name = "BOOT";
|
start = "0%";
|
||||||
start = "0%";
|
end = "550MiB";
|
||||||
end = "550MiB";
|
bootable = true;
|
||||||
bootable = true;
|
flags = [ "esp" ];
|
||||||
flags = [ "esp" ];
|
fs-type = "fat32";
|
||||||
fs-type = "fat32";
|
content = {
|
||||||
content = {
|
type = "filesystem";
|
||||||
type = "filesystem";
|
format = "vfat";
|
||||||
format = "vfat";
|
mountpoint = "/boot";
|
||||||
mountpoint = "/boot";
|
};
|
||||||
};
|
} # partition 1
|
||||||
} # partition 1
|
{
|
||||||
{
|
type = "partition";
|
||||||
name = "ROOT";
|
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 = "/";
|
||||||
mountOptions = [ "compress=zstd" "noatime" ];
|
mountOptions = [ "compress=zstd" "noatime" ];
|
||||||
}; # root
|
}; # root
|
||||||
"/home" = {
|
"/home" = {
|
||||||
mountpoint = "/home";
|
mountpoint = "/home";
|
||||||
mountOptions = [ "compress=zstd" "noatime" ];
|
mountOptions = [ "compress=zstd" "noatime" ];
|
||||||
}; # home
|
}; # home
|
||||||
"/nix" = {
|
"/nix" = {
|
||||||
mountpoint = "/nix";
|
mountpoint = "/nix";
|
||||||
mountOptions = [ "compress=zstd" "noatime" ];
|
mountOptions = [ "compress=zstd" "noatime" ];
|
||||||
}; # nix
|
}; # nix
|
||||||
}; # subvolumes
|
}; # subvolumes
|
||||||
}; # content.content
|
}; # content.content
|
||||||
}; # content
|
}; # content
|
||||||
} # partition 2
|
} # partition 2
|
||||||
]; # partitions
|
]; # partitions
|
||||||
}; # content
|
}; # content
|
||||||
}; # sda
|
}; # disko.devices.disk.sda
|
||||||
}; # disk
|
|
||||||
}; # disko.devices
|
|
||||||
} # root
|
} # root
|
Loading…
Reference in a new issue