This commit is contained in:
iFargle 2023-09-22 19:45:23 +09:00
parent 9727dea6c7
commit 245fe5bee8
5 changed files with 39 additions and 34 deletions

View file

@ -14,14 +14,14 @@
nur.url = "github:nix-community/NUR";
# sops-nix - Secret Management with SOPS using GPG Keys
sops-nix.url = "github:Mic92/sops-nix";
# doom-emacs - The Doom Emacs distribution
# doom-emacs - The Doom Emacs distribution`
doom-emacs.url = "github:nix-community/nix-doom-emacs";
# nixos-hardware - Hardware Configurations
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
# nixos-generators - Automated Image / ISO Creation
nixos-generators.url = "github:nix-community/nixos-generators";
nixos-generators.inputs.nixpkgs.follows = "nixpkgs";
# disko - Automated Disk Partitioning
# disko - Declarative Disk Partitioning
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
};

View file

@ -1,14 +1,12 @@
{ config, pkgs, ... }: {
{ config, pkgs, desktop, ... }: {
# IF we're booting into a GUI, load in pretty things
imports = [ ] ++ lib.optional (builtins.isString desktop) ./plymouth.nix;
# Bootloader
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.systemd-boot.enable = true;
boot.tmp.cleanOnBoot = true;
boot.initrd.systemd.enable = true;
boot.kernelParams = ["quiet"];
# Plymouth splash screen
boot.plymouth.enable = true;
# https://github.com/adi1090x/plymouth-themes
boot.plymouth.theme = "red_loader";
boot.plymouth.themePackages = [ pkgs.adi1090x-plymouth-themes ];
}
}

View file

@ -0,0 +1,7 @@
{ pkgs, config, ... }: {
# Plymouth splash screen
boot.plymouth.enable = true;
# https://github.com/adi1090x/plymouth-themes
boot.plymouth.theme = "red_loader";
boot.plymouth.themePackages = [ pkgs.adi1090x-plymouth-themes ];
}

View file

@ -1,8 +1,6 @@
{
boot.loader.grub.device = "/dev/sda";
boot.initrd.luks.devices."sda2".device = "/dev/sda2";
services.btrfs.autoScrub.enable = true;
services.btrfs.autoScrub.interval = "weekly";
disko.devices.disk.sda = {
device = "/dev/sda";
@ -29,27 +27,11 @@
end = "100%";
content = {
type = "luks";
name = "LUKS-ROOT";
extraOpenArgs = [ "--allow-discards" ];
settings.keyFile = "/tmp/secret.key";
name = "ROOT";
content = {
type = "filesystem";
format = "btrfs";
# extraArgs = [ "-f" ];
subvolumes = {
"/root" = {
format = "ext4";
mountpoint = "/";
mountOptions = [ "compress=zstd" "noatime" ];
}; # root
"/home" = {
mountpoint = "/home";
mountOptions = [ "compress=zstd" "noatime" ];
}; # home
"/nix" = {
mountpoint = "/nix";
mountOptions = [ "compress=zstd" "noatime" ];
}; # nix
}; # subvolumes
}; # content.content
}; # content
} # partition 2

View file

@ -1,6 +1,8 @@
{
boot.loader.grub.device = "/dev/sda";
boot.initrd.luks.devices."sda2".device = "/dev/sda2";
services.btrfs.autoScrub.enable = true;
services.btrfs.autoScrub.interval = "weekly";
disko.devices.disk.sda = {
device = "/dev/sda";
@ -27,11 +29,27 @@
end = "100%";
content = {
type = "luks";
name = "ROOT";
name = "LUKS-ROOT";
extraOpenArgs = [ "--allow-discards" ];
settings.keyFile = "/tmp/secret.key";
content = {
type = "filesystem";
format = "ext4";
format = "btrfs";
# extraArgs = [ "-f" ];
subvolumes = {
"/root" = {
mountpoint = "/";
mountOptions = [ "compress=zstd" "noatime" ];
}; # root
"/home" = {
mountpoint = "/home";
mountOptions = [ "compress=zstd" "noatime" ];
}; # home
"/nix" = {
mountpoint = "/nix";
mountOptions = [ "compress=zstd" "noatime" ];
}; # nix
}; # subvolumes
}; # content.content
}; # content
} # partition 2