Reorganize configuration and prep for flakes
This commit is contained in:
parent
78439054dd
commit
dea7fcbf96
19 changed files with 250 additions and 95 deletions
18
flake.nix
18
flake.nix
|
@ -2,25 +2,31 @@
|
|||
description = "All system configurations for Vili Sinervä";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-25.05";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||
nixvim.url = "github:nix-community/nixvim/nixos-25.05";
|
||||
};
|
||||
|
||||
outputs =
|
||||
inputs@{ nixpkgs, ... }:
|
||||
{ nixpkgs, nixvim, ... }:
|
||||
{
|
||||
nixosConfigurations = (
|
||||
let
|
||||
hosts = map (name: (nixpkgs.lib.removeSuffix ".nix" name)) (
|
||||
builtins.attrNames (builtins.readDir ./hosts)
|
||||
);
|
||||
hosts = builtins.attrNames (builtins.readDir ./hosts);
|
||||
in
|
||||
builtins.listToAttrs (
|
||||
map (
|
||||
host:
|
||||
nixpkgs.lib.nameValuePair host (
|
||||
nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit nixpkgs;
|
||||
inherit nixvim;
|
||||
};
|
||||
system = "x86_64-linux";
|
||||
modules = [ ./hosts/${host}.nix ];
|
||||
modules = [
|
||||
./hosts/${host}/configuration.nix
|
||||
./hosts/${host}/hardware-configuration.nix
|
||||
];
|
||||
}
|
||||
)
|
||||
) hosts
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue