Re-add variants and reorganize things
This commit is contained in:
parent
bf803d18a6
commit
8476bbde12
|
@ -1,10 +1,12 @@
|
|||
{ id, name, passwordFile ? "/should_not_be_needed_in_this_context", ... }:
|
||||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
passwordFile = "/tmp/dotfiles_${config.networking.hostName}_password";
|
||||
in
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
"${name}" = {
|
||||
"${config.networking.hostName}" = {
|
||||
type = "disk";
|
||||
device = "/dev/disk/by-id/${id}";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
|
@ -25,7 +27,7 @@
|
|||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "${name}";
|
||||
name = "${config.networking.hostName}";
|
||||
passwordFile = passwordFile;
|
||||
settings = {
|
||||
# Not having SSDs die fast is more important than crypto
|
12
curacao/default.nix
Normal file
12
curacao/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
config = {
|
||||
networking.hostName = "curacao";
|
||||
};
|
||||
imports = [
|
||||
./backup
|
||||
./disko.nix
|
||||
./features.nix
|
||||
./hardware.nix
|
||||
];
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{ passwordFile ? "/should_not_be_needed_in_this_context", ... }:
|
||||
{ pkgs, lib, config, ... }:
|
||||
# TODO Find a way to use keys in filesystem
|
||||
# TODO Not relatime everywhere, thank you
|
||||
# TODO Default options
|
||||
|
@ -10,8 +10,10 @@ let
|
|||
"space_cache"
|
||||
];
|
||||
btrfs_args_ssd = btrfs_args_hdd ++ [ "ssd" ];
|
||||
passwordFile = "/tmp/dotfiles_${config.networking.hostName}_password";
|
||||
in
|
||||
{
|
||||
boot.loader.efi.efiSysMountPoint = config.disko.devices.disk.razmo.content.partitions.esp.content.mountpoint;
|
||||
disko.devices = {
|
||||
disk = {
|
||||
razmo = {
|
||||
|
@ -32,7 +34,6 @@ in
|
|||
# hibernation image is saved. That's what I'm doing with Arch,
|
||||
# but I'm setting resume=, should test if it actually works?
|
||||
# Untranslated options from /etc/crypttab: swap,cipher=aes-xts-plain64,size=256
|
||||
# Untranslated options from /etc/fstab: defaults,pri=100
|
||||
};
|
||||
};
|
||||
nixosboot = {
|
13
curacao/features.nix
Normal file
13
curacao/features.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ ... }:
|
||||
{
|
||||
frogeye = {
|
||||
desktop = {
|
||||
xorg = true;
|
||||
};
|
||||
dev = {
|
||||
docker = true;
|
||||
};
|
||||
extra = true;
|
||||
gaming = true;
|
||||
};
|
||||
}
|
|
@ -10,4 +10,15 @@
|
|||
# TODO Maybe we could? In case the HDD doesn't boot anymore?
|
||||
};
|
||||
};
|
||||
frogeye.desktop = {
|
||||
x11_screens = [ "HDMI-1-0" "eDP-1" ];
|
||||
maxVideoHeight = 1440;
|
||||
numlock = true;
|
||||
phasesBrightness = {
|
||||
enable = true;
|
||||
jour = "40000";
|
||||
crepuscule = "10000";
|
||||
nuit = "1";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
frogeye = {
|
||||
desktop = {
|
||||
xorg = true;
|
||||
x11_screens = [ "HDMI-1-0" "eDP-1" ];
|
||||
maxVideoHeight = 1440;
|
||||
numlock = true;
|
||||
phasesBrightness = {
|
||||
enable = true;
|
||||
jour = "40000";
|
||||
crepuscule = "10000";
|
||||
nuit = "1";
|
||||
};
|
||||
};
|
||||
dev = {
|
||||
docker = true;
|
||||
};
|
||||
extra = true;
|
||||
gaming = true;
|
||||
};
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./options.nix
|
||||
./hardware.nix
|
||||
./dk.nix
|
||||
./backup
|
||||
];
|
||||
|
||||
networking.hostName = "curacao";
|
||||
boot = {
|
||||
loader = {
|
||||
efi.efiSysMountPoint = "/efi";
|
||||
};
|
||||
};
|
||||
}
|
13
curacao/usb.nix
Normal file
13
curacao/usb.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
config = {
|
||||
boot.loader.grub.efiInstallAsRemovable = true;
|
||||
disk."${config.networking.hostName}".device = "/dev/disk/by-id/usb-Kingston_DataTraveler_3.0_E0D55EA57414F510489F0F1A-0:0";
|
||||
networking.hostName = "curacao-usb";
|
||||
};
|
||||
imports = [
|
||||
../common/disko/single_uefi_btrfs.nix
|
||||
./features.nix
|
||||
./hardware.nix
|
||||
];
|
||||
}
|
18
flake.nix
18
flake.nix
|
@ -102,14 +102,28 @@
|
|||
nixosConfigurations.curacao = lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./curacao/os.nix
|
||||
./curacao
|
||||
nixos-hardware.nixosModules.dell-g3-3779
|
||||
];
|
||||
};
|
||||
nixosConfigurations.curacao_usb = lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./curacao/usb.nix
|
||||
nixos-hardware.nixosModules.dell-g3-3779
|
||||
];
|
||||
};
|
||||
nixosConfigurations.pindakaas = lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
modules = [
|
||||
./pindakaas/os.nix
|
||||
./pindakaas
|
||||
nixos-hardware.nixosModules.pine64-pinebook-pro
|
||||
];
|
||||
};
|
||||
nixosConfigurations.pindakaas-sd = lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
modules = [
|
||||
./pindakaas/sd.nix
|
||||
nixos-hardware.nixosModules.pine64-pinebook-pro
|
||||
];
|
||||
};
|
||||
|
|
13
os/boot/default.nix
Normal file
13
os/boot/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
boot.loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
device = "nodev"; # Don't install on MBR
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@
|
|||
../options.nix
|
||||
../common/frogarized
|
||||
./battery.nix
|
||||
./boot
|
||||
./ccc
|
||||
./common.nix
|
||||
./desktop.nix
|
||||
|
|
11
pindakaas/default.nix
Normal file
11
pindakaas/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
config = {
|
||||
disk."${config.networking.hostName}".device = "/dev/disk/by-id/mmc-DA4064_0x931f080f";
|
||||
networking.hostName = "pindakaas";
|
||||
};
|
||||
imports = [
|
||||
./hardware.nix
|
||||
./features.nix
|
||||
];
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
{ ... } @ args:
|
||||
import ../dk/single_uefi_btrfs.nix (args // { id = "mmc-DA4064_0x931f080f"; name = "pindakaas"; })
|
9
pindakaas/features.nix
Normal file
9
pindakaas/features.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
config = {
|
||||
frogeye = {
|
||||
desktop.xorg = true;
|
||||
extra = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -6,24 +6,29 @@
|
|||
|
||||
# Otherwise it will not show stage1 echo and prompt
|
||||
# UPST
|
||||
kernelParams = ["console=tty0"];
|
||||
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)
|
||||
efi.canTouchEfiVariables = false;
|
||||
|
||||
# systemd-boot crashes after booting, so GRUB it is
|
||||
grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
efiInstallAsRemovable = true;
|
||||
device = "nodev";
|
||||
};
|
||||
grub.efiInstallAsRemovable = true;
|
||||
};
|
||||
};
|
||||
|
||||
zramSwap = { # Not capable of building itself otherwise
|
||||
frogeye.desktop = {
|
||||
x11_screens = [ "DP-1" "eDP-1" ];
|
||||
maxVideoHeight = 720;
|
||||
phasesBrightness = {
|
||||
enable = true;
|
||||
jour = "3500";
|
||||
crepuscule = "3000";
|
||||
nuit = "700";
|
||||
};
|
||||
};
|
||||
|
||||
zramSwap = {
|
||||
# Not capable of building itself otherwise
|
||||
enable = true;
|
||||
memoryPercent = 150; # Factory settings
|
||||
};
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
frogeye.extra = true;
|
||||
frogeye.desktop = {
|
||||
xorg = true;
|
||||
x11_screens = [ "DP-1" "eDP-1" ];
|
||||
maxVideoHeight = 720;
|
||||
phasesBrightness = {
|
||||
enable = true;
|
||||
jour = "3500";
|
||||
crepuscule = "3000";
|
||||
nuit = "700";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./hardware.nix
|
||||
./dk.nix
|
||||
./options.nix
|
||||
];
|
||||
|
||||
networking.hostName = "pindakaas";
|
||||
}
|
13
pindakaas/sd.nix
Normal file
13
pindakaas/sd.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
config = {
|
||||
boot.loader.grub.efiInstallAsRemovable = true;
|
||||
disk."${config.networking.hostName}".device = "/dev/disk/by-id/mmc-SN32G_0xfb19ae99";
|
||||
networking.hostName = "pindakaas-sd";
|
||||
};
|
||||
imports = [
|
||||
../common/disko/single_uefi_btrfs.nix
|
||||
./features.nix
|
||||
./hardware.nix
|
||||
];
|
||||
}
|
Loading…
Reference in a new issue