nixfmt
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
home,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
namespace,
|
||||
config,
|
||||
...
|
||||
|
||||
@@ -3,19 +3,23 @@ with lib;
|
||||
let
|
||||
cfg = config.mjallen.theme;
|
||||
|
||||
mkPalettePath = name:
|
||||
lib.snowfall.fs.get-file "modules/home/desktop/theme/palettes/${name}.nix";
|
||||
mkPalettePath = name: lib.snowfall.fs.get-file "modules/home/desktop/theme/palettes/${name}.nix";
|
||||
|
||||
cap = s: let
|
||||
cap =
|
||||
s:
|
||||
let
|
||||
len = builtins.stringLength s;
|
||||
in
|
||||
(lib.toUpper (builtins.substring 0 1 s))
|
||||
+ (builtins.substring 1 (len - 1) s);
|
||||
(lib.toUpper (builtins.substring 0 1 s)) + (builtins.substring 1 (len - 1) s);
|
||||
in
|
||||
{
|
||||
options.mjallen.theme = {
|
||||
name = mkOption {
|
||||
type = types.enum [ "nord" "dracula" "everforest" ];
|
||||
type = types.enum [
|
||||
"nord"
|
||||
"dracula"
|
||||
"everforest"
|
||||
];
|
||||
default = "nord";
|
||||
description = "Global theme palette name.";
|
||||
};
|
||||
@@ -51,25 +55,47 @@ in
|
||||
|
||||
# e.g. Colloid-Dark-Compact-*
|
||||
color = mkOption {
|
||||
type = types.enum [ "dark" "light" ];
|
||||
type = types.enum [
|
||||
"dark"
|
||||
"light"
|
||||
];
|
||||
default = "dark";
|
||||
description = "GTK color variant.";
|
||||
};
|
||||
|
||||
size = mkOption {
|
||||
type = types.enum [ "standard" "compact" ];
|
||||
type = types.enum [
|
||||
"standard"
|
||||
"compact"
|
||||
];
|
||||
default = "compact";
|
||||
description = "GTK size variant.";
|
||||
};
|
||||
|
||||
accent = mkOption {
|
||||
type = types.enum [ "default" "purple" "pink" "red" "orange" "yellow" "green" "teal" "grey" "all" ];
|
||||
type = types.enum [
|
||||
"default"
|
||||
"purple"
|
||||
"pink"
|
||||
"red"
|
||||
"orange"
|
||||
"yellow"
|
||||
"green"
|
||||
"teal"
|
||||
"grey"
|
||||
"all"
|
||||
];
|
||||
default = "all";
|
||||
description = "GTK accent (Colloid themeVariants).";
|
||||
};
|
||||
|
||||
tweak = mkOption {
|
||||
type = types.enum [ "normal" "rimless" "float" "black" ];
|
||||
type = types.enum [
|
||||
"normal"
|
||||
"rimless"
|
||||
"float"
|
||||
"black"
|
||||
];
|
||||
default = "normal";
|
||||
description = "GTK tweak (Colloid tweaks).";
|
||||
};
|
||||
@@ -84,13 +110,31 @@ in
|
||||
icons = {
|
||||
# Colloid icon scheme usually supports several named schemes. Default follows palette name.
|
||||
scheme = mkOption {
|
||||
type = types.enum [ "default" "nord" "dracula" "gruvbox" "everforest" "catppuccin" ];
|
||||
type = types.enum [
|
||||
"default"
|
||||
"nord"
|
||||
"dracula"
|
||||
"gruvbox"
|
||||
"everforest"
|
||||
"catppuccin"
|
||||
];
|
||||
default = cfg.name;
|
||||
description = "Icon scheme to use (Colloid schemeVariants).";
|
||||
};
|
||||
|
||||
variant = mkOption {
|
||||
type = types.enum [ "default" "purple" "pink" "red" "orange" "yellow" "green" "teal" "grey" "all" ];
|
||||
type = types.enum [
|
||||
"default"
|
||||
"purple"
|
||||
"pink"
|
||||
"red"
|
||||
"orange"
|
||||
"yellow"
|
||||
"green"
|
||||
"teal"
|
||||
"grey"
|
||||
"all"
|
||||
];
|
||||
default = "all";
|
||||
description = "Icon variant (Colloid colorVariants).";
|
||||
};
|
||||
@@ -110,7 +154,10 @@ in
|
||||
|
||||
# Pull tokens directly from the palette file for convenience
|
||||
mjallen.theme.tokens = mkDefault (
|
||||
let pal = import cfg.paletteFile; in pal.tokens or { }
|
||||
let
|
||||
pal = import cfg.paletteFile;
|
||||
in
|
||||
pal.tokens or { }
|
||||
);
|
||||
|
||||
# Expose the imported palette for convenience
|
||||
@@ -129,12 +176,16 @@ in
|
||||
# Computed GTK/Icon theme names if not overridden
|
||||
_module.args.mjallenThemeComputed = {
|
||||
gtkTheme =
|
||||
if cfg.gtk.themeName != null then cfg.gtk.themeName
|
||||
else "Colloid-${cap cfg.gtk.color}-${cap cfg.gtk.size}";
|
||||
if cfg.gtk.themeName != null then
|
||||
cfg.gtk.themeName
|
||||
else
|
||||
"Colloid-${cap cfg.gtk.color}-${cap cfg.gtk.size}";
|
||||
|
||||
iconTheme =
|
||||
if cfg.icons.themeName != null then cfg.icons.themeName
|
||||
else "Colloid-${cap cfg.icons.scheme}-${cap cfg.gtk.color}";
|
||||
if cfg.icons.themeName != null then
|
||||
cfg.icons.themeName
|
||||
else
|
||||
"Colloid-${cap cfg.icons.scheme}-${cap cfg.gtk.color}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -374,7 +374,14 @@ in
|
||||
scale
|
||||
];
|
||||
# Append transform only when set, as "transform, <value>"
|
||||
transformTokens = if m.transform == null then [ ] else [ "transform" m.transform ];
|
||||
transformTokens =
|
||||
if m.transform == null then
|
||||
[ ]
|
||||
else
|
||||
[
|
||||
"transform"
|
||||
m.transform
|
||||
];
|
||||
tokens = parts ++ transformTokens ++ m.extra;
|
||||
in
|
||||
builtins.concatStringsSep ", " tokens
|
||||
|
||||
@@ -6,25 +6,29 @@ let
|
||||
|
||||
# Back-compat shims for deprecated options
|
||||
rightModules =
|
||||
if builtins.hasAttr "modules-right" cfg && (cfg."modules-right" != [ ])
|
||||
then cfg."modules-right"
|
||||
else cfg.layout.right;
|
||||
if builtins.hasAttr "modules-right" cfg && (cfg."modules-right" != [ ]) then
|
||||
cfg."modules-right"
|
||||
else
|
||||
cfg.layout.right;
|
||||
|
||||
netIf =
|
||||
if (cfg ? networkInterface) && (cfg.networkInterface != "wlan0")
|
||||
then cfg.networkInterface
|
||||
else cfg.network.interface;
|
||||
if (cfg ? networkInterface) && (cfg.networkInterface != "wlan0") then
|
||||
cfg.networkInterface
|
||||
else
|
||||
cfg.network.interface;
|
||||
|
||||
defaultOpacity = palette.tokens.opacity or "opacity: 0.85;";
|
||||
defaultBorderRadius = palette.tokens.borderRadius or "border-radius: 1rem;";
|
||||
defaultCenterOptions = palette.tokens.centerOptions or ''
|
||||
defaultCenterOptions =
|
||||
palette.tokens.centerOptions or ''
|
||||
padding-top: 0.2rem;
|
||||
padding-bottom: 0.2rem;
|
||||
padding-left: 0.5rem;
|
||||
padding-right: 0.5rem;
|
||||
margin: 3px 0;
|
||||
'';
|
||||
borderRight = palette.tokens.borderRight or ''
|
||||
borderRight =
|
||||
palette.tokens.borderRight or ''
|
||||
padding-top: 0.2rem;
|
||||
padding-bottom: 0.2rem;
|
||||
padding-left: 0.5rem;
|
||||
@@ -33,7 +37,8 @@ let
|
||||
border-radius: 0rem 1rem 1rem 0rem;
|
||||
margin-right: 0.5rem;
|
||||
'';
|
||||
borderLeft = palette.tokens.borderLeft or ''
|
||||
borderLeft =
|
||||
palette.tokens.borderLeft or ''
|
||||
padding-top: 0.2rem;
|
||||
padding-bottom: 0.2rem;
|
||||
padding-left: 0.5rem;
|
||||
@@ -312,11 +317,8 @@ in
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
|
||||
settings =
|
||||
(
|
||||
{
|
||||
mainBar =
|
||||
(
|
||||
settings = ({
|
||||
mainBar = (
|
||||
(mkMerge [
|
||||
{
|
||||
layer = cfg.layer;
|
||||
@@ -587,14 +589,10 @@ in
|
||||
])
|
||||
// cfg.extra.settings
|
||||
);
|
||||
}
|
||||
)
|
||||
})
|
||||
// cfg.extraModules; # keep legacy top-level extra modules for compatibility
|
||||
|
||||
style =
|
||||
baseStyle
|
||||
+ (cfg.extra.style or "")
|
||||
+ (cfg.extraModulesStyle or "");
|
||||
style = baseStyle + (cfg.extra.style or "") + (cfg.extraModulesStyle or "");
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
{ lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
inherit (types) str int bool listOf attrs path nullOr submodule;
|
||||
inherit (types)
|
||||
str
|
||||
int
|
||||
bool
|
||||
listOf
|
||||
attrs
|
||||
path
|
||||
nullOr
|
||||
submodule
|
||||
;
|
||||
in
|
||||
{
|
||||
options.mjallen.programs.waybar = {
|
||||
@@ -161,22 +170,50 @@ in
|
||||
type = submodule {
|
||||
options = {
|
||||
tray = mkOption {
|
||||
type = submodule { options = { enable = mkOption { type = bool; default = true; }; }; };
|
||||
type = submodule {
|
||||
options = {
|
||||
enable = mkOption {
|
||||
type = bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
};
|
||||
|
||||
bluetooth = mkOption {
|
||||
type = submodule { options = { enable = mkOption { type = bool; default = true; }; }; };
|
||||
type = submodule {
|
||||
options = {
|
||||
enable = mkOption {
|
||||
type = bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
};
|
||||
|
||||
idleInhibitor = mkOption {
|
||||
type = submodule { options = { enable = mkOption { type = bool; default = true; }; }; };
|
||||
type = submodule {
|
||||
options = {
|
||||
enable = mkOption {
|
||||
type = bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
};
|
||||
|
||||
keyboardIndicators = mkOption {
|
||||
type = submodule { options = { enable = mkOption { type = bool; default = true; }; }; };
|
||||
type = submodule {
|
||||
options = {
|
||||
enable = mkOption {
|
||||
type = bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
};
|
||||
|
||||
@@ -184,11 +221,25 @@ in
|
||||
type = submodule {
|
||||
options = {
|
||||
sink = mkOption {
|
||||
type = submodule { options = { enable = mkOption { type = bool; default = true; }; }; };
|
||||
type = submodule {
|
||||
options = {
|
||||
enable = mkOption {
|
||||
type = bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
};
|
||||
source = mkOption {
|
||||
type = submodule { options = { enable = mkOption { type = bool; default = false; }; }; };
|
||||
type = submodule {
|
||||
options = {
|
||||
enable = mkOption {
|
||||
type = bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
@@ -197,22 +248,50 @@ in
|
||||
};
|
||||
|
||||
weather = mkOption {
|
||||
type = submodule { options = { enable = mkOption { type = bool; default = true; }; }; };
|
||||
type = submodule {
|
||||
options = {
|
||||
enable = mkOption {
|
||||
type = bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
};
|
||||
|
||||
hass = mkOption {
|
||||
type = submodule { options = { enable = mkOption { type = bool; default = false; }; }; };
|
||||
type = submodule {
|
||||
options = {
|
||||
enable = mkOption {
|
||||
type = bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
};
|
||||
|
||||
clock = mkOption {
|
||||
type = submodule { options = { enable = mkOption { type = bool; default = true; }; }; };
|
||||
type = submodule {
|
||||
options = {
|
||||
enable = mkOption {
|
||||
type = bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
};
|
||||
|
||||
battery = mkOption {
|
||||
type = submodule { options = { enable = mkOption { type = bool; default = true; }; }; };
|
||||
type = submodule {
|
||||
options = {
|
||||
enable = mkOption {
|
||||
type = bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, pciutils
|
||||
, bash
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
pciutils,
|
||||
bash,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
@@ -36,7 +37,7 @@ stdenv.mkDerivation {
|
||||
homepage = "https://github.com/ryanrudolfoba/SteamDeck-BIOS-Manager";
|
||||
license = licenses.agpl3Only;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [];
|
||||
maintainers = [ ];
|
||||
sourceProvenance = with sourceTypes; [ ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
kernel = pkgs.linuxPackages_cachyos;
|
||||
in
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
services.greetd.settings.default_session.command = lib.mkForce ''${lib.getExe' pkgs.coreutils "env"} XCURSOR_THEME="''${XCURSOR_THEME:-Pop}" ${lib.getExe' config.services.displayManager.cosmic-greeter.package "cosmic-greeter-start"}'';
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.greetd.settings.default_session.command =
|
||||
lib.mkForce ''${lib.getExe' pkgs.coreutils "env"} XCURSOR_THEME="''${XCURSOR_THEME:-Pop}" ${lib.getExe' config.services.displayManager.cosmic-greeter.package "cosmic-greeter-start"}'';
|
||||
services.greetd.settings.default_session.user = lib.mkForce "cosmic-greeter";
|
||||
jovian = {
|
||||
steam = {
|
||||
|
||||
Reference in New Issue
Block a user