change shell config to module, and ghostty also.
This commit is contained in:
parent
19d80c007f
commit
414972925c
8 changed files with 176 additions and 89 deletions
|
|
@ -9,10 +9,8 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./starship
|
./starship
|
||||||
./fish
|
|
||||||
./firefox.nix
|
./firefox.nix
|
||||||
./foot
|
./foot
|
||||||
./ghostty
|
|
||||||
./niri
|
./niri
|
||||||
./zed.nix
|
./zed.nix
|
||||||
];
|
];
|
||||||
|
|
@ -25,6 +23,9 @@
|
||||||
name = "ulic-youthlic";
|
name = "ulic-youthlic";
|
||||||
signKey = "C6FCBD7F49E1CBBABD6661F7FC02063F04331A95";
|
signKey = "C6FCBD7F49E1CBBABD6661F7FC02063F04331A95";
|
||||||
};
|
};
|
||||||
|
fish.enable = true;
|
||||||
|
bash.enable = true;
|
||||||
|
ghostty.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.userDirs = {
|
xdg.userDirs = {
|
||||||
|
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
programs = {
|
|
||||||
bash = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
fish = {
|
|
||||||
enable = true;
|
|
||||||
functions = {
|
|
||||||
__fish_command_not_found_handler = {
|
|
||||||
body = "__fish_default_command_not_found_handler $argv[1]";
|
|
||||||
onEvent = "fish_command_not_found";
|
|
||||||
};
|
|
||||||
fish_greeting = {
|
|
||||||
body = ''
|
|
||||||
fastfetch
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
fastfetch.enable = true;
|
|
||||||
starship = {
|
|
||||||
enableFishIntegration = true;
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
zoxide = {
|
|
||||||
enableFishIntegration = true;
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
yazi = {
|
|
||||||
enableFishIntegration = true;
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
fzf = {
|
|
||||||
enableFishIntegration = true;
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
eza = {
|
|
||||||
enableFishIntegration = true;
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
# zellij = {
|
|
||||||
# enable = true;
|
|
||||||
# enableFishIntegration = true;
|
|
||||||
# };
|
|
||||||
direnv = {
|
|
||||||
enable = true;
|
|
||||||
nix-direnv.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services = {
|
|
||||||
gpg-agent.enableFishIntegration = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
font-family = FiraCode Nerd Font
|
|
||||||
font-feature = "calt=1"
|
|
||||||
font-feature = "clig=1"
|
|
||||||
font-feature = "liga=1"
|
|
||||||
font-feature = "cv01"
|
|
||||||
font-feature = "cv02"
|
|
||||||
font-feature = "cv06"
|
|
||||||
font-feature = "zero"
|
|
||||||
font-feature = "onum"
|
|
||||||
font-feature = "cv17"
|
|
||||||
font-feature = "ss05"
|
|
||||||
font-feature = "ss03"
|
|
||||||
font-feature = "cv16"
|
|
||||||
font-feature = "cv31"
|
|
||||||
font-feature = "cv29"
|
|
||||||
font-feature = "cv30"
|
|
||||||
font-size = 17
|
|
||||||
theme = ayu
|
|
||||||
background-opacity = 0.8
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
xdg.configFile."ghostty/config" = {
|
|
||||||
source = config.lib.file.mkOutOfStoreSymlink ./config/config;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -9,6 +9,8 @@
|
||||||
./helix
|
./helix
|
||||||
./gpg
|
./gpg
|
||||||
./git.nix
|
./git.nix
|
||||||
|
./shell
|
||||||
|
./ghostty.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
|
@ -21,4 +23,10 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
config = {
|
||||||
|
programs.direnv = {
|
||||||
|
enable = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
61
home/modules/ghostty.nix
Normal file
61
home/modules/ghostty.nix
Normal file
|
|
@ -0,0 +1,61 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
youthlic.programs.ghostty = {
|
||||||
|
enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
example = false;
|
||||||
|
default = true;
|
||||||
|
description = ''
|
||||||
|
whether enable ghostty
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config =
|
||||||
|
let
|
||||||
|
cfg = config.youthlic.programs.ghostty;
|
||||||
|
in
|
||||||
|
(lib.mkIf cfg.enable {
|
||||||
|
programs.ghostty = lib.mkMerge [
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.ghostty;
|
||||||
|
settings = {
|
||||||
|
font-family = "FiraCode Nerd Font";
|
||||||
|
font-feature = [
|
||||||
|
"calt=1"
|
||||||
|
"clig=1"
|
||||||
|
"liga=1"
|
||||||
|
"cv01"
|
||||||
|
"cv02"
|
||||||
|
"cv06"
|
||||||
|
"zero"
|
||||||
|
"onum"
|
||||||
|
"cv17"
|
||||||
|
"ss05"
|
||||||
|
"ss03"
|
||||||
|
"cv16"
|
||||||
|
"cv31"
|
||||||
|
"cv29"
|
||||||
|
"cv30"
|
||||||
|
];
|
||||||
|
font-size = 17;
|
||||||
|
theme = "ayu";
|
||||||
|
background-opacity = 0.8;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
(lib.mkIf config.youthlic.programs.fish.enable {
|
||||||
|
enableFishIntegration = true;
|
||||||
|
})
|
||||||
|
(lib.mkIf config.youthlic.programs.bash.enable {
|
||||||
|
enableBashIntegration = true;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -22,11 +22,19 @@
|
||||||
cfg = config.youthlic.programs.gpg;
|
cfg = config.youthlic.programs.gpg;
|
||||||
in
|
in
|
||||||
lib.mkIf cfg.enable {
|
lib.mkIf cfg.enable {
|
||||||
services.gpg-agent = {
|
services.gpg-agent = lib.mkMerge [
|
||||||
enable = true;
|
{
|
||||||
enableSshSupport = true;
|
enable = true;
|
||||||
pinentryPackage = pkgs.pinentry-all;
|
enableSshSupport = true;
|
||||||
};
|
pinentryPackage = pkgs.pinentry-all;
|
||||||
|
}
|
||||||
|
(lib.mkIf config.youthlic.programs.fish.enable {
|
||||||
|
enableFishIntegration = true;
|
||||||
|
})
|
||||||
|
(lib.mkIf config.youthlic.programs.bash.enable {
|
||||||
|
enableBashIntegration = true;
|
||||||
|
})
|
||||||
|
];
|
||||||
programs.gpg = {
|
programs.gpg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
mutableKeys = true;
|
mutableKeys = true;
|
||||||
|
|
|
||||||
91
home/modules/shell/default.nix
Normal file
91
home/modules/shell/default.nix
Normal file
|
|
@ -0,0 +1,91 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) mkOption mkIf mkMerge;
|
||||||
|
inherit (lib.types) bool;
|
||||||
|
fish-cfg = config.youthlic.programs.fish;
|
||||||
|
bash-cfg = config.youthlic.programs.bash;
|
||||||
|
cfg-helper =
|
||||||
|
conf:
|
||||||
|
mkMerge [
|
||||||
|
conf
|
||||||
|
(mkIf fish-cfg.enable {
|
||||||
|
enableFishIntegration = true;
|
||||||
|
})
|
||||||
|
(mkIf bash-cfg.enable {
|
||||||
|
enableBashIntegration = true;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
youthlic.programs = {
|
||||||
|
fish = {
|
||||||
|
enable = mkOption {
|
||||||
|
type = bool;
|
||||||
|
default = true;
|
||||||
|
description = ''
|
||||||
|
whether to use fish shell
|
||||||
|
'';
|
||||||
|
example = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
bash = {
|
||||||
|
enable = mkOption {
|
||||||
|
type = bool;
|
||||||
|
default = true;
|
||||||
|
description = ''
|
||||||
|
whether to use bash shell
|
||||||
|
'';
|
||||||
|
example = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = mkMerge [
|
||||||
|
{
|
||||||
|
programs = {
|
||||||
|
starship = cfg-helper {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
zoxide = cfg-helper {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
yazi = cfg-helper {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
fzf = cfg-helper {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
eza = cfg-helper {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
(mkIf fish-cfg.enable {
|
||||||
|
programs = {
|
||||||
|
fish = {
|
||||||
|
enable = true;
|
||||||
|
functions = {
|
||||||
|
__fish_command_not_found_handler = {
|
||||||
|
body = "__fish_default_command_not_found_handler $argv[1]";
|
||||||
|
onEvent = "fish_command_not_found";
|
||||||
|
};
|
||||||
|
fish_greeting = {
|
||||||
|
body = ''
|
||||||
|
fastfetch
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
fastfetch.enable = true;
|
||||||
|
};
|
||||||
|
})
|
||||||
|
(mkIf bash-cfg.enable {
|
||||||
|
programs = {
|
||||||
|
bash = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue