feat: massive refactor
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
{ config, lib, ... }:
|
||||
lib.my.makeSwitch {
|
||||
inherit config;
|
||||
optionName = "all shells";
|
||||
optionPath = [
|
||||
"cli"
|
||||
"shell"
|
||||
"all"
|
||||
];
|
||||
config' = {
|
||||
let
|
||||
cfg = config.my.cli.shell.all;
|
||||
in
|
||||
{
|
||||
options.my.cli.shell.all = {
|
||||
enable = lib.mkEnableOption "all shells";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.cli.shell = {
|
||||
zsh.enable = true;
|
||||
fish.enable = true;
|
||||
|
||||
@@ -4,16 +4,19 @@
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
lib.my.makeSwitch {
|
||||
inherit config;
|
||||
default = true;
|
||||
optionName = "default fish settings";
|
||||
optionPath = [
|
||||
"cli"
|
||||
"shell"
|
||||
"fish"
|
||||
];
|
||||
config' = {
|
||||
let
|
||||
cfg = config.my.cli.shell.fish;
|
||||
in
|
||||
{
|
||||
options.my.cli.shell.fish = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Enable default fish settings";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.persist.homeDirs = [
|
||||
".local/share/fish"
|
||||
];
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{ config, lib, ... }:
|
||||
lib.my.makeSwitch {
|
||||
inherit config;
|
||||
optionName = "starship prompt";
|
||||
optionPath = [
|
||||
"cli"
|
||||
"shell"
|
||||
"starship"
|
||||
];
|
||||
config' = {
|
||||
let
|
||||
cfg = config.my.cli.shell.starship;
|
||||
in
|
||||
{
|
||||
options.my.cli.shell.starship = {
|
||||
enable = lib.mkEnableOption "starship prompt";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.hm = {
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
|
||||
@@ -4,16 +4,19 @@
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
lib.my.makeSwitch {
|
||||
inherit config;
|
||||
default = true;
|
||||
optionName = "default zsh settings";
|
||||
optionPath = [
|
||||
"cli"
|
||||
"shell"
|
||||
"zsh"
|
||||
];
|
||||
config' = {
|
||||
let
|
||||
cfg = config.my.cli.shell.zsh;
|
||||
in
|
||||
{
|
||||
options.my.cli.shell.zsh = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Enable default zsh settings";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.hm = {
|
||||
home.packages = with pkgs; [
|
||||
fzf
|
||||
|
||||
Reference in New Issue
Block a user