Commit 09b8ae0c319e

Vincent Demeester <vincent@sbr.pm>
2019-03-24 14:50:31
profiles: add fincances profile with ledger ๐Ÿ’ƒ
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 673106d
Changed files (4)
machines/hokkaido.nix
@@ -10,6 +10,7 @@
     rust.enable = true;
     java = { enable = true; javaPackage = pkgs.jre; };
   };
+  profiles.finances.enable = true;
   profiles.laptop.enable = true;
   profiles.media.enable = true;
   profiles.mails = {
@@ -18,7 +19,6 @@
   };
   programs.podman.enable = true;
   home.packages = with pkgs; [
-    ledger
     slack
   ];
 }
machines/wakasu.nix
@@ -20,6 +20,7 @@
     rust.enable = true;
     vscode.enable = true;
   };
+  profiles.finances.enable = true;
   profiles.laptop.enable = true;
   profiles.media.enable = true;
   profiles.mails.enable = true;
modules/profiles/finances.nix
@@ -0,0 +1,20 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+let
+  cfg = config.profiles.finances;
+in
+{
+  options = {
+    profiles.finances = {
+      enable = mkOption {
+        default = false;
+        description = "Enable fincances profile";
+        type = types.bool;
+      };
+    };
+  };
+  config = mkIf cfg.enable {
+    home.packages = with pkgs; [ ledger ];
+  };
+}
modules/module-list.nix
@@ -12,6 +12,7 @@
     ./profiles/dev.rust.nix
     ./profiles/docker.nix
     ./profiles/emacs.nix
+    ./profiles/finances.nix
     ./profiles/fish.nix
     ./profiles/gaming.nix
     ./profiles/gcloud.nix