Compare commits
No commits in common. "b2bf8fc419bc082095b9e5ca0d34e0cea9b1e28b" and "770b5c085072da317589ef83c21f0500dbee78ea" have entirely different histories.
b2bf8fc419
...
770b5c0850
|
@ -1,115 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
# Do not change this value! This tracks when NixOS was installed on your system.
|
||||
stateVersion = "24.11";
|
||||
in
|
||||
{
|
||||
imports = [ ./hardware-configuration.nix ];
|
||||
|
||||
system.stateVersion = stateVersion;
|
||||
|
||||
###*** Configure your system below this line. ***###
|
||||
# Set your time zone.
|
||||
# To see all available timezones, run `timedatectl list-timezones`.
|
||||
time.timeZone = "America/New_York";
|
||||
|
||||
# Configure the system.
|
||||
aux.system = {
|
||||
# Enable to allow unfree (e.g. closed source) packages.
|
||||
# Some settings may override this (e.g. enabling Nvidia GPU support).
|
||||
# https://nixos.org/manual/nixpkgs/stable/#sec-allow-unfree
|
||||
allowUnfree = true;
|
||||
|
||||
apps = {
|
||||
development.enable = true;
|
||||
media.enable = true;
|
||||
office.enable = true;
|
||||
recording.enable = true;
|
||||
social.enable = true;
|
||||
writing.enable = true;
|
||||
};
|
||||
|
||||
# Enable Secure Boot support.
|
||||
bootloader = {
|
||||
enable = true;
|
||||
secureboot.enable = true;
|
||||
tpm2.enable = true;
|
||||
};
|
||||
|
||||
# Use Disko to partition and format disks
|
||||
disko = {
|
||||
enable = true;
|
||||
primaryDiskID = "";
|
||||
swapFile = {
|
||||
enable = true;
|
||||
size = "16G";
|
||||
};
|
||||
};
|
||||
|
||||
# Change the default text editor. Options are "emacs", "nano", or "vim".
|
||||
editor = "nano";
|
||||
|
||||
# Enable GPU support.
|
||||
gpu = {
|
||||
intel.enable = true;
|
||||
nvidia = {
|
||||
enable = false;
|
||||
hybrid = {
|
||||
enable = false;
|
||||
busIDs.nvidia = "";
|
||||
busIDs.intel = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Change how long old generations are kept for.
|
||||
retentionPeriod = "14d";
|
||||
|
||||
services = {
|
||||
autoUpgrade = {
|
||||
enable = true;
|
||||
configDir = config.secrets.nixConfigFolder;
|
||||
onCalendar = "daily";
|
||||
user = config.users.users.aires.name;
|
||||
};
|
||||
virtualization.enable = true;
|
||||
};
|
||||
|
||||
ui = {
|
||||
desktops.gnome = {
|
||||
enable = true;
|
||||
tripleBuffering.enable = true;
|
||||
};
|
||||
flatpak = {
|
||||
# Enable Flatpak support.
|
||||
enable = true;
|
||||
|
||||
# Define Flatpak packages to install.
|
||||
packages = [
|
||||
"com.github.tchx84.Flatseal"
|
||||
"com.github.wwmm.easyeffects"
|
||||
"md.obsidian.Obsidian"
|
||||
"org.keepassxc.KeePassXC"
|
||||
"org.mozilla.firefox"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
users.aires = {
|
||||
enable = true;
|
||||
services = {
|
||||
syncthing = {
|
||||
enable = true;
|
||||
autostart = true;
|
||||
enableTray = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
builtins.abort "Need to generate hardware-configuration.nix for Dimaga"
|
|
@ -40,16 +40,6 @@ in
|
|||
tpm2.enable = true;
|
||||
};
|
||||
|
||||
# Use Disko to partition and format disks
|
||||
disko = {
|
||||
enable = false;
|
||||
primaryDiskID = "nvme-eui.002538da11443b4d";
|
||||
swapFile = {
|
||||
enable = true;
|
||||
size = "16G";
|
||||
};
|
||||
};
|
||||
|
||||
# Change the default text editor. Options are "emacs", "nano", or "vim".
|
||||
editor = "nano";
|
||||
|
||||
|
|
|
@ -53,16 +53,6 @@ in
|
|||
tpm2.enable = true;
|
||||
};
|
||||
|
||||
# Partition disks using Disko
|
||||
disko = {
|
||||
enable = false;
|
||||
primaryDiskID = "nvme-eui.ace42e0025b66c912ee4ac0000000001";
|
||||
swapFile = {
|
||||
enable = true;
|
||||
size = "16G";
|
||||
};
|
||||
};
|
||||
|
||||
# Change the default text editor. Options are "emacs", "nano", or "vim".
|
||||
editor = "nano";
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.aux.system.disko;
|
||||
cfg = config.disko;
|
||||
|
||||
standardMountOpts = [
|
||||
"compress=zstd"
|
||||
|
@ -9,12 +9,20 @@ let
|
|||
in
|
||||
{
|
||||
options = {
|
||||
aux.system.disko = {
|
||||
disko = {
|
||||
enable = lib.mkEnableOption (lib.mdDoc "Enables Disko for disk & partition management.");
|
||||
primaryDiskID = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "The ID of the disk to manage using Disko. If possible, use the World Wide Name (WWN), e.g `/dev/disk/by-id/nvme-eui.*`";
|
||||
default = "";
|
||||
primaryDisk = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
description = "The disk to format using Disko.";
|
||||
default = {
|
||||
name = "nvme0n1";
|
||||
id = "";
|
||||
};
|
||||
};
|
||||
enableTPM = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
description = "Enables TPM2 support.";
|
||||
default = true;
|
||||
};
|
||||
swapFile = {
|
||||
enable = lib.mkEnableOption (lib.mdDoc "Enables the creation of swap files.");
|
||||
|
@ -28,15 +36,8 @@ in
|
|||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Check for blank values
|
||||
assertions = [
|
||||
{
|
||||
assertion = (cfg.primaryDiskID != "");
|
||||
message = "aux.system.disko.primaryDiskID is not set. Please enter a valid disk ID.";
|
||||
}
|
||||
];
|
||||
# Disk management
|
||||
disko.enableConfig = true;
|
||||
disko.enableConfig = false;
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
|
@ -65,7 +66,7 @@ in
|
|||
name = "cryptroot";
|
||||
settings = {
|
||||
allowDiscards = true;
|
||||
crypttabExtraOpts = lib.mkIf config.aux.system.bootloader.tpm2.enable [ "tpm2-device=auto" ];
|
||||
crypttabExtraOpts = lib.mkIf cfg.enableTPM [ "tpm2-device=auto" ];
|
||||
};
|
||||
content = {
|
||||
type = "btrfs";
|
Loading…
Reference in a new issue