commit e011d067a3cb7177829e6fed2923b85035b82f0b
parent 8b495cddbed23e8fee059e9970ec5da72241be8b
Author: Vincent Demeester <vincent@sbr.pm>
Date: Thu, 1 Nov 2018 15:42:18 +0100
profiles.dev: add java, js, python and rust
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
13 files changed, 131 insertions(+), 59 deletions(-)
diff --git a/dev.java.nix b/dev.java.nix
@@ -1,9 +0,0 @@
-{ pkgs, prefix, ... }:
-
-{
- profiles.dev.enable = true;
- home.packages = with pkgs; [
- jdk
- gradle
- ];
-}
diff --git a/dev.js.nix b/dev.js.nix
@@ -1,15 +0,0 @@
-{ pkgs, prefix, ... }:
-
-{
- profiles.dev.enable = true;
- home.file.".npmrc".text = ''
- prefix = ~/.local/npm
- '';
- xdg.configFile."fish/conf.d/js.fish".text = ''
- set -gx PATH $HOME/.local/npm/bin $PATH
- '';
- home.packages = with pkgs; [
- nodejs-10_x
- yarn
- ];
-}
diff --git a/dev.python.nix b/dev.python.nix
@@ -1,12 +0,0 @@
-{ pkgs, prefix, ... }:
-
-{
- profiles.dev.enable = true;
- home.packages = with pkgs; [
- python3
- python36Packages.virtualenv
- python36Packages.pip-tools
- python36Packages.tox
- pipenv
- ];
-}
diff --git a/dev.rust.nix b/dev.rust.nix
@@ -1,8 +0,0 @@
-{ pkgs, prefix, ... }:
-
-{
- profiles.dev.enable = true;
- home.packages = with pkgs; [
- rustup
- ];
-}
diff --git a/hokkaido.nix b/hokkaido.nix
@@ -3,15 +3,17 @@
{
imports = [
./desktop.nix
- # dev
- ./dev.python.nix
- ./dev.js.nix
# k8s
./containers.nix
./kubernetes.nix
];
profiles.laptop.enable = true;
- profiles.dev.go.enable = true;
+ profiles.dev = {
+ go.enable = true;
+ js.enable = true;
+ python.enable = true;
+ rust.enable = true;
+ };
programs.vscode.enable = true;
home.packages = with pkgs; [
google-chrome
diff --git a/modules/module-list.nix b/modules/module-list.nix
@@ -6,6 +6,11 @@
./profiles/desktop.nix
./profiles/dev.nix
./profiles/dev.go.nix
+ ./profiles/dev.haskell.nix
+ ./profiles/dev.java.nix
+ ./profiles/dev.js.nix
+ ./profiles/dev.python.nix
+ ./profiles/dev.rust.nix
./profiles/emacs.nix
./profiles/fish.nix
./profiles/git.nix
diff --git a/modules/profiles/dev.java.nix b/modules/profiles/dev.java.nix
@@ -0,0 +1,24 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+let
+ cfg = config.profiles.dev.java;
+in
+{
+ options = {
+ profiles.dev.java = {
+ enable = mkOption {
+ default = false;
+ description = "Enable java development profile";
+ type = types.bool;
+ };
+ };
+ };
+ config = mkIf cfg.enable {
+ profiles.dev.enable = true;
+ home.packages = with pkgs; [
+ jdk
+ gradle
+ ];
+ };
+}
diff --git a/modules/profiles/dev.js.nix b/modules/profiles/dev.js.nix
@@ -0,0 +1,33 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+let
+ cfg = config.profiles.dev.js;
+in
+{
+ options = {
+ profiles.dev.js = {
+ enable = mkOption {
+ default = false;
+ description = "Enable js development profile";
+ type = types.bool;
+ };
+ };
+ };
+ config = mkIf cfg.enable (mkMerge [
+ {
+ home.file.".npmrc".text = ''
+ prefix = ~/.local/npm
+ '';
+ home.packages = with pkgs; [
+ nodejs-10_x
+ yarn
+ ];
+ }
+ (mkIf config.profiles.fish.enable {
+ xdg.configFile."fish/conf.d/js.fish".text = ''
+ set -gx PATH $HOME/.local/npm/bin $PATH
+ '';
+ })
+ ]);
+}
diff --git a/modules/profiles/dev.python.nix b/modules/profiles/dev.python.nix
@@ -0,0 +1,27 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+let
+ cfg = config.profiles.dev.python;
+in
+{
+ options = {
+ profiles.dev.python = {
+ enable = mkOption {
+ default = false;
+ description = "Enable python development profile";
+ type = types.bool;
+ };
+ };
+ };
+ config = mkIf cfg.enable {
+ profiles.dev.enable = true;
+ home.packages = with pkgs; [
+ python3
+ python36Packages.virtualenv
+ python36Packages.pip-tools
+ python36Packages.tox
+ pipenv
+ ];
+ };
+}
diff --git a/modules/profiles/dev.rust.nix b/modules/profiles/dev.rust.nix
@@ -0,0 +1,23 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+let
+ cfg = config.profiles.dev.rust;
+in
+{
+ options = {
+ profiles.dev.rust = {
+ enable = mkOption {
+ default = false;
+ description = "Enable rust development profile";
+ type = types.bool;
+ };
+ };
+ };
+ config = mkIf cfg.enable {
+ profiles.dev.enable = true;
+ home.packages = with pkgs; [
+ rustup
+ ];
+ };
+}
diff --git a/remote-dev.nix b/remote-dev.nix
@@ -3,9 +3,11 @@
{
imports = [
./base.nix
- ./dev.js.nix
- ./dev.rust.nix
];
- profiles.dev.go.enable = true;
+ profiles.dev = {
+ go.enable = true;
+ js.enable = true;
+ rust.enable = true;
+ };
manual.manpages.enable = false;
}
diff --git a/shikoku.nix b/shikoku.nix
@@ -5,16 +5,16 @@
./desktop.nix
./gaming.nix
./devops.nix
- ./dev.rust.nix
- ./dev.python.nix
- ./dev.js.nix
- ./dev.java.nix
./openshift.nix
];
profiles.desktop.enable = true;
profiles.dev = {
go.enable = true;
haskell.enable = true;
+ java.enable = true;
+ js.enable = true;
+ python.enable = true;
+ rust.enable = true;
};
programs.vscode.enable = true;
xdg.configFile."fish/conf.d/docker.fish".text = ''
diff --git a/wakasu.nix b/wakasu.nix
@@ -4,16 +4,16 @@
imports = [
./desktop.nix
./devops.nix
- ./dev.rust.nix
- ./dev.python.nix
- ./dev.js.nix
- ./dev.java.nix
./openshift.nix
];
profiles.laptop.enable = true;
profiles.dev = {
go.enable = true;
+ java.enable = true;
+ js.enable = true;
haskell.enable = true;
+ python.enable = true;
+ rust.enable = true;
};
programs.vscode.enable = true;
xdg.configFile."fish/conf.d/docker.fish".text = ''