mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 04:19:19 -08:00
feat: the stuff of nightmares
This commit is contained in:
parent
b589fdda9f
commit
3a29446c96
51 changed files with 679 additions and 1094 deletions
|
|
@ -7,13 +7,10 @@ in with lib; {
|
|||
palette = mkOption {
|
||||
type = attrsOf str;
|
||||
};
|
||||
palette' = mkOption {
|
||||
type = attrsOf str;
|
||||
};
|
||||
sass = {
|
||||
variables = mkOption {
|
||||
type = attrsOf str;
|
||||
default = cfg.palette // cfg.palette' // {
|
||||
default = cfg.palette // {
|
||||
term_font = "Iosevka";
|
||||
font = "Iosevka";
|
||||
font_size = "12px";
|
||||
|
|
@ -28,16 +25,10 @@ in with lib; {
|
|||
config = mkIf (cfg.schemes != {}) {
|
||||
base16 = {
|
||||
# TODO: convert to std
|
||||
palette = lib.mapAttrs' (k: v:
|
||||
palette = lib.mapAttrs' (k: v:
|
||||
lib.nameValuePair
|
||||
k
|
||||
"#${v.hex}")
|
||||
(lib.filterAttrs (n: _: lib.hasInfix "base" n)
|
||||
cfg.defaultScheme);
|
||||
palette' = lib.mapAttrs' (k: v:
|
||||
lib.nameValuePair
|
||||
"${k}t"
|
||||
"rgba(${toString v.red.byte}, ${toString v.green.byte}, ${toString v.blue.byte}, ${toString 0.7})")
|
||||
"#${v.hex}")
|
||||
(lib.filterAttrs (n: _: lib.hasInfix "base" n)
|
||||
cfg.defaultScheme);
|
||||
};
|
||||
|
|
@ -50,7 +41,7 @@ in with lib; {
|
|||
source = pkgs.callPackage
|
||||
({ sass, stdenv }: stdenv.mkDerivation {
|
||||
inherit name src variables;
|
||||
nativeBuildInputs = lib.singleton sass;
|
||||
nativeBuildInputs = lib.singleton pkgs.sass;
|
||||
phases = [ "buildPhase" ];
|
||||
buildPhase = ''
|
||||
cat $variables $src > src-mut.sass
|
||||
|
|
|
|||
5
modules/home/waybar.nix
Normal file
5
modules/home/waybar.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ config, ... }: {
|
||||
systemd.user.services.waybar.Unit.X-Restart-Triggers = [
|
||||
(builtins.toString config.programs.waybar.style)
|
||||
];
|
||||
}
|
||||
34
modules/home/wofi.nix
Normal file
34
modules/home/wofi.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ config, lib, pkgs, ... }: let
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.types) attrsOf unspecified;
|
||||
inherit (lib.generators) toKeyValue;
|
||||
cfg = config.programs.wofi;
|
||||
in {
|
||||
options.programs.wofi = {
|
||||
enable = mkEnableOption "wofi, an unmaintained launcher program for wlroots";
|
||||
package = mkOption {
|
||||
type = unspecified;
|
||||
default = pkgs.wofi;
|
||||
};
|
||||
exec = mkOption {
|
||||
internal = true;
|
||||
type = unspecified;
|
||||
default = "${cfg.package}/bin/wofi";
|
||||
};
|
||||
settings = mkOption {
|
||||
type = attrsOf unspecified;
|
||||
};
|
||||
};
|
||||
config = mkMerge [
|
||||
{
|
||||
programs.wofi.settings.term = config.wayland.windowManager.sway.config.terminal;
|
||||
}
|
||||
(mkIf cfg.enable {
|
||||
xdg.configFile."wofi/config" = {
|
||||
text = toKeyValue {} cfg.settings;
|
||||
};
|
||||
wayland.windowManager.sway.config.menu = "${pkgs.j4-dmenu-desktop}/bin/j4-dmenu-desktop --no-generic --dmenu=\"${cfg.exec}\" --term='${cfg.settings.term}'";
|
||||
})
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue