mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 15:11:34 +01:00
Move modules in programs/services subfolders
This commit is contained in:
parent
2ff87c8404
commit
211ca98e92
38 changed files with 0 additions and 0 deletions
31
modules/home/services/cliphist.nix
Normal file
31
modules/home/services/cliphist.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.custom.services.cliphist.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.custom.services.cliphist.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = config.custom.programs.rofi.enable;
|
||||
message = "cliphist requires rofi";
|
||||
}
|
||||
];
|
||||
|
||||
services.cliphist = {
|
||||
enable = true;
|
||||
allowImages = false;
|
||||
};
|
||||
|
||||
systemd.user.services.cliphist.Service.ExecStopPost =
|
||||
"${lib.getExe config.services.cliphist.package} wipe";
|
||||
|
||||
home.packages = [
|
||||
pkgs.wl-clipboard
|
||||
(pkgs.writeScriptBin "rofi-clipboard" "cliphist list | rofi -dmenu -display-columns 2 | cliphist decode | wl-copy")
|
||||
];
|
||||
};
|
||||
}
|
||||
25
modules/home/services/gammastep.nix
Normal file
25
modules/home/services/gammastep.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ config, lib, ... }@moduleArgs:
|
||||
{
|
||||
options.custom.services.gammastep.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.custom.services.gammastep.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion =
|
||||
let
|
||||
inherit (moduleArgs.osConfig.services) geoclue2;
|
||||
in
|
||||
geoclue2.enable or true && geoclue2.appConfig.gammastep.isAllowed or true;
|
||||
message = "gammastep requires geoclue";
|
||||
}
|
||||
];
|
||||
|
||||
services.gammastep = {
|
||||
enable = true;
|
||||
provider = "geoclue2";
|
||||
settings.general.adjustment-method = "wayland";
|
||||
|
||||
temperature.night = 2700;
|
||||
};
|
||||
};
|
||||
}
|
||||
43
modules/home/services/hypridle.nix
Normal file
43
modules/home/services/hypridle.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.custom.services.hypridle.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.custom.services.hypridle.enable {
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = lib.mkIf config.custom.programs.hyprlock.enable "pidof hyprlock || hyprlock";
|
||||
before_sleep_cmd = "loginctl lock-session";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
};
|
||||
|
||||
listener = [
|
||||
(lib.mkIf config.custom.programs.brightnessctl.enable {
|
||||
timeout = 5 * 60;
|
||||
on-timeout = "brightnessctl --save --exponent set 10%";
|
||||
on-resume = "brightnessctl --restore";
|
||||
})
|
||||
{
|
||||
timeout = 10 * 60;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
{
|
||||
timeout = 10 * 60 + 10;
|
||||
on-timeout = "loginctl lock-session";
|
||||
}
|
||||
{
|
||||
timeout = 30 * 60;
|
||||
on-timeout = "systemctl sleep";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
14
modules/home/services/hyprpaper.nix
Normal file
14
modules/home/services/hyprpaper.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
options.custom.services.hyprpaper.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.custom.services.hyprpaper.enable {
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
settings = {
|
||||
preload = [ "~/Pictures/.wallpaper" ];
|
||||
wallpaper = [ ", ~/Pictures/.wallpaper" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
16
modules/home/services/tailscale.nix
Normal file
16
modules/home/services/tailscale.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ config, lib, ... }@moduleArgs:
|
||||
{
|
||||
options.custom.services.tailscale.enable = lib.mkEnableOption "" // {
|
||||
default = moduleArgs.osConfig.custom.services.tailscale.enable or false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.custom.services.tailscale.enable {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
matchBlocks.installer.extraOptions = {
|
||||
UserKnownHostsFile = "/dev/null";
|
||||
StrictHostKeyChecking = "no";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
114
modules/home/services/waybar.nix
Normal file
114
modules/home/services/waybar.nix
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
options.custom.services.waybar.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.custom.services.waybar.enable {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
|
||||
settings.mainBar = {
|
||||
output = [
|
||||
"DP-1"
|
||||
"eDP-1"
|
||||
];
|
||||
layer = "top";
|
||||
position = "bottom";
|
||||
spacing = 10;
|
||||
|
||||
modules-left = [ "clock" ];
|
||||
modules-center = [ "hyprland/workspaces" ];
|
||||
modules-right = [
|
||||
"tray"
|
||||
"network"
|
||||
"wireplumber"
|
||||
"backlight"
|
||||
"battery"
|
||||
];
|
||||
|
||||
clock = {
|
||||
format = " {:%H:%M}";
|
||||
tooltip-format = "{:%d.%m.%Y}";
|
||||
};
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
active-only = false;
|
||||
all-outputs = true;
|
||||
};
|
||||
|
||||
tray = {
|
||||
icon-size = 20;
|
||||
spacing = 6;
|
||||
};
|
||||
|
||||
network = {
|
||||
interval = 10;
|
||||
format = "";
|
||||
format-disconnected = "";
|
||||
format-ethernet = "";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
format-wifi = "{icon}";
|
||||
tooltip-format-disconnected = "Disconnected";
|
||||
tooltip-format-ethernet = " {bandwidthDownBits} {bandwidthUpBits}";
|
||||
tooltip-format-wifi = "{essid} {bandwidthDownBits} {bandwidthUpBits}";
|
||||
};
|
||||
|
||||
wireplumber = {
|
||||
format = "{icon} {volume}%";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
format-muted = "";
|
||||
scroll-step = "5";
|
||||
};
|
||||
|
||||
backlight = {
|
||||
device = "amdgpu_bl1";
|
||||
format = "{icon} {percent}%";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
|
||||
battery = {
|
||||
format = "{icon} {capacity}%";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
states = {
|
||||
critical = 5;
|
||||
warning = 15;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
style = ''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0px;
|
||||
font-family: "Open Sans, Symbols Nerd Font Mono";
|
||||
font-size: 15px;
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue