More modulatiry
This commit is contained in:
parent
a48a455788
commit
99b4d41dda
4 changed files with 39 additions and 36 deletions
|
@ -10,7 +10,7 @@
|
||||||
# Other things to consider:
|
# Other things to consider:
|
||||||
# Telegraf
|
# Telegraf
|
||||||
|
|
||||||
{ lib, config, pkgs, hostname, ... }: {
|
{ lib, config, pkgs, ... }: {
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
# Gnome configuration file.
|
# Gnome configuration file.
|
||||||
|
@ -31,8 +31,6 @@
|
||||||
# Bootloader
|
# Bootloader
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
boot.tmp.cleanOnBoot = true;
|
boot.tmp.cleanOnBoot = true;
|
||||||
# Hibernation resume device:
|
|
||||||
boot.resumeDevice = "/dev/disk/by-uuid/67600fc1-6d26-4d2f-b2d3-a99174654058";
|
|
||||||
# Plymouth splash screen
|
# Plymouth splash screen
|
||||||
boot.plymouth.enable = true;
|
boot.plymouth.enable = true;
|
||||||
boot.initrd.systemd.enable = true;
|
boot.initrd.systemd.enable = true;
|
||||||
|
@ -43,15 +41,6 @@
|
||||||
boot.lanzaboote.enable = true;
|
boot.lanzaboote.enable = true;
|
||||||
boot.lanzaboote.pkiBundle = "/etc/secureboot";
|
boot.lanzaboote.pkiBundle = "/etc/secureboot";
|
||||||
|
|
||||||
# Setup keyfile
|
|
||||||
boot.initrd.secrets = {
|
|
||||||
"/crypto_keyfile.bin" = null;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable swap on luks
|
|
||||||
boot.initrd.luks.devices."luks-9704447e-6bd0-4a35-9c24-20cbab81c431".device = "/dev/disk/by-uuid/9704447e-6bd0-4a35-9c24-20cbab81c431";
|
|
||||||
boot.initrd.luks.devices."luks-9704447e-6bd0-4a35-9c24-20cbab81c431".keyFile = "/crypto_keyfile.bin";
|
|
||||||
|
|
||||||
# Enable networking
|
# Enable networking
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "${hostname}";
|
hostName = "${hostname}";
|
||||||
|
@ -84,13 +73,6 @@
|
||||||
LC_TIME = "en_US.UTF-8";
|
LC_TIME = "en_US.UTF-8";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Configure the fingerprint reader
|
|
||||||
services.fprintd = {
|
|
||||||
enable = true;
|
|
||||||
tod.enable = true;
|
|
||||||
tod.driver = pkgs.libfprint-2-tod1-vfs0090;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
# Configure keymap in X11
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -105,15 +87,6 @@
|
||||||
autorun = true;
|
autorun = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable nVidia PRIME Render Offload
|
|
||||||
# https://github.com/NixOS/nixos-hardware/blob/master/lenovo/thinkpad/p1/3th-gen/nvidia.nix
|
|
||||||
hardware.nvidia.prime = {
|
|
||||||
# Bus ID of the Intel GPU.
|
|
||||||
intelBusId = lib.mkDefault "PCI:0:2:0";
|
|
||||||
# Bus ID of the NVIDIA GPU.
|
|
||||||
nvidiaBusId = lib.mkDefault "PCI:1:0:0";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable sound with pipewire.
|
# Enable sound with pipewire.
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
hardware.pulseaudio.enable = false;
|
hardware.pulseaudio.enable = false;
|
||||||
|
@ -151,9 +124,6 @@
|
||||||
# Secureboot
|
# Secureboot
|
||||||
sbctl
|
sbctl
|
||||||
|
|
||||||
# Fingerprint Reader
|
|
||||||
fprintd
|
|
||||||
|
|
||||||
# General packages
|
# General packages
|
||||||
# https://github.com/gvolpe/dconf2nix
|
# https://github.com/gvolpe/dconf2nix
|
||||||
dconf2nix
|
dconf2nix
|
||||||
|
|
10
flake.nix
10
flake.nix
|
@ -52,15 +52,15 @@
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
# Declare the configuration for my laptop
|
# Declare the configuration for my laptop
|
||||||
nixos-p1 = lib.nixosSystem {
|
nixos-p1 = lib.nixosSystem {
|
||||||
inherit system hostname;
|
inherit system;
|
||||||
modules = [
|
modules = [
|
||||||
# Hardware Configuration
|
# Hardware Configuration
|
||||||
./hardware/lenovo-p1.nix
|
./hardware/lenovo-p1/hardware-configuration.nix
|
||||||
|
./hardware/lenovo-p1/configuration.nix
|
||||||
# SecureBoot Configuration
|
# SecureBoot Configuration
|
||||||
lanzaboote.nixosModules.lanzaboote
|
lanzaboote.nixosModules.lanzaboote
|
||||||
|
|
||||||
# NixOS Configuration file
|
# Common NixOS Configuration file
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
|
|
||||||
# Tell home-manager to use both global and user packages:
|
# Tell home-manager to use both global and user packages:
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
|
|
||||||
# Declare the configuration for my desktop
|
# Declare the configuration for my desktop
|
||||||
nixos-desktop = lib.nixosSystem {
|
nixos-desktop = lib.nixosSystem {
|
||||||
inherit system hostname;
|
inherit system;
|
||||||
modules = [
|
modules = [
|
||||||
# Hardware Configuration
|
# Hardware Configuration
|
||||||
./hardware/desktop.nix
|
./hardware/desktop.nix
|
||||||
|
|
33
hardware/lenovo-p1/configuration.nix
Normal file
33
hardware/lenovo-p1/configuration.nix
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
{ lib, config, pkgs, ... }: {
|
||||||
|
|
||||||
|
# Enable swap on luks
|
||||||
|
boot.initrd.luks.devices."luks-9704447e-6bd0-4a35-9c24-20cbab81c431".device = "/dev/disk/by-uuid/9704447e-6bd0-4a35-9c24-20cbab81c431";
|
||||||
|
boot.initrd.luks.devices."luks-9704447e-6bd0-4a35-9c24-20cbab81c431".keyFile = "/crypto_keyfile.bin";
|
||||||
|
|
||||||
|
# Setup keyfile
|
||||||
|
boot.initrd.secrets = {
|
||||||
|
"/crypto_keyfile.bin" = null;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Hibernation resume device:
|
||||||
|
boot.resumeDevice = "/dev/disk/by-uuid/67600fc1-6d26-4d2f-b2d3-a99174654058";
|
||||||
|
|
||||||
|
# Configure the fingerprint reader
|
||||||
|
services.fprintd = {
|
||||||
|
enable = true;
|
||||||
|
tod.enable = true;
|
||||||
|
tod.driver = pkgs.libfprint-2-tod1-vfs0090;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable nVidia PRIME Render Offload
|
||||||
|
# https://github.com/NixOS/nixos-hardware/blob/master/lenovo/thinkpad/p1/3th-gen/nvidia.nix
|
||||||
|
hardware.nvidia.prime = {
|
||||||
|
# Bus ID of the Intel GPU.
|
||||||
|
intelBusId = lib.mkDefault "PCI:0:2:0";
|
||||||
|
# Bus ID of the NVIDIA GPU.
|
||||||
|
nvidiaBusId = lib.mkDefault "PCI:1:0:0";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Fingerprint software
|
||||||
|
environment.systemPackages = with pkgs; [ fprintd ];
|
||||||
|
}
|
Loading…
Reference in a new issue