Commit 49e394f7846c

Vincent Demeester <vincent@sbr.pm>
2022-08-22 12:00:49
systems/wakasu: enable and add basic dev modules
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 7d19094
Changed files (7)
systems/hosts/wakasu.nix
@@ -76,8 +76,9 @@ in
     desktop = {
       wayland.sway.enable = true;
     };
-    # dev = {
-    # };
+    dev = {
+      enable = true;
+    };
     profiles = {
       #   home = true;
       work.redhat = true;
systems/modules/dev/base.nix
@@ -0,0 +1,26 @@
+{ config, lib, pkgs, ... }:
+
+let
+  cfg = config.modules.dev;
+  inherit (lib) mkEnableOption mkIf;
+in
+{
+  options = {
+    modules.dev = {
+      enable = mkEnableOption "Mark this machine as a dev machine";
+    };
+  };
+  config = mkIf cfg.enable {
+    # Dev means Emacs ๐Ÿ™ƒ
+    modules.editors.emacs.enable = true;
+    # Enable lorri (to handle nix shells)
+    services.lorri.enable = true;
+    environment.systemPackages = with pkgs; [
+      git # will probably be enabled otherwise but still
+      tig
+      grc
+      ripgrep
+      gnumake
+    ];
+  };
+}
systems/modules/dev/default.nix
@@ -0,0 +1,5 @@
+{
+  imports = [
+    ./base.nix
+  ];
+}
users/vincent/dev/mr/src.mr
@@ -25,3 +25,15 @@ skip = true
 [gitlab.com]
 chain = true
 skip = true
+
+[home]
+checkout =
+    git clone https://git.sr.ht/~vdemeester/home
+    cd home
+    git remote set-url --add --push origin git@git.sr.ht:~vdemeester/home
+
+[www]
+checkout =
+    git clone https://git.sr.ht/~vdemeester/www
+    cd home
+    git remote set-url --add --push origin git@git.sr.ht:~vdemeester/www
users/vincent/dev/default.nix
@@ -2,7 +2,7 @@
 
 {
   imports = [
-    ./emacs.nix
+    # ./emacs.nix
     ./go.nix
     ./js.nix
     ./lisp.nix
@@ -40,6 +40,7 @@
     '';
   };
 
+  # FIXME move this to a "work.redhat" configuration.
   # Upstream Tekton
   home.file."src/tektoncd/.envrc".source = ./src/tektoncd.envrc;
   home.file."src/tektoncd/shell.nix".source = ./src/tektoncd.shell.nix;
users/vincent/default.nix
@@ -74,6 +74,9 @@ in
       ++ optionals config.modules.editors.emacs.enable [
         (import ./dev/emacs.nix)
       ]
+      ++ optionals config.modules.dev.enable [
+        (import ./dev)
+      ]
       ++ optionals config.modules.desktop.enable [ (import ./desktop) ]
       ++ optionals config.profiles.dev.enable [
         (import ./dev)
flake.nix
@@ -127,6 +127,7 @@
           # Common modules
           ./systems/modules/core/default.nix
           ./systems/modules/desktop/default.nix
+          ./systems/modules/dev/default.nix
           ./systems/modules/editors/default.nix
           ./systems/modules/hardware/default.nix
           ./systems/modules/profiles/default.flake.nix # TODO: rename