ft (wip): big initial config
This commit is contained in:
46
flake.nix
Executable file
46
flake.nix
Executable file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
description = "Djai's nixos machines";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nix4nvchad = {
|
||||
url = "github:nix-community/nix4nvchad";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
sops-nix = {
|
||||
url = "github:Mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ nixpkgs, ... }@inputs:
|
||||
let
|
||||
mkHost =
|
||||
hostname:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
inputs.home-manager.nixosModules.default
|
||||
inputs.nix-flatpak.nixosModules.nix-flatpak
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
./hosts/${hostname}
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
# name configurations after hostnames so `nixos-rebuild --flake .` gets the right one.
|
||||
nixosConfigurations = nixpkgs.lib.genAttrs [ "nixbook" "nixpad" "tuxcomp" ] mkHost;
|
||||
|
||||
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-tree.override {
|
||||
settings.formatter.nixfmt.excludes = [ "hosts/*/hardware-configuration.nix" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user