diff options
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 64 |
1 files changed, 45 insertions, 19 deletions
@@ -1,28 +1,54 @@ { inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; - nixinate.url = "github:matthewcroughan/nixinate"; + flake-parts.url = "github:hercules-ci/flake-parts"; }; - outputs = { self, nixpkgs, nixinate }: { - apps = nixinate.nixinate.aarch64-darwin self; - nixosConfigurations = { - nixos-test = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - (import ./machines/nixos-test) + outputs = inputs@{ self, nixpkgs, flake-parts, ... }: + flake-parts.lib.mkFlake { inherit inputs; } ({ withSystem, flake-parts-lib, ... }: + let + inherit (flake-parts-lib) importApply; + flakeModules.nixinate = importApply ./nixinate { inherit withSystem; }; + in + { + imports = [ + flakeModules.nixinate + ]; + flake = + let + specialArgs = inputs // { inherit inputs; }; + system = "x86_64-linux"; + in { - _module.args.nixinate = { - host = "10.49.212.3"; - sshUser = "root"; - buildOn = "remote"; - substituteOnTarget = true; - hermetic = false; + inherit flakeModules; + nixosConfigurations = { + nixos-test = nixpkgs.lib.nixosSystem { + system = system; + specialArgs = specialArgs // { inherit system; }; + modules = [ + (import ./machines/nixos-test) + + (import ./modules) + (import ./modules/users) + { + _module.args.nixinate = { + host = "10.49.212.3"; + sshUser = "audron"; + buildOn = "remote"; + substituteOnTarget = true; + hermetic = false; + }; + } + ]; + }; }; - } - # ... other configuration ... + }; + systems = [ + "x86_64-linux" + "x86_64-darwin" + "aarch64-linux" + "aarch64-darwin" ]; - }; - }; - }; + perSystem = { config, ... }: { }; + }); } |
