first version
This commit is contained in:
parent
a75b303a94
commit
77e9e90c6d
9 changed files with 90 additions and 45 deletions
|
@ -19,6 +19,7 @@
|
|||
work-ntb = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./nixosModules
|
||||
./hosts/work-ntb
|
||||
inputs.nix-flatpak.nixosModules.nix-flatpak
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
../${hostname}/hardware-configuration.nix
|
||||
../../modules/dev
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
|
|
|
@ -4,7 +4,13 @@
|
|||
];
|
||||
|
||||
# My own modules configuration
|
||||
krop.devtools.installIDE = true;
|
||||
krop = {
|
||||
ide = {
|
||||
enable = true;
|
||||
install-pycharm = true;
|
||||
};
|
||||
python.install-older = true;
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
{ config, pkgs, lib, ... }@inputs:
|
||||
let
|
||||
cfg = config.krop.devtools;
|
||||
in {
|
||||
options.krop.devtools = {
|
||||
installIDE = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether to install the ides";
|
||||
};
|
||||
installTools = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
example = true;
|
||||
description = "Whether to install the most used tools";
|
||||
};
|
||||
};
|
||||
config = let
|
||||
ides = with pkgs; [
|
||||
jetbrains.pycharm-professional
|
||||
zed-editor
|
||||
vscodium
|
||||
];
|
||||
languages = with pkgs; [
|
||||
python3
|
||||
python311
|
||||
python310
|
||||
poetry
|
||||
];
|
||||
tools = with pkgs; [
|
||||
lazygit
|
||||
lazydocker
|
||||
micro-with-wl-clipboard
|
||||
albert
|
||||
openssl_3_3
|
||||
];
|
||||
in {
|
||||
environment.systemPackages = languages
|
||||
++ (lib.optionals cfg.installIDE ides)
|
||||
++ (lib.optionals cfg.installTools tools);
|
||||
};
|
||||
}
|
6
nixosModules/default.nix
Normal file
6
nixosModules/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{...}:
|
||||
{
|
||||
imports = [
|
||||
./dev
|
||||
];
|
||||
}
|
29
nixosModules/dev/default.nix
Normal file
29
nixosModules/dev/default.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ config, pkgs, lib, ... }@inputs:
|
||||
let
|
||||
cfg = config.krop.devtools;
|
||||
in {
|
||||
imports = [
|
||||
./python.nix
|
||||
./ide.nix
|
||||
];
|
||||
options.krop.devtools = {
|
||||
installTools = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
example = true;
|
||||
description = "Whether to install the most used tools";
|
||||
};
|
||||
};
|
||||
|
||||
config = let
|
||||
tools = with pkgs; [
|
||||
lazygit
|
||||
lazydocker
|
||||
micro-with-wl-clipboard
|
||||
albert
|
||||
openssl_3_3
|
||||
];
|
||||
in {
|
||||
environment.systemPackages = tools;
|
||||
};
|
||||
}
|
0
nixosModules/dev/go.nix
Normal file
0
nixosModules/dev/go.nix
Normal file
23
nixosModules/dev/ide.nix
Normal file
23
nixosModules/dev/ide.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
cfg = config.krop.ide;
|
||||
in {
|
||||
options.krop.ide = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = lib.mkOptionDefault true;
|
||||
example = true;
|
||||
};
|
||||
install-pycharm = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = lib.mkOptionDefault false;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
zed-editor
|
||||
vscodium
|
||||
] ++ lib.optionals cfg.install-pycharm [pkgs.jetbrains.pycharm-professional];
|
||||
};
|
||||
}
|
24
nixosModules/dev/python.nix
Normal file
24
nixosModules/dev/python.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
cfg = config.krop.python;
|
||||
in {
|
||||
options.krop.python = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = lib.mkOptionDefault false;
|
||||
example = true;
|
||||
};
|
||||
install-older = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = lib.mkOptionDefault true;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
python3
|
||||
poetry
|
||||
] ++ lib.optionals cfg.install-older [python311 python310];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue