move helix as home module, provide option youthlic.programs.helix.
This commit is contained in:
parent
aa4a261a04
commit
445dfe6543
5 changed files with 63 additions and 20 deletions
|
|
@ -3,12 +3,12 @@
|
||||||
config,
|
config,
|
||||||
rootPath,
|
rootPath,
|
||||||
inputs,
|
inputs,
|
||||||
|
unixName,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./starship
|
./starship
|
||||||
./helix
|
|
||||||
./fish
|
./fish
|
||||||
./rime-ice.nix
|
./rime-ice.nix
|
||||||
./firefox.nix
|
./firefox.nix
|
||||||
|
|
@ -17,6 +17,9 @@
|
||||||
./niri
|
./niri
|
||||||
./zed.nix
|
./zed.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
youthlic.programs.helix.enable = true;
|
||||||
|
|
||||||
xdg.userDirs = {
|
xdg.userDirs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
download = "${config.home.homeDirectory}/dls";
|
download = "${config.home.homeDirectory}/dls";
|
||||||
|
|
@ -29,8 +32,8 @@
|
||||||
desktop = "${config.home.homeDirectory}/dsk";
|
desktop = "${config.home.homeDirectory}/dsk";
|
||||||
createDirectories = true;
|
createDirectories = true;
|
||||||
};
|
};
|
||||||
home.username = "david";
|
home.username = "${unixName}";
|
||||||
home.homeDirectory = "/home/david";
|
home.homeDirectory = "/home/${unixName}";
|
||||||
home.stateVersion = "24.11";
|
home.stateVersion = "24.11";
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
programs.git = {
|
programs.git = {
|
||||||
|
|
@ -61,13 +64,9 @@
|
||||||
dust
|
dust
|
||||||
qq
|
qq
|
||||||
telegram-desktop
|
telegram-desktop
|
||||||
taplo
|
|
||||||
ghostty
|
ghostty
|
||||||
sops
|
sops
|
||||||
scrcpy
|
scrcpy
|
||||||
markdown-oxide
|
|
||||||
deno
|
|
||||||
taplo
|
|
||||||
ast-grep
|
ast-grep
|
||||||
lazygit
|
lazygit
|
||||||
dig
|
dig
|
||||||
|
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
programs.helix = {
|
|
||||||
enable = true;
|
|
||||||
defaultEditor = true;
|
|
||||||
settings =
|
|
||||||
let
|
|
||||||
config-file = builtins.readFile ./config.toml;
|
|
||||||
config = builtins.fromTOML config-file;
|
|
||||||
in
|
|
||||||
config;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
])
|
])
|
||||||
++ [
|
++ [
|
||||||
./nix.nix
|
./nix.nix
|
||||||
|
./helix
|
||||||
];
|
];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
|
|
||||||
56
home/modules/helix/default.nix
Normal file
56
home/modules/helix/default.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
youthlic.programs.helix = {
|
||||||
|
enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = true;
|
||||||
|
example = false;
|
||||||
|
description = ''
|
||||||
|
enable helix editor
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
extraPackages = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.package;
|
||||||
|
default = with pkgs; [
|
||||||
|
taplo
|
||||||
|
markdown-oxide
|
||||||
|
nixd
|
||||||
|
deno
|
||||||
|
nixfmt-rfc-style
|
||||||
|
];
|
||||||
|
example = (
|
||||||
|
with pkgs;
|
||||||
|
[
|
||||||
|
deno
|
||||||
|
]
|
||||||
|
);
|
||||||
|
description = ''
|
||||||
|
extra packages for helix lsp and formatter
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config =
|
||||||
|
let
|
||||||
|
cfg = config.youthlic.programs.helix;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
programs.helix = lib.mkIf cfg.enable {
|
||||||
|
enable = true;
|
||||||
|
defaultEditor = true;
|
||||||
|
settings =
|
||||||
|
let
|
||||||
|
config-file = builtins.readFile ./config.toml;
|
||||||
|
config = builtins.fromTOML config-file;
|
||||||
|
in
|
||||||
|
config;
|
||||||
|
};
|
||||||
|
home.packages = cfg.extraPackages;
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue