nixos/flake.nix

79 lines
2.2 KiB
Nix
Raw Normal View History

2023-08-19 23:40:25 +02:00
{
2023-08-20 00:48:31 +02:00
description = "NixOS configuration of MrDev023";
2023-08-19 23:40:25 +02:00
inputs = {
2024-02-17 14:56:18 +01:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
2024-06-25 20:07:01 +02:00
nur.url = github:nix-community/NUR;
2024-02-17 18:20:01 +01:00
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-02-19 20:17:01 +01:00
2024-04-08 01:15:52 +02:00
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
2024-04-04 15:19:40 +02:00
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.4.1";
2024-05-28 20:46:24 +02:00
# Follow nix-doom-emacs completely when this is merged or fixed
# - https://github.com/nix-community/nix-doom-emacs/issues/409
# - https://github.com/nix-community/nix-straight.el/pull/4
nix-straight = {
url = "github:codingkoi/nix-straight.el?ref=codingkoi/apply-librephoenixs-fix";
flake = false;
};
nix-doom-emacs = {
url = "github:nix-community/nix-doom-emacs";
inputs = {
nix-straight.follows = "nix-straight";
nixpkgs.follows = "nixpkgs";
};
};
2023-08-19 23:40:25 +02:00
};
2023-08-20 00:48:31 +02:00
outputs = inputs@{
nixpkgs,
2024-06-25 20:07:01 +02:00
nur,
home-manager,
agenix,
2024-05-28 16:05:44 +02:00
nix-flatpak,
2024-05-28 20:46:24 +02:00
nix-doom-emacs,
...
2024-04-08 00:06:14 +02:00
}:
let
2024-04-08 00:43:06 +02:00
systems = [
{ name = "nixos-test"; system = "x86_64-linux"; }
{ name = "perso-laptop"; system = "x86_64-linux"; }
{ name = "perso-desktop"; system = "x86_64-linux"; }
2024-05-21 21:42:24 +02:00
{ name = "pro-laptop"; system = "x86_64-linux"; }
2024-04-08 00:06:14 +02:00
];
in {
2024-04-08 00:43:06 +02:00
nixosConfigurations = nixpkgs.lib.foldl (c: s:
c // {
${s.name} = nixpkgs.lib.nixosSystem {
2024-04-08 00:45:54 +02:00
inherit (s) system;
2024-04-08 00:43:06 +02:00
modules = [
./hosts/${s.name}/configuration.nix
2024-04-08 00:43:06 +02:00
home-manager.nixosModules.home-manager
2024-04-08 01:15:52 +02:00
agenix.nixosModules.default
2024-06-25 20:07:01 +02:00
{ nixpkgs.overlays = [ nur.overlay ]; }
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = inputs;
2024-05-28 16:05:44 +02:00
home-manager.users.florian.imports = [
nix-flatpak.homeManagerModules.nix-flatpak
2024-05-28 20:46:24 +02:00
nix-doom-emacs.hmModule
2024-05-28 16:05:44 +02:00
./hosts/${s.name}/home.nix
];
}
2024-04-08 00:43:06 +02:00
];
};
}) {} systems;
2023-08-19 23:40:25 +02:00
};
2024-02-02 21:07:29 +01:00
}