nixos-config/flake.nix

93 lines
2.5 KiB
Nix
Raw Normal View History

2025-08-07 01:32:02 +02:00
{
2025-08-31 12:03:52 +02:00
description = "My nixos config with WM switch capacity";
2025-08-07 01:32:02 +02:00
2025-08-31 12:03:52 +02:00
inputs = {
2025-09-05 09:59:31 +02:00
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.05";
home-manager-stable = {
url = "github:nix-community/home-manager/release-25.05";
inputs.nixpkgs.follows = "nixpkgs-stable";
};
2025-09-16 12:11:06 +02:00
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable-small";
2025-08-31 12:03:52 +02:00
home-manager = {
url = "github:nix-community/home-manager";
2025-09-05 09:59:31 +02:00
inputs.nixpkgs.follows = "nixpkgs-unstable";
2025-08-31 12:03:52 +02:00
};
2025-09-16 12:11:06 +02:00
nur.url = "github:nix-community/NUR";
2025-10-17 22:43:24 +02:00
agenix.url = "github:ryantm/agenix";
2025-10-22 08:18:41 +02:00
nvim-config.url = "git+https://govel.porzh.me/DuN0z/neovim-config.git";
2025-08-31 12:03:52 +02:00
};
2025-08-07 01:32:02 +02:00
2025-09-04 10:21:17 +02:00
outputs = {
2025-09-05 09:59:31 +02:00
nixpkgs-stable,
nixpkgs-unstable,
home-manager-stable,
2025-09-04 10:21:17 +02:00
home-manager,
2025-09-16 12:11:06 +02:00
nur,
2025-10-17 22:43:24 +02:00
agenix,
2025-10-22 08:18:41 +02:00
nvim-config,
2025-09-04 10:21:17 +02:00
...
2025-10-05 08:20:57 +02:00
}: let
mkUnstablePkgsWithNur = {
system,
config ? {},
}:
import nixpkgs-unstable {
inherit system;
overlays = [nur.overlays.default];
inherit config;
};
in {
2025-09-16 12:11:06 +02:00
nixosConfigurations = {
pennsardin = nixpkgs-unstable.lib.nixosSystem {
2025-10-22 08:18:41 +02:00
specialArgs = { inherit nvim-config; };
2025-09-16 12:11:06 +02:00
system = "x86_64-linux";
2025-10-05 08:20:57 +02:00
pkgs = mkUnstablePkgsWithNur {
2025-09-16 12:11:06 +02:00
system = "x86_64-linux";
config = {
2025-10-05 08:20:57 +02:00
allowUnfree = true;
allowUnsupportedSystem = true;
2025-09-16 12:11:06 +02:00
};
};
modules = [
./hosts/pennsardin/configuration.nix
2025-10-05 08:20:57 +02:00
home-manager.nixosModules.home-manager
2025-10-22 08:18:41 +02:00
{
home-manager = {
useGlobalPkgs = true ;
useUserPackages = true ;
extraSpecialArgs = {inherit nvim-config; };
};
}
2025-09-16 12:11:06 +02:00
];
};
2025-08-21 11:21:15 +02:00
2025-09-05 09:59:31 +02:00
terre-neuvas = nixpkgs-stable.lib.nixosSystem {
2025-10-17 22:43:24 +02:00
specialArgs = { inherit agenix; };
2025-09-05 09:59:31 +02:00
system = "x86_64-linux";
2025-09-16 12:11:06 +02:00
modules = [
2025-09-05 09:59:31 +02:00
./hosts/terre-neuvas/configuration.nix
2025-10-05 08:20:57 +02:00
home-manager-stable.nixosModules.home-manager
2025-10-17 22:43:24 +02:00
agenix.nixosModules.default
2025-09-16 12:11:06 +02:00
];
2025-09-05 09:59:31 +02:00
};
2025-10-04 12:35:54 +02:00
forbann = nixpkgs-stable.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hosts/forbann/configuration.nix
"${nixpkgs-stable}/nixos/modules/profiles/qemu-guest.nix"
];
};
2025-09-05 09:59:31 +02:00
};
2025-10-05 08:20:57 +02:00
# --- DevShell (x86_64 uniquement) ---
2025-09-04 10:21:17 +02:00
devShells.x86_64-linux.default = import ./devshell.nix {
2025-09-05 09:59:31 +02:00
pkgs = import nixpkgs-stable {system = "x86_64-linux";};
2025-08-31 12:03:52 +02:00
};
2025-09-04 10:21:17 +02:00
2025-10-05 08:20:57 +02:00
# --- Formatter (x86_64 uniquement) ---
2025-09-04 10:21:17 +02:00
formatter.x86_64-linux =
2025-09-05 09:59:31 +02:00
(import nixpkgs-stable {system = "x86_64-linux";}).alejandra;
2025-08-31 12:03:52 +02:00
};
2025-08-07 01:32:02 +02:00
}