mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 22:59:15 +00:00
ref(nix): ✨ mkOptions ✨
This commit is contained in:
parent
d98d30916b
commit
989d025f56
42 changed files with 80 additions and 78 deletions
23
nix/home/_/cmus/default.nix
Normal file
23
nix/home/_/cmus/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
home = lib.optionalAttrs config.cmus.enable {
|
||||
packages = with pkgs; [
|
||||
cmus
|
||||
cmusfm
|
||||
];
|
||||
file.cmus = {
|
||||
recursive = true;
|
||||
source = let
|
||||
inherit (pkgs.stdenv) isLinux;
|
||||
in
|
||||
if isLinux
|
||||
then ./cmus-linux
|
||||
else ./cmus-darwin;
|
||||
target = ".config/cmus";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -2,12 +2,28 @@
|
|||
pkgs,
|
||||
unstable,
|
||||
mypkgs,
|
||||
settings,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (settings) extraUtils enableCmus universityTools;
|
||||
inherit (pkgs) lib;
|
||||
in {
|
||||
}: {
|
||||
imports = [
|
||||
./fish
|
||||
./direnv
|
||||
./atuin
|
||||
|
||||
./starship
|
||||
./fzf
|
||||
./git
|
||||
./btop
|
||||
|
||||
./tmux
|
||||
|
||||
./neovim
|
||||
./vim
|
||||
|
||||
./cmus
|
||||
];
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
home = {
|
||||
username = lib.mkDefault "leana";
|
||||
|
|
@ -15,24 +31,6 @@ in {
|
|||
stateVersion = "23.11";
|
||||
};
|
||||
|
||||
imports =
|
||||
[
|
||||
./fish
|
||||
./direnv
|
||||
./atuin
|
||||
|
||||
./starship
|
||||
./fzf
|
||||
./git
|
||||
./btop
|
||||
|
||||
./tmux
|
||||
|
||||
./neovim
|
||||
./vim
|
||||
]
|
||||
++ lib.lists.optional enableCmus ./cmus;
|
||||
|
||||
programs = {
|
||||
ripgrep.enable = true;
|
||||
gpg.enable = true;
|
||||
|
|
@ -60,8 +58,7 @@ in {
|
|||
tldr
|
||||
irssi
|
||||
]
|
||||
++ lib.lists.optionals extraUtils
|
||||
[
|
||||
++ lib.lists.optionals config.extraUtils.enable [
|
||||
unstable.opam
|
||||
unstable.cargo
|
||||
hyperfine
|
||||
|
|
@ -71,7 +68,7 @@ in {
|
|||
gnumake
|
||||
sd
|
||||
]
|
||||
++ lib.lists.optionals universityTools [
|
||||
++ lib.lists.optionals config.universityTools.enable [
|
||||
mypkgs.logisim-evolution
|
||||
mypkgs.necrolib
|
||||
pkgs.rars
|
||||
|
|
@ -1,12 +1,9 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
settings,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (settings) extraLanguageServers;
|
||||
inherit (pkgs) lib;
|
||||
in {
|
||||
}: {
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
|
|
@ -18,7 +15,7 @@ in {
|
|||
shellcheck
|
||||
nil
|
||||
]
|
||||
++ lib.lists.optionals extraLanguageServers [
|
||||
++ lib.lists.optionals config.extraLanguageServers.enable [
|
||||
nodePackages.vim-language-server
|
||||
vscode-langservers-extracted # HTML/CSS/JSON/ESLint
|
||||
marksman
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
cmus
|
||||
cmusfm
|
||||
];
|
||||
|
||||
home.file.cmus = {
|
||||
recursive = true;
|
||||
source = let
|
||||
inherit (pkgs.stdenv) isLinux;
|
||||
in
|
||||
if isLinux
|
||||
then ./cmus-linux
|
||||
else ./cmus-darwin;
|
||||
target = ".config/cmus";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue