mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2026-04-14 21:29:12 +02:00
feat: switch to niri+noctalia
This commit is contained in:
parent
a343de7a90
commit
694dd794f7
38 changed files with 3922 additions and 2066 deletions
|
|
@ -2,21 +2,25 @@
|
|||
{
|
||||
options.swarselmodules.lowBattery = lib.mkEnableOption "low battery notification config";
|
||||
config = lib.mkIf config.swarselmodules.lowBattery {
|
||||
systemd.user.services."battery-low" = {
|
||||
enable = true;
|
||||
description = "Timer for battery check that alerts at 10% or less";
|
||||
partOf = [ "graphical-session.target" ];
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = pkgs.writeShellScript "battery-low-notification"
|
||||
''
|
||||
if (( 10 >= $(${lib.getExe pkgs.acpi} -b | head -n 1 | ${lib.getExe pkgs.ripgrep} -o "\d+%" | ${lib.getExe pkgs.ripgrep} -o "\d+") && $(${lib.getExe pkgs.acpi} -b | head -n 1 | ${lib.getExe pkgs.ripgrep} -o "\d+%" | ${lib.getExe pkgs.ripgrep} -o "\d+") > 0 ));
|
||||
then ${lib.getExe pkgs.libnotify} --urgency=critical "low battery" "$(${lib.getExe pkgs.acpi} -b | head -n 1 | ${lib.getExe pkgs.ripgrep} -o "\d+%")";
|
||||
fi;
|
||||
'';
|
||||
systemd.user.services."battery-low" =
|
||||
let
|
||||
target = "sway-session.target";
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
description = "Timer for battery check that alerts at 10% or less";
|
||||
partOf = [ target ];
|
||||
wantedBy = [ target ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = pkgs.writeShellScript "battery-low-notification"
|
||||
''
|
||||
if (( 10 >= $(${lib.getExe pkgs.acpi} -b | head -n 1 | ${lib.getExe pkgs.ripgrep} -o "\d+%" | ${lib.getExe pkgs.ripgrep} -o "\d+") && $(${lib.getExe pkgs.acpi} -b | head -n 1 | ${lib.getExe pkgs.ripgrep} -o "\d+%" | ${lib.getExe pkgs.ripgrep} -o "\d+") > 0 ));
|
||||
then ${lib.getExe pkgs.libnotify} --urgency=critical "low battery" "$(${lib.getExe pkgs.acpi} -b | head -n 1 | ${lib.getExe pkgs.ripgrep} -o "\d+%")";
|
||||
fi;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
systemd.user.timers."battery-low" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ in
|
|||
comment = "Sway compositor managed by UWSM";
|
||||
binPath = "/run/current-system/sw/bin/sway";
|
||||
};
|
||||
niri = lib.mkIf (config.swarselmodules ? niri) {
|
||||
niri = lib.mkIf (config.programs ? niri) {
|
||||
prettyName = "Niri";
|
||||
comment = "Niri compositor managed by UWSM";
|
||||
binPath = "/run/current-system/sw/bin/niri-session";
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
{ lib, config, ... }:
|
||||
{
|
||||
options.swarselmodules.xdg-portal = lib.mkEnableOption "xdg portal config";
|
||||
config = lib.mkIf config.swarselmodules.xdg-portal {
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
config = {
|
||||
common = {
|
||||
default = "wlr";
|
||||
};
|
||||
};
|
||||
wlr.enable = true;
|
||||
wlr.settings.screencast = {
|
||||
output_name = "eDP-1";
|
||||
chooser_type = "simple";
|
||||
chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or";
|
||||
};
|
||||
# config = {
|
||||
# common = {
|
||||
# default = "wlr";
|
||||
# };
|
||||
# };
|
||||
# wlr.enable = true;
|
||||
# wlr.settings.screencast = {
|
||||
# output_name = "eDP-1";
|
||||
# chooser_type = "simple";
|
||||
# chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or";
|
||||
# };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,33 +1,30 @@
|
|||
{ inputs, lib, config, pkgs, ... }:
|
||||
let
|
||||
moduleName = "niri";
|
||||
in
|
||||
{ self, inputs, config, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.niri-flake.nixosModules.niri
|
||||
];
|
||||
options.swarselmodules.${moduleName} = lib.mkEnableOption "${moduleName} settings";
|
||||
config = lib.mkIf config.swarselmodules.${moduleName}
|
||||
{
|
||||
config = {
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
wl-clipboard
|
||||
wayland-utils
|
||||
libsecret
|
||||
cage
|
||||
gamescope
|
||||
xwayland-satellite-unstable
|
||||
];
|
||||
|
||||
|
||||
programs.niri = {
|
||||
enable = true;
|
||||
package = pkgs.niri-unstable; # the actual niri that will be installed and used
|
||||
};
|
||||
} // {
|
||||
niri-flake.cache.enable = true;
|
||||
programs.niri = {
|
||||
package = null;
|
||||
home-manager.users.${config.swarselsystems.mainUser}.imports = [
|
||||
"${self}/modules/home/optional/niri.nix"
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
wl-clipboard
|
||||
wayland-utils
|
||||
libsecret
|
||||
cage
|
||||
gamescope
|
||||
xwayland-satellite-unstable
|
||||
];
|
||||
|
||||
|
||||
programs = {
|
||||
niri = {
|
||||
enable = true;
|
||||
package = pkgs.niri-stable; # the actual niri that will be installed and used
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
17
modules/nixos/optional/noctalia.nix
Normal file
17
modules/nixos/optional/noctalia.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ self, inputs, config, ... }:
|
||||
{
|
||||
disabledModules = [ "programs/gpu-screen-recorder.nix" ];
|
||||
imports = [
|
||||
"${inputs.nixpkgs-dev}/nixos/modules/programs/gpu-screen-recorder.nix"
|
||||
];
|
||||
config = {
|
||||
home-manager.users.${config.swarselsystems.mainUser}.imports = [
|
||||
"${self}/modules/home/optional/noctalia.nix"
|
||||
];
|
||||
services = {
|
||||
upower.enable = true; # needed for battery percentage
|
||||
gnome.evolution-data-server.enable = true; # needed for calendar integration
|
||||
};
|
||||
programs.gpu-screen-recorder.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{ self, lib, config, globals, dns, confLib, ... }:
|
||||
{ lib, config, globals, dns, confLib, ... }:
|
||||
let
|
||||
inherit (confLib.gen { name = "firefly-iii"; port = 80; }) servicePort serviceName serviceUser serviceGroup serviceDomain serviceAddress proxyAddress4 proxyAddress6;
|
||||
inherit (confLib.static) isHome dnsServer webProxy homeWebProxy homeServiceAddress nginxAccessRules;
|
||||
|
|
@ -30,11 +30,11 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
topology.self.services.${serviceName} = {
|
||||
name = "Firefly-III";
|
||||
info = "https://${serviceDomain}";
|
||||
icon = "${self}/files/topology-images/${serviceName}.png";
|
||||
};
|
||||
# topology.self.services.${serviceName} = {
|
||||
# name = "Firefly-III";
|
||||
# info = "https://${serviceDomain}";
|
||||
# icon = "${self}/files/topology-images/${serviceName}.png";
|
||||
# };
|
||||
|
||||
globals.services.${serviceName} = {
|
||||
domain = serviceDomain;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ self, lib, config, globals, dns, confLib, ... }:
|
||||
{ lib, config, globals, dns, confLib, ... }:
|
||||
let
|
||||
inherit (confLib.gen { name = "freshrss"; port = 80; }) servicePort serviceName serviceUser serviceGroup serviceDomain serviceAddress proxyAddress4 proxyAddress6;
|
||||
inherit (confLib.static) isHome webProxy homeWebProxy dnsServer homeServiceAddress nginxAccessRules;
|
||||
|
|
@ -49,11 +49,11 @@ in
|
|||
# };
|
||||
};
|
||||
|
||||
topology.self.services.${serviceName} = {
|
||||
name = "FreshRSS";
|
||||
info = "https://${serviceDomain}";
|
||||
icon = "${self}/files/topology-images/${serviceName}.png";
|
||||
};
|
||||
# topology.self.services.${serviceName} = {
|
||||
# name = "FreshRSS";
|
||||
# info = "https://${serviceDomain}";
|
||||
# icon = "${self}/files/topology-images/${serviceName}.png";
|
||||
# };
|
||||
|
||||
globals.services.${serviceName} = {
|
||||
domain = serviceDomain;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue