My Nix Configuration

[modules.home] Add wlogout

Changed files
+66 -56
homes
x86_64-linux
pyrox
programs
wlogout
modules
home
programs
+14 -3
homes/x86_64-linux/pyrox/programs/wlogout/default.nix modules/home/programs/wlogout/default.nix
···
-
{ pkgs, ...}: {
-
imports = [./style.nix];
-
programs.wlogout = {
+
{
+
pkgs,
+
config,
+
lib,
+
...
+
}:
+
let
+
cfg = config.programs.py.wlogout;
+
pkg = config.programs.wlogout.package;
+
in
+
{
+
options.py.programs.wlogout.enable = lib.mkEnableOption "wlogout";
+
config.programs.wlogout = lib.mkIf cfg.enable {
enable = true;
+
style = import ./style.nix pkg;
layout = [
{
label = "hibernate";
-53
homes/x86_64-linux/pyrox/programs/wlogout/style.nix
···
-
{config, ...}: let
-
pkg = config.programs.wlogout.package;
-
icon-path = "${pkg}/share/wlogout/icons";
-
in {
-
programs.wlogout.style = ''
-
* {
-
background-image: none;
-
}
-
window {
-
background-image: image(url("/home/thehedgehog/bgs/ctp-waves.png"), url("/home/thehedgehog/bgs/ctp-waves.png"));
-
background-size: cover;
-
}
-
button {
-
color: #cdd6f4;
-
background-color: #11111b;
-
border: none;
-
border-color: #6c7086;
-
background-repeat: no-repeat;
-
background-position: center;
-
background-size: 25%;
-
}
-
-
button:focus, button:active, button:hover {
-
background-color: #1e1e2e;
-
outline-style: none;
-
border:none;
-
}
-
-
#lock {
-
background-image: image(url("${icon-path}/lock.png"), url("${icon-path}/lock.png"));
-
}
-
-
#suspend-then-hibernate {
-
background-image: image(url("${icon-path}/suspend.png"), url("${icon-path}/suspend.png"));
-
}
-
-
#suspend {
-
background-image: image(url("${icon-path}/suspend.png"), url("${icon-path}/suspend.png"));
-
}
-
-
#hibernate {
-
background-image: image(url("${icon-path}/hibernate.png"), url("${icon-path}/hibernate.png"));
-
}
-
-
#shutdown {
-
background-image: image(url("${icon-path}/shutdown.png"), url("${icon-path}/shutdown.png"));
-
}
-
-
#reboot {
-
background-image: image(url("${icon-path}/reboot.png"), url("${icon-path}/reboot.png"));
-
}
-
'';
-
}
+52
modules/home/programs/wlogout/style.nix
···
+
{ pkg }:
+
let
+
icon-path = "${pkg}/share/wlogout/icons";
+
in
+
''
+
* {
+
background-image: none;
+
}
+
window {
+
background-image: image(url("/home/thehedgehog/bgs/ctp-waves.png"), url("/home/thehedgehog/bgs/ctp-waves.png"));
+
background-size: cover;
+
}
+
button {
+
color: #cdd6f4;
+
background-color: #11111b;
+
border: none;
+
border-color: #6c7086;
+
background-repeat: no-repeat;
+
background-position: center;
+
background-size: 25%;
+
}
+
+
button:focus, button:active, button:hover {
+
background-color: #1e1e2e;
+
outline-style: none;
+
border:none;
+
}
+
+
#lock {
+
background-image: image(url("${icon-path}/lock.png"), url("${icon-path}/lock.png"));
+
}
+
+
#suspend-then-hibernate {
+
background-image: image(url("${icon-path}/suspend.png"), url("${icon-path}/suspend.png"));
+
}
+
+
#suspend {
+
background-image: image(url("${icon-path}/suspend.png"), url("${icon-path}/suspend.png"));
+
}
+
+
#hibernate {
+
background-image: image(url("${icon-path}/hibernate.png"), url("${icon-path}/hibernate.png"));
+
}
+
+
#shutdown {
+
background-image: image(url("${icon-path}/shutdown.png"), url("${icon-path}/shutdown.png"));
+
}
+
+
#reboot {
+
background-image: image(url("${icon-path}/reboot.png"), url("${icon-path}/reboot.png"));
+
}
+
''