nixos-wiki-infra/flake.nix
Jörg Thalheim 055c435037 flake.lock: Update
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/3cb78c93e6a02f494aaf6aeb37481c27a2e2ee22' (2023-11-25)
  → 'github:nix-community/disko/1b191113874dee97796749bb21eac3d84735c70a' (2023-12-25)
• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/8c9fa2545007b49a5db5f650ae91f227672c3877' (2023-11-01)
  → 'github:hercules-ci/flake-parts/34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5' (2023-12-01)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/5a09cb4b393d58f9ed0d9ca1555016a8543c2ac8' (2023-11-24)
  → 'github:NixOS/nixpkgs/5f64a12a728902226210bf01d25ec6cbb9d9265b' (2023-12-24)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/4be58d802693d7def8622ff34d36714f8db40371' (2023-11-26)
  → 'github:Mic92/sops-nix/e523e89763ff45f0a6cf15bcb1092636b1da9ed3' (2023-12-24)
• Updated input 'srvos':
    'github:numtide/srvos/396f6d3fa41a594b7ea02fa0d34f0c6975983e6e' (2023-11-24)
  → 'github:numtide/srvos/52d07db520046c4775f1047e68a05dcb53bba9ec' (2023-12-25)
• Removed input 'srvos/nixos-23_05'
• Added input 'srvos/nixos-stable':
    'github:NixOS/nixpkgs/d65bceaee0fb1e64363f7871bc43dc1c6ecad99f' (2023-12-20)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/e82f32aa7f06bbbd56d7b12186d555223dc399d1' (2023-11-12)
  → 'github:numtide/treefmt-nix/2961375283668d867e64129c22af532de8e77734' (2023-12-19)
2023-12-27 15:18:52 +01:00

71 lines
2.3 KiB
Nix

{
description = "Dependencies to deploy a nixos-wiki";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
treefmt-nix.url = "github:numtide/treefmt-nix";
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
srvos.url = "github:numtide/srvos";
# Use the version of nixpkgs that has been tested to work with SrvOS
srvos.inputs.nixpkgs.follows = "nixpkgs";
srvos.inputs.nixos-stable.follows = "nixpkgs";
sops-nix.url = "github:Mic92/sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
sops-nix.inputs.nixpkgs-stable.follows = "";
};
outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } ({ self, lib, ... }: {
systems = [
"aarch64-linux"
"x86_64-linux"
"riscv64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
imports = [
inputs.treefmt-nix.flakeModule
./targets/flake-module.nix
./modules/flake-module.nix
./checks/flake-module.nix
];
perSystem = { config, self', system, pkgs, ... }: {
treefmt = {
projectRootFile = "flake.nix";
programs.hclfmt.enable = true;
programs.nixpkgs-fmt.enable = true;
};
packages.default =
pkgs.mkShell {
packages = [
pkgs.bashInteractive
pkgs.sops
(pkgs.opentofu.withPlugins (p: [
p.netlify
p.hcloud
p.null
p.external
p.local
]))
];
};
checks =
let
nixosMachines = lib.mapAttrs' (name: config: lib.nameValuePair "nixos-${name}" config.config.system.build.toplevel) ((lib.filterAttrs (_: config: config.pkgs.system == system)) self.nixosConfigurations);
packages = lib.mapAttrs' (n: lib.nameValuePair "package-${n}") self'.packages;
devShells = lib.mapAttrs' (n: lib.nameValuePair "devShell-${n}") self'.devShells;
in
nixosMachines // packages // devShells;
};
});
}