commit aebc861d84a3ce6730cff82f9fab315a01d50f0a Author: mad_nico Date: Mon Nov 20 11:39:27 2023 +0100 Ajouter flake.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..d3560fa --- /dev/null +++ b/flake.nix @@ -0,0 +1,46 @@ +{ + description = "NixOS configurations for servers"; + + inputs = { + # Nixos pkgs 23.05 + nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; + + # Agenix (for credentials) + agenix = { + url = "github:ryantm/agenix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = { self, nixpkgs, agenix, ... }: + { + nixosConfigurations = { + freebox-VM = nixpkgs.lib.nixosSystem { + system = "aarch64-linux"; + modules = [ + ./hosts/freebox-VM/configuration.nix + { environment.systemPackages = [ agenix.packages.x86_64-linux.default ]; } + agenix.nixosModules.default + ]; + }; + + virt-manager-VM = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./hosts/virt-manager-VM/configuration.nix + { environment.systemPackages = [ agenix.packages.x86_64-linux.default ]; } + agenix.nixosModules.default + ]; + }; + + virt-backup-VM = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./hosts/virt-backup-VM/configuration.nix + { environment.systemPackages = [ agenix.packages.x86_64-linux.default ]; } + agenix.nixosModules.default + ]; + }; + }; + }; +}