diff --git a/README.md b/README.md index cf71ecf..739c823 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,13 @@ -# nixMail +# nixConfig -a try to configure a nixOS mail server \ No newline at end of file +## Build a machine +### Local +If you want to build the machineconfiguration for machine +run +``` +nix build .#nixosConfiguration. +``` + +### On the machine +clone this repo to `/etc/nixos/` and `nixos-rebuild` that will select +the appropriate machine based on hostname diff --git a/flake-module.nix b/flake-module.nix index 589de49..2220d58 100644 --- a/flake-module.nix +++ b/flake-module.nix @@ -1,6 +1,9 @@ {inputs, ...}: { - debug = true; + # debug = true; + # We only define machines config in this flake yet, so we only include + # the module that builds these. This file might get fuller, if we need to + # build our own packages, that are not flakes. imports = [ ./nixos/flake-module.nix # To import a flake module # 1. Add foo to inputs diff --git a/nixos/flake-module.nix b/nixos/flake-module.nix index 3e5a6cc..cca5849 100644 --- a/nixos/flake-module.nix +++ b/nixos/flake-module.nix @@ -1,4 +1,7 @@ # copied and adopted from maralorns config + +# This automatically searches for nixos configs in ./machines/${name}/configuration.nix +# and exposes them as outputs.nixosConfigurations.${name} { withSystem, lib, inputs, ... }: { flake = { nixosConfigurations = withSystem "x86_64-linux" ({ pkgs, ... }: