Migrate nix and nix registry configuration to home manager module
There is an existing module. Existing manually written and linked files are replaced with usage of the module. This has the advantage that I don't need to know where to place the files and which format to use. Furthermore, the module will check whether I've typos in options and whether values match expected types.
This commit is contained in:
parent
cbe783115c
commit
992116b57d
7
home.nix
7
home.nix
|
@ -25,6 +25,10 @@
|
|||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
nix = import ./home/programs/nix.nix {
|
||||
inherit pkgs;
|
||||
};
|
||||
|
||||
# Install packages
|
||||
# Some are installed via `programs` below, as they are also configured.
|
||||
# Some packages don't have a module for configuration, and are configured via `home.file` below.
|
||||
|
@ -136,9 +140,6 @@
|
|||
"phpactor/phpactor.yml".source = ./home/files/phpactor.yml;
|
||||
"tig/config".source = ./home/files/tig;
|
||||
|
||||
"nix/nix.conf".source = ./home/files/nix/nix.conf;
|
||||
"nix/registry.json".source = ./home/files/nix/registry.json;
|
||||
|
||||
"cmus/smyckblue.theme".source = ./home/files/cmus/smyckblue.theme;
|
||||
"cmus/rc".source = ./home/files/cmus/rc;
|
||||
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
experimental-features = nix-command flakes
|
||||
substituters = https://cache.nixos.org https://fossar.cachix.org
|
||||
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= fossar.cachix.org-1:Zv6FuqIboeHPWQS7ysLCJ7UT7xExb4OE8c4LyGb5AsE=
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
"flakes": [
|
||||
{
|
||||
"from": {
|
||||
"id": "cp",
|
||||
"type": "indirect"
|
||||
},
|
||||
"to": {
|
||||
"path": "/home/daniels/.config/nixpkgs/registries/customer-projects",
|
||||
"type": "path"
|
||||
}
|
||||
}
|
||||
],
|
||||
"version": 2
|
||||
}
|
39
home/programs/nix.nix
Normal file
39
home/programs/nix.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ pkgs }:
|
||||
|
||||
{
|
||||
enable = true;
|
||||
|
||||
package = pkgs.nix;
|
||||
|
||||
settings = {
|
||||
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
substituters = [
|
||||
"https://cache.nixos.org"
|
||||
"https://fossar.cachix.org"
|
||||
];
|
||||
|
||||
trusted-public-keys = "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= fossar.cachix.org-1:Zv6FuqIboeHPWQS7ysLCJ7UT7xExb4OE8c4LyGb5AsE=";
|
||||
|
||||
};
|
||||
|
||||
registry = {
|
||||
|
||||
customer-projects = {
|
||||
from = {
|
||||
id = "cp";
|
||||
type = "indirect";
|
||||
};
|
||||
to = {
|
||||
path = toString ./../../registries/customer-projects;
|
||||
type = "path";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in a new issue