mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-03-25 21:30:52 +01:00
48 lines
1.3 KiB
Nix
48 lines
1.3 KiB
Nix
{
|
|
description = "A flake for my personnal configurations";
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11";
|
|
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
neovim-nightly-overlay = {
|
|
url = "github:nix-community/neovim-nightly-overlay";
|
|
};
|
|
homepage = {
|
|
url = "github:JulienMalka/homepage";
|
|
flake = false;
|
|
};
|
|
|
|
unstable = {
|
|
url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
};
|
|
|
|
sops-nix = {
|
|
url = "github:Mic92/sops-nix";
|
|
};
|
|
|
|
};
|
|
|
|
outputs = { self, home-manager, nixpkgs, unstable, sops-nix, neovim-nightly-overlay, nur, ... }@inputs:
|
|
let
|
|
utils = import ./utils.nix { inherit nixpkgs sops-nix home-manager inputs; nixpkgs-unstable = unstable; };
|
|
in
|
|
with utils;
|
|
{
|
|
nixosModules = builtins.listToAttrs (map
|
|
(x: {
|
|
name = x;
|
|
value = import (./modules + "/${x}");
|
|
})
|
|
(builtins.attrNames (builtins.readDir ./modules)));
|
|
|
|
nixosConfigurations = builtins.mapAttrs (name: value: (mkMachine name value self.nixosModules)) (importConfig ./machines);
|
|
hydraJobs = (nixpkgs.lib.mapAttrs' (name: config:
|
|
nixpkgs.lib.nameValuePair "nixos-${name}"
|
|
config.config.system.build.toplevel) self.nixosConfigurations);
|
|
|
|
};
|
|
}
|