mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
Add laptop host
This commit is contained in:
parent
e73f27a94c
commit
7ad646f580
8 changed files with 317 additions and 88 deletions
|
|
@ -1,4 +1,5 @@
|
|||
{ pkgs, lib, config, ... }: let
|
||||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
monitorModule = lib.types.submodule {
|
||||
options = {
|
||||
name = lib.mkOption {
|
||||
|
|
@ -21,22 +22,22 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
config = let
|
||||
config = let
|
||||
startupTargets = [
|
||||
"systemd-user-sessions.service"
|
||||
"multi-user.target"
|
||||
"network-online.target"
|
||||
];
|
||||
|
||||
|
||||
in lib.mkIf config.mods.xorg.enable {
|
||||
services.xserver.enable = true;
|
||||
services.xserver.xkb.layout = "us";
|
||||
services.xserver.xkb.options = "caps:escape";
|
||||
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
# services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.displayManager.sddm.enable = true;
|
||||
services.displayManager.autoLogin.enable = true;
|
||||
services.displayManager.autoLogin.user =
|
||||
config.mods.user.name;
|
||||
services.displayManager.autoLogin.user = config.mods.user.name;
|
||||
|
||||
systemd.services.display-manager.wants = startupTargets;
|
||||
systemd.services.display-manager.after = startupTargets;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
cfg = config.mods.unfree.nvidia;
|
||||
let cfg = config.mods.unfree.nvidia;
|
||||
in {
|
||||
options.mods.unfree.nvidia = {
|
||||
enable = lib.mkEnableOption {
|
||||
|
|
@ -8,7 +7,7 @@ in {
|
|||
description = "enables proprietary nvidia drivers";
|
||||
};
|
||||
packages = lib.mkOption {
|
||||
default = [ "nvidia-x11" ];
|
||||
default = [ "nvidia-x11" "nvidia-settings" ];
|
||||
description = "unfree packages";
|
||||
};
|
||||
driver = lib.mkOption {
|
||||
|
|
@ -29,12 +28,12 @@ in {
|
|||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
|
||||
powerManagement.enable = false;
|
||||
# powerManagement.enable = false;
|
||||
powerManagement.finegrained = false;
|
||||
|
||||
open = false;
|
||||
nvidiaSettings = false;
|
||||
|
||||
nvidiaSettings = lib.mkDefault false;
|
||||
|
||||
package = config.boot.kernelPackages.nvidiaPackages."${cfg.driver}";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue