aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-09-18 01:14:11 +0000
committerFuwn <[email protected]>2024-09-18 01:14:11 +0000
commit1b3449f11615df7c6dd6f31643728c0ddd2f08d4 (patch)
tree5637d1061413b8b32242a25211e245178b0d15b3 /flake.nix
parentfeat(rui): editor and flake file configuration (diff)
downloadrui-1b3449f11615df7c6dd6f31643728c0ddd2f08d4.tar.xz
rui-1b3449f11615df7c6dd6f31643728c0ddd2f08d4.zip
feat: pure home-manager configuration
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix40
1 files changed, 39 insertions, 1 deletions
diff --git a/flake.nix b/flake.nix
index 415469b..557efdc 100644
--- a/flake.nix
+++ b/flake.nix
@@ -33,7 +33,7 @@
{
packages.default = pkgs.buildGoModule {
pname = "rui";
- version = "2024-09-16";
+ version = "2024.09.17";
src = pkgs.lib.cleanSource ./.;
vendorHash = "sha256-mN/QjzJ4eGfbW1H92cCKvC0wDhCR6IUes2HCZ5YBdPA=";
@@ -70,6 +70,44 @@
buildInputs = self.checks.${system}.pre-commit-check.enabledPackages;
};
+
+ homeManagerModules.default =
+ { config, ... }:
+ with pkgs.lib;
+ {
+ options.programs.rui = {
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ };
+
+ settings = {
+ editor = mkOption {
+ type = types.str;
+ default = "";
+ };
+
+ notify = mkOption {
+ type = types.bool;
+ default = false;
+ };
+
+ flake = mkOption {
+ type = types.str;
+ default = "";
+ };
+ };
+ };
+
+ config = mkIf config.programs.rui.enable {
+ home.packages = [
+ self.packages.${system}.default
+ pkgs.libnotify
+ ];
+
+ xdg.configFile."rui/config.json".text = builtins.toJSON config.programs.rui.settings;
+ };
+ };
}
);
}