❄ Personal NixOS Flake Manager
nixos home-manager go nix
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: pure home-manager configuration

Fuwn 1b3449f1 e7608534

+80 -8
+41 -7
README.md
··· 11 11 - `rui home news` - Show the latest news from your Home Manager configuration 12 12 packages 13 13 14 - Rui checks the `FLAKE` environment variable for the path to your flake 15 - directory. 16 - 17 - Rui looks at the `FLAKE_EDITOR` environment variable for the editor to use when 18 - opening the flake directory, but falls back to `EDITOR` if it isn't set. 19 - 20 14 ## Installation 21 15 22 16 ### Add to Flake Inputs (for Flakes Users) ··· 30 24 } 31 25 ``` 32 26 33 - ### Add to System or Home Manager Packages 27 + ### Add to Home Manager (Managed Configuration) 28 + 29 + This method manages the configuration for you with Nix. 30 + 31 + ```nix 32 + # ... 33 + 34 + inputs.home-manager.lib.homeManagerConfiguration { 35 + modules = [ 36 + inputs.rui.homeManagerModules.${builtins.currentSystem}.default 37 + ]; 38 + }; 39 + 40 + # ... 41 + ``` 42 + 43 + ### Configure Rui Using Home Manager 44 + 45 + ```nix 46 + { 47 + programs.rui = { 48 + enable = true; 49 + 50 + settings = { 51 + # Status notifications via `notify-send` 52 + notify = true; 53 + 54 + # Rui falls back on the `FLAKE_EDITOR` and `EDITOR` environment variables 55 + editor = "code"; 56 + 57 + # Rui falls back on the `FLAKE` environment variable 58 + flake = "/path/to/your-flake"; 59 + }; 60 + }; 61 + } 62 + ``` 63 + 64 + ### Add to System or Home Manager Packages (Manual Configuration) 65 + 66 + Using this method, configuration is done manually by the user in the 67 + `$HOME/.config/rui/config.json` file. 34 68 35 69 ```nix 36 70 # For flakes users
+39 -1
flake.nix
··· 33 33 { 34 34 packages.default = pkgs.buildGoModule { 35 35 pname = "rui"; 36 - version = "2024-09-16"; 36 + version = "2024.09.17"; 37 37 src = pkgs.lib.cleanSource ./.; 38 38 vendorHash = "sha256-mN/QjzJ4eGfbW1H92cCKvC0wDhCR6IUes2HCZ5YBdPA="; 39 39 ··· 70 70 71 71 buildInputs = self.checks.${system}.pre-commit-check.enabledPackages; 72 72 }; 73 + 74 + homeManagerModules.default = 75 + { config, ... }: 76 + with pkgs.lib; 77 + { 78 + options.programs.rui = { 79 + enable = mkOption { 80 + type = types.bool; 81 + default = false; 82 + }; 83 + 84 + settings = { 85 + editor = mkOption { 86 + type = types.str; 87 + default = ""; 88 + }; 89 + 90 + notify = mkOption { 91 + type = types.bool; 92 + default = false; 93 + }; 94 + 95 + flake = mkOption { 96 + type = types.str; 97 + default = ""; 98 + }; 99 + }; 100 + }; 101 + 102 + config = mkIf config.programs.rui.enable { 103 + home.packages = [ 104 + self.packages.${system}.default 105 + pkgs.libnotify 106 + ]; 107 + 108 + xdg.configFile."rui/config.json".text = builtins.toJSON config.programs.rui.settings; 109 + }; 110 + }; 73 111 } 74 112 ); 75 113 }