nixos/system/services.nix

129 lines
3.3 KiB
Nix
Raw Normal View History

2024-03-18 11:58:34 +00:00
{ config, pkgs, ... }: {
security.rtkit.enable = true;
2024-11-04 21:04:08 +00:00
services.fwupd.enable = true;
2024-11-15 10:24:09 +00:00
networking.firewall = {
enable = true;
allowedTCPPorts = [ 22 ];
};
networking.nftables.enable = true;
2024-10-13 19:11:45 +00:00
programs.dconf.enable = true;
2024-09-13 16:42:10 +00:00
services.gnome.gnome-keyring.enable = true;
security.pam.services.i3.enableGnomeKeyring = true;
environment.extraInit = ''
xset s off -dpms
'';
2024-03-18 11:58:34 +00:00
security.polkit.enable = true;
2024-11-15 10:24:09 +00:00
2024-03-18 11:58:34 +00:00
services = {
2024-11-04 21:04:08 +00:00
# prometheus = {
# scrapeConfigs = [
# {
# job_name = "chrysalis";
# static_configs = [{
# targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" ];
# }];
# }
# ];
#
# exporters = {
# node = {
# enable = true;
# enabledCollectors = [ "systemd" "processes" ];
# port = 9002;
# };
# };
#
# enable = true;
# port = 9001;
# };
#
# grafana = {
# enable = true;
# settings = {
# server = {
# # Listening Address
# http_addr = "127.0.0.1";
# # and Port
# http_port = 3000;
# # Grafana needs to know on which domain and URL it's running
# serve_from_sub_path = true;
# };
# };
# };
2024-04-21 04:49:09 +00:00
displayManager =
{
defaultSession = "none+i3";
autoLogin.enable = true;
autoLogin.user = "mbeno";
};
2024-05-14 15:42:09 +00:00
logind.extraConfig = "IdleAction=ignore";
2024-03-18 11:58:34 +00:00
xserver = {
2024-09-13 16:42:10 +00:00
exportConfiguration = true;
2024-03-18 11:58:34 +00:00
enable = true;
2024-07-07 21:16:41 +00:00
xkb.layout = "us,no";
xkb.variant = "qwerty";
2024-09-13 16:42:10 +00:00
xkb.options = "grp:lalt_lshift_toggle";
2024-03-18 11:58:34 +00:00
desktopManager = {
xterm.enable = false;
};
videoDrivers = [ "nvidia" ];
2024-05-14 15:42:09 +00:00
deviceSection = ''
Option "TearFree" "False"
Option "VariableRefresh" "true"
'';
xrandrHeads = [
{
output = "DP-2";
primary = true;
monitorConfig = "
Option \"TargetRefresh\" \"144\"
Option \"Primary\" \"true\"
Option \"PreferredMode\" \"2560x1440\"
Option \"DPMS\" \"true\"
";
}
{
output = "DP-0";
primary = false;
monitorConfig = "
Option \"TargetRefresh\" \"144\"
Option \"Primary\" \"false\"
Option \"PreferredMode\" \"1920x1080\"
";
}
];
screenSection =
''
Option "metamodes" "DP-2: 2560x1440_144 +0+0, DP-0: 1920x1080_144 +2560+0"
'';
2024-03-18 11:58:34 +00:00
windowManager.i3 = {
enable = true;
extraPackages = with pkgs; [
dmenu #application launcher most people use
i3status # gives you the default i3 status bar
2024-09-13 16:42:10 +00:00
i3lock
2024-05-14 15:42:09 +00:00
# i3lock #default i3 screen locker
2024-03-18 11:58:34 +00:00
i3blocks #if you are planning on using i3blocks over i3status
polybar
rofi
nitrogen
];
};
};
};
2024-11-01 01:03:02 +00:00
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
2024-03-18 11:58:34 +00:00
services.pcscd.enable = true;
services.dbus.packages = [ pkgs.gcr ];
2024-05-14 15:42:09 +00:00
services.openssh = {
enable = true;
settings.PasswordAuthentication = true;
};
2024-03-18 11:58:34 +00:00
}