nix #11
|
@ -9,6 +9,9 @@
|
|||
# nixos-hardware use latest kernel by default. It has been set a while ago, we maybe don't need it anymore?
|
||||
kernelPackages = pkgs.linuxPackages;
|
||||
|
||||
# Otherwise it will not show stage1 echo and prompt
|
||||
kernelParams = ["console=tty0"];
|
||||
|
||||
# Pinebook supports UEFI, at least when tow-boot is installed on the SPI
|
||||
loader = {
|
||||
# EFI Variables don't work (no generation appears in systemd-boot)
|
||||
|
|
|
@ -1,64 +0,0 @@
|
|||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
pindakaas_sd = {
|
||||
type = "disk";
|
||||
device = "/dev/disk/by-id/mmc-SN32G_0xfb19ae99";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
# Needs enough to store multiple kernel generations
|
||||
size = "512M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [
|
||||
"defaults"
|
||||
];
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "pindakaas_sd";
|
||||
#passwordFile = "/tmp/secret.key"; # Commented out so asked interactively
|
||||
settings = {
|
||||
# Not having SSDs die fast is more important than crypto
|
||||
# nerds that could potentially discover which filesystem I
|
||||
# use from TRIM patterns
|
||||
allowDiscards = true;
|
||||
};
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ];
|
||||
subvolumes = {
|
||||
"/nixos" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
"/home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = [ "compress=zstd" "relatime" ];
|
||||
};
|
||||
"/nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
# Maybe later
|
||||
# "/swap" = {
|
||||
# mountpoint = "/.swapvol";
|
||||
# swap.swapfile.size = "20M";
|
||||
# };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
vdb = {
|
||||
type = "disk";
|
||||
device = "/dev/disk/by-id/mmc-SN32G_0xfb19ae99";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "500M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "crypted";
|
||||
settings.allowDiscards = true;
|
||||
passwordFile = "/tmp/secret.key";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
vdb = {
|
||||
type = "disk";
|
||||
device = "/dev/disk/by-id/mmc-SN32G_0xfb19ae99";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "500M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
disko-hanging.nix
|
65
pindakaas_sd/disko.nix
Normal file
65
pindakaas_sd/disko.nix
Normal file
|
@ -0,0 +1,65 @@
|
|||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
pindakaas_sd = {
|
||||
type = "disk";
|
||||
device = "/dev/disk/by-id/mmc-SN32G_0xfb19ae99";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
# Needs enough to store multiple kernel generations
|
||||
size = "512M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [
|
||||
"defaults"
|
||||
];
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "pindakaas_sd";
|
||||
passwordFile = "/tmp/secret.key"; # TODO Generate this somehow
|
||||
settings = {
|
||||
# Not having SSDs die fast is more important than crypto
|
||||
# nerds that could potentially discover which filesystem I
|
||||
# use from TRIM patterns
|
||||
allowDiscards = true;
|
||||
};
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ];
|
||||
subvolumes = {
|
||||
"/nixos" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
"/home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = [ "compress=zstd" "relatime" ];
|
||||
};
|
||||
"/nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
# Maybe later
|
||||
# "/swap" = {
|
||||
# mountpoint = "/.swapvol";
|
||||
# swap.swapfile.size = "20M";
|
||||
# };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
1
pindakaas_sd/hybrid
Symbolic link
1
pindakaas_sd/hybrid
Symbolic link
|
@ -0,0 +1 @@
|
|||
/nix/store/bz6nqy0ky5l33rfrkb6k66bzkgw18k90-nixos-system-pindakaas_sd-23.05.4981.5b528f99f73c
|
|
@ -1,6 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
# Barebones is faster to test partition schemes
|
||||
frogeye.dev.ansible = false;
|
||||
frogeye.dev.python = false;
|
||||
}
|
|
@ -1,15 +1,11 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
imports = [
|
||||
# START DEBUG
|
||||
# ../os
|
||||
# ./options.nix
|
||||
"${builtins.fetchTarball "https://github.com/nix-community/disko/archive/3cb78c93e6a02f494aaf6aeb37481c27a2e2ee22.tar.gz"}/module.nix"
|
||||
# END DEBUG
|
||||
../os
|
||||
../pindakaas/options.nix
|
||||
../pindakaas/hardware.nix
|
||||
./disko.nix
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true; # DEBUG
|
||||
networking.hostName = "pindakaas_sd";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue