home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 926c46571914857dfcb612e913306d29de2ca0a6
parent 002befb915f019eeb6f26a69fe143edf05f0ba8f
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Thu,  1 Nov 2018 14:22:27 +0100

profiles: add a dev.go profile

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Ddev.go.nix | 34----------------------------------
Mhokkaido.nix | 2+-
Mhonshu.nix | 2+-
Mmodules/module-list.nix | 1+
Amodules/profiles/dev.go.nix | 53+++++++++++++++++++++++++++++++++++++++++++++++++++++
Mremote-dev.nix | 3+--
Mshikoku.nix | 5++---
Mshikoku.win.nix | 4+---
Mwakasu.nix | 3+--
9 files changed, 61 insertions(+), 46 deletions(-)

diff --git a/dev.go.nix b/dev.go.nix @@ -1,34 +0,0 @@ -{ pkgs, prefix, ... }: - -{ - profiles.dev.enable = true; - xdg.configFile."fish/conf.d/go.fish".source = ./modules/profiles/assets/fish/go.fish; - programs.fish.shellAbbrs = { - got = "go test -v"; - gob = "go build -v"; - gol = "golangci-lint run"; - }; - home.packages = with pkgs; [ - go - gcc - # tools - gotools - golint - godef - gocode - gotests - gopkgs - gomodifytags - go-outline - go-symbols - goconvey - delve - # vendoring tools - vndr - dep - dep-collector - # misc - protobuf - protobuild - ]; -} diff --git a/hokkaido.nix b/hokkaido.nix @@ -4,7 +4,6 @@ imports = [ ./desktop.nix # dev - ./dev.go.nix ./dev.python.nix ./dev.js.nix ./vscode.nix @@ -13,6 +12,7 @@ ./kubernetes.nix ]; profiles.laptop.enable = true; + profiles.dev.go.enable = true; home.packages = with pkgs; [ google-chrome ]; diff --git a/honshu.nix b/honshu.nix @@ -3,8 +3,8 @@ { imports = [ ./server.nix - ./dev.go.nix ]; + profiles.dev.go.enable = true; xdg.configFile."ape.conf".source = ./ape.conf; home.packages = with pkgs; [ youtube-dl diff --git a/modules/module-list.nix b/modules/module-list.nix @@ -5,6 +5,7 @@ ./profiles/bash.nix ./profiles/desktop.nix ./profiles/dev.nix + ./profiles/dev.go.nix ./profiles/emacs.nix ./profiles/fish.nix ./profiles/git.nix diff --git a/modules/profiles/dev.go.nix b/modules/profiles/dev.go.nix @@ -0,0 +1,53 @@ +{ config, lib, pkgs, ... }: + +with lib; +let + cfg = config.profiles.dev.go; +in +{ + options = { + profiles.dev.go = { + enable = mkOption { + default = false; + description = "Enable go development profile"; + type = types.bool; + }; + }; + }; + config = mkIf cfg.enable (mkMerge [ + { + profiles.dev.enable = true; + home.packages = with pkgs; [ + go + gcc + # tools + gotools + golint + godef + gocode + gotests + gopkgs + gomodifytags + go-outline + go-symbols + goconvey + delve + # vendoring tools + vndr + dep + dep-collector + # misc + protobuf + protobuild + ]; + } + (mkIf config.profiles.fish.enable { + xdg.configFile."fish/conf.d/go.fish".source = ./assets/fish/go.fish; + programs.fish.shellAbbrs = { + got = "go test -v"; + gob = "go build -v"; + gol = "golangci-lint run"; + }; + }) + ]); +} diff --git a/remote-dev.nix b/remote-dev.nix @@ -2,11 +2,10 @@ { imports = [ - ./fish.nix ./base.nix - ./dev.go.nix ./dev.js.nix ./dev.rust.nix ]; + profiles.dev.go.enable = true; manual.manpages.enable = false; } diff --git a/shikoku.nix b/shikoku.nix @@ -2,20 +2,19 @@ { imports = [ + ./desktop.nix ./gaming.nix ./devops.nix - ./dev.go.nix ./dev.rust.nix ./dev.python.nix ./dev.js.nix ./dev.java.nix ./dev.haskell.nix - ./fish.nix ./openshift.nix - ./ssh.nix ./vscode.nix ]; profiles.desktop.enable = true; + profiles.dev.go.enable = true; xdg.configFile."fish/conf.d/docker.fish".text = '' set -gx DOCKER_BUILDKIT 1 ''; diff --git a/shikoku.win.nix b/shikoku.win.nix @@ -3,9 +3,7 @@ { imports = [ ./base.nix - ./dev.go.nix - ./fish.nix - ./ssh.nix ]; + profiles.dev.go.enable = true; home.packages = with pkgs; [ docker ]; } diff --git a/wakasu.nix b/wakasu.nix @@ -4,17 +4,16 @@ imports = [ ./desktop.nix ./devops.nix - ./dev.go.nix ./dev.rust.nix ./dev.python.nix ./dev.js.nix ./dev.java.nix ./dev.haskell.nix ./openshift.nix - ./ssh.nix ./vscode.nix ]; profiles.laptop.enable = true; + profiles.dev.go.enable = true; xdg.configFile."fish/conf.d/docker.fish".text = '' set -gx DOCKER_BUILDKIT 1 '';