Summary Files Commits Branches @commit @diff @stats
path: root / services.nix
diff options
context:
space:
mode:
Commitd0caf89ffc06104cb9c077c299a96b778d5db79b (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-11-29 19:44:57 +0200
Committer
 Syndamia <kamen@syndamia.com>
2023-11-29 19:44:57 +0200
Files1f4850021bc37dd9a0531206e60fcf795b343461 /services.nix
nix-d0caf89ffc06104cb9c077c299a96b778d5db79b.tar
nix-d0caf89ffc06104cb9c077c299a96b778d5db79b.tar.gz
nix-d0caf89ffc06104cb9c077c299a96b778d5db79b.zip
Parent3c2f7173c7620e14ef349ab36df14bf07f109d66 (diff)
(all) Overhaul, moved all package and their configs into packages/default.nix, reordered configuration.nix
1 files changed, 1 insertions, 120 deletions
-rw-r--r--services.nix121
diff --git a/services.nix b/services.nix
index db6158b..261909e 100644
--- a/services.nix
+++ b/services.nix
@@ -1,124 +1,5 @@
-
-{ config, pkgs, ... }:
-
-{
- virtualisation.libvirtd.enable = true;
- systemd.user.services = {
- lxqt-policykit = {
- description = "lxqt-policykit runner";
- wantedBy = [ "graphical-session.target" ];
- wants = [ "graphical-session.target" ];
- after = [ "graphical-session.target" ];
- serviceConfig = {
- Type = "simple";
- ExecStart = "${pkgs.lxqt.lxqt-policykit}/bin/lxqt-policykit-agent";
- Restart = "on-failure";
- RestartSec = 1;
- TimeoutStopSec = 10;
- };
- };
-
- devilspie2 = {
- description = "devilspie2 runner";
- wantedBy = [ "graphical-session.target" ];
- wants = [ "graphical-session.target" ];
- after = [ "graphical-session.target" ];
- serviceConfig = {
- ExecStart = "${pkgs.devilspie2}/bin/devilspie2";
- Restart = "on-failure";
- RestartSec = 1;
- TimeoutStopSec = 10;
- };
- };
-
- # This is kinda gross, because the xautolock service is already defined and configured
- # inside services.xserver.xautolock, but it's the only way I know
- xautolock.serviceConfig.Environment = [ "DISPLAY=:0" "PATH=/run/current-system/sw/bin" ];
- };
-
- systemd.services = {
- lockscreen = {
- wantedBy = [ "sleep.target" ];
- before = [ "suspend.target" ];
- serviceConfig = {
- User = "kamen";
- Environment = [ "DISPLAY=:0" "PATH=/run/current-system/sw/bin" "DBUS_SESSION_BUS_ADDRESS=\"unix:path=/run/user/1000/bus\"" ];
- ExecStart = "/home/kamen/.a/sys/lock.sh";
- };
- };
- };
-
- security.rtkit.enable = true;
+{ pkgs, ... }: {
services = {
- upower.enable = true;
- tlp.enable = true;
- udisks2.enable = true; # gnome-disks disk access
- gnome.gnome-keyring.enable = true;
- gvfs.enable = true; # MTP (for nemo)
-
- avahi = {
- enable = true;
- nssmdns = true;
- openFirewall = true;
- };
-
- pipewire = {
- enable = true;
- alsa.support32Bit = true;
- pulse.enable = true;
- };
-
- logind.extraConfig = ''
- InhibitDelayMaxSec=1
- HoldoffTimeoutSec=1s
- HandlePowerKey=poweroff'';
-
- thinkfan = {
- enable = true;
- levels = [
- [0 0 35]
- [1 35 38]
- [3 38 53]
- ["level auto" 53 32767]
- ];
- };
-
- httpd = {
- enable = true;
-
- virtualHosts = {
- syndamiadotcom-local = {
- hostName = "synd.local";
- listen = [ { port = 80; } ];
- documentRoot = "/home/kamen/Programming/GitLab-repos/syndamiadotcom/website";
- };
- };
- };
-
- xserver = {
- enable = true;
- # xkbmap
- layout = "us,bg"; # TODO us,bg-custom
- xkbVariant = ",phonetic";
- xkbOptions = "grp:alt_shift_toggle,lv3:switch,caps:escape";
-
- # Window manager
- windowManager.openbox.enable = true;
-
- # touchpad support
- libinput = {
- enable = true;
- touchpad.naturalScrolling = true;
- };
-
- xautolock = {
- enable = true;
- time = 15;
- locker = "/home/kamen/.a/sys/lock.sh";
- extraOptions = [ "-detectsleep" "-secure" ];
- };
- };
-
udev.extraRules = ''
#
# Copyright 2012-2013 Osmocom rtl-sdr project