dev modules

This commit is contained in:
Sakooooo 2023-07-09 14:44:29 +03:00
parent 341b40d02d
commit da871dabf3
Signed by: sako
GPG key ID: 3FD715D87D7725E0
6 changed files with 80 additions and 7 deletions

View file

@ -8,6 +8,7 @@
./hardware-configuration.nix
../../default.nix
];
# required for hostname specific configurations
networking.hostName = "sakotop"; # Define your hostname.
@ -39,6 +40,10 @@
editors = {
nvim.enable = true;
};
cc.enable = true;
javascript.enable = true;
python.enable = true;
rust.enable = true;
};
shell = {
nix = {
@ -63,13 +68,6 @@
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" ]; # Enable sudo for the user.
packages = with pkgs; [
gcc
python3
python310Packages.pip
rustup
cargo
nodejs
yarn
newsboat
];
};

20
modules/dev/cc.nix Normal file
View file

@ -0,0 +1,20 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.dev.cc;
in
{
options.modules.dev.cc = {
enable = mkEnableOption false;
};
config = mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
gcc
gnumake
cmake
clang
gdb
];
};
}

View file

@ -1,5 +1,9 @@
{
imports = [
./editors
./cc.nix
./javascript.nix
./python.nix
./rust.nix
];
}

View file

@ -0,0 +1,17 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.dev.javascript;
in
{
options.modules.dev.javascript = {
enable = mkEnableOption false;
};
config = mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
nodejs
yarn
];
};
}

17
modules/dev/python.nix Normal file
View file

@ -0,0 +1,17 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.dev.python;
in
{
options.modules.dev.python = {
enable = mkEnableOption false;
};
config = mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
python3
python310Packages.pip
];
};
}

17
modules/dev/rust.nix Normal file
View file

@ -0,0 +1,17 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.dev.rust;
in
{
options.modules.dev.rust= {
enable = mkEnableOption false;
};
config = mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
rustup
cargo
];
};
}