From a36b384657a11acdb267bfefa9bc7719ab6ab4a0 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Thu, 25 Dec 2025 18:59:14 +0100 Subject: refactor: introduce Services and Monitoring sections --- nixos/profiles/workstation/graphical.nix | 54 +++++++++++++++++--------------- 1 file changed, 29 insertions(+), 25 deletions(-) (limited to 'nixos/profiles/workstation') diff --git a/nixos/profiles/workstation/graphical.nix b/nixos/profiles/workstation/graphical.nix index c30a24e..1cbb9de 100644 --- a/nixos/profiles/workstation/graphical.nix +++ b/nixos/profiles/workstation/graphical.nix @@ -1,6 +1,35 @@ { config, pkgs, ... }: { + # Services + + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + security.rtkit.enable = true; # recommended for PipeWire + hardware.bluetooth.enable = true; + + services.upower.enable = true; + + systemd.user.services.hugo-notes = { + after = ["network.target"]; + + serviceConfig = { + Type = "simple"; + WorkingDirectory = "%h/repos/notes"; + ExecStart = "${pkgs.hugo}/bin/hugo serve --port 1313"; + Restart = "on-failure"; + RestartSec = "5s"; + }; + + wantedBy = ["default.target"]; + }; + + # Packages + programs.sway = { enable = true; extraPackages = []; @@ -49,8 +78,6 @@ poweralertd ]; - services.upower.enable = true; - # This generates /etc/xdg/mimeapps.list. The XDG spec and xdg-open don't support wildcards in MIME types. # TODO: use an xdg-open alternative that supports wildcards in MIME types and doesn't use mimeapps.list xdg.mime.defaultApplications = @@ -66,30 +93,7 @@ "x-scheme-handler/mailto" = "thunderbird.desktop"; }; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - }; - security.rtkit.enable = true; # recommended for PipeWire - hardware.bluetooth.enable = true; - programs.thunderbird = { enable = true; }; - - systemd.user.services.hugo-notes = { - after = ["network.target"]; - - serviceConfig = { - Type = "simple"; - WorkingDirectory = "%h/repos/notes"; - ExecStart = "${pkgs.hugo}/bin/hugo serve --port 1313"; - Restart = "on-failure"; - RestartSec = "5s"; - }; - - wantedBy = ["default.target"]; - }; } -- cgit v1.3.1