move starship configuration to home/modules.
This commit is contained in:
parent
da06f1018e
commit
d412f2641d
6 changed files with 38 additions and 17 deletions
|
|
@ -8,7 +8,6 @@
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./starship
|
|
||||||
./firefox.nix
|
./firefox.nix
|
||||||
./niri
|
./niri
|
||||||
];
|
];
|
||||||
|
|
@ -25,6 +24,7 @@
|
||||||
bash.enable = true;
|
bash.enable = true;
|
||||||
ghostty.enable = true;
|
ghostty.enable = true;
|
||||||
foot.enable = false;
|
foot.enable = false;
|
||||||
|
starship.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.userDirs = {
|
xdg.userDirs = {
|
||||||
|
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
{ config, ... }:
|
|
||||||
{
|
|
||||||
programs.starship = {
|
|
||||||
enable = true;
|
|
||||||
# settings =
|
|
||||||
# let
|
|
||||||
# config-file = builtins.readFile ./config.toml;
|
|
||||||
# in
|
|
||||||
# builtins.fromTOML config-file;
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.configFile."starship.toml".source = config.lib.file.mkOutOfStoreSymlink ./config.toml;
|
|
||||||
}
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
./shell
|
./shell
|
||||||
./ghostty.nix
|
./ghostty.nix
|
||||||
./foot
|
./foot
|
||||||
|
./starship
|
||||||
];
|
];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
|
|
||||||
|
|
@ -44,9 +44,6 @@ in
|
||||||
config = mkMerge [
|
config = mkMerge [
|
||||||
{
|
{
|
||||||
programs = {
|
programs = {
|
||||||
starship = cfg-helper {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
zoxide = cfg-helper {
|
zoxide = cfg-helper {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
36
home/modules/starship/default.nix
Normal file
36
home/modules/starship/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.youthlic.programs.starship;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
youthlic.programs.starship = {
|
||||||
|
enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = true;
|
||||||
|
example = false;
|
||||||
|
description = ''
|
||||||
|
whether enable starship
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
programs.starship = lib.mkMerge [
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
settings =
|
||||||
|
let
|
||||||
|
config-file = builtins.readFile ./config.toml;
|
||||||
|
in
|
||||||
|
builtins.fromTOML config-file;
|
||||||
|
}
|
||||||
|
(lib.mkIf config.youthlic.programs.fish.enable {
|
||||||
|
enableFishIntegration = true;
|
||||||
|
})
|
||||||
|
(lib.mkIf config.youthlic.programs.bash.enable {
|
||||||
|
enableBashIntegration = true;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue