From 791e059a690a3a58aa5169f284341e0116cfa342 Mon Sep 17 00:00:00 2001 From: NullBite <me@nullbite.com> Date: Tue, 26 Dec 2023 01:52:13 -0500 Subject: [PATCH] Add host-configuration.nix example --- .gitignore | 1 + configuration.nix | 3 +-- host-configuration.nix.example | 29 +++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 host-configuration.nix.example diff --git a/.gitignore b/.gitignore index 577b0a0..73f32fe 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ hardware-configuration.nix +host-configuration.nix diff --git a/configuration.nix b/configuration.nix index f3df9b6..f74a3c3 100644 --- a/configuration.nix +++ b/configuration.nix @@ -11,7 +11,7 @@ ./hardware-configuration.nix # manually defined device specific configuration - ./custom-hardware-configuration.nix + ./host-configuration.nix ]; # Use the systemd-boot EFI boot loader. @@ -21,7 +21,6 @@ # networking.hostName = "nixos"; # Define your hostname. - networking.hostName = "slab"; # Pick only one of the below networking options. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. diff --git a/host-configuration.nix.example b/host-configuration.nix.example new file mode 100644 index 0000000..ed644f6 --- /dev/null +++ b/host-configuration.nix.example @@ -0,0 +1,29 @@ +{ config, lib, pkgs, modulesPath, ... }: + +{ + ### set hostname + # networking.hostname = "hostname"; + + # cryptsetup + boot.initrd.luks.devices = { + lvmroot = { + # device="/dev/disk/by-uuid/<UUID>"; + allowDiscards = true; + fallbackToPassword = true; + preLVM = true; + }; + }; + + # bootloader setup + boot.loader = { + efi = { + canTouchEfiVariables = true; + # efiSysMountPoint = "/efi"; + }; + grub = { + enable = true; + efiSupport = true; + device = "nodev"; + }; + }; +}