From 423030d81c93e97d13752e81bd4989b8ab64747d Mon Sep 17 00:00:00 2001 From: Frantisek Bohacek Date: Sat, 14 Oct 2023 11:39:13 +0200 Subject: [PATCH] feat: add auto regenerated nix-index-database --- flake.lock | 21 +++++++++++++++++++++ flake.nix | 11 ++++++++--- hosts/configuration.nix | 2 ++ hosts/default.nix | 5 ++++- hosts/home.nix | 4 +--- 5 files changed, 36 insertions(+), 7 deletions(-) diff --git a/flake.lock b/flake.lock index fcda0be..fccb53f 100644 --- a/flake.lock +++ b/flake.lock @@ -70,6 +70,26 @@ "type": "github" } }, + "nix-index-database": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1696736548, + "narHash": "sha256-Dg0gJ9xVXud55sAbXspMapFYZOpVAldQQo7MFp91Vb0=", + "owner": "nix-community", + "repo": "nix-index-database", + "rev": "2902dc66f64f733bfb45754e984e958e9fe7faf9", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-index-database", + "type": "github" + } + }, "nix-vscode-extensions": { "inputs": { "flake-compat": "flake-compat", @@ -163,6 +183,7 @@ "root": { "inputs": { "home-manager": "home-manager", + "nix-index-database": "nix-index-database", "nix-vscode-extensions": "nix-vscode-extensions", "nixgl": "nixgl", "nixpkgs": "nixpkgs", diff --git a/flake.nix b/flake.nix index 9de7c7a..a2b8506 100644 --- a/flake.nix +++ b/flake.nix @@ -32,9 +32,14 @@ url = "github:nix-community/nix-vscode-extensions"; inputs.nixpkgs.follows = "nixpkgs"; }; + + nix-index-database = { + url = "github:nix-community/nix-index-database"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = inputs @ { self, nixpkgs, nixpkgs-stable, home-manager, nur, nixgl, ... }: # Function that tells my flake which to use and what do what to do with the dependencies. + outputs = inputs @ { self, nixpkgs, nixpkgs-stable, nix-index-database, home-manager, nur, nixgl, ... }: # Function that tells my flake which to use and what do what to do with the dependencies. let # Variables that can be used in the config files. user = "ruther"; location = "$HOME/.setup"; @@ -47,14 +52,14 @@ nixosConfigurations = ( # NixOS configurations import ./hosts { # Imports ./hosts/default.nix inherit (nixpkgs) lib; - inherit inputs nixpkgs nixpkgs-stable home-manager nur user location; # Also inherit home-manager so it does not need to be defined here. + inherit inputs nixpkgs nixpkgs-stable nix-index-database home-manager nur user location; } ); homeConfigurations = ( # Non-NixOS configurations import ./nix { inherit (nixpkgs) lib; - inherit inputs nixpkgs nixpkgs-stable home-manager nixgl user location; + inherit inputs nixpkgs nixpkgs-stable nix-index-database home-manager nixgl user location; } ); diff --git a/hosts/configuration.nix b/hosts/configuration.nix index b50684d..d1733ca 100644 --- a/hosts/configuration.nix +++ b/hosts/configuration.nix @@ -37,6 +37,8 @@ programs.dconf.enable = true; + programs.command-not-found.enable = false; + time.timeZone = "Europe/Prague"; # Time zone and internationalisation i18n = { defaultLocale = "en_US.UTF-8"; diff --git a/hosts/default.nix b/hosts/default.nix index 086d504..c4cccfc 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -11,7 +11,7 @@ # └─ ./home.nix # -{ lib, inputs, nixpkgs, nixpkgs-stable, home-manager, nur, user, location, ... }: +{ lib, inputs, nixpkgs, nixpkgs-stable, nix-index-database, home-manager, nur, user, location, ... }: let system = "x86_64-linux"; # System architecture @@ -49,6 +49,7 @@ in home-manager.users.${user} = { imports = [ nur.hmModules.nur + nix-index-database.hmModules.nix-index { nixpkgs.overlays = [ nur.overlay ]; } (import ./home.nix) (import ./laptop/home.nix) @@ -77,6 +78,7 @@ in home-manager.users.${user} = { imports = [ nur.hmModules.nur + nix-index-database.hmModules.nix-index { nixpkgs.overlays = [ nur.overlay ]; } (import ./home.nix) (import ./vm/home.nix) @@ -105,6 +107,7 @@ in home-manager.users.${user} = { imports = [ nur.hmModules.nur + nix-index-database.hmModules.nix-index { nixpkgs.overlays = [ nur.overlay ]; } ./home.nix ./desktop/home.nix diff --git a/hosts/home.nix b/hosts/home.nix index da4fc8c..9c2b893 100644 --- a/hosts/home.nix +++ b/hosts/home.nix @@ -11,7 +11,7 @@ # └─ default.nix # -{ config, lib, nixpkgs, stable, pkgs, user, location, ... }: +{ config, lib, nix-index-database, nixpkgs, stable, pkgs, user, location, ... }: { imports = # Home Manager Modules @@ -121,8 +121,6 @@ stateVersion = "23.05"; }; - programs.command-not-found.enable = true; - programs = { home-manager.enable = true; }; -- 2.48.1