From cbdeb114b0fd37aa0f6438fc8511158aa55f343b Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Mon, 24 Mar 2025 00:26:29 +0800 Subject: [PATCH] feat(comma): add comma and nix-index-database --- flake.lock | 21 +++++++++++++++++++++ flake.nix | 24 +++++++++++++----------- systems/modules/common.nix | 4 ++++ 3 files changed, 38 insertions(+), 11 deletions(-) diff --git a/flake.lock b/flake.lock index 2f70da1..262c3c9 100644 --- a/flake.lock +++ b/flake.lock @@ -985,6 +985,26 @@ "type": "github" } }, + "nix-index-database": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1742701275, + "narHash": "sha256-AulwPVrS9859t+eJ61v24wH/nfBEIDSXYxlRo3fL/SA=", + "owner": "nix-community", + "repo": "nix-index-database", + "rev": "36dc43cb50d5d20f90a28d53abb33a32b0a2aae6", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-index-database", + "type": "github" + } + }, "nixd": { "inputs": { "flake-parts": "flake-parts", @@ -1331,6 +1351,7 @@ "hyprland-plugins": "hyprland-plugins", "hyprlock": "hyprlock", "impermanence": "impermanence", + "nix-index-database": "nix-index-database", "nixd": "nixd", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_4", diff --git a/flake.nix b/flake.nix index 5779a4f..9b5063b 100644 --- a/flake.nix +++ b/flake.nix @@ -40,17 +40,17 @@ specialArgs = args; modules = [ ./systems/mellinoe.nix - home-manager.nixosModules.home-manager - { - home-manager = { - useGlobalPkgs = true; # inherit the nixpkgs and its config - useUserPackages = true; - extraSpecialArgs = args; - users.rafiq.imports = [ - ./users/rafiq.nix - ]; - }; - } + home-manager.nixosModules.home-manager + { + home-manager = { + useGlobalPkgs = true; # inherit the nixpkgs and its config + useUserPackages = true; + extraSpecialArgs = args; + users.rafiq.imports = [ + ./users/rafiq.nix + ]; + }; + } ]; }; }; @@ -77,5 +77,7 @@ disko.url = "github:nix-community/disko/latest"; disko.inputs.nixpkgs.follows = "nixpkgs"; impermanence.url = "github:nix-community/impermanence"; + nix-index-database.url = "github:nix-community/nix-index-database"; + nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; }; } diff --git a/systems/modules/common.nix b/systems/modules/common.nix index af52fc4..6e2a540 100644 --- a/systems/modules/common.nix +++ b/systems/modules/common.nix @@ -1,4 +1,5 @@ { + inputs, pkgs, config, ... @@ -9,6 +10,7 @@ ./shell.nix ./stylix.nix ./sops.nix + inputs.nix-index-database.nixosModules.nix-index ]; users.mutableUsers = false; # Always reset users on system activation @@ -70,4 +72,6 @@ dates = "daily"; options = "-d"; }; + + programs.nix-index-database.comma.enable = true; }