More refactoring and added hyprlock
This commit is contained in:
@@ -3,9 +3,6 @@
|
||||
let
|
||||
cfg = config.samfelag.modules.desktop.tools.eww;
|
||||
hyprCfg = config.samfelag.modules.desktop.wm.hyprland;
|
||||
# Paths
|
||||
paths = {
|
||||
};
|
||||
in {
|
||||
|
||||
options.samfelag.modules.desktop.tools.eww = {
|
||||
@@ -29,6 +26,11 @@ in {
|
||||
hm.xdg.configFile."eww/widgets".source = ../../../config/eww/widgets;
|
||||
hm.xdg.configFile."eww/scripts".source = ../../../config/eww/scripts;
|
||||
|
||||
# - Execute on startup -----------------------
|
||||
hm.wayland.windowManager.hyprland.settings.exec-once = lib.mkIf hyprCfg.enable [
|
||||
"eww open top-bar"
|
||||
];
|
||||
|
||||
# - Themeing ---------------------------------
|
||||
hm.xdg.configFile."eww/colour-scheme.scss".text = ''
|
||||
$base00: #${config.colorScheme.palette.base00};
|
||||
|
||||
50
modules/desktop/tools/greetd.nix
Normal file
50
modules/desktop/tools/greetd.nix
Normal file
@@ -0,0 +1,50 @@
|
||||
{ inputs, config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.samfelag.modules.desktop.tools.greetd;
|
||||
in {
|
||||
|
||||
options.samfelag.modules.desktop.tools.greetd = with lib; {
|
||||
enable = mkEnableOption "Greetd based greeter";
|
||||
wm_cmd = lib.my.mkOpt' types.str "" "Window manager command";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
greetd.gtkgreet
|
||||
cage
|
||||
];
|
||||
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "${pkgs.cage}/bin/cage -d -s ${pkgs.greetd.gtkgreet}/bin/gtkgreet -- -c ${cfg.wm_cmd} -s /etc/greetd/greetd.css";
|
||||
user = config.user.name;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.etc."greetd/environments".text = ''
|
||||
${cfg.wm_cmd}
|
||||
'';
|
||||
|
||||
environment.etc."greetd/greetd.css".text = ''
|
||||
window {
|
||||
background-image: url("file://${config.samfelag.modules.desktop.wallpaper}");
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
font-family: Iosevka;
|
||||
color: #${config.colorScheme.palette.base00};
|
||||
}
|
||||
|
||||
box#body {
|
||||
background-color: #${config.colorScheme.palette.base06};
|
||||
opacity: 0.75;
|
||||
border-radius: 10px;
|
||||
padding: 50px;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
66
modules/desktop/tools/hyprlock.nix
Normal file
66
modules/desktop/tools/hyprlock.nix
Normal file
@@ -0,0 +1,66 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.samfelag.modules.desktop.tools.hyprlock;
|
||||
hexToRGBString = inputs.nix-colors.lib-core.conversions.hexToRGBString ",";
|
||||
in
|
||||
{
|
||||
options.samfelag.modules.desktop.tools.hyprlock = {
|
||||
enable = mkEnableOption "Hyprlock screen locker";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
hm.programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
# disable_loading_bar = true;
|
||||
# grace = 5;
|
||||
};
|
||||
|
||||
background = [
|
||||
{
|
||||
path = "${config.samfelag.modules.desktop.wallpaper}";
|
||||
blur_passes = 2;
|
||||
blur_size = 4;
|
||||
}
|
||||
];
|
||||
|
||||
input-field = [
|
||||
{
|
||||
font_family = "Iosevka";
|
||||
size = "300, 40";
|
||||
position = "0, -80";
|
||||
outline_thickness = 1;
|
||||
fade_on_empty = "false";
|
||||
placeholder_text = "";
|
||||
|
||||
outer_color = "rgba(${hexToRGBString config.colorScheme.palette.base02},0.9)";
|
||||
inner_color = "rgba(${hexToRGBString config.colorScheme.palette.base00},0.9)";
|
||||
font_color = "rgba(${hexToRGBString config.colorScheme.palette.base05},1.0)";
|
||||
|
||||
check_color = "rgba(${hexToRGBString config.colorScheme.palette.base07},1.0)";
|
||||
fail_color = "rgba(${hexToRGBString config.colorScheme.palette.base06},1.0)";
|
||||
}
|
||||
];
|
||||
|
||||
label = [
|
||||
{
|
||||
text = "$TIME";
|
||||
color = "rgba(${hexToRGBString config.colorScheme.palette.base00},1.0)";
|
||||
font_size = 25;
|
||||
font_family = "Iosevka";
|
||||
|
||||
position = "0, 80";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
28
modules/desktop/tools/hyprpaper.nix
Normal file
28
modules/desktop/tools/hyprpaper.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.samfelag.modules.desktop.tools.hyprpaper;
|
||||
in
|
||||
{
|
||||
options.samfelag.modules.desktop.tools.hyprpaper = {
|
||||
enable = mkEnableOption "Hyprpaper desktop wallpaper";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
hm.services.hyprpaper = {
|
||||
enable = true;
|
||||
settings = {
|
||||
preload = "${config.samfelag.modules.desktop.wallpaper}";
|
||||
wallpaper = ",${config.samfelag.modules.desktop.wallpaper}";
|
||||
};
|
||||
};
|
||||
|
||||
# - Execute on startup -----------------------
|
||||
hm.wayland.windowManager.hyprland.settings.exec-once = [
|
||||
"hyprpaper"
|
||||
];
|
||||
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user