mirror of
https://github.com/kaesaecracker/nixos-configuration.git
synced 2025-01-18 10:30:14 +01:00
add builttools as an option
This commit is contained in:
parent
04ccf5cdd4
commit
026f592b17
40
modules/buildtools.nix
Normal file
40
modules/buildtools.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.my.buildtools;
|
||||
in {
|
||||
options.my.buildtools = {
|
||||
native = lib.mkEnableOption "include native build tools";
|
||||
dotnet = lib.mkEnableOption "include dotnet build tools";
|
||||
rust = lib.mkEnableOption "include rust build tools";
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf cfg.native
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
cmake
|
||||
gnumake
|
||||
gcc
|
||||
gdb
|
||||
];
|
||||
})
|
||||
(lib.mkIf cfg.dotnet {
|
||||
environment.systemPackages = with pkgs; [
|
||||
dotnet-sdk_8
|
||||
];
|
||||
})
|
||||
(lib.mkIf cfg.rust {
|
||||
environment.systemPackages = with pkgs; [
|
||||
cargo
|
||||
rustc
|
||||
rustfmt
|
||||
clippy
|
||||
cargo-generate
|
||||
];
|
||||
})
|
||||
];
|
||||
}
|
|
@ -7,6 +7,7 @@ modulesCfg: {lib, ...}: {
|
|||
./server.nix
|
||||
./sshd.nix
|
||||
./tailscale.nix
|
||||
./buildtools.nix
|
||||
]
|
||||
++ (map (path: (import path modulesCfg)) [
|
||||
./hardware
|
||||
|
|
|
@ -26,16 +26,7 @@ in
|
|||
screen
|
||||
kdiff3
|
||||
youtube-music
|
||||
|
||||
jetbrains-toolbox
|
||||
dotnet-sdk_8
|
||||
|
||||
cargo
|
||||
rustc
|
||||
gcc
|
||||
rustfmt
|
||||
clippy
|
||||
cargo-generate
|
||||
];
|
||||
|
||||
programs = {
|
||||
|
|
|
@ -15,6 +15,11 @@
|
|||
enableGaming = true;
|
||||
enablePrinting = true;
|
||||
};
|
||||
buildtools = {
|
||||
native = true;
|
||||
dotnet = true;
|
||||
rust = true;
|
||||
};
|
||||
};
|
||||
|
||||
users.users.vinzenz.openssh.authorizedKeys.keys = [
|
||||
|
|
Loading…
Reference in a new issue