move some nixos configuration to ./nixos/modules and ./nixos/configurations. try to find a good arch to conbine home-manager and nixos modules.
This commit is contained in:
parent
6be554822c
commit
64db779064
32 changed files with 534 additions and 635 deletions
30
nixos/modules/default.nix
Normal file
30
nixos/modules/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
inputs,
|
||||
outputs,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports =
|
||||
(with inputs; [
|
||||
niri-flake.nixosModules.niri
|
||||
nixos-cosmic.nixosModules.default
|
||||
home-manager.nixosModules.home-manager
|
||||
dae.nixosModules.dae
|
||||
])
|
||||
++ [
|
||||
./nix.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
nixpkgs = {
|
||||
overlays =
|
||||
(with outputs; [
|
||||
overlays.modifications
|
||||
])
|
||||
++ (with inputs; [
|
||||
niri-flake.overlays.niri
|
||||
]);
|
||||
};
|
||||
};
|
||||
}
|
||||
45
nixos/modules/nix.nix
Normal file
45
nixos/modules/nix.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
inputs,
|
||||
outputs,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
config = {
|
||||
nix = {
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||
settings = {
|
||||
inherit (outputs.nix.settings) substituters;
|
||||
trusted-users = [
|
||||
"root"
|
||||
"@wheel"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
auto-optimise-store = lib.mkDefault true;
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
warn-dirty = false;
|
||||
system-features = [
|
||||
"kvm"
|
||||
"big-parallel"
|
||||
];
|
||||
use-xdg-base-directories = true;
|
||||
builders-use-substitutes = true;
|
||||
};
|
||||
package = pkgs.nix;
|
||||
registry.sys = lib.mkDefault {
|
||||
from = {
|
||||
type = "indirect";
|
||||
id = "sys";
|
||||
};
|
||||
flake = inputs.nixpkgs;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue