can i boot this?

This commit is contained in:
Henrik Lissner 2021-10-10 18:31:00 +10:00
parent 14393312e0
commit c886a5849a
5 changed files with 87 additions and 1 deletions

View file

@ -114,13 +114,22 @@
hosts = {
/* set host specific properties here */
NixOS = { };
curve = {
channelName = "latest";
modules = [ ]; # nixos-hardware.nixosModules.lenovo-thinkpad
# Yubikey
};
box = { };
hypercube = { };
};
importables = rec {
profiles = digga.lib.rakeLeaves ./profiles // {
users = digga.lib.rakeLeaves ./users;
};
suites = with profiles; rec {
base = [ core users.nixos users.root ];
base = [ core users.nixos users.root nvim ];
sealight = [ base ]; # matrix rsshub backup wireguard
mossnet = [ base ]; # shaarli wallabag nextcloud taskwarrior headphones
};
};
};
@ -132,10 +141,12 @@
profiles = digga.lib.rakeLeaves ./users/profiles;
suites = with profiles; rec {
base = [ direnv git ];
gui = [ base firefox desktop ]
};
};
users = {
nixos = { suites, ... }: { imports = suites.base; };
anish = { suites, ... }: { imports = suites.gui; };
}; # digga.lib.importers.rakeLeaves ./users/hm;
};

View file

@ -0,0 +1,9 @@
{profiles, suites, ... }:
{
imports = [
profiles.core
profiles.users.anish
profiles.hardware.curve # how else to deal with hardware?
suites.gui
];
}

View file

@ -0,0 +1,38 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/6ee9d430-1b1b-4e39-bced-606145570a78";
fsType = "btrfs";
options = [ "subvol=root" ];
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/6ee9d430-1b1b-4e39-bced-606145570a78";
fsType = "btrfs";
options = [ "subvol=home" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/AD0C-92EF";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/5486bd9f-6826-4ac7-b09b-8768a35c331f"; }
];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
}

View file

@ -0,0 +1,28 @@
{
imports = [ ./curve-hardware-configuration ];
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
# Define on which hard drive you want to install Grub.
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
# Minimal list of modules to use the EFI system partition and the YubiKey
boot.initrd.kernelModules = [ "vfat" "nls_cp437" "nls_iso8859-1" "usbhid" ];
# Enable support for the YubiKey PBA
boot.initrd.luks.yubikeySupport = true;
# Configuration to use your Luks device
boot.initrd.luks.devices = {
"crypthome" = {
device = "/dev/sda2";
preLVM = true; # You may want to set this to false if you need to start a network service first
yubikey = {
slot = 2;
twoFactor = true; # Set to false if you did not set up a user password.
storage = {
device = "/dev/sda1";
};
};
};
};
}

View file