boxen/flake.nix

58 lines
1.6 KiB
Nix
Raw Normal View History

2021-05-24 08:33:02 +00:00
{
description = "My NixOS configuration";
2021-05-24 08:33:02 +00:00
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
2021-05-24 09:23:07 +00:00
2021-05-24 08:33:02 +00:00
home-manager.url = "github:nix-community/home-manager";
2021-05-24 09:23:07 +00:00
nur.url = "github:nix-community/NUR";
2021-05-25 09:11:06 +00:00
emacs-overlay.url = "github:nix-community/emacs-overlay";
#nix-doom-emacs.url = "github:nix-community/nix-doom-emacs";
nix-doom-emacs.url = "git+https://codeberg.org/jezcope/nix-doom-emacs?ref=fix/evil-collection";
2023-06-25 11:07:41 +00:00
nix-std.url = "github:chessai/nix-std";
2021-10-11 19:54:32 +00:00
home-manager.inputs.nixpkgs.follows = "nixpkgs";
emacs-overlay.inputs.nixpkgs.follows = "nixpkgs";
2021-05-24 08:33:02 +00:00
};
2023-06-25 11:07:41 +00:00
outputs =
{ self, nixpkgs, home-manager, nur, emacs-overlay, nix-std, ... }@inputs:
let
inherit (nixpkgs.lib) genAttrs nixosSystem;
system = "x86_64-linux";
hosts = [ "arianrhod" "gwydion" ];
overlay = import ./overlay.nix;
2023-06-25 11:07:41 +00:00
std = nix-std.lib;
in {
inherit overlay;
nixosConfigurations = genAttrs hosts (hostName:
nixosSystem {
inherit system;
modules = [
./profiles
./configuration.nix
(./hosts + "/${hostName}")
(./secrets + "/${hostName}.nix")
{
nixpkgs.overlays = [ overlay nur.overlay emacs-overlay.overlay ];
}
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.jez = import ./home;
2023-07-05 11:41:48 +00:00
extraSpecialArgs = { inherit inputs std; };
};
}
];
specialArgs = { inherit inputs hostName; };
});
2021-07-28 17:37:14 +00:00
};
2021-05-24 08:33:02 +00:00
}