mirror of https://gitlab.crans.org/nounous/nixos
73 lines
1.5 KiB
Nix
73 lines
1.5 KiB
Nix
{
|
|
description = "Configuration NixOS du Crans";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
|
|
# Formatter
|
|
treefmt-nix = {
|
|
url = "github:numtide/treefmt-nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# Secret management
|
|
sops-nix = {
|
|
url = "github:Mic92/sops-nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
inputs@{
|
|
self,
|
|
nixpkgs,
|
|
flake-parts,
|
|
...
|
|
}:
|
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
|
imports = [
|
|
inputs.treefmt-nix.flakeModule
|
|
];
|
|
|
|
systems = [ "x86_64-linux" ];
|
|
|
|
flake = with nixpkgs.lib; {
|
|
nixosConfigurations = {
|
|
neo = nixosSystem {
|
|
specialArgs = inputs;
|
|
modules = [ ./hosts/vm/neo ];
|
|
};
|
|
|
|
redite = nixosSystem {
|
|
specialArgs = inputs;
|
|
modules = [ ./hosts/vm/redite ];
|
|
};
|
|
|
|
thot = nixosSystem {
|
|
specialArgs = inputs;
|
|
modules = [ ./hosts/physiques/thot ];
|
|
};
|
|
|
|
two = nixosSystem {
|
|
specialArgs = inputs;
|
|
modules = [ ./hosts/vm/two ];
|
|
};
|
|
};
|
|
};
|
|
|
|
perSystem =
|
|
{ config, pkgs, ... }:
|
|
{
|
|
treefmt = {
|
|
projectRootFile = "flake.nix";
|
|
programs.nixpkgs-fmt.enable = true;
|
|
};
|
|
|
|
devShells = {
|
|
default = pkgs.callPackage ./devshells/default.nix { };
|
|
};
|
|
};
|
|
};
|
|
}
|