nixos/core: use dbus-broker && minor tweaks

This commit is contained in:
Guanran Wang 2024-03-06 06:02:22 +08:00
parent a963d7fc39
commit fcca57f2ad
Signed by: nyancat
SSH key fingerprint: SHA256:8oWGKciPALWut/6WA27oFKofX+6Wtc0gQnsefXLQx/8

View file

@ -44,7 +44,6 @@
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_zen; # mkDefault for server boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_zen; # mkDefault for server
### Default Programs ### Default Programs
environment.defaultPackages = [];
# In addition of https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/config/system-path.nix # In addition of https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/config/system-path.nix
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
unzip unzip
@ -55,24 +54,27 @@
lsof lsof
ltrace ltrace
strace
dnsutils dnsutils
pciutils pciutils
usbutils usbutils
]; ];
programs.dconf.enable = true;
programs.nano.enable = false; # make sure to add another editor and set the $EDITOR variable programs.nano.enable = false;
programs.neovim = { programs.neovim = {
enable = true; enable = true;
viAlias = true; viAlias = true;
vimAlias = true; vimAlias = true;
defaultEditor = true; defaultEditor = true; # important!
}; };
services.openssh = { services.openssh = {
enable = true; enable = true;
settings.PermitRootLogin = "no"; settings.PermitRootLogin = "no";
settings.PasswordAuthentication = false; settings.PasswordAuthentication = false;
}; };
services.getty.greetingLine = let services.getty.greetingLine = let
inherit (config.system) nixos; inherit (config.system) nixos;
in '' in ''
@ -83,6 +85,9 @@
"[ 5.996722] amdgpu 0000:67:00.0: Fatal error during GPU init"} "[ 5.996722] amdgpu 0000:67:00.0: Fatal error during GPU init"}
''; '';
# https://archlinux.org/news/making-dbus-broker-our-default-d-bus-daemon/
services.dbus.implementation = "broker";
### WORKAROUND: Use NVIDIA beta version 550.40.07 due to performance issues introduced in version 545.29.06, ### WORKAROUND: Use NVIDIA beta version 550.40.07 due to performance issues introduced in version 545.29.06,
# this shouldn't affect non-nvidia machines. # this shouldn't affect non-nvidia machines.
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta; hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta;
@ -107,6 +112,7 @@
]; ];
}; };
programs.dconf.enable = true;
programs.fish.enable = true; programs.fish.enable = true;
users.groups."nix-access-tokens" = {}; users.groups."nix-access-tokens" = {};
nix.extraOptions = "!include ${config.sops.secrets.nix-access-tokens.path}"; nix.extraOptions = "!include ${config.sops.secrets.nix-access-tokens.path}";