mirror of
https://github.com/EdenQwQ/nixos.git
synced 2026-02-04 04:03:23 +08:00
config.lib -> lib
This commit is contained in:
parent
ac0ac31e1e
commit
279cac318b
10 changed files with 15 additions and 21 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
config.lib.misc.addFlags =
|
||||
lib.misc.addFlags =
|
||||
flags: name: pkg:
|
||||
pkgs.symlinkJoin {
|
||||
name = "${name}-wrapped";
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
config.lib.colorScheme = {
|
||||
lib.colorScheme = {
|
||||
inherit convertColorScheme buildColorScheme buildSpecialisation;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ let
|
|||
in
|
||||
with recolorConfig;
|
||||
{
|
||||
config.lib.colorScheme.recolorScript = ''
|
||||
lib.colorScheme.recolorScript = ''
|
||||
${pythonEnv}/bin/python ${./recolor.py} --src $out/share/icons \
|
||||
--smooth '${toString smooth}' \
|
||||
${
|
||||
|
|
|
|||
|
|
@ -56,17 +56,11 @@ in
|
|||
options.monitors = lib.mkOption {
|
||||
type = lib.types.attrsOf monitor;
|
||||
};
|
||||
options.mainMonitorName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
};
|
||||
options.otherMonitorsNames = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
};
|
||||
|
||||
config.mainMonitorName =
|
||||
config.lib.monitors.mainMonitorName =
|
||||
builtins.attrNames config.monitors
|
||||
|> builtins.filter (name: config.monitors.${name}.isMain)
|
||||
|> builtins.head;
|
||||
config.otherMonitorsNames =
|
||||
config.lib.monitors.otherMonitorsNames =
|
||||
builtins.attrNames config.monitors |> builtins.filter (name: !config.monitors.${name}.isMain);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,5 +49,5 @@ let
|
|||
+ extraConfig;
|
||||
in
|
||||
{
|
||||
config.lib.swhkd = { inherit mkSwhkdrc; };
|
||||
lib.swhkd = { inherit mkSwhkdrc; };
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
config.lib.wallpapers = {
|
||||
lib.wallpapers = {
|
||||
inherit
|
||||
getWallpaper
|
||||
convertWallpaper
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
config.lib.wallpapers.goNord =
|
||||
lib.wallpapers.goNord =
|
||||
image:
|
||||
let
|
||||
goNordScript =
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
...
|
||||
}:
|
||||
{
|
||||
config.lib.wallpapers.lutgen =
|
||||
lib.wallpapers.lutgen =
|
||||
image:
|
||||
let
|
||||
inherit (image) name path live;
|
||||
|
|
|
|||
|
|
@ -105,19 +105,19 @@
|
|||
};
|
||||
workspaces = {
|
||||
"1" = {
|
||||
open-on-output = config.mainMonitorName;
|
||||
open-on-output = config.lib.monitors.mainMonitorName;
|
||||
name = "coding";
|
||||
};
|
||||
"2" = {
|
||||
open-on-output = config.mainMonitorName;
|
||||
open-on-output = config.lib.monitors.mainMonitorName;
|
||||
name = "browsing";
|
||||
};
|
||||
"3" = {
|
||||
open-on-output = builtins.head config.otherMonitorsNames;
|
||||
open-on-output = builtins.head config.lib.monitors.otherMonitorsNames;
|
||||
name = "reading";
|
||||
};
|
||||
"4" = {
|
||||
open-on-output = config.mainMonitorName;
|
||||
open-on-output = config.lib.monitors.mainMonitorName;
|
||||
name = "music";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ in
|
|||
],
|
||||
${moduleConfiguration}
|
||||
},
|
||||
'') config.otherMonitorsNames
|
||||
'') config.lib.monitors.otherMonitorsNames
|
||||
|> builtins.concatStringsSep "\n";
|
||||
in
|
||||
# json
|
||||
|
|
@ -169,7 +169,7 @@ in
|
|||
{
|
||||
"position": "top",
|
||||
"layer": "top",
|
||||
"output": "${config.mainMonitorName}",
|
||||
"output": "${config.lib.monitors.mainMonitorName}",
|
||||
"modules-left": [
|
||||
"niri/workspaces",
|
||||
"tray",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue