mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2024-11-15 05:13:10 +01:00
add shared systemd module
This commit is contained in:
parent
0ac9348fd2
commit
9e8e5053fd
|
@ -31,7 +31,6 @@
|
|||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
systemd.package = pkgs.systemd.override { withHomed = false; };
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
|
@ -58,6 +57,7 @@
|
|||
enable = true;
|
||||
settings.PasswordAuthentication = false;
|
||||
};
|
||||
services.journald.enableHttpGateway = true;
|
||||
programs.mosh.enable = true;
|
||||
security = {
|
||||
audit.enable = true;
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
loader.efi.canTouchEfiVariables = true;
|
||||
tmp.useTmpfs = true;
|
||||
};
|
||||
systemd.package = pkgs.systemd.override { withHomed = false; };
|
||||
services.btrfs.autoScrub.enable = true;
|
||||
|
||||
environment.persistence."/nix/persist/system" = {
|
||||
|
@ -61,6 +60,7 @@
|
|||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
services.journald.enableHttpGateway = true;
|
||||
programs.mosh.enable = true;
|
||||
security = {
|
||||
audit.enable = true;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
'';
|
||||
tmp.useTmpfs = true;
|
||||
};
|
||||
systemd.package = pkgs.systemd.override { withHomed = false; };
|
||||
# systemd.package = pkgs.systemd.override { withHomed = false; withUkify = true; };
|
||||
|
||||
environment.persistence."/nix/persist/system" = {
|
||||
directories = [
|
||||
|
@ -60,23 +60,9 @@
|
|||
};
|
||||
hardware.bluetooth.enable = true;
|
||||
|
||||
systemd.sleep.extraConfig = ''
|
||||
HibernateDelaySec=2h
|
||||
'';
|
||||
|
||||
services.mysql = {
|
||||
enable = true;
|
||||
package = pkgs.mariadb;
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "user1";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
services.logind = {
|
||||
lidSwitch = "suspend-then-hibernate";
|
||||
lidSwitchDocked = "suspend-then-hibernate";
|
||||
lidSwitchDocked = "suspend";
|
||||
lidSwitchExternalPower = "suspend";
|
||||
extraConfig = ''
|
||||
HandlePowerKey = ignore
|
||||
|
|
18
shared/systemd.nix
Normal file
18
shared/systemd.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
systemd = {
|
||||
|
||||
package = lib.mkDefault (pkgs.systemd.override { withHomed = false; });
|
||||
sleep.extraConfig = ''
|
||||
HibernateDelaySec=2h
|
||||
'';
|
||||
oomd = {
|
||||
enable = true;
|
||||
enableSystemSlice = true;
|
||||
enableRootSlice = true;
|
||||
enableUserServices = true;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in a new issue