mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 17:31:34 +01:00
Improve wrapper structure
This commit is contained in:
parent
83433f81ea
commit
30c546b57f
20 changed files with 170 additions and 212 deletions
|
|
@ -1,4 +1,7 @@
|
|||
{ assembleWrapper, pkgs, ... }:
|
||||
{ assembleWrapper, moduleArgs, ... }:
|
||||
let
|
||||
inherit (moduleArgs) pkgs;
|
||||
in
|
||||
assembleWrapper {
|
||||
basePackage = pkgs.bottom;
|
||||
flags = [ "--group" ];
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
}@moduleArgs:
|
||||
let
|
||||
assembleWrapper =
|
||||
wrapperConfig:
|
||||
|
|
@ -17,7 +17,7 @@ in
|
|||
(lib.filterAttrs (name: value: name != "default.nix"))
|
||||
(lib.concatMapAttrs (
|
||||
name: _: {
|
||||
${lib.removeSuffix ".nix" name} = import ./${name} { inherit assembleWrapper pkgs lib; };
|
||||
${lib.removeSuffix ".nix" name} = import ./${name} { inherit assembleWrapper moduleArgs; };
|
||||
}
|
||||
))
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,23 +0,0 @@
|
|||
{ assembleWrapper, pkgs, ... }:
|
||||
assembleWrapper {
|
||||
basePackage = pkgs.hyprlock;
|
||||
|
||||
flags =
|
||||
let
|
||||
hyprlock-config = pkgs.writeText "hyprlock-config" ''
|
||||
background {
|
||||
monitor =
|
||||
path = screenshot
|
||||
blur_size = 4
|
||||
blur_passes = 1
|
||||
}
|
||||
input-field {
|
||||
monitor =
|
||||
}
|
||||
'';
|
||||
in
|
||||
[
|
||||
"--config"
|
||||
hyprlock-config
|
||||
];
|
||||
}
|
||||
11
wrappers/hyprlock/default.nix
Normal file
11
wrappers/hyprlock/default.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ assembleWrapper, moduleArgs, ... }:
|
||||
let
|
||||
inherit (moduleArgs) pkgs;
|
||||
in
|
||||
assembleWrapper {
|
||||
basePackage = pkgs.hyprlock;
|
||||
flags = [
|
||||
"--config"
|
||||
./hyprlock.conf
|
||||
];
|
||||
}
|
||||
9
wrappers/hyprlock/hyprlock.conf
Normal file
9
wrappers/hyprlock/hyprlock.conf
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
background {
|
||||
monitor =
|
||||
path = screenshot
|
||||
blur_size = 4
|
||||
blur_passes = 1
|
||||
}
|
||||
input-field {
|
||||
monitor =
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
{ assembleWrapper, pkgs, ... }:
|
||||
assembleWrapper {
|
||||
basePackage = pkgs.hyprpaper;
|
||||
|
||||
flags =
|
||||
let
|
||||
hyprpaper-config = pkgs.writeText "hyprpaper-config" ''
|
||||
preload = ~/Pictures/.wallpaper
|
||||
wallpaper = , ~/Pictures/.wallpaper
|
||||
splash = false
|
||||
'';
|
||||
in
|
||||
[
|
||||
"--config"
|
||||
hyprpaper-config
|
||||
];
|
||||
}
|
||||
11
wrappers/hyprpaper/default.nix
Normal file
11
wrappers/hyprpaper/default.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ assembleWrapper, moduleArgs, ... }:
|
||||
let
|
||||
inherit (moduleArgs) pkgs;
|
||||
in
|
||||
assembleWrapper {
|
||||
basePackage = pkgs.hyprpaper;
|
||||
flags = [
|
||||
"--config"
|
||||
./hyprpaper.conf
|
||||
];
|
||||
}
|
||||
3
wrappers/hyprpaper/hyprpaper.conf
Normal file
3
wrappers/hyprpaper/hyprpaper.conf
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
preload = ~/Pictures/.wallpaper
|
||||
wallpaper = , ~/Pictures/.wallpaper
|
||||
splash = false
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
{
|
||||
assembleWrapper,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
theme ? "dark",
|
||||
}:
|
||||
assembleWrapper {
|
||||
basePackage = pkgs.kitty;
|
||||
|
||||
flags =
|
||||
let
|
||||
toKittyConfig = lib.generators.toKeyValue {
|
||||
mkKeyValue =
|
||||
key: value:
|
||||
let
|
||||
value' = (if lib.isBool value then lib.hm.booleans.yesNo value else toString value);
|
||||
in
|
||||
"${key} ${value'}";
|
||||
};
|
||||
kitty-config = pkgs.writeText "kitty-config" (toKittyConfig {
|
||||
font_family = "JetBrainsMono Nerd Font";
|
||||
confirm_os_window_close = 0;
|
||||
background_opacity = "0.85";
|
||||
enable_audio_bell = false;
|
||||
update_check_interval = 0;
|
||||
cursor_shape = "beam";
|
||||
});
|
||||
kitty-theme = pkgs.writeText "kitty-theme" "include ${pkgs.kitty-themes}/share/kitty-themes/themes/${
|
||||
{
|
||||
dark = "default.conf";
|
||||
light = "GitHub_Light.conf";
|
||||
}
|
||||
.${theme}
|
||||
}";
|
||||
in
|
||||
[
|
||||
"--config"
|
||||
kitty-config
|
||||
"--config"
|
||||
kitty-theme
|
||||
];
|
||||
}
|
||||
27
wrappers/kitty/default.nix
Normal file
27
wrappers/kitty/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ assembleWrapper, moduleArgs, ... }:
|
||||
let
|
||||
inherit (moduleArgs) pkgs;
|
||||
in
|
||||
{
|
||||
theme ? "dark",
|
||||
}:
|
||||
assembleWrapper {
|
||||
basePackage = pkgs.kitty;
|
||||
|
||||
flags =
|
||||
let
|
||||
theme-file =
|
||||
{
|
||||
dark = "default.conf";
|
||||
light = "GitHub_Light.conf";
|
||||
}
|
||||
.${theme};
|
||||
kitty-theme = pkgs.writeText "kitty-theme" "include ${pkgs.kitty-themes}/share/kitty-themes/themes/${theme-file}}";
|
||||
in
|
||||
[
|
||||
"--config"
|
||||
./kitty.conf
|
||||
"--config"
|
||||
kitty-theme
|
||||
];
|
||||
}
|
||||
6
wrappers/kitty/kitty.conf
Normal file
6
wrappers/kitty/kitty.conf
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
font_family JetBrainsMono Nerd Font
|
||||
background_opacity 0.85
|
||||
cursor_shape beam
|
||||
confirm_os_window_close 0
|
||||
enable_audio_bell no
|
||||
update_check_interval 0
|
||||
|
|
@ -1,4 +1,7 @@
|
|||
{ assembleWrapper, pkgs, ... }:
|
||||
{ assembleWrapper, moduleArgs, ... }:
|
||||
let
|
||||
inherit (moduleArgs) pkgs;
|
||||
in
|
||||
assembleWrapper {
|
||||
basePackage = pkgs.marktext;
|
||||
flags = [ "--disable-gpu" ];
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
{ assembleWrapper, pkgs, ... }:
|
||||
{ assembleWrapper, moduleArgs, ... }:
|
||||
let
|
||||
inherit (moduleArgs) pkgs;
|
||||
in
|
||||
assembleWrapper {
|
||||
basePackage = pkgs.obsidian;
|
||||
flags = [ "--disable-gpu" ];
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
{
|
||||
assembleWrapper,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{ assembleWrapper, moduleArgs, ... }:
|
||||
let
|
||||
inherit (moduleArgs) pkgs;
|
||||
in
|
||||
{
|
||||
theme ? "dark",
|
||||
}:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
{ assembleWrapper, pkgs, ... }:
|
||||
{ assembleWrapper, moduleArgs, ... }:
|
||||
let
|
||||
inherit (moduleArgs) pkgs;
|
||||
in
|
||||
assembleWrapper {
|
||||
basePackage = pkgs.spotify;
|
||||
flags = [ "--disable-gpu" ];
|
||||
|
|
|
|||
|
|
@ -1,114 +0,0 @@
|
|||
{ assembleWrapper, pkgs, ... }:
|
||||
assembleWrapper {
|
||||
basePackage = pkgs.waybar;
|
||||
|
||||
flags =
|
||||
let
|
||||
waybar-config = (pkgs.formats.json { }).generate "waybar-config" {
|
||||
layer = "top";
|
||||
position = "bottom";
|
||||
spacing = 10;
|
||||
|
||||
modules-left = [ "clock" ];
|
||||
modules-center = [ "hyprland/workspaces" ];
|
||||
modules-right = [
|
||||
"tray"
|
||||
"network"
|
||||
"wireplumber"
|
||||
"backlight"
|
||||
"battery"
|
||||
];
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
active-only = false;
|
||||
all-outputs = true;
|
||||
};
|
||||
|
||||
clock = {
|
||||
format = " {:%H.%M}";
|
||||
tooltip-format = "{:%d.%m.%Y}";
|
||||
};
|
||||
|
||||
network = {
|
||||
interval = 10;
|
||||
format = "";
|
||||
|
||||
format-wifi = "{icon}";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
tooltip-format-wifi = "{essid} {bandwidthDownBits} {bandwidthUpBits}";
|
||||
|
||||
format-ethernet = "";
|
||||
tooltip-format-ethernet = " {bandwidthDownBits} {bandwidthUpBits}";
|
||||
|
||||
format-disconnected = "";
|
||||
tooltip-format-disconnected = "Disconnected";
|
||||
};
|
||||
|
||||
wireplumber = {
|
||||
format = "{icon} {volume}%";
|
||||
format-muted = "";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
scroll-step = "5";
|
||||
};
|
||||
|
||||
tray = {
|
||||
icon-size = 20;
|
||||
spacing = 6;
|
||||
};
|
||||
|
||||
backlight = {
|
||||
device = "amdgpu_bl1";
|
||||
format = "{icon} {percent}%";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
|
||||
battery = {
|
||||
states = {
|
||||
warning = 15;
|
||||
critical = 5;
|
||||
};
|
||||
format = "{icon} {capacity}%";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
};
|
||||
waybar-style = pkgs.writeText "waybar-style" ''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0px;
|
||||
font-family: "Open Sans, Symbols Nerd Font Mono";
|
||||
font-size: 15px;
|
||||
}
|
||||
'';
|
||||
in
|
||||
[
|
||||
"--config"
|
||||
waybar-config
|
||||
"--style"
|
||||
waybar-style
|
||||
];
|
||||
}
|
||||
58
wrappers/waybar/config.jsonc
Normal file
58
wrappers/waybar/config.jsonc
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
"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": {
|
||||
"format": "",
|
||||
"format-disconnected": "",
|
||||
"format-ethernet": "",
|
||||
"format-icons": ["", "", "", ""],
|
||||
"format-wifi": "{icon}",
|
||||
"interval": 10,
|
||||
"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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
13
wrappers/waybar/default.nix
Normal file
13
wrappers/waybar/default.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ assembleWrapper, moduleArgs, ... }:
|
||||
let
|
||||
inherit (moduleArgs) pkgs;
|
||||
in
|
||||
assembleWrapper {
|
||||
basePackage = pkgs.waybar;
|
||||
flags = [
|
||||
"--config"
|
||||
./config.jsonc
|
||||
"--style"
|
||||
./style.css
|
||||
];
|
||||
}
|
||||
6
wrappers/waybar/style.css
Normal file
6
wrappers/waybar/style.css
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
* {
|
||||
border: none;
|
||||
border-radius: 0px;
|
||||
font-family: "Open Sans, Symbols Nerd Font Mono";
|
||||
font-size: 15px;
|
||||
}
|
||||
|
|
@ -1,4 +1,7 @@
|
|||
{ assembleWrapper, pkgs, ... }:
|
||||
{ assembleWrapper, moduleArgs, ... }:
|
||||
let
|
||||
inherit (moduleArgs) pkgs;
|
||||
in
|
||||
assembleWrapper {
|
||||
basePackage = pkgs.webcord;
|
||||
flags = [ "--disable-gpu" ];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue