-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix some more duplicated nix configuration
- Loading branch information
Showing
8 changed files
with
79 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,13 @@ | ||
{ config, lib, pkgs, inputs, ... }: | ||
|
||
with lib; | ||
|
||
let | ||
|
||
cfg = config.custom.base.nix; | ||
|
||
in | ||
{ pkgs, ... }: | ||
|
||
{ | ||
options = { | ||
custom.base.nix = { | ||
enableStoreOptimization = mkEnableOption "Optimize nix store" // { default = true; }; | ||
}; | ||
}; | ||
|
||
config = { | ||
home.packages = [ | ||
pkgs.nix-output-monitor | ||
]; | ||
home.packages = [ | ||
pkgs.nix-output-monitor | ||
]; | ||
|
||
nix = { | ||
registry = { | ||
nixpkgs.flake = inputs.nixpkgs; | ||
nix-config.flake = inputs.self; | ||
}; | ||
settings = { | ||
auto-optimise-store = cfg.enableStoreOptimization; | ||
experimental-features = [ "nix-command" "flakes" ]; | ||
log-lines = 30; | ||
substituters = [ | ||
"https://christianharke.cachix.org/" | ||
"https://nix-community.cachix.org" | ||
"https://cache.nixos.org" | ||
]; | ||
trusted-public-keys = [ | ||
"christianharke.cachix.org-1:TzmbiNLRcH8G0932XRlQzh8GPvuV9pJcHLqLnzznLKU=" | ||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" | ||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" | ||
]; | ||
}; | ||
}; | ||
nixpkgs.config = import ./nixpkgs-config.nix; | ||
xdg.configFile."nixpkgs/config.nix".source = ./nixpkgs-config.nix; | ||
nixpkgs.config = import ./nixpkgs-config.nix; | ||
xdg.configFile."nixpkgs/config.nix".source = ./nixpkgs-config.nix; | ||
|
||
# Command-not-found replacement | ||
programs.nix-index.enable = true; | ||
}; | ||
# Command-not-found replacement | ||
programs.nix-index.enable = true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ lib, inputs, pkgs, ... }: | ||
|
||
let | ||
|
||
nixSubstituters = import ../nix-commons/substituters.nix; | ||
|
||
in | ||
|
||
{ | ||
nix = { | ||
package = pkgs.nix; | ||
registry = { | ||
nixpkgs.flake = inputs.nixpkgs; | ||
nix-config.flake = inputs.self; | ||
}; | ||
settings = { | ||
auto-optimise-store = lib.mkDefault true; | ||
experimental-features = [ "nix-command" "flakes" ]; | ||
log-lines = 30; | ||
} // nixSubstituters; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
substituters = [ | ||
"https://christianharke.cachix.org/" | ||
"https://nix-community.cachix.org" | ||
"https://cache.nixos.org" | ||
]; | ||
trusted-public-keys = [ | ||
"christianharke.cachix.org-1:TzmbiNLRcH8G0932XRlQzh8GPvuV9pJcHLqLnzznLKU=" | ||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" | ||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ lib, pkgs, ... }: | ||
|
||
let | ||
|
||
nixCommons = import ../nix-commons; | ||
nixSubstituters = import ../nix-commons/substituters.nix; | ||
|
||
in | ||
|
||
lib.recursiveUpdate nixCommons { | ||
nix = { | ||
nixPath = [ "nixpkgs=flake:nixpkgs" ]; | ||
settings = { | ||
auto-optimise-store = false; | ||
}; | ||
} // nixSubstituters; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters