mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2025-12-04 15:00:13 +01:00
feat: make it so only hosts with gui enabled have dbus/gnome-keyring/gvfs :)
This commit is contained in:
parent
09e6a3a302
commit
3b00c85ad1
7 changed files with 58 additions and 22 deletions
|
|
@ -10,5 +10,6 @@
|
||||||
"olm-3.2.16"
|
"olm-3.2.16"
|
||||||
];
|
];
|
||||||
|
|
||||||
liv.desktop = true;
|
liv.desktop.enable = true;
|
||||||
|
liv.gui.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,10 @@
|
||||||
{ lib, inputs, pkgs, config, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
@ -15,10 +21,16 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
liv.laptop.enable = true;
|
liv.laptop.enable = true;
|
||||||
|
liv.gui.enable = true;
|
||||||
|
|
||||||
# Bootloader stuff
|
# Bootloader stuff
|
||||||
boot = {
|
boot = {
|
||||||
kernelParams = [ "quiet" "loglevel=3" "systemd.show_status=false" "splash" ];
|
kernelParams = [
|
||||||
|
"quiet"
|
||||||
|
"loglevel=3"
|
||||||
|
"systemd.show_status=false"
|
||||||
|
"splash"
|
||||||
|
];
|
||||||
loader.grub = {
|
loader.grub = {
|
||||||
enable = lib.mkForce true;
|
enable = lib.mkForce true;
|
||||||
device = lib.mkForce "/dev/sda";
|
device = lib.mkForce "/dev/sda";
|
||||||
|
|
@ -28,8 +40,10 @@
|
||||||
initrd.secrets = {
|
initrd.secrets = {
|
||||||
"/crypto_keyfile.bin" = null;
|
"/crypto_keyfile.bin" = null;
|
||||||
};
|
};
|
||||||
initrd.luks.devices."luks-729500c5-557b-45c8-ab3f-5c365db28284".keyFile = lib.mkForce "/crypto_keyfile.bin";
|
initrd.luks.devices."luks-729500c5-557b-45c8-ab3f-5c365db28284".keyFile =
|
||||||
extraModulePackages = with config.boot.kernelPackages;
|
lib.mkForce "/crypto_keyfile.bin";
|
||||||
|
extraModulePackages =
|
||||||
|
with config.boot.kernelPackages;
|
||||||
[
|
[
|
||||||
acpi_call
|
acpi_call
|
||||||
cpupower
|
cpupower
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@
|
||||||
desktop.enable = false;
|
desktop.enable = false;
|
||||||
creative.enable = true;
|
creative.enable = true;
|
||||||
amdgpu.enable = true;
|
amdgpu.enable = true;
|
||||||
|
gui.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.hardware.bolt.enable = true;
|
services.hardware.bolt.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,8 @@
|
||||||
useOSProber = true;
|
useOSProber = true;
|
||||||
};
|
};
|
||||||
kernelModules = [ "acpi_call" ];
|
kernelModules = [ "acpi_call" ];
|
||||||
extraModulePackages = with config.boot.kernelPackages;
|
extraModulePackages =
|
||||||
|
with config.boot.kernelPackages;
|
||||||
[
|
[
|
||||||
acpi_call
|
acpi_call
|
||||||
cpupower
|
cpupower
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,10 @@
|
||||||
{ inputs, pkgs, config, lib, ... }:
|
{
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
@ -18,6 +24,7 @@
|
||||||
creative.enable = true;
|
creative.enable = true;
|
||||||
amdgpu.enable = true;
|
amdgpu.enable = true;
|
||||||
wine.enable = true;
|
wine.enable = true;
|
||||||
|
gui.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
|
@ -34,7 +41,8 @@
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
systemd-boot.configurationLimit = 10;
|
systemd-boot.configurationLimit = 10;
|
||||||
};
|
};
|
||||||
extraModulePackages = with config.boot.kernelPackages;
|
extraModulePackages =
|
||||||
|
with config.boot.kernelPackages;
|
||||||
[
|
[
|
||||||
acpi_call
|
acpi_call
|
||||||
cpupower
|
cpupower
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
services = {
|
services = {
|
||||||
gvfs.enable = true;
|
|
||||||
gnome.gnome-keyring.enable = true;
|
|
||||||
dbus.enable = true;
|
|
||||||
fstrim.enable = true;
|
fstrim.enable = true;
|
||||||
};
|
};
|
||||||
services.logind.extraConfig = ''
|
services.logind.extraConfig = ''
|
||||||
|
|
|
||||||
14
roles/gui.nix
Normal file
14
roles/gui.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.liv.gui;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services = {
|
||||||
|
gvfs.enable = true;
|
||||||
|
gnome.gnome-keyring.enable = true;
|
||||||
|
dbus.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue