nixos: profiles: simplify

This commit is contained in:
Guanran Wang 2024-01-10 02:13:52 +08:00
parent 33a42f5f82
commit 2323bfcc3e
Signed by: nyancat
SSH key fingerprint: SHA256:8oWGKciPALWut/6WA27oFKofX+6Wtc0gQnsefXLQx/8
9 changed files with 46 additions and 58 deletions

View file

@ -32,6 +32,7 @@
boot.initrd.systemd.enable = true; boot.initrd.systemd.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.loader.systemd-boot.enable = lib.mkDefault true; # mkDefault for Lanzaboote boot.loader.systemd-boot.enable = lib.mkDefault true; # mkDefault for Lanzaboote
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_zen; # mkDefault for server
### Default Programs ### Default Programs
environment.defaultPackages = []; environment.defaultPackages = [];

View file

@ -1,7 +1,32 @@
{...}: { {pkgs, ...}: {
imports = [ # plymouth
./gnome-keyring.nix boot.plymouth.enable = true;
./display-server.nix
./polkit.nix # xserver
]; services.xserver = {
enable = true;
excludePackages = with pkgs; [xterm];
displayManager.startx.enable = true;
};
# gnome keyring
services.gnome.gnome-keyring.enable = true;
programs.seahorse.enable = true;
# polkit
security.polkit.enable = true;
environment.systemPackages = with pkgs; [polkit_gnome];
systemd.user.services.polkit-gnome-authentication-agent-1 = {
description = "polkit-gnome-authentication-agent-1";
wantedBy = ["graphical-session.target"];
wants = ["graphical-session.target"];
after = ["graphical-session.target"];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
} }

View file

@ -1,15 +0,0 @@
{pkgs, ...}: {
services.xserver = {
enable = true;
excludePackages = with pkgs; [xterm];
displayManager = {
startx.enable = true;
};
desktopManager = {
#plasma5.enable = true;
};
windowManager = {
#bspwm.enable = true;
};
};
}

View file

@ -1,5 +0,0 @@
_: {
# gnome keyring
services.gnome.gnome-keyring.enable = true;
programs.seahorse.enable = true;
}

View file

@ -1,21 +0,0 @@
{pkgs, ...}: {
security.polkit.enable = true;
environment.systemPackages = with pkgs; [polkit_gnome];
# polkit_gnome autostart for wms
systemd = {
user.services.polkit-gnome-authentication-agent-1 = {
description = "polkit-gnome-authentication-agent-1";
wantedBy = ["graphical-session.target"];
wants = ["graphical-session.target"];
after = ["graphical-session.target"];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
};
}

View file

@ -0,0 +1,6 @@
_: {
networking.stevenblack.enable = true;
services.system76-scheduler.enable = true;
services.power-profiles-daemon.enable = true;
services.thermald.enable = true;
}

View file

@ -1,14 +1,7 @@
{pkgs, ...}: { {...}: {
imports = [ imports = [
../common/core ../common/core
../common/graphical ../common/graphical
../common/physical
]; ];
boot.kernelPackages = pkgs.linuxPackages_zen;
boot.plymouth.enable = true;
networking.stevenblack.enable = true;
services.system76-scheduler.enable = true;
services.power-profiles-daemon.enable = true;
services.thermald.enable = true;
#services.printing.enable = true;
} }

View file

@ -1,5 +1,7 @@
{...}: { {...}: {
imports = [ imports = [
../desktop ../common/core
../common/graphical
../common/physical
]; ];
} }

View file

@ -1,7 +1,9 @@
{...}: {pkgs, ...}:
# no i dont actually own a server # no i dont actually own a server
{ {
imports = [ imports = [
../common/minimal ../common/minimal
]; ];
boot.kernelPackages = pkgs.linuxPackages; # mkDefault for server
} }