nixos-config/config/flake.nix
2025-07-20 15:19:37 +02:00

64 lines
1.9 KiB
Nix

{
inputs = {
# This is pointing to an unstable release.
# If you prefer a stable release instead, you can this to the latest number shown here: https://nixos.org/download
# i.e. nixos-24.11
# Use `nix flake update` to update the flake to the latest revision of the chosen release channel.
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; # Use the same nixpkgs as the system
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
nur.url = "github:nix-community/nur";
# firefox-addons = {
# url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
# inputs.nixpkgs.follows = "nixpkgs"; # Use the same nixpkgs as the system
# };
};
outputs = inputs @ { self, disko, nixpkgs, home-manager, ... }:
let
system = "x86_64-linux"; # Default system architecture
in {
# NOTE: 'nixos' is the default hostname
nixosConfigurations = {
nixos = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
./configuration.nix
home-manager.nixosModules.home-manager
disko.nixosModules.disko
./btrfs-disko.nix
{
home-manager.useGlobalPkgs = true; # Use global packages in home-manager
home-manager.useUserPackages = true; # Use user packages in home-manager
home-manager.extraSpecialArgs = {
inherit inputs;
};
}
];
specialArgs = {
inherit inputs home-manager;
};
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true; # Allow unfree packages globally
overlays = [
inputs.nur.overlays.default
];
};
};
};
};
}