flake: refactor handling of shared modules

This commit is contained in:
Bruno BELANYI 2021-04-02 11:49:07 +00:00
parent 817ca1e9df
commit 825e09f59e
3 changed files with 15 additions and 24 deletions

View File

@ -58,12 +58,18 @@
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
# Include generic settings
./modules
# Include my secrets
./secrets
# Include my services
./services
];
buildHost = name: system: lib.nixosSystem {
inherit system;
modules = defaultModules ++ [
(./. + "/${name}.nix")
(./. + "/machines/${name}")
];
specialArgs = {
# Use my extended lib in NixOS configuration

View File

@ -9,4 +9,12 @@
./services.nix
./users.nix
];
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "20.09"; # Did you read the comment?
}

View File

@ -1,23 +0,0 @@
# Porthos self-hosted server
{ ... }:
{
imports = [
# Include generic settings
./modules
# Include porthos-specific modules
./machines/porthos
# Include my secrets
./secrets
# Include my services
./services
];
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "20.09"; # Did you read the comment?
}