From aebc861d84a3ce6730cff82f9fab315a01d50f0a Mon Sep 17 00:00:00 2001 From: mad_nico Date: Mon, 20 Nov 2023 11:39:27 +0100 Subject: [PATCH] Ajouter flake.nix --- flake.nix | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 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 + ]; + }; + }; + }; +}