This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

superconfig / 2configs / desktops / sway / noctalia.nix
1.8 kB 69 lines
1{ 2 pkgs, 3 config, 4 self, 5 ... 6}: 7let 8 noctalia-shell = self.packages.${pkgs.system}.noctalia-shell; 9in 10{ 11 systemd.user.services.noctalia-shell = { 12 description = "Noctalia Shell - Wayland desktop shell"; 13 documentation = [ "https://docs.noctalia.dev" ]; 14 partOf = [ "sway-session.target" ]; 15 wantedBy = [ "sway-session.target" ]; 16 after = [ "sway-session.target" ]; 17 path = [ 18 pkgs.bash 19 pkgs.coreutils 20 pkgs.gnugrep 21 pkgs.gawk 22 pkgs.procps 23 pkgs.util-linux 24 pkgs.sway 25 pkgs.brightnessctl 26 pkgs.pulseaudio 27 pkgs.networkmanager 28 pkgs.wl-clipboard 29 ]; 30 serviceConfig = { 31 ExecStart = "${noctalia-shell}/bin/noctalia-shell"; 32 Restart = "on-failure"; 33 }; 34 }; 35 36 environment.systemPackages = [ 37 noctalia-shell 38 # ryzenadj and power-profile for power profile control 39 pkgs.ryzenadj 40 self.packages.${pkgs.system}.power-profile 41 ]; 42 43 # Idle inhibit service - toggled by bar button 44 systemd.user.services.sway-idle-inhibit = { 45 description = "Inhibit idle/sleep"; 46 serviceConfig = { 47 Type = "simple"; 48 ExecStart = "${pkgs.systemd}/bin/systemd-inhibit --what=idle:sleep --who=noctalia --why='User requested' --mode=block sleep infinity"; 49 }; 50 }; 51 52 # Allow user to run ryzenadj without password (for power profile switching) 53 security.sudo.extraRules = [ 54 { 55 users = [ config.users.users.mainUser.name ]; 56 commands = [ 57 { 58 command = "/run/current-system/sw/bin/ryzenadj"; 59 options = [ "NOPASSWD" ]; 60 } 61 ]; 62 } 63 ]; 64 65 # Make RAPL energy counters readable for power monitoring 66 services.udev.extraRules = '' 67 SUBSYSTEM=="powercap", ACTION=="add", RUN+="${pkgs.coreutils}/bin/chmod a+r /sys/class/powercap/%k/energy_uj" 68 ''; 69}