wip: switch to niri [skip-ci]
Some checks failed
/ check (nvimDev) (push) Successful in 6s
/ check (nvimHeadless) (push) Successful in 2s
/ check (nvimNoBundledBins) (push) Successful in 4s
/ check (nvimNoLsp) (push) Successful in 5s
/ check (nvimNoTSGrammars) (push) Successful in 5s
/ check (treefmt) (push) Successful in 2s
/ check-renovaterc (push) Successful in 2s
/ build (audiomenu) (push) Successful in 2s
/ build (docs) (push) Successful in 3s
/ build (jpassmenu) (push) Successful in 1s
/ build (nixosConfigurations.vm.config.system.build.toplevel) (push) Failing after 2s
/ build (nvim) (push) Successful in 8s
/ report-size (push) Has been skipped
Some checks failed
/ check (nvimDev) (push) Successful in 6s
/ check (nvimHeadless) (push) Successful in 2s
/ check (nvimNoBundledBins) (push) Successful in 4s
/ check (nvimNoLsp) (push) Successful in 5s
/ check (nvimNoTSGrammars) (push) Successful in 5s
/ check (treefmt) (push) Successful in 2s
/ check-renovaterc (push) Successful in 2s
/ build (audiomenu) (push) Successful in 2s
/ build (docs) (push) Successful in 3s
/ build (jpassmenu) (push) Successful in 1s
/ build (nixosConfigurations.vm.config.system.build.toplevel) (push) Failing after 2s
/ build (nvim) (push) Successful in 8s
/ report-size (push) Has been skipped
Looks cooler c:
This commit is contained in:
parent
7dab7eb1dc
commit
d7de392201
8 changed files with 209 additions and 74 deletions
113
home/options.nix
113
home/options.nix
|
@ -78,13 +78,23 @@ let
|
|||
example = "/sys/class/hwmon/hwmon2/temp1_input";
|
||||
};
|
||||
|
||||
sway.options = {
|
||||
enable = lib.mkEnableOption "sway" // {
|
||||
windowManager.options = {
|
||||
enable = lib.mkEnableOption "window manager" // {
|
||||
default = fromConfig [
|
||||
"gui"
|
||||
"sway"
|
||||
"windowManager"
|
||||
"enable"
|
||||
] true;
|
||||
};
|
||||
windowManager = lib.mkOption {
|
||||
description = "Which window manager to enable";
|
||||
type = types.enum [ "niri" ];
|
||||
default = fromConfig [
|
||||
"gui"
|
||||
"windowManager"
|
||||
"windowManager"
|
||||
] "niri";
|
||||
};
|
||||
background = lib.mkOption {
|
||||
description = "The wallpaper to use.";
|
||||
type = types.path;
|
||||
|
@ -114,55 +124,60 @@ let
|
|||
default = true;
|
||||
example = false;
|
||||
};
|
||||
exec = lib.mkOption {
|
||||
description = "Run commands when starting sway.";
|
||||
default = { };
|
||||
type = types.submodule {
|
||||
options = {
|
||||
once = lib.mkOption {
|
||||
description = "Programs to start only once (`exec`).";
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
example = [ "signal-desktop --start-in-tray" ];
|
||||
};
|
||||
always = lib.mkOption {
|
||||
description = "Programs to start whenever the config is sourced (`exec_always`).";
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
example = [ "signal-desktop --start-in-tray" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
gui.options = {
|
||||
enable = lib.mkEnableOption "GUI applications" // {
|
||||
default = fromConfig [
|
||||
"gui"
|
||||
"enable"
|
||||
] false;
|
||||
gui.options =
|
||||
let
|
||||
cfg = attrs.config.jhome.gui;
|
||||
in
|
||||
{
|
||||
enable = lib.mkEnableOption "GUI applications" // {
|
||||
default = fromConfig [
|
||||
"gui"
|
||||
"enable"
|
||||
] false;
|
||||
};
|
||||
tempInfo = lib.mkOption {
|
||||
description = "Temperature info to display in the statusbar.";
|
||||
default = null;
|
||||
type = types.nullOr (types.submodule tempInfo);
|
||||
};
|
||||
windowManager = lib.mkOption {
|
||||
description = "Window manager configuration.";
|
||||
default = { };
|
||||
type = types.submodule windowManager;
|
||||
};
|
||||
terminal = lib.mkOption {
|
||||
description = "The terminal emulator to use.";
|
||||
default = "alacritty";
|
||||
example = "wezterm";
|
||||
type = types.enum [
|
||||
"wezterm"
|
||||
"alacritty"
|
||||
];
|
||||
};
|
||||
terminalCommand = lib.mkOption {
|
||||
description = "The command to run in order to start the terminal.";
|
||||
default =
|
||||
if cfg.terminal == "wezterm" then
|
||||
[
|
||||
"wezterm"
|
||||
"start"
|
||||
]
|
||||
else if cfg.terminal == "alacritty" then
|
||||
[
|
||||
"alacritty"
|
||||
"-e"
|
||||
]
|
||||
else
|
||||
builtins.abort "no command configured for ${cfg.terminal}";
|
||||
example = [
|
||||
"wezterm"
|
||||
"start"
|
||||
];
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
};
|
||||
tempInfo = lib.mkOption {
|
||||
description = "Temperature info to display in the statusbar.";
|
||||
default = null;
|
||||
type = types.nullOr (types.submodule tempInfo);
|
||||
};
|
||||
sway = lib.mkOption {
|
||||
description = "Sway window manager configuration.";
|
||||
default = { };
|
||||
type = types.submodule sway;
|
||||
};
|
||||
terminal = lib.mkOption {
|
||||
description = "The terminal emulator to use.";
|
||||
default = "alacritty";
|
||||
example = "wezterm";
|
||||
type = types.enum [
|
||||
"wezterm"
|
||||
"alacritty"
|
||||
];
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
options.jhome = lib.mkOption {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue