diff options
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/flake.nix b/flake.nix index 02a25cd..e82e17f 100644 --- a/flake.nix +++ b/flake.nix @@ -18,31 +18,32 @@ url = "github:numtide/treefmt-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; - - pre-commit-hooks = { - url = "github:cachix/pre-commit-hooks.nix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - devshell.url = "github:numtide/devshell"; - - # utils - futils.url = "github:numtide/flake-utils"; - flake-parts.url = "github:hercules-ci/flake-parts"; }; # Output config, or config for NixOS system - outputs = inputs: - inputs.flake-parts.lib.mkFlake { inherit inputs; } { - - systems = [ - "aarch64-darwin" - "x86_64-darwin" - - "aarch64-linux" - "x86_64-linux" - ]; - - imports = [ ./nix/flake/devshell.nix ./nix/flake/hosts.nix ]; + outputs = { nixpkgs, darwin, ... }@inputs: + let mkSystem = import ./nix/lib/mkSystem.nix { inherit nixpkgs inputs; }; + in { + nixosConfigurations.vm-aarch64 = mkSystem "vm-aarch64" { + system = "aarch64-linux"; + user = "fcuny"; + }; + + nixosConfigurations.vm-synology = mkSystem "vm-synology" { + system = "x86_64-linux"; + user = "fcuny"; + }; + + darwinConfigurations.macbook-air-m2 = mkSystem "macbook-air-m2" { + system = "aarch64-darwin"; + user = "fcuny"; + darwin = true; + }; + + darwinConfigurations.macbook-pro-intel = mkSystem "macbook-pro-intel" { + system = "x86_64-darwin"; + user = "fcuny"; + darwin = true; + }; }; } |