Introduce more options to configure individual modules
This commit is contained in:
parent
351584ecb4
commit
e3619d6c94
13 changed files with 668 additions and 531 deletions
|
|
@ -32,20 +32,358 @@
|
|||
Enables jetbrains toolbox.
|
||||
'';
|
||||
};
|
||||
useDefaultPackages = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = "Use default base packages (only additionalPackages are installed if false)";
|
||||
};
|
||||
additionalPackages = lib.mkOption {
|
||||
default = [ ];
|
||||
example = [ ];
|
||||
type = with lib.types; listOf package;
|
||||
description = "Additional packages to be installed";
|
||||
};
|
||||
languages = {
|
||||
haskell = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enables haskell.
|
||||
'';
|
||||
};
|
||||
packages = lib.mkOption {
|
||||
default = with pkgs; [
|
||||
haskellPackages.cabal-install
|
||||
ghc
|
||||
haskellPackages.haskell-language-server
|
||||
];
|
||||
example = [ ];
|
||||
type = with lib.types; listOf package;
|
||||
description = ''
|
||||
haskell packages
|
||||
'';
|
||||
};
|
||||
};
|
||||
typst = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enables typst.
|
||||
'';
|
||||
};
|
||||
packages = lib.mkOption {
|
||||
default = with pkgs; [
|
||||
typst
|
||||
tinymist
|
||||
ltex-ls
|
||||
];
|
||||
example = [ ];
|
||||
type = with lib.types; listOf package;
|
||||
description = ''
|
||||
typst packages
|
||||
'';
|
||||
};
|
||||
};
|
||||
go = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enables go.
|
||||
'';
|
||||
};
|
||||
packages = lib.mkOption {
|
||||
default = with pkgs; [
|
||||
go
|
||||
gopls
|
||||
];
|
||||
example = [ ];
|
||||
type = with lib.types; listOf package;
|
||||
description = ''
|
||||
Go packages
|
||||
'';
|
||||
};
|
||||
};
|
||||
rust = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enables rust.
|
||||
'';
|
||||
};
|
||||
packages = lib.mkOption {
|
||||
default = with pkgs; [ rustup ];
|
||||
example = [ ];
|
||||
type = with lib.types; listOf package;
|
||||
description = ''
|
||||
Rust packages
|
||||
'';
|
||||
};
|
||||
};
|
||||
ts-js = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enables TS/JS.
|
||||
'';
|
||||
};
|
||||
packages = lib.mkOption {
|
||||
default = with pkgs; [
|
||||
nodejs_20
|
||||
deno
|
||||
typescript
|
||||
nodePackages.typescript-language-server
|
||||
nodePackages.prettier
|
||||
];
|
||||
example = [ ];
|
||||
type = with lib.types; listOf package;
|
||||
description = ''
|
||||
TS/JS packages
|
||||
'';
|
||||
};
|
||||
};
|
||||
zig = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enables zig.
|
||||
'';
|
||||
};
|
||||
packages = lib.mkOption {
|
||||
default = with pkgs; [
|
||||
zig
|
||||
zls
|
||||
];
|
||||
example = [ ];
|
||||
type = with lib.types; listOf package;
|
||||
description = ''
|
||||
zig packages
|
||||
'';
|
||||
};
|
||||
};
|
||||
java = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enables java.
|
||||
'';
|
||||
};
|
||||
packages = lib.mkOption {
|
||||
default = with pkgs; [
|
||||
gradle
|
||||
maven
|
||||
jdt-language-server
|
||||
temurin-jre-bin
|
||||
];
|
||||
example = [ ];
|
||||
type = with lib.types; listOf package;
|
||||
description = ''
|
||||
Java packages
|
||||
'';
|
||||
};
|
||||
};
|
||||
dotnet = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enables C#/F#.
|
||||
'';
|
||||
};
|
||||
packages = lib.mkOption {
|
||||
default = with pkgs; [
|
||||
#.!
|
||||
dotnet-sdk_8
|
||||
omnisharp-roslyn
|
||||
csharpier
|
||||
netcoredbg
|
||||
#fsharp
|
||||
fsharp
|
||||
fsautocomplete
|
||||
];
|
||||
example = [ ];
|
||||
type = with lib.types; listOf package;
|
||||
description = ''
|
||||
C#/F# packages
|
||||
'';
|
||||
};
|
||||
};
|
||||
C-CPP = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enables C/C++.
|
||||
'';
|
||||
};
|
||||
packages = lib.mkOption {
|
||||
default = with pkgs; [
|
||||
bear
|
||||
gcc
|
||||
clang-tools
|
||||
];
|
||||
example = [ ];
|
||||
type = with lib.types; listOf package;
|
||||
description = ''
|
||||
C/C++ packages
|
||||
'';
|
||||
};
|
||||
};
|
||||
python = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enables python.
|
||||
'';
|
||||
};
|
||||
packages = lib.mkOption {
|
||||
default = with pkgs; [
|
||||
python3
|
||||
python312Packages.python-lsp-server
|
||||
python312Packages.python-lsp-ruff
|
||||
python312Packages.python-lsp-black
|
||||
];
|
||||
example = [ ];
|
||||
type = with lib.types; listOf package;
|
||||
description = ''
|
||||
python packages
|
||||
'';
|
||||
};
|
||||
};
|
||||
configFiles = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enables Json/toml/yaml etc.
|
||||
'';
|
||||
};
|
||||
packages = lib.mkOption {
|
||||
default = with pkgs; [
|
||||
#yaml
|
||||
yamlfmt
|
||||
yamllint
|
||||
yaml-language-server
|
||||
|
||||
#json
|
||||
jq
|
||||
];
|
||||
example = [ ];
|
||||
type = with lib.types; listOf package;
|
||||
description = ''
|
||||
packages for said filetypes
|
||||
'';
|
||||
};
|
||||
};
|
||||
bash = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enables bash.
|
||||
'';
|
||||
};
|
||||
packages = lib.mkOption {
|
||||
default = with pkgs; [
|
||||
bash-language-server
|
||||
shfmt
|
||||
];
|
||||
example = [ ];
|
||||
type = with lib.types; listOf package;
|
||||
description = ''
|
||||
bash packages
|
||||
'';
|
||||
};
|
||||
};
|
||||
html-css = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enables html/css.
|
||||
'';
|
||||
};
|
||||
packages = lib.mkOption {
|
||||
default = with pkgs; [
|
||||
tailwindcss
|
||||
tailwindcss-language-server
|
||||
# html-tidy
|
||||
];
|
||||
example = [ ];
|
||||
type = with lib.types; listOf package;
|
||||
description = ''
|
||||
html/css packages
|
||||
'';
|
||||
};
|
||||
};
|
||||
sql = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enables sql.
|
||||
'';
|
||||
};
|
||||
packages = lib.mkOption {
|
||||
default = with pkgs; [
|
||||
nodePackages.sql-formatter
|
||||
sqls
|
||||
];
|
||||
example = [ ];
|
||||
type = with lib.types; listOf package;
|
||||
description = ''
|
||||
sql packages
|
||||
'';
|
||||
};
|
||||
};
|
||||
asm = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enables assembly.
|
||||
'';
|
||||
};
|
||||
packages = lib.mkOption {
|
||||
default = with pkgs; [ asm-lsp ];
|
||||
example = [ ];
|
||||
type = with lib.types; listOf package;
|
||||
description = ''
|
||||
assembly packages
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.coding.enable (
|
||||
lib.optionalAttrs (options ? home.packages) {
|
||||
programs.dashvim = lib.mkIf config.mods.coding.dashvim {
|
||||
enable = true;
|
||||
colorscheme = config.mods.stylix.colorscheme;
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
(lib.mkIf config.mods.coding.jetbrains jetbrains-toolbox)
|
||||
#basics
|
||||
config =
|
||||
let
|
||||
basePackages = with pkgs; [
|
||||
gitui
|
||||
gcc
|
||||
meson
|
||||
ninja
|
||||
tree-sitter
|
||||
|
|
@ -54,100 +392,39 @@
|
|||
sqlite
|
||||
plantuml
|
||||
d-spy
|
||||
|
||||
# cpp
|
||||
bear
|
||||
clang-tools
|
||||
|
||||
#sql
|
||||
nodePackages.sql-formatter
|
||||
sqls
|
||||
|
||||
#assembly
|
||||
asm-lsp
|
||||
|
||||
#yaml
|
||||
yamlfmt
|
||||
yamllint
|
||||
yaml-language-server
|
||||
|
||||
#markdown
|
||||
marksman
|
||||
mdformat
|
||||
|
||||
#bash
|
||||
bash-language-server
|
||||
shfmt
|
||||
|
||||
#fsharp
|
||||
fsharp
|
||||
fsautocomplete
|
||||
|
||||
#haskell
|
||||
haskellPackages.cabal-install
|
||||
ghc
|
||||
haskellPackages.haskell-language-server
|
||||
|
||||
#html
|
||||
# html-tidy
|
||||
|
||||
#json
|
||||
jq
|
||||
|
||||
#css
|
||||
tailwindcss
|
||||
tailwindcss-language-server
|
||||
|
||||
#editors
|
||||
neovide
|
||||
##fallback
|
||||
vscodium
|
||||
|
||||
#rust
|
||||
rustup
|
||||
|
||||
#python
|
||||
python3
|
||||
python312Packages.python-lsp-server
|
||||
python312Packages.python-lsp-ruff
|
||||
python312Packages.python-lsp-black
|
||||
|
||||
#ts/js
|
||||
nodejs_20
|
||||
deno
|
||||
typescript
|
||||
nodePackages.typescript-language-server
|
||||
nodePackages.prettier
|
||||
|
||||
#go
|
||||
go
|
||||
gopls
|
||||
|
||||
#typst
|
||||
typst
|
||||
tinymist
|
||||
ltex-ls
|
||||
|
||||
#java
|
||||
gradle
|
||||
maven
|
||||
jdt-language-server
|
||||
temurin-jre-bin
|
||||
|
||||
#.!
|
||||
dotnet-sdk_8
|
||||
omnisharp-roslyn
|
||||
csharpier
|
||||
netcoredbg
|
||||
|
||||
#zig
|
||||
zig
|
||||
zls
|
||||
|
||||
tmux
|
||||
tmate
|
||||
#editors
|
||||
neovide
|
||||
#fallback
|
||||
vscodium
|
||||
];
|
||||
|
||||
in
|
||||
lib.mkIf config.mods.coding.enable (
|
||||
lib.optionalAttrs (options ? home.packages) {
|
||||
programs.dashvim = lib.mkIf config.mods.coding.dashvim {
|
||||
enable = true;
|
||||
colorscheme = config.mods.stylix.colorscheme;
|
||||
};
|
||||
home.packages =
|
||||
with pkgs;
|
||||
[ (lib.mkIf config.mods.coding.jetbrains jetbrains-toolbox) ]
|
||||
++ config.mods.coding.additionalPackages
|
||||
++ (lib.lists.optionals config.mods.coding.useDefaultPackages basePackages)
|
||||
++ (lib.lists.optionals config.mods.coding.languages.haskell.enable config.mods.coding.languages.haskell.packages)
|
||||
++ (lib.lists.optionals config.mods.coding.languages.rust.enable config.mods.coding.languages.rust.packages)
|
||||
++ (lib.lists.optionals config.mods.coding.languages.go.enable config.mods.coding.languages.go.packages)
|
||||
++ (lib.lists.optionals config.mods.coding.languages.java.enable config.mods.coding.languages.java.packages)
|
||||
++ (lib.lists.optionals config.mods.coding.languages.dotnet.enable config.mods.coding.languages.dotnet.packages)
|
||||
++ (lib.lists.optionals config.mods.coding.languages.bash.enable config.mods.coding.languages.bash.packages)
|
||||
++ (lib.lists.optionals config.mods.coding.languages.C-CPP.enable config.mods.coding.languages.C-CPP.packages)
|
||||
++ (lib.lists.optionals config.mods.coding.languages.asm.enable config.mods.coding.languages.asm.packages)
|
||||
++ (lib.lists.optionals config.mods.coding.languages.sql.enable config.mods.coding.languages.sql.packages)
|
||||
++ (lib.lists.optionals config.mods.coding.languages.html-css.enable config.mods.coding.languages.html-css.packages)
|
||||
++ (lib.lists.optionals config.mods.coding.languages.configFiles.enable config.mods.coding.languages.configFiles.packages)
|
||||
++ (lib.lists.optionals config.mods.coding.languages.ts-js.enable config.mods.coding.languages.ts-js.packages)
|
||||
++ (lib.lists.optionals config.mods.coding.languages.typst.enable config.mods.coding.languages.typst.packages)
|
||||
++ (lib.lists.optionals config.mods.coding.languages.zig.enable config.mods.coding.languages.zig.packages);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,12 +12,26 @@
|
|||
type = lib.types.bool;
|
||||
description = "Enables fish";
|
||||
};
|
||||
additionalConfig = lib.mkOption {
|
||||
default = '''';
|
||||
example = '''';
|
||||
type = lib.types.lines;
|
||||
description = "Additional fish config";
|
||||
};
|
||||
useDefaultConfig = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = "Use default fish config";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.mods.fish.enable (
|
||||
lib.optionalAttrs (options ? programs.fish) {
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
shellInit = ''
|
||||
shellInit =
|
||||
if config.mods.fish.useDefaultConfig then
|
||||
''
|
||||
if status is-interactive
|
||||
# Commands to run in interactive sessions can go here
|
||||
end
|
||||
|
|
@ -151,7 +165,10 @@
|
|||
# zoxide init fish | source
|
||||
|
||||
direnv hook fish | source
|
||||
'';
|
||||
''
|
||||
+ config.mods.fish.additionalConfig
|
||||
else
|
||||
config.mods.fish.additionalPackages;
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -61,9 +61,10 @@
|
|||
lib.optionalAttrs (options ? environment.systemPackages) {
|
||||
environment.systemPackages = config.mods.gaming.tools;
|
||||
|
||||
programs.steam.enable = config.mods.gaming.steam;
|
||||
programs.gamemode.enable = true;
|
||||
programs.gamemode = {
|
||||
programs = {
|
||||
steam.enable = config.mods.gaming.steam;
|
||||
gamemode.enable = true;
|
||||
gamemode = {
|
||||
enableRenice = true;
|
||||
settings = {
|
||||
general = {
|
||||
|
|
@ -81,6 +82,7 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,16 +9,25 @@
|
|||
options.mods = {
|
||||
gnome_services.enable = lib.mkOption {
|
||||
default = true;
|
||||
type = lib.types.bool;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enables gnome services: keyring and settings daemon.
|
||||
Note: Do not use these for environments which ship these functionalities by default: GNOME, KDE
|
||||
'';
|
||||
};
|
||||
nautilus.enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enables and configures Nautilus
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.gnome_services.enable (
|
||||
config =
|
||||
lib.mkIf config.mods.gnome_services.enable (
|
||||
lib.optionalAttrs (options ? services.gnome.gnome-keyring) {
|
||||
programs.dconf.enable = true;
|
||||
services = {
|
||||
|
|
@ -32,12 +41,15 @@
|
|||
gvfs.enable = true;
|
||||
};
|
||||
}
|
||||
)
|
||||
// lib.optionalAttrs (options ? home.packages) {
|
||||
home.packages = with pkgs; [
|
||||
home.packages = lib.mkIf config.mods.gnome_services.nautilus.enable (
|
||||
with pkgs;
|
||||
[
|
||||
nautilus
|
||||
sushi
|
||||
nautilus-python
|
||||
];
|
||||
}
|
||||
]
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,25 +10,33 @@
|
|||
options.mods = {
|
||||
nvidia.enable = lib.mkOption {
|
||||
default = false;
|
||||
type = lib.types.bool;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enables nvidia support.
|
||||
'';
|
||||
};
|
||||
amdgpu.enable = lib.mkOption {
|
||||
default = false;
|
||||
type = lib.types.bool;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enables amdgpu support.
|
||||
'';
|
||||
};
|
||||
intelgpu.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enables intel support.
|
||||
'';
|
||||
};
|
||||
vapi = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
example = true;
|
||||
description = ''
|
||||
Enables vapi.
|
||||
'';
|
||||
|
|
@ -44,8 +52,8 @@
|
|||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.vapi.enable (
|
||||
lib.optionalAttrs (options ? hardware.graphics) {
|
||||
config =
|
||||
(lib.optionalAttrs (options ? hardware.graphics) {
|
||||
boot = lib.mkIf config.mods.amdgpu.enable {
|
||||
kernelModules = [ "kvm-amd" ];
|
||||
initrd.kernelModules = [ "amdgpu" ];
|
||||
|
|
@ -55,12 +63,14 @@
|
|||
hardware = {
|
||||
graphics =
|
||||
let
|
||||
base_packages = [
|
||||
pkgs.libvdpau-va-gl
|
||||
pkgs.vaapiVdpau
|
||||
pkgs.mesa.drivers
|
||||
amdPackages = [
|
||||
(lib.mkIf (config.mods.intelgpu && lib.mkIf config.mods.vapi.enable) pkgs.vpl-gpu-rt)
|
||||
(lib.mkIf (config.mods.intelgpu && lib.mkIf config.mods.vapi.enable) pkgs.intel-media-driver)
|
||||
(lib.mkIf config.mods.vapi.enable pkgs.libvdpau-va-gl)
|
||||
(lib.mkIf config.mods.vapi.enable pkgs.vaapiVdpau)
|
||||
(lib.mkIf (config.mods.intelgpu || config.mods.amdgpu) pkgs.mesa.drivers)
|
||||
];
|
||||
rocm_packages = [
|
||||
rocmPackages = [
|
||||
pkgs.rocmPackages.clr.icd
|
||||
pkgs.rocm-opencl-runtime
|
||||
];
|
||||
|
|
@ -68,10 +78,12 @@
|
|||
{
|
||||
enable = true;
|
||||
enable32Bit = lib.mkDefault true;
|
||||
extraPackages = base_packages ++ (lib.lists.optionals config.mods.vapi.rocm.enable rocm_packages);
|
||||
extraPackages =
|
||||
amdPackages
|
||||
++ (lib.lists.optionals (config.mods.vapi.rocm.enable && config.mods.gpu.amdgpu) rocmPackages);
|
||||
};
|
||||
};
|
||||
}
|
||||
})
|
||||
// lib.optionalAttrs (options ? hardware.graphics) (
|
||||
lib.mkIf config.mods.nvidia.enable {
|
||||
hardware.nvidia = {
|
||||
|
|
@ -84,6 +96,5 @@
|
|||
};
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,20 @@
|
|||
Resolution/refreshrate used by the monitor in the login screen.
|
||||
'';
|
||||
};
|
||||
environments = lib.mkOption {
|
||||
default = ''
|
||||
Hyprland
|
||||
'';
|
||||
# no idea if these are written correctly
|
||||
example = ''
|
||||
Niri
|
||||
River
|
||||
'';
|
||||
type = lib.types.lines;
|
||||
description = ''
|
||||
List of environments that should be available in the login prompt.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -78,9 +92,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
environment.etc."greetd/environments".text = ''
|
||||
Hyprland
|
||||
'';
|
||||
environment.etc."greetd/environments".text = config.mods.greetd.environments;
|
||||
|
||||
# should technically be the same, but this is configured instead in order to provide a decent out of the box login experience.
|
||||
environment.etc."greetd/hyprgreet.conf".text = ''
|
||||
|
|
|
|||
|
|
@ -52,6 +52,12 @@
|
|||
type = with lib.types; nullOr package;
|
||||
description = "The email client";
|
||||
};
|
||||
additionalBrowser = lib.mkOption {
|
||||
default = pkgs.brave;
|
||||
example = null;
|
||||
type = with lib.types; nullOr package;
|
||||
description = "Additional browser -> second to firefox, the only installed browser if firefox is disabled";
|
||||
};
|
||||
};
|
||||
config =
|
||||
(lib.optionalAttrs (options ? home.packages) {
|
||||
|
|
@ -68,9 +74,11 @@
|
|||
(lib.mkIf config.mods.home_packages.nextcloudClient nextcloud-client)
|
||||
(lib.mkIf (!isNull config.mods.home_packages.matrixClient) config.mods.home_packages.matrixClient)
|
||||
(lib.mkIf (!isNull config.mods.home_packages.mailClient) config.mods.home_packages.mailClient)
|
||||
(lib.mkIf (
|
||||
!isNull config.mods.home_packages.additionalBrowser
|
||||
) config.mods.home_packages.additionalBrowser)
|
||||
adw-gtk3
|
||||
bat
|
||||
brave
|
||||
brightnessctl
|
||||
dbus
|
||||
fastfetch
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@
|
|||
cache_config = lib.mkOption {
|
||||
default = ''
|
||||
[General]
|
||||
LastDatabases=/home/dashie/Music/Passwords.kdbx
|
||||
LastActiveDatabase=/home/dashie/Music/Passwords.kdbx
|
||||
LastOpenedDatabases=/home/dashie/Music/Passwords.kdbx
|
||||
LastDatabases=/home/${config.conf.username}/Music/Passwords.kdbx
|
||||
LastActiveDatabase=/home/${config.conf.username}/Music/Passwords.kdbx
|
||||
LastOpenedDatabases=/home/${config.conf.username}/Music/Passwords.kdbx
|
||||
LastKeyFiles=@Variant(\0\0\0\x1c\0\0\0\x1\0\0\0\x42\0/\0h\0o\0m\0\x65\0/\0\x64\0\x61\0s\0h\0i\0\x65\0/\0M\0u\0s\0i\0\x63\0/\0P\0\x61\0s\0s\0w\0o\0r\0\x64\0s\0.\0k\0\x64\0\x62\0x\0\0\0\n\0\0\0\x42\0/\0h\0o\0m\0\x65\0/\0\x64\0\x61\0s\0h\0i\0\x65\0/\0M\0u\0s\0i\0\x63\0/\0l\0o\0g\0i\0n\0_\0k\0\x65\0y\0.\0k\0\x65\0y\0x)
|
||||
'';
|
||||
example = "";
|
||||
|
|
|
|||
|
|
@ -69,10 +69,10 @@ in
|
|||
sync_with_monitor = "no";
|
||||
background_opacity = "0.8";
|
||||
|
||||
font_family = "${config.mods.stylix.monospace.name}";
|
||||
bold_font = "${config.mods.stylix.monospace.name} Extra Bold";
|
||||
italic_font = "${config.mods.stylix.monospace.name} Extra Italic";
|
||||
bold_italic_font = "${config.mods.stylix.monospace.name} Extra Bold Italic";
|
||||
font_family = "${config.mods.stylix.fonts.monospace.name}";
|
||||
bold_font = "${config.mods.stylix.fonts.monospace.name} Extra Bold";
|
||||
italic_font = "${config.mods.stylix.fonts.monospace.name} Extra Italic";
|
||||
bold_italic_font = "${config.mods.stylix.fonts.monospace.name} Extra Bold Italic";
|
||||
|
||||
background = base;
|
||||
foreground = "#" + scheme.base05;
|
||||
|
|
|
|||
|
|
@ -7,27 +7,26 @@
|
|||
}:
|
||||
{
|
||||
options.mods.media_packages = {
|
||||
enable = lib.mkOption {
|
||||
useBasePackages = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = "Default media packages";
|
||||
description = "Default media packages (If disabled, only the additional packages will be installed)";
|
||||
};
|
||||
additional_packages = lib.mkOption {
|
||||
additionalPackages = lib.mkOption {
|
||||
default = [ ];
|
||||
example = [ pkgs.flatpak ];
|
||||
type = lib.types.str;
|
||||
type = with lib.types; listOf package;
|
||||
description = ''
|
||||
Additional media packages.
|
||||
Will be installed regardless of default media packages are installed.
|
||||
'';
|
||||
};
|
||||
};
|
||||
config = (
|
||||
lib.optionalAttrs (options ? home.packages) {
|
||||
home.packages = config.mods.media_packages.additional_packages;
|
||||
home.packages = config.mods.media_packages.additionalPackages;
|
||||
}
|
||||
// (lib.mkIf config.mods.media_packages.enable (
|
||||
// (lib.mkIf config.mods.media_packages.useBasePackages (
|
||||
lib.optionalAttrs (options ? home.packages) {
|
||||
home.packages = with pkgs; [
|
||||
# base audio
|
||||
|
|
|
|||
|
|
@ -85,8 +85,8 @@
|
|||
description = "font config";
|
||||
};
|
||||
};
|
||||
config = (
|
||||
lib.optionalAttrs (options ? stylix) {
|
||||
config =
|
||||
(lib.optionalAttrs (options ? stylix) {
|
||||
stylix = {
|
||||
enable = true;
|
||||
image = ../../base/black.jpg;
|
||||
|
|
@ -104,7 +104,7 @@
|
|||
"${pkgs.base16-schemes}/share/themes/${config.mods.stylix.colorscheme}.yaml"
|
||||
);
|
||||
};
|
||||
}
|
||||
})
|
||||
// lib.optionalAttrs (options ? environment.systemPackages) {
|
||||
environment.systemPackages = [
|
||||
config.mods.stylix.fonts.serif.package
|
||||
|
|
@ -112,6 +112,5 @@
|
|||
config.mods.stylix.fonts.monospace.package
|
||||
config.mods.stylix.fonts.emoji.package
|
||||
];
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,8 +12,38 @@
|
|||
type = lib.types.bool;
|
||||
description = "Enables yazi";
|
||||
};
|
||||
useDefaultConfig = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = "Use default yazi config (if disabled only additionalConfig is used)";
|
||||
};
|
||||
additionalConfig = lib.mkOption {
|
||||
default = { };
|
||||
example = { };
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = "Additional config for yazi";
|
||||
};
|
||||
useDefaultKeymap = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = "Use default yazi keymap (if disabled only additionalKeymap is used)";
|
||||
};
|
||||
additionalKeymap = lib.mkOption {
|
||||
default = { };
|
||||
example = { };
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = "Additional keymap for yazi";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.mods.yazi.enable (
|
||||
lib.optionalAttrs (options ? home.packages) { programs.yazi = import ./yazi.nix; }
|
||||
// {
|
||||
programs.yazi.settings = {
|
||||
settings = config.mods.yazi.additionalKeymap;
|
||||
keymap = config.mods.yazi.additionalConfig;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
# don't ask....
|
||||
enable = true;
|
||||
|
|
@ -6,7 +7,6 @@
|
|||
enabled = false;
|
||||
};
|
||||
opener = {
|
||||
|
||||
folder = [
|
||||
{
|
||||
run = ''open - R "$@"'';
|
||||
|
|
@ -1000,234 +1000,4 @@
|
|||
}
|
||||
];
|
||||
};
|
||||
# theme = {
|
||||
# manager = {
|
||||
# cwd = {
|
||||
# fg = "#94e2d5";
|
||||
# };
|
||||
#
|
||||
# # Hovered
|
||||
# hovered = {
|
||||
# reversed = true;
|
||||
# };
|
||||
# preview_hovered = { underline = true; };
|
||||
#
|
||||
# # Find
|
||||
# find_keyword = {
|
||||
# fg = "#f9e2af";
|
||||
# bold = true;
|
||||
# italic = true;
|
||||
# underline = true;
|
||||
# };
|
||||
# find_position = {
|
||||
# fg = "#f5c2e7";
|
||||
# bg = "reset";
|
||||
# bold = true;
|
||||
# italic = true;
|
||||
# };
|
||||
#
|
||||
# # Marker
|
||||
# marker_copied = {
|
||||
# fg = "#a6e3a1";
|
||||
# bg = "#a6e3a1";
|
||||
# };
|
||||
# marker_cut = {
|
||||
# fg = "#f38ba8";
|
||||
# bg = "#f38ba8";
|
||||
# };
|
||||
# marker_marked = {
|
||||
# fg = "#f9e2af";
|
||||
# bg = "#f9e2af";
|
||||
# };
|
||||
# marker_selected = {
|
||||
# fg = "#779EF0";
|
||||
# bg = "#89b4fa";
|
||||
# };
|
||||
#
|
||||
# # Tab
|
||||
# tab_active = {
|
||||
# fg = "#1e1e2e";
|
||||
# bg = "#cdd6f4";
|
||||
# };
|
||||
# tab_inactive = {
|
||||
# fg = "#cdd6f4";
|
||||
# bg = "#45475a";
|
||||
# };
|
||||
# tab_width = 1;
|
||||
#
|
||||
# # Count
|
||||
# count_copied = {
|
||||
# fg = "#1e1e2e";
|
||||
# bg = "#a6e3a1";
|
||||
# };
|
||||
# count_cut = {
|
||||
# fg = "#1e1e2e";
|
||||
# bg = "#f38ba8";
|
||||
# };
|
||||
# count_selected = {
|
||||
# fg = "#1e1e2e";
|
||||
# bg = "#89b4fa";
|
||||
# };
|
||||
#
|
||||
# # Border
|
||||
# border_symbol = "│";
|
||||
# border_style = { fg = "#7f849c"; };
|
||||
#
|
||||
# };
|
||||
# status = {
|
||||
# separator_open = "";
|
||||
# separator_close = "";
|
||||
# separator_style = {
|
||||
# fg = "#45475a";
|
||||
# bg = "#45475a";
|
||||
# };
|
||||
#
|
||||
# # Mode
|
||||
# mode_normal = {
|
||||
# fg = "#1e1e2e";
|
||||
# bg = "#89b4fa";
|
||||
# bold = true;
|
||||
# };
|
||||
# mode_select = {
|
||||
# fg = "#1e1e2e";
|
||||
# bg = "#a6e3a1";
|
||||
# bold = true;
|
||||
# };
|
||||
# mode_unset = {
|
||||
# fg = "#1e1e2e";
|
||||
# bg = "#f2cdcd";
|
||||
# bold = true;
|
||||
# };
|
||||
#
|
||||
# # Progress
|
||||
# progress_label = {
|
||||
# fg = "#ffffff";
|
||||
# bold = true;
|
||||
# };
|
||||
# progress_normal = {
|
||||
# fg = "#89b4fa";
|
||||
# bg = "#45475a";
|
||||
# };
|
||||
# progress_error = {
|
||||
# fg = "#f38ba8";
|
||||
# bg = "#45475a";
|
||||
# };
|
||||
#
|
||||
# # Permissions
|
||||
# permissions_t = { fg = "#89b4fa"; };
|
||||
# permissions_r = { fg = "#f9e2af"; };
|
||||
# permissions_w = { fg = "#f38ba8"; };
|
||||
# permissions_x = { fg = "#a6e3a1"; };
|
||||
# permissions_s = { fg = "#7f849c"; };
|
||||
# };
|
||||
#
|
||||
# input = {
|
||||
# border = {
|
||||
# fg = "#89b4fa";
|
||||
# };
|
||||
# title = { };
|
||||
# value = { };
|
||||
# selected = { reversed = true; };
|
||||
# };
|
||||
# select = {
|
||||
# border = {
|
||||
# fg = "#89b4fa";
|
||||
# };
|
||||
# active = { fg = "#f5c2e7"; };
|
||||
# inactive = { };
|
||||
# };
|
||||
# tasks = {
|
||||
# border = {
|
||||
# fg = "#89b4fa";
|
||||
# };
|
||||
# title = { };
|
||||
# hovered = {
|
||||
# underline = true;
|
||||
# };
|
||||
# };
|
||||
# which = {
|
||||
# mask = {
|
||||
# bg = "#313244";
|
||||
# };
|
||||
# cand = { fg = "#94e2d5"; };
|
||||
# rest = { fg = "#9399b2"; };
|
||||
# desc = { fg = "#f5c2e7"; };
|
||||
# separator = " ";
|
||||
# separator_style = { fg = "#585b70"; };
|
||||
# };
|
||||
# help = {
|
||||
# on = {
|
||||
# fg = "#f5c2e7";
|
||||
# };
|
||||
# exec = { fg = "#94e2d5"; };
|
||||
# desc = { fg = "#9399b2"; };
|
||||
# hovered = {
|
||||
# bg = "#585b70";
|
||||
# bold = true;
|
||||
# };
|
||||
# footer = {
|
||||
# fg = "#45475a";
|
||||
# bg = "#cdd6f4";
|
||||
# };
|
||||
# };
|
||||
# filetype = {
|
||||
# rules = [
|
||||
# # Images
|
||||
# {
|
||||
# mime = "image/*";
|
||||
# fg = "#94e2d5";
|
||||
# }
|
||||
#
|
||||
# # Videos
|
||||
# {
|
||||
# mime = "video/*";
|
||||
# fg = "#f9e2af";
|
||||
# }
|
||||
# {
|
||||
# mime = "audio/*";
|
||||
# fg = "#f9e2af";
|
||||
# }
|
||||
#
|
||||
# # Archives
|
||||
# {
|
||||
# mime = "application/zip";
|
||||
# fg = "#f5c2e7";
|
||||
# }
|
||||
# {
|
||||
# mime = "application/gzip";
|
||||
# fg = "#f5c2e7";
|
||||
# }
|
||||
# {
|
||||
# mime = "application/x-tar";
|
||||
# fg = "#f5c2e7";
|
||||
# }
|
||||
# {
|
||||
# mime = "application/x-bzip";
|
||||
# fg = "#f5c2e7";
|
||||
# }
|
||||
# {
|
||||
# mime = "application/x-bzip2";
|
||||
# fg = "#f5c2e7";
|
||||
# }
|
||||
# {
|
||||
# mime = "application/x-7z-compressed";
|
||||
# fg = "#f5c2e7";
|
||||
# }
|
||||
# {
|
||||
# mime = "application/x-rar";
|
||||
# fg = "#f5c2e7";
|
||||
# }
|
||||
#
|
||||
# # Fallback
|
||||
# {
|
||||
# name = "*";
|
||||
# fg = "#cdd6f4";
|
||||
# }
|
||||
# {
|
||||
# name = "*/";
|
||||
# fg = "#89b4fa";
|
||||
# }
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue