rest of the split migration
This commit is contained in:
@@ -1,2 +1,3 @@
|
|||||||
prefix_rule(pattern=["deadnix", "-e"], decision="allow")
|
prefix_rule(pattern=["deadnix", "-e"], decision="allow")
|
||||||
prefix_rule(pattern=["nix", "eval"], decision="allow")
|
prefix_rule(pattern=["nix", "eval"], decision="allow")
|
||||||
|
prefix_rule(pattern=["nix", "develop", "path:.#nix", "--command", "bash", "-lc", "deadnix -e && nix run nixpkgs#nixfmt-tree && statix fix"], decision="allow")
|
||||||
|
|||||||
@@ -26,11 +26,11 @@
|
|||||||
backupFileExtension = "hbckup";
|
backupFileExtension = "hbckup";
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
|
users.jawz = import ./home-manager.nix;
|
||||||
sharedModules = [ ../modules/home-manager.nix ];
|
sharedModules = [ ../modules/home-manager.nix ];
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit inputs outputs;
|
inherit inputs outputs;
|
||||||
};
|
};
|
||||||
users.jawz = import ./home-manager.nix;
|
|
||||||
};
|
};
|
||||||
time = {
|
time = {
|
||||||
inherit (config.my) timeZone;
|
inherit (config.my) timeZone;
|
||||||
|
|||||||
3
config/derek-home.nix
Normal file
3
config/derek-home.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
_: {
|
||||||
|
home.stateVersion = "23.05";
|
||||||
|
}
|
||||||
@@ -86,5 +86,4 @@ in
|
|||||||
"games"
|
"games"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
home-manager.users.bearded_dragonn.home.stateVersion = "23.05";
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,10 @@ let
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = lib.optionals (osConfig != null) [ ./jawz-home.nix ];
|
imports = lib.optionals (osConfig != null) [
|
||||||
|
./jawz-home.nix
|
||||||
|
./stylix-home.nix
|
||||||
|
];
|
||||||
home.stateVersion = "23.05";
|
home.stateVersion = "23.05";
|
||||||
programs = {
|
programs = {
|
||||||
direnv = {
|
direnv = {
|
||||||
|
|||||||
41
config/stylix-home.nix
Normal file
41
config/stylix-home.nix
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
osConfig,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
schemesFile = import ./schemes.nix {
|
||||||
|
inherit pkgs inputs;
|
||||||
|
};
|
||||||
|
scheme = schemesFile.schemes.paul;
|
||||||
|
cfg = osConfig.my.stylix;
|
||||||
|
gnomeEnabled = osConfig.services.desktopManager.gnome.enable;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
gtk = lib.mkIf (!cfg.enable && gnomeEnabled) {
|
||||||
|
enable = true;
|
||||||
|
iconTheme = {
|
||||||
|
name = "Papirus-Light";
|
||||||
|
package = pkgs.papirus-icon-theme.override {
|
||||||
|
color = "yellow";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
stylix = {
|
||||||
|
inherit (cfg) enable;
|
||||||
|
autoEnable = cfg.enable;
|
||||||
|
iconTheme = {
|
||||||
|
enable = true;
|
||||||
|
package = scheme.iconPackage;
|
||||||
|
light = "Papirus-Light";
|
||||||
|
dark = "Papirus-Dark";
|
||||||
|
};
|
||||||
|
targets.librewolf = {
|
||||||
|
firefoxGnomeTheme.enable = true;
|
||||||
|
profileNames = [ config.home.username ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -11,7 +11,6 @@ let
|
|||||||
};
|
};
|
||||||
scheme = schemesFile.schemes.paul;
|
scheme = schemesFile.schemes.paul;
|
||||||
cfg = config.my.stylix;
|
cfg = config.my.stylix;
|
||||||
gnomeEnabled = config.services.desktopManager.gnome.enable;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.my.stylix = {
|
options.my.stylix = {
|
||||||
@@ -30,30 +29,5 @@ in
|
|||||||
targets.qt.platform = lib.mkForce "qtct";
|
targets.qt.platform = lib.mkForce "qtct";
|
||||||
}
|
}
|
||||||
// lib.optionalAttrs (scheme ? base16Scheme) { inherit (scheme) base16Scheme; };
|
// lib.optionalAttrs (scheme ? base16Scheme) { inherit (scheme) base16Scheme; };
|
||||||
home-manager.users = inputs.self.lib.mkHomeManagerUsers lib config.my.stylix.users (user: {
|
|
||||||
gtk = lib.mkIf (!cfg.enable && gnomeEnabled) {
|
|
||||||
enable = true;
|
|
||||||
iconTheme = {
|
|
||||||
name = "Papirus-Light";
|
|
||||||
package = pkgs.papirus-icon-theme.override {
|
|
||||||
color = "yellow";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
stylix = {
|
|
||||||
inherit (cfg) enable;
|
|
||||||
autoEnable = cfg.enable;
|
|
||||||
iconTheme = {
|
|
||||||
enable = true;
|
|
||||||
package = scheme.iconPackage;
|
|
||||||
light = "Papirus-Light";
|
|
||||||
dark = "Papirus-Dark";
|
|
||||||
};
|
|
||||||
targets.librewolf = {
|
|
||||||
firefoxGnomeTheme.enable = true;
|
|
||||||
profileNames = [ user ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
113
environments/hyprland-home.nix
Normal file
113
environments/hyprland-home.nix
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
mod = "SUPER";
|
||||||
|
waybarConfig = import ./waybar-config.nix { inherit pkgs config; };
|
||||||
|
waybarStyle = import ./waybar-style.nix { inherit config; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
programs = {
|
||||||
|
wofi = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
allow_images = true;
|
||||||
|
allow_markup = true;
|
||||||
|
insensitive = true;
|
||||||
|
width = "30%";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
waybar = waybarConfig.programs.waybar // {
|
||||||
|
style = waybarStyle;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
wayland.windowManager.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
general = {
|
||||||
|
gaps_in = 5;
|
||||||
|
gaps_out = 10;
|
||||||
|
border_size = 3;
|
||||||
|
layout = "dwindle";
|
||||||
|
};
|
||||||
|
misc = {
|
||||||
|
disable_hyprland_logo = true;
|
||||||
|
disable_splash_rendering = true;
|
||||||
|
force_default_wallpaper = 0;
|
||||||
|
};
|
||||||
|
dwindle = {
|
||||||
|
pseudotile = true;
|
||||||
|
preserve_split = true;
|
||||||
|
force_split = 2;
|
||||||
|
};
|
||||||
|
bind = [
|
||||||
|
"${mod}, return, exec, ghostty"
|
||||||
|
"${mod}, Q, killactive,"
|
||||||
|
"${mod} SHIFT, F, togglefloating,"
|
||||||
|
"${mod}, F, fullscreen,"
|
||||||
|
"${mod}, T, pin,"
|
||||||
|
"${mod}, G, togglegroup,"
|
||||||
|
"${mod}, bracketleft, changegroupactive, b"
|
||||||
|
"${mod}, bracketright, changegroupactive, f"
|
||||||
|
"${mod}, S, exec, wofi --show drun icons"
|
||||||
|
"${mod}, P, pin, active"
|
||||||
|
"${mod}, left, movefocus, l"
|
||||||
|
"${mod}, right, movefocus, r"
|
||||||
|
"${mod}, up, movefocus, u"
|
||||||
|
"${mod}, down, movefocus, d"
|
||||||
|
"${mod}, h, movefocus, l"
|
||||||
|
"${mod}, l, movefocus, r"
|
||||||
|
"${mod}, k, movefocus, u"
|
||||||
|
"${mod}, j, movefocus, d"
|
||||||
|
"${mod} SHIFT, left, movewindow, l"
|
||||||
|
"${mod} SHIFT, right, movewindow, r"
|
||||||
|
"${mod} SHIFT, up, movewindow, u"
|
||||||
|
"${mod} SHIFT, down, movewindow, d"
|
||||||
|
"${mod} SHIFT, h, movewindow, l"
|
||||||
|
"${mod} SHIFT, l, movewindow, r"
|
||||||
|
"${mod} SHIFT, k, movewindow, u"
|
||||||
|
"${mod} SHIFT, j, movewindow, d"
|
||||||
|
"${mod}, 1, workspace, 1"
|
||||||
|
"${mod}, 2, workspace, 2"
|
||||||
|
"${mod}, 3, workspace, 3"
|
||||||
|
"${mod}, 4, workspace, 4"
|
||||||
|
"${mod}, 5, workspace, 5"
|
||||||
|
"${mod}, 6, workspace, 6"
|
||||||
|
"${mod}, 7, workspace, 7"
|
||||||
|
"${mod}, 8, workspace, 8"
|
||||||
|
"${mod}, 9, workspace, 9"
|
||||||
|
"${mod}, 0, workspace, 10"
|
||||||
|
"${mod} SHIFT, 1, movetoworkspace, 1"
|
||||||
|
"${mod} SHIFT, 2, movetoworkspace, 2"
|
||||||
|
"${mod} SHIFT, 3, movetoworkspace, 3"
|
||||||
|
"${mod} SHIFT, 4, movetoworkspace, 4"
|
||||||
|
"${mod} SHIFT, 5, movetoworkspace, 5"
|
||||||
|
"${mod} SHIFT, 6, movetoworkspace, 6"
|
||||||
|
"${mod} SHIFT, 7, movetoworkspace, 7"
|
||||||
|
"${mod} SHIFT, 8, movetoworkspace, 8"
|
||||||
|
"${mod} SHIFT, 9, movetoworkspace, 9"
|
||||||
|
"${mod} SHIFT, 0, movetoworkspace, 10"
|
||||||
|
"${mod}, F3, exec, grimblast save area ~/Pictures/Screenshots/$(date +'%Y-%m-%d_%H-%M-%S').png"
|
||||||
|
"${mod} SHIFT, F3, exec, grimblast save screen ~/Pictures/Screenshots/$(date +'%Y-%m-%d_%H-%M-%S').png"
|
||||||
|
];
|
||||||
|
binde = [
|
||||||
|
"${mod} SHIFT, h, moveactive, -20 0"
|
||||||
|
"${mod} SHIFT, l, moveactive, 20 0"
|
||||||
|
"${mod} SHIFT, k, moveactive, 0 -20"
|
||||||
|
"${mod} SHIFT, j, moveactive, 0 20"
|
||||||
|
"${mod} CTRL, l, resizeactive, 30 0"
|
||||||
|
"${mod} CTRL, h, resizeactive, -30 0"
|
||||||
|
"${mod} CTRL, k, resizeactive, 0 -10"
|
||||||
|
"${mod} CTRL, j, resizeactive, 0 10"
|
||||||
|
",XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%+"
|
||||||
|
",XF86AudioLowerVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%-"
|
||||||
|
];
|
||||||
|
bindm = [
|
||||||
|
"${mod}, mouse:272, movewindow"
|
||||||
|
"${mod}, mouse:273, resizewindow"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,13 +1,7 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
|
||||||
mod = "SUPER";
|
|
||||||
waybarConfig = import ./waybar-config.nix { inherit pkgs config; };
|
|
||||||
waybarStyle = import ./waybar-style.nix { inherit config; };
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
programs.hyprland.enable = true;
|
programs.hyprland.enable = true;
|
||||||
services.greetd = {
|
services.greetd = {
|
||||||
@@ -19,119 +13,16 @@ in
|
|||||||
};
|
};
|
||||||
users.users.jawz.packages = builtins.attrValues {
|
users.users.jawz.packages = builtins.attrValues {
|
||||||
inherit (pkgs)
|
inherit (pkgs)
|
||||||
# Wayland utilities
|
|
||||||
wl-clipboard-rs
|
wl-clipboard-rs
|
||||||
wf-recorder
|
wf-recorder
|
||||||
grimblast # screenshots
|
grimblast
|
||||||
mako # notification daemon
|
mako
|
||||||
libnotify # dependency of mako
|
libnotify
|
||||||
swaylock-effects # screen locker
|
swaylock-effects
|
||||||
yazi # file manager
|
yazi
|
||||||
imv # images
|
imv
|
||||||
playerctl # media player control
|
playerctl
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
home-manager.users.jawz = {
|
home-manager.users.jawz.imports = [ ./hyprland-home.nix ];
|
||||||
programs = {
|
|
||||||
wofi = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
allow_images = true;
|
|
||||||
allow_markup = true;
|
|
||||||
insensitive = true;
|
|
||||||
width = "30%";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
waybar = waybarConfig.programs.waybar // {
|
|
||||||
style = waybarStyle;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
wayland.windowManager.hyprland = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
general = {
|
|
||||||
gaps_in = 5;
|
|
||||||
gaps_out = 10;
|
|
||||||
border_size = 3;
|
|
||||||
layout = "dwindle";
|
|
||||||
};
|
|
||||||
misc = {
|
|
||||||
disable_hyprland_logo = true;
|
|
||||||
disable_splash_rendering = true;
|
|
||||||
force_default_wallpaper = 0;
|
|
||||||
};
|
|
||||||
dwindle = {
|
|
||||||
pseudotile = true;
|
|
||||||
preserve_split = true;
|
|
||||||
force_split = 2;
|
|
||||||
};
|
|
||||||
bind = [
|
|
||||||
"${mod}, return, exec, ghostty"
|
|
||||||
"${mod}, Q, killactive,"
|
|
||||||
"${mod} SHIFT, F, togglefloating,"
|
|
||||||
"${mod}, F, fullscreen,"
|
|
||||||
"${mod}, T, pin,"
|
|
||||||
"${mod}, G, togglegroup,"
|
|
||||||
"${mod}, bracketleft, changegroupactive, b"
|
|
||||||
"${mod}, bracketright, changegroupactive, f"
|
|
||||||
"${mod}, S, exec, wofi --show drun icons"
|
|
||||||
"${mod}, P, pin, active"
|
|
||||||
"${mod}, left, movefocus, l"
|
|
||||||
"${mod}, right, movefocus, r"
|
|
||||||
"${mod}, up, movefocus, u"
|
|
||||||
"${mod}, down, movefocus, d"
|
|
||||||
"${mod}, h, movefocus, l"
|
|
||||||
"${mod}, l, movefocus, r"
|
|
||||||
"${mod}, k, movefocus, u"
|
|
||||||
"${mod}, j, movefocus, d"
|
|
||||||
"${mod} SHIFT, left, movewindow, l"
|
|
||||||
"${mod} SHIFT, right, movewindow, r"
|
|
||||||
"${mod} SHIFT, up, movewindow, u"
|
|
||||||
"${mod} SHIFT, down, movewindow, d"
|
|
||||||
"${mod} SHIFT, h, movewindow, l"
|
|
||||||
"${mod} SHIFT, l, movewindow, r"
|
|
||||||
"${mod} SHIFT, k, movewindow, u"
|
|
||||||
"${mod} SHIFT, j, movewindow, d"
|
|
||||||
"${mod}, 1, workspace, 1"
|
|
||||||
"${mod}, 2, workspace, 2"
|
|
||||||
"${mod}, 3, workspace, 3"
|
|
||||||
"${mod}, 4, workspace, 4"
|
|
||||||
"${mod}, 5, workspace, 5"
|
|
||||||
"${mod}, 6, workspace, 6"
|
|
||||||
"${mod}, 7, workspace, 7"
|
|
||||||
"${mod}, 8, workspace, 8"
|
|
||||||
"${mod}, 9, workspace, 9"
|
|
||||||
"${mod}, 0, workspace, 10"
|
|
||||||
"${mod} SHIFT, 1, movetoworkspace, 1"
|
|
||||||
"${mod} SHIFT, 2, movetoworkspace, 2"
|
|
||||||
"${mod} SHIFT, 3, movetoworkspace, 3"
|
|
||||||
"${mod} SHIFT, 4, movetoworkspace, 4"
|
|
||||||
"${mod} SHIFT, 5, movetoworkspace, 5"
|
|
||||||
"${mod} SHIFT, 6, movetoworkspace, 6"
|
|
||||||
"${mod} SHIFT, 7, movetoworkspace, 7"
|
|
||||||
"${mod} SHIFT, 8, movetoworkspace, 8"
|
|
||||||
"${mod} SHIFT, 9, movetoworkspace, 9"
|
|
||||||
"${mod} SHIFT, 0, movetoworkspace, 10"
|
|
||||||
"${mod}, F3, exec, grimblast save area ~/Pictures/Screenshots/$(date +'%Y-%m-%d_%H-%M-%S').png"
|
|
||||||
"${mod} SHIFT, F3, exec, grimblast save screen ~/Pictures/Screenshots/$(date +'%Y-%m-%d_%H-%M-%S').png"
|
|
||||||
];
|
|
||||||
binde = [
|
|
||||||
"${mod} SHIFT, h, moveactive, -20 0"
|
|
||||||
"${mod} SHIFT, l, moveactive, 20 0"
|
|
||||||
"${mod} SHIFT, k, moveactive, 0 -20"
|
|
||||||
"${mod} SHIFT, j, moveactive, 0 20"
|
|
||||||
"${mod} CTRL, l, resizeactive, 30 0"
|
|
||||||
"${mod} CTRL, h, resizeactive, -30 0"
|
|
||||||
"${mod} CTRL, k, resizeactive, 0 -10"
|
|
||||||
"${mod} CTRL, j, resizeactive, 0 10"
|
|
||||||
",XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%+"
|
|
||||||
",XF86AudioLowerVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%-"
|
|
||||||
];
|
|
||||||
bindm = [
|
|
||||||
"${mod}, mouse:272, movewindow"
|
|
||||||
"${mod}, mouse:273, resizewindow"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
packages = builtins.attrValues {
|
|
||||||
inherit (pkgs)
|
|
||||||
clang # C/C++ compiler frontend (part of LLVM)
|
|
||||||
clang-tools # Extra LLVM tools (e.g. clang-tidy, clang-apply-replacements)
|
|
||||||
gcc # GNU Compiler Collection (C, C++, etc.)
|
|
||||||
gdb # GNU Debugger
|
|
||||||
valgrind # Memory leak detector and performance profiler
|
|
||||||
;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
my.dev.cc = {
|
|
||||||
enable = lib.mkEnableOption "Install C/C++ tooling globally";
|
|
||||||
users = lib.mkOption {
|
|
||||||
type = inputs.self.lib.usersOptionType lib;
|
|
||||||
default = config.my.toggleUsers.dev;
|
|
||||||
description = "Users to install C/C++ packages for";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
devShells.cc = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = pkgs.mkShell {
|
|
||||||
inherit packages;
|
|
||||||
name = "cc-dev-shell";
|
|
||||||
shellHook = ''
|
|
||||||
echo "🔧 C/C++ dev environment"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
description = "C/C++ development shell";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.my.dev.cc.enable {
|
|
||||||
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.cc.users { inherit packages; };
|
|
||||||
};
|
|
||||||
}
|
|
||||||
22
modules/dev/cc/common.nix
Normal file
22
modules/dev/cc/common.nix
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{ pkgs }:
|
||||||
|
let
|
||||||
|
packages = builtins.attrValues {
|
||||||
|
inherit (pkgs)
|
||||||
|
clang
|
||||||
|
clang-tools
|
||||||
|
gcc
|
||||||
|
gdb
|
||||||
|
valgrind
|
||||||
|
;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit packages;
|
||||||
|
devShell = pkgs.mkShell {
|
||||||
|
inherit packages;
|
||||||
|
name = "cc-dev-shell";
|
||||||
|
shellHook = ''
|
||||||
|
echo "🔧 C/C++ dev environment"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
34
modules/dev/cc/home.nix
Normal file
34
modules/dev/cc/home.nix
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
osConfig ? null,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
hm = inputs.self.lib.hmModule {
|
||||||
|
inherit
|
||||||
|
config
|
||||||
|
inputs
|
||||||
|
osConfig
|
||||||
|
;
|
||||||
|
optionPath = [
|
||||||
|
"dev"
|
||||||
|
"cc"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
cfg = config.my.dev.cc;
|
||||||
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.dev.cc.enable = lib.mkEnableOption "Install C/C++ tooling globally";
|
||||||
|
config = lib.mkMerge [
|
||||||
|
{
|
||||||
|
my.dev.cc.enable = lib.mkDefault hm.enabledByDefault;
|
||||||
|
}
|
||||||
|
(lib.mkIf cfg.enable {
|
||||||
|
home.packages = feature.packages;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
27
modules/dev/cc/nixos.nix
Normal file
27
modules/dev/cc/nixos.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
my.dev.cc = {
|
||||||
|
enable = lib.mkEnableOption "Install C/C++ tooling globally";
|
||||||
|
users = lib.mkOption {
|
||||||
|
type = inputs.self.lib.usersOptionType lib;
|
||||||
|
default = config.my.toggleUsers.dev;
|
||||||
|
description = "Users to install C/C++ packages for";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
devShells.cc = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
default = feature.devShell;
|
||||||
|
description = "C/C++ development shell";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
packages = builtins.attrValues {
|
|
||||||
inherit (pkgs)
|
|
||||||
dockfmt # Format Dockerfiles
|
|
||||||
dockerfile-language-server # LSP for Dockerfiles
|
|
||||||
;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
my.dev.docker = {
|
|
||||||
enable = lib.mkEnableOption "Install Docker tooling globally";
|
|
||||||
users = lib.mkOption {
|
|
||||||
type = inputs.self.lib.usersOptionType lib;
|
|
||||||
default = config.my.toggleUsers.dev;
|
|
||||||
description = "Users to install Docker packages for";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
devShells.docker = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = pkgs.mkShell {
|
|
||||||
inherit packages;
|
|
||||||
name = "docker-dev-shell";
|
|
||||||
shellHook = ''
|
|
||||||
echo "🐳 Docker dev environment"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
description = "Docker and Dockerfile tooling shell";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkMerge [
|
|
||||||
(lib.mkIf config.my.dev.docker.enable {
|
|
||||||
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.docker.users { inherit packages; };
|
|
||||||
})
|
|
||||||
{
|
|
||||||
environment.variables.DOCKER_CONFIG = "\${XDG_CONFIG_HOME}/docker";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
19
modules/dev/docker/common.nix
Normal file
19
modules/dev/docker/common.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{ pkgs }:
|
||||||
|
let
|
||||||
|
packages = builtins.attrValues {
|
||||||
|
inherit (pkgs)
|
||||||
|
dockfmt
|
||||||
|
dockerfile-language-server
|
||||||
|
;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit packages;
|
||||||
|
devShell = pkgs.mkShell {
|
||||||
|
inherit packages;
|
||||||
|
name = "docker-dev-shell";
|
||||||
|
shellHook = ''
|
||||||
|
echo "🐳 Docker dev environment"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
35
modules/dev/docker/home.nix
Normal file
35
modules/dev/docker/home.nix
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
osConfig ? null,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
hm = inputs.self.lib.hmModule {
|
||||||
|
inherit
|
||||||
|
config
|
||||||
|
inputs
|
||||||
|
osConfig
|
||||||
|
;
|
||||||
|
optionPath = [
|
||||||
|
"dev"
|
||||||
|
"docker"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
cfg = config.my.dev.docker;
|
||||||
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.dev.docker.enable = lib.mkEnableOption "Install Docker tooling globally";
|
||||||
|
config = lib.mkMerge [
|
||||||
|
{
|
||||||
|
my.dev.docker.enable = lib.mkDefault hm.enabledByDefault;
|
||||||
|
}
|
||||||
|
(lib.mkIf cfg.enable {
|
||||||
|
home.packages = feature.packages;
|
||||||
|
home.sessionVariables.DOCKER_CONFIG = "${config.xdg.configHome}/docker";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
27
modules/dev/docker/nixos.nix
Normal file
27
modules/dev/docker/nixos.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
my.dev.docker = {
|
||||||
|
enable = lib.mkEnableOption "Install Docker tooling globally";
|
||||||
|
users = lib.mkOption {
|
||||||
|
type = inputs.self.lib.usersOptionType lib;
|
||||||
|
default = config.my.toggleUsers.dev;
|
||||||
|
description = "Users to install Docker packages for";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
devShells.docker = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
default = feature.devShell;
|
||||||
|
description = "Docker and Dockerfile tooling shell";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
packages = builtins.attrValues {
|
|
||||||
inherit (pkgs)
|
|
||||||
go # Go compiler and core toolchain
|
|
||||||
gocode-gomod # Code completion for Go (modern fork of gocode)
|
|
||||||
gotools # Contains godoc, gorename, goimports, etc.
|
|
||||||
gore # Go REPL
|
|
||||||
gotests # Generate Go tests from function signatures
|
|
||||||
gomodifytags # Struct tag manipulation
|
|
||||||
golangci-lint # Linter aggregation
|
|
||||||
;
|
|
||||||
};
|
|
||||||
GOPATH = "\${XDG_DATA_HOME}/go";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
my.dev.go = {
|
|
||||||
enable = lib.mkEnableOption "Install Go tooling globally";
|
|
||||||
users = lib.mkOption {
|
|
||||||
type = inputs.self.lib.usersOptionType lib;
|
|
||||||
default = config.my.toggleUsers.dev;
|
|
||||||
description = "Users to install Go packages for";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
devShells.go = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = pkgs.mkShell {
|
|
||||||
inherit packages GOPATH;
|
|
||||||
name = "go-dev-shell";
|
|
||||||
shellHook = ''
|
|
||||||
echo "🐹 Go dev environment"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
description = "Go development shell with Emacs tooling, REPL, formatter, and linter";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkMerge [
|
|
||||||
{
|
|
||||||
environment.variables = { inherit GOPATH; };
|
|
||||||
}
|
|
||||||
(lib.mkIf config.my.dev.go.enable {
|
|
||||||
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.go.users { inherit packages; };
|
|
||||||
})
|
|
||||||
];
|
|
||||||
}
|
|
||||||
25
modules/dev/go/common.nix
Normal file
25
modules/dev/go/common.nix
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{ pkgs }:
|
||||||
|
let
|
||||||
|
packages = builtins.attrValues {
|
||||||
|
inherit (pkgs)
|
||||||
|
go
|
||||||
|
gocode-gomod
|
||||||
|
gotools
|
||||||
|
gore
|
||||||
|
gotests
|
||||||
|
gomodifytags
|
||||||
|
golangci-lint
|
||||||
|
;
|
||||||
|
};
|
||||||
|
GOPATH = "\${XDG_DATA_HOME:-\$HOME/.local/share}/go";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit packages GOPATH;
|
||||||
|
devShell = pkgs.mkShell {
|
||||||
|
inherit packages GOPATH;
|
||||||
|
name = "go-dev-shell";
|
||||||
|
shellHook = ''
|
||||||
|
echo "🐹 Go dev environment"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
35
modules/dev/go/home.nix
Normal file
35
modules/dev/go/home.nix
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
osConfig ? null,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
hm = inputs.self.lib.hmModule {
|
||||||
|
inherit
|
||||||
|
config
|
||||||
|
inputs
|
||||||
|
osConfig
|
||||||
|
;
|
||||||
|
optionPath = [
|
||||||
|
"dev"
|
||||||
|
"go"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
cfg = config.my.dev.go;
|
||||||
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.dev.go.enable = lib.mkEnableOption "Install Go tooling globally";
|
||||||
|
config = lib.mkMerge [
|
||||||
|
{
|
||||||
|
my.dev.go.enable = lib.mkDefault hm.enabledByDefault;
|
||||||
|
}
|
||||||
|
(lib.mkIf cfg.enable {
|
||||||
|
home.packages = feature.packages;
|
||||||
|
home.sessionVariables.GOPATH = "${config.xdg.dataHome}/go";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
27
modules/dev/go/nixos.nix
Normal file
27
modules/dev/go/nixos.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
my.dev.go = {
|
||||||
|
enable = lib.mkEnableOption "Install Go tooling globally";
|
||||||
|
users = lib.mkOption {
|
||||||
|
type = inputs.self.lib.usersOptionType lib;
|
||||||
|
default = config.my.toggleUsers.dev;
|
||||||
|
description = "Users to install Go packages for";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
devShells.go = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
default = feature.devShell;
|
||||||
|
description = "Go development shell with Emacs tooling, REPL, formatter, and linter";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
packages = builtins.attrValues {
|
|
||||||
inherit (pkgs)
|
|
||||||
haskell-language-server # LSP server for Haskell
|
|
||||||
cabal-install # Standard Haskell build tool
|
|
||||||
hlint # Linter for Haskell source code
|
|
||||||
;
|
|
||||||
inherit (pkgs.haskellPackages)
|
|
||||||
hoogle # Haskell API search engine
|
|
||||||
;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
my.dev.haskell = {
|
|
||||||
enable = lib.mkEnableOption "Install Haskell tooling globally";
|
|
||||||
users = lib.mkOption {
|
|
||||||
type = inputs.self.lib.usersOptionType lib;
|
|
||||||
default = config.my.toggleUsers.dev;
|
|
||||||
description = "Users to install Haskell packages for";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
devShells.haskell = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = pkgs.mkShell {
|
|
||||||
inherit packages;
|
|
||||||
name = "haskell-dev-shell";
|
|
||||||
shellHook = ''
|
|
||||||
echo "λ Haskell dev environment"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
description = "Haskell development shell";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkMerge [
|
|
||||||
(lib.mkIf config.my.dev.haskell.enable {
|
|
||||||
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.haskell.users { inherit packages; };
|
|
||||||
})
|
|
||||||
{
|
|
||||||
environment.variables = {
|
|
||||||
CABAL_DIR = "\${XDG_CACHE_HOME}/cabal";
|
|
||||||
STACK_ROOT = "\${XDG_DATA_HOME}/stack";
|
|
||||||
GHCUP_USE_XDG_DIRS = "true";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
23
modules/dev/haskell/common.nix
Normal file
23
modules/dev/haskell/common.nix
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{ pkgs }:
|
||||||
|
let
|
||||||
|
packages = builtins.attrValues {
|
||||||
|
inherit (pkgs)
|
||||||
|
haskell-language-server
|
||||||
|
cabal-install
|
||||||
|
hlint
|
||||||
|
;
|
||||||
|
inherit (pkgs.haskellPackages)
|
||||||
|
hoogle
|
||||||
|
;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit packages;
|
||||||
|
devShell = pkgs.mkShell {
|
||||||
|
inherit packages;
|
||||||
|
name = "haskell-dev-shell";
|
||||||
|
shellHook = ''
|
||||||
|
echo "λ Haskell dev environment"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
39
modules/dev/haskell/home.nix
Normal file
39
modules/dev/haskell/home.nix
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
osConfig ? null,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
hm = inputs.self.lib.hmModule {
|
||||||
|
inherit
|
||||||
|
config
|
||||||
|
inputs
|
||||||
|
osConfig
|
||||||
|
;
|
||||||
|
optionPath = [
|
||||||
|
"dev"
|
||||||
|
"haskell"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
cfg = config.my.dev.haskell;
|
||||||
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.dev.haskell.enable = lib.mkEnableOption "Install Haskell tooling globally";
|
||||||
|
config = lib.mkMerge [
|
||||||
|
{
|
||||||
|
my.dev.haskell.enable = lib.mkDefault hm.enabledByDefault;
|
||||||
|
}
|
||||||
|
(lib.mkIf cfg.enable {
|
||||||
|
home.packages = feature.packages;
|
||||||
|
home.sessionVariables = {
|
||||||
|
CABAL_DIR = "${config.xdg.cacheHome}/cabal";
|
||||||
|
STACK_ROOT = "${config.xdg.dataHome}/stack";
|
||||||
|
GHCUP_USE_XDG_DIRS = "true";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
27
modules/dev/haskell/nixos.nix
Normal file
27
modules/dev/haskell/nixos.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
my.dev.haskell = {
|
||||||
|
enable = lib.mkEnableOption "Install Haskell tooling globally";
|
||||||
|
users = lib.mkOption {
|
||||||
|
type = inputs.self.lib.usersOptionType lib;
|
||||||
|
default = config.my.toggleUsers.dev;
|
||||||
|
description = "Users to install Haskell packages for";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
devShells.haskell = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
default = feature.devShell;
|
||||||
|
description = "Haskell development shell";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
16
modules/dev/julia/common.nix
Normal file
16
modules/dev/julia/common.nix
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{ pkgs }:
|
||||||
|
let
|
||||||
|
packages = builtins.attrValues {
|
||||||
|
inherit (pkgs) julia;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit packages;
|
||||||
|
devShell = pkgs.mkShell {
|
||||||
|
inherit packages;
|
||||||
|
name = "julia-dev-shell";
|
||||||
|
shellHook = ''
|
||||||
|
echo "🔬 Julia dev environment"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
34
modules/dev/julia/home.nix
Normal file
34
modules/dev/julia/home.nix
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
osConfig ? null,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
hm = inputs.self.lib.hmModule {
|
||||||
|
inherit
|
||||||
|
config
|
||||||
|
inputs
|
||||||
|
osConfig
|
||||||
|
;
|
||||||
|
optionPath = [
|
||||||
|
"dev"
|
||||||
|
"julia"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
cfg = config.my.dev.julia;
|
||||||
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.dev.julia.enable = lib.mkEnableOption "Install Julia globally";
|
||||||
|
config = lib.mkMerge [
|
||||||
|
{
|
||||||
|
my.dev.julia.enable = lib.mkDefault hm.enabledByDefault;
|
||||||
|
}
|
||||||
|
(lib.mkIf cfg.enable {
|
||||||
|
home.packages = feature.packages;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -6,9 +6,7 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
packages = builtins.attrValues {
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
inherit (pkgs) julia; # High-performance dynamic language for technical computing
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
@@ -22,17 +20,8 @@ in
|
|||||||
};
|
};
|
||||||
devShells.julia = lib.mkOption {
|
devShells.julia = lib.mkOption {
|
||||||
type = lib.types.package;
|
type = lib.types.package;
|
||||||
default = pkgs.mkShell {
|
default = feature.devShell;
|
||||||
inherit packages;
|
|
||||||
name = "julia-dev-shell";
|
|
||||||
shellHook = ''
|
|
||||||
echo "🔬 Julia dev environment"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
description = "Julia development shell";
|
description = "Julia development shell";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = lib.mkIf config.my.dev.julia.enable {
|
|
||||||
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.julia.users { inherit packages; };
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
18
modules/dev/mcp/common.nix
Normal file
18
modules/dev/mcp/common.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{ pkgs, inputs }:
|
||||||
|
let
|
||||||
|
packages = [
|
||||||
|
pkgs.codex
|
||||||
|
inputs.self.packages.${pkgs.system}.nixos-mcp
|
||||||
|
];
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit packages;
|
||||||
|
devShell = pkgs.mkShell {
|
||||||
|
inherit packages;
|
||||||
|
name = "mcp-dev-shell";
|
||||||
|
shellHook = ''
|
||||||
|
export CODEX_HOME=$PWD/.codex
|
||||||
|
echo "MCP shell ready: codex + nixos-mcp"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
34
modules/dev/mcp/home.nix
Normal file
34
modules/dev/mcp/home.nix
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
osConfig ? null,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
hm = inputs.self.lib.hmModule {
|
||||||
|
inherit
|
||||||
|
config
|
||||||
|
inputs
|
||||||
|
osConfig
|
||||||
|
;
|
||||||
|
optionPath = [
|
||||||
|
"dev"
|
||||||
|
"mcp"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
cfg = config.my.dev.mcp;
|
||||||
|
feature = import ./common.nix { inherit pkgs inputs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.dev.mcp.enable = lib.mkEnableOption "Install MCP tooling globally";
|
||||||
|
config = lib.mkMerge [
|
||||||
|
{
|
||||||
|
my.dev.mcp.enable = lib.mkDefault hm.enabledByDefault;
|
||||||
|
}
|
||||||
|
(lib.mkIf cfg.enable {
|
||||||
|
home.packages = feature.packages;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -6,10 +6,7 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
packages = [
|
feature = import ./common.nix { inherit pkgs inputs; };
|
||||||
pkgs.codex
|
|
||||||
inputs.self.packages.${pkgs.system}.nixos-mcp
|
|
||||||
];
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
@@ -23,18 +20,8 @@ in
|
|||||||
};
|
};
|
||||||
devShells.mcp = lib.mkOption {
|
devShells.mcp = lib.mkOption {
|
||||||
type = lib.types.package;
|
type = lib.types.package;
|
||||||
|
default = feature.devShell;
|
||||||
description = "MCP dev shell for this repo";
|
description = "MCP dev shell for this repo";
|
||||||
default = pkgs.mkShell {
|
|
||||||
inherit packages;
|
|
||||||
name = "mcp-dev-shell";
|
|
||||||
shellHook = ''
|
|
||||||
export CODEX_HOME=$PWD/.codex
|
|
||||||
echo "MCP shell ready: codex + nixos-mcp"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = lib.mkIf config.my.dev.mcp.enable {
|
|
||||||
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.mcp.users { inherit packages; };
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
packages = builtins.attrValues {
|
|
||||||
inherit (pkgs) ruby; # Ruby interpreter
|
|
||||||
inherit (pkgs.rubyPackages) solargraph; # LSP for Ruby
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
my.dev.ruby = {
|
|
||||||
enable = lib.mkEnableOption "Install Ruby tooling globally";
|
|
||||||
users = lib.mkOption {
|
|
||||||
type = inputs.self.lib.usersOptionType lib;
|
|
||||||
default = config.my.toggleUsers.dev;
|
|
||||||
description = "Users to install Ruby packages for";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
devShells.ruby = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = pkgs.mkShell {
|
|
||||||
inherit packages;
|
|
||||||
name = "ruby-dev-shell";
|
|
||||||
shellHook = ''
|
|
||||||
echo "💎 Ruby dev environment"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
description = "Ruby development shell with interpreter and Solargraph LSP";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkMerge [
|
|
||||||
(lib.mkIf config.my.dev.ruby.enable {
|
|
||||||
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.ruby.users { inherit packages; };
|
|
||||||
})
|
|
||||||
{
|
|
||||||
environment.variables = {
|
|
||||||
GEM_HOME = "\${XDG_DATA_HOME}/ruby/gems";
|
|
||||||
GEM_PATH = "\${XDG_DATA_HOME}/ruby/gems";
|
|
||||||
GEM_SPEC_CACHE = "\${XDG_DATA_HOME}/ruby/specs";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
17
modules/dev/ruby/common.nix
Normal file
17
modules/dev/ruby/common.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{ pkgs }:
|
||||||
|
let
|
||||||
|
packages = builtins.attrValues {
|
||||||
|
inherit (pkgs) ruby;
|
||||||
|
inherit (pkgs.rubyPackages) solargraph;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit packages;
|
||||||
|
devShell = pkgs.mkShell {
|
||||||
|
inherit packages;
|
||||||
|
name = "ruby-dev-shell";
|
||||||
|
shellHook = ''
|
||||||
|
echo "💎 Ruby dev environment"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
39
modules/dev/ruby/home.nix
Normal file
39
modules/dev/ruby/home.nix
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
osConfig ? null,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
hm = inputs.self.lib.hmModule {
|
||||||
|
inherit
|
||||||
|
config
|
||||||
|
inputs
|
||||||
|
osConfig
|
||||||
|
;
|
||||||
|
optionPath = [
|
||||||
|
"dev"
|
||||||
|
"ruby"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
cfg = config.my.dev.ruby;
|
||||||
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.dev.ruby.enable = lib.mkEnableOption "Install Ruby tooling globally";
|
||||||
|
config = lib.mkMerge [
|
||||||
|
{
|
||||||
|
my.dev.ruby.enable = lib.mkDefault hm.enabledByDefault;
|
||||||
|
}
|
||||||
|
(lib.mkIf cfg.enable {
|
||||||
|
home.packages = feature.packages;
|
||||||
|
home.sessionVariables = {
|
||||||
|
GEM_HOME = "${config.xdg.dataHome}/ruby/gems";
|
||||||
|
GEM_PATH = "${config.xdg.dataHome}/ruby/gems";
|
||||||
|
GEM_SPEC_CACHE = "${config.xdg.dataHome}/ruby/specs";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
27
modules/dev/ruby/nixos.nix
Normal file
27
modules/dev/ruby/nixos.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
my.dev.ruby = {
|
||||||
|
enable = lib.mkEnableOption "Install Ruby tooling globally";
|
||||||
|
users = lib.mkOption {
|
||||||
|
type = inputs.self.lib.usersOptionType lib;
|
||||||
|
default = config.my.toggleUsers.dev;
|
||||||
|
description = "Users to install Ruby packages for";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
devShells.ruby = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
default = feature.devShell;
|
||||||
|
description = "Ruby development shell with interpreter and Solargraph LSP";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
packages = builtins.attrValues {
|
|
||||||
inherit (pkgs)
|
|
||||||
rustc # Rust compiler
|
|
||||||
cargo # Rust package manager
|
|
||||||
rust-analyzer # Language server for Rust
|
|
||||||
clippy # Linter for Rust
|
|
||||||
rustfmt # Formatter for Rust code
|
|
||||||
;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
my.dev.rust = {
|
|
||||||
enable = lib.mkEnableOption "Install Rust tooling globally";
|
|
||||||
users = lib.mkOption {
|
|
||||||
type = inputs.self.lib.usersOptionType lib;
|
|
||||||
default = config.my.toggleUsers.dev;
|
|
||||||
description = "Users to install Rust packages for";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
devShells.rust = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = pkgs.mkShell {
|
|
||||||
inherit packages;
|
|
||||||
name = "rust-dev-shell";
|
|
||||||
shellHook = ''
|
|
||||||
echo "🦀 Rust dev environment"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
description = "Rust development shell with cargo and rust-analyzer";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkMerge [
|
|
||||||
(lib.mkIf config.my.dev.rust.enable {
|
|
||||||
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.rust.users { inherit packages; };
|
|
||||||
})
|
|
||||||
{
|
|
||||||
environment.variables.CARGO_HOME = "\${XDG_DATA_HOME}/cargo";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
22
modules/dev/rust/common.nix
Normal file
22
modules/dev/rust/common.nix
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{ pkgs }:
|
||||||
|
let
|
||||||
|
packages = builtins.attrValues {
|
||||||
|
inherit (pkgs)
|
||||||
|
rustc
|
||||||
|
cargo
|
||||||
|
rust-analyzer
|
||||||
|
clippy
|
||||||
|
rustfmt
|
||||||
|
;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit packages;
|
||||||
|
devShell = pkgs.mkShell {
|
||||||
|
inherit packages;
|
||||||
|
name = "rust-dev-shell";
|
||||||
|
shellHook = ''
|
||||||
|
echo "🦀 Rust dev environment"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
35
modules/dev/rust/home.nix
Normal file
35
modules/dev/rust/home.nix
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
osConfig ? null,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
hm = inputs.self.lib.hmModule {
|
||||||
|
inherit
|
||||||
|
config
|
||||||
|
inputs
|
||||||
|
osConfig
|
||||||
|
;
|
||||||
|
optionPath = [
|
||||||
|
"dev"
|
||||||
|
"rust"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
cfg = config.my.dev.rust;
|
||||||
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.dev.rust.enable = lib.mkEnableOption "Install Rust tooling globally";
|
||||||
|
config = lib.mkMerge [
|
||||||
|
{
|
||||||
|
my.dev.rust.enable = lib.mkDefault hm.enabledByDefault;
|
||||||
|
}
|
||||||
|
(lib.mkIf cfg.enable {
|
||||||
|
home.packages = feature.packages;
|
||||||
|
home.sessionVariables.CARGO_HOME = "${config.xdg.dataHome}/cargo";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
27
modules/dev/rust/nixos.nix
Normal file
27
modules/dev/rust/nixos.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
my.dev.rust = {
|
||||||
|
enable = lib.mkEnableOption "Install Rust tooling globally";
|
||||||
|
users = lib.mkOption {
|
||||||
|
type = inputs.self.lib.usersOptionType lib;
|
||||||
|
default = config.my.toggleUsers.dev;
|
||||||
|
description = "Users to install Rust packages for";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
devShells.rust = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
default = feature.devShell;
|
||||||
|
description = "Rust development shell with cargo and rust-analyzer";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
19
modules/dev/zig/common.nix
Normal file
19
modules/dev/zig/common.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{ pkgs }:
|
||||||
|
let
|
||||||
|
packages = builtins.attrValues {
|
||||||
|
inherit (pkgs)
|
||||||
|
zig
|
||||||
|
zls
|
||||||
|
;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit packages;
|
||||||
|
devShell = pkgs.mkShell {
|
||||||
|
inherit packages;
|
||||||
|
name = "zig-dev-shell";
|
||||||
|
shellHook = ''
|
||||||
|
echo "🦎 Zig dev environment"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
34
modules/dev/zig/home.nix
Normal file
34
modules/dev/zig/home.nix
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
osConfig ? null,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
hm = inputs.self.lib.hmModule {
|
||||||
|
inherit
|
||||||
|
config
|
||||||
|
inputs
|
||||||
|
osConfig
|
||||||
|
;
|
||||||
|
optionPath = [
|
||||||
|
"dev"
|
||||||
|
"zig"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
cfg = config.my.dev.zig;
|
||||||
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.dev.zig.enable = lib.mkEnableOption "Install Zig tooling globally";
|
||||||
|
config = lib.mkMerge [
|
||||||
|
{
|
||||||
|
my.dev.zig.enable = lib.mkDefault hm.enabledByDefault;
|
||||||
|
}
|
||||||
|
(lib.mkIf cfg.enable {
|
||||||
|
home.packages = feature.packages;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -6,12 +6,7 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
packages = builtins.attrValues {
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
inherit (pkgs)
|
|
||||||
zig # Zig compiler and stdlib
|
|
||||||
zls # Language server for Zig
|
|
||||||
;
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
@@ -25,17 +20,8 @@ in
|
|||||||
};
|
};
|
||||||
devShells.zig = lib.mkOption {
|
devShells.zig = lib.mkOption {
|
||||||
type = lib.types.package;
|
type = lib.types.package;
|
||||||
default = pkgs.mkShell {
|
default = feature.devShell;
|
||||||
inherit packages;
|
|
||||||
name = "zig-dev-shell";
|
|
||||||
shellHook = ''
|
|
||||||
echo "🦎 Zig dev environment"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
description = "Zig development shell with compiler and LSP";
|
description = "Zig development shell with compiler and LSP";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = lib.mkIf config.my.dev.zig.enable {
|
|
||||||
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.zig.users { inherit packages; };
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
20
modules/shell/config/home.nix
Normal file
20
modules/shell/config/home.nix
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
osConfig ? null,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
shellType = inputs.self.lib.hmShellType osConfig "bash";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.shell.type = lib.mkOption {
|
||||||
|
type = lib.types.enum [
|
||||||
|
"bash"
|
||||||
|
"zsh"
|
||||||
|
];
|
||||||
|
default = "bash";
|
||||||
|
description = "The shell to use in Home Manager";
|
||||||
|
};
|
||||||
|
config.my.shell.type = lib.mkDefault shellType;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user