Compare commits
3 commits
8051acd6cc
...
acada9b054
| Author | SHA1 | Date | |
|---|---|---|---|
| acada9b054 | |||
| c54f9c4207 | |||
| fe1d793481 |
10 changed files with 52 additions and 52 deletions
|
|
@ -38,7 +38,6 @@
|
|||
inherit flakes;
|
||||
|
||||
system = "x86_64-linux";
|
||||
doctrinePrefix = "local";
|
||||
|
||||
paths = {
|
||||
localOverlay = "pkgs";
|
||||
|
|
|
|||
|
|
@ -27,19 +27,14 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
# trivionomicon
|
||||
local = {
|
||||
trivium = {
|
||||
sway.enable = true;
|
||||
trivionomiconMotd.enable = true;
|
||||
};
|
||||
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
|
||||
#TODO
|
||||
useDHCP = false; # The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
||||
interfaces.enp7s0.useDHCP = true; # Per-interface useDHCP will be mandatory in the future, so this generated config
|
||||
interfaces.wlp6s0.useDHCP = true; # replicates the default behaviour.
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,8 +18,7 @@
|
|||
bluetooth.enable = true;
|
||||
};
|
||||
|
||||
# trivionomicon
|
||||
local = {
|
||||
trivium = {
|
||||
laptop.enable = true;
|
||||
thinkpad.enable = true;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -37,8 +37,7 @@ with lib; {
|
|||
};
|
||||
};
|
||||
|
||||
# trivionomicon
|
||||
local.soju = {
|
||||
trivium.soju = {
|
||||
enable = true;
|
||||
fullyQualifiedDomain = "soju.posixlycorrect.com";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -7,4 +7,5 @@ doctrine.lib.mkModule {
|
|||
inherit config;
|
||||
name = "laptop";
|
||||
sys = ./sys.nix;
|
||||
options = ./options.nix;
|
||||
}
|
||||
|
|
|
|||
10
trivionomicon/modules/laptop/options.nix
Normal file
10
trivionomicon/modules/laptop/options.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{lib, ...}:
|
||||
with lib.types; {
|
||||
sys = {
|
||||
thinkpad = lib.mkOption {
|
||||
type = boolean;
|
||||
default = false;
|
||||
description = "set to true if your laptop is a thinkpad";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -2,10 +2,15 @@
|
|||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
cfg,
|
||||
...
|
||||
}: {
|
||||
services = {
|
||||
tlp.enable = lib.mkDefault true;
|
||||
upower.enable = lib.mkDefault true;
|
||||
};
|
||||
|
||||
imports = [
|
||||
./thinkpad.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
33
trivionomicon/modules/laptop/thinkpad.nix
Normal file
33
trivionomicon/modules/laptop/thinkpad.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
cfg,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf cfg.thinkpad {
|
||||
# For suspending to RAM to work, set Config -> Power -> Sleep State to "Linux" in EFI.
|
||||
# See https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_6)#Suspend_issues
|
||||
# Fingerprint sensor requires a firmware-update to work.
|
||||
|
||||
boot = {
|
||||
extraModulePackages = with config.boot.kernelPackages; [acpi_call];
|
||||
extraModprobeConfig = "options iwlwifi 11n_disable=1 wd_disable=1";
|
||||
|
||||
# acpi_call makes tlp work for newer thinkpads
|
||||
kernelModules = ["acpi_call"];
|
||||
|
||||
# Force use of the thinkpad_acpi driver for backlight control.
|
||||
# This allows the backlight save/load systemd service to work.
|
||||
kernelParams = ["acpi_backlight=native"];
|
||||
};
|
||||
|
||||
hardware.firmware = [pkgs.sof-firmware];
|
||||
|
||||
services = {
|
||||
fprintd.enable = lib.mkDefault true;
|
||||
thinkfan.enable = lib.mkDefault true;
|
||||
tp-auto-kbbl.enable = lib.mkDefault true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
config,
|
||||
doctrine,
|
||||
...
|
||||
}:
|
||||
doctrine.lib.mkModule {
|
||||
inherit config;
|
||||
name = "thinkpad";
|
||||
sys = ./sys.nix;
|
||||
requires = ["laptop"];
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
# For suspending to RAM to work, set Config -> Power -> Sleep State to "Linux" in EFI.
|
||||
# See https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_6)#Suspend_issues
|
||||
# Fingerprint sensor requires a firmware-update to work.
|
||||
|
||||
boot = {
|
||||
extraModulePackages = with config.boot.kernelPackages; [acpi_call];
|
||||
extraModprobeConfig = "options iwlwifi 11n_disable=1 wd_disable=1";
|
||||
|
||||
# acpi_call makes tlp work for newer thinkpads
|
||||
kernelModules = ["acpi_call"];
|
||||
|
||||
# Force use of the thinkpad_acpi driver for backlight control.
|
||||
# This allows the backlight save/load systemd service to work.
|
||||
kernelParams = ["acpi_backlight=native"];
|
||||
};
|
||||
|
||||
hardware.firmware = [pkgs.sof-firmware];
|
||||
|
||||
services = {
|
||||
fprintd.enable = lib.mkDefault true;
|
||||
thinkfan.enable = lib.mkDefault true;
|
||||
tp-auto-kbbl.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue