modularise lenovo?

This commit is contained in:
andromeda
2026-01-09 23:23:07 +01:00
parent 8b79f4e825
commit 0658c5d898
13 changed files with 116 additions and 367 deletions

View File

@@ -0,0 +1,6 @@
{
boot.loader = {
efi.canTouchEfiVariables = true;
systemd-boot.enable = true;
};
}

View File

@@ -0,0 +1,15 @@
{
fileSystems."/persist".neededForBoot = true;
environment.persistence."/persist" = {
enable = true;
hideMounts = true;
directories = [
"/var/log"
"/var/lib/nixos"
"/var/lib/systemd/coredump"
];
files = [
"/etc/machine-id"
];
};
}

39
modules/nixos/laptop.nix Normal file
View File

@@ -0,0 +1,39 @@
{
# bluetooth
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
services.blueman.enable = true;
# locale
i18n.defaultLocale = "de_DE.UTF-8";
time.timeZone = "Europe/Berlin";
# networking
networking = {
firewall.enable = true;
networkmanager.enable = true;
};
# misc
services = {
printing.enable = true;
# trackpad
libinput.enable = true;
# ssh
openssh.enable = true;
};
# impermanence
environment.persistence."/persist".directories = [
# bluetooth
"/var/lib/bluetooth"
# wifi connections
"/etc/NetworkManager/system-connections"
# machine ssh keys
"/etc/ssh"
];
}

8
modules/nixos/ly.nix Normal file
View File

@@ -0,0 +1,8 @@
{
services.displayManager = {
enable = true;
ly.enable = true;
};
# TODO needs to be manually updated when new users added
environment.persistence."/persist".files = ["/etc/ly/save.txt"];
}

10
modules/nixos/steam.nix Normal file
View File

@@ -0,0 +1,10 @@
{lib, ...}: {
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"steam"
"steam-original"
"steam-unwrapped"
"steam-run"
];
programs.steam.enable = true;
}

3
modules/nixos/sway.nix Normal file
View File

@@ -0,0 +1,3 @@
{
programs.sway.enable = true;
}