add user conf and split some configs
This commit is contained in:
parent
e7f0cdb4a2
commit
6d4453b618
6 changed files with 52 additions and 16 deletions
|
|
@ -3,7 +3,8 @@ rewrite of my nixos flake with hopefully better structuring and modularity
|
|||
|
||||
# todo
|
||||
- (progress) migrate files to this repository in the modules folder
|
||||
- split the files into little chunks for 1 specific purposes per file
|
||||
- (half-progress) split the files into little chunks for 1 specific purposes per file
|
||||
- (quater-progress) reintegrate file paths and arguments to work together
|
||||
|
||||
# todo: migrate files below
|
||||
[X] flake stuff (flake.nix & flake.lock)
|
||||
|
|
@ -12,7 +13,7 @@ rewrite of my nixos flake with hopefully better structuring and modularity
|
|||
[X] nixos system
|
||||
[X] base nix configs
|
||||
[X] apps list
|
||||
[ ] user config (not hm)
|
||||
[X] user config (not hm)
|
||||
|
||||
[ ] home manager config
|
||||
[ ] rice config (everything in /rice)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
{ ... }: {
|
||||
|
||||
}
|
||||
10
modules/hardware/hibernation.nix
Normal file
10
modules/hardware/hibernation.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ resume-dev, ... }: {
|
||||
security.protectKernelImage = false; # https://discourse.nixos.org/t/hibernate-doesnt-work-anymore/24673/7
|
||||
boot = {
|
||||
kernelParams = if resume-dev == "" then [] else ["resume=${resume-dev}"];
|
||||
resumeDevice = "${resume-dev}";
|
||||
};
|
||||
powerManagement = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,11 +1,10 @@
|
|||
{ pkgs, lib, resume-dev, ... }: {
|
||||
time.timeZone = lib.mkForce null;
|
||||
powerManagement = {
|
||||
enable = true;
|
||||
powertop.enable = true;
|
||||
};
|
||||
{ pkgs, ... }: {
|
||||
import = [
|
||||
./tzupdate.nix
|
||||
./hibernation.nix
|
||||
];
|
||||
powerManagement.powertop.enable = true;
|
||||
security = {
|
||||
protectKernelImage = false; # https://discourse.nixos.org/t/hibernate-doesnt-work-anymore/24673/7
|
||||
tpm2 = {
|
||||
enable = true;
|
||||
pkcs11.enable = true;
|
||||
|
|
@ -30,9 +29,6 @@
|
|||
};
|
||||
};
|
||||
boot = {
|
||||
kernelParams = if resume-dev == "" then [] else ["resume=${resume-dev}"];
|
||||
resumeDevice = "${resume-dev}";
|
||||
|
||||
kernelPackages = pkgs.linuxPackages;
|
||||
kernel.sysctl."vm.laptop_mode" = 5;
|
||||
initrd.availableKernelModules = [ "thinkpad_acpi" ];
|
||||
|
|
@ -54,10 +50,6 @@
|
|||
echo 85 > /sys/class/power_supply/BAT1/charge_control_end_threshold || true
|
||||
''}"
|
||||
'';
|
||||
tzupdate = {
|
||||
enable = true;
|
||||
timer.enable = true;
|
||||
};
|
||||
upower = {
|
||||
enable = true;
|
||||
percentageCritical = 15;
|
||||
|
|
|
|||
7
modules/hardware/tzupdate.nix
Normal file
7
modules/hardware/tzupdate.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ lib, ... }: {
|
||||
time.timeZone = lib.mkForce null;
|
||||
services.tzupdate = {
|
||||
enable = true;
|
||||
timer.enable = true;
|
||||
};
|
||||
}
|
||||
23
modules/system/user.nix
Normal file
23
modules/system/user.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ pkgs, username, ... }: {
|
||||
users = {
|
||||
users."${username}" = {
|
||||
linger = true;
|
||||
isNormalUser = true;
|
||||
description = "${username}";
|
||||
initialPassword = "${username}";
|
||||
shell = pkgs.zsh;
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
"dialout"
|
||||
"libvirtd"
|
||||
"docker"
|
||||
"input"
|
||||
"uinput"
|
||||
"ydotool"
|
||||
"adbusers"
|
||||
"kvm"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue