69 lines
2 KiB
Nix
69 lines
2 KiB
Nix
{
|
|
description = "NixOS flake";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
|
unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
nix-snapd.url = "github:nix-community/nix-snapd";
|
|
nix-snapd.inputs.nixpkgs.follows = "nixpkgs";
|
|
spicetify-nix.url = "github:Gerg-L/spicetify-nix";
|
|
autofirma-nix = {
|
|
url = "github:nix-community/autofirma-nix/release-25.05";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/release-24.11";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
nixConfig = {
|
|
extra-substituters = [
|
|
"https://nix-community.cachix.org"
|
|
];
|
|
extra-trusted-public-keys = [
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
];
|
|
};
|
|
|
|
outputs = { self, nixpkgs, unstable, nix-snapd, home-manager, autofirma-nix, ... }:
|
|
let
|
|
system = "x86_64-linux";
|
|
lib = nixpkgs.lib;
|
|
pkgs-unstable = unstable.legacyPackages.${system};
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
in
|
|
{
|
|
nixosConfigurations = {
|
|
limgrave = lib.nixosSystem {
|
|
inherit system;
|
|
specialArgs = { inherit pkgs-unstable; };
|
|
modules = [
|
|
./hosts/limgrave/configuration.nix
|
|
nix-snapd.nixosModules.default
|
|
autofirma-nix.nixosModules.default
|
|
home-manager.nixosModules.home-manager
|
|
];
|
|
};
|
|
|
|
carpates = lib.nixosSystem {
|
|
inherit system;
|
|
specialArgs = { inherit pkgs-unstable; };
|
|
modules = [
|
|
./hosts/carpates/configuration.nix
|
|
home-manager.nixosModules.home-manager
|
|
];
|
|
};
|
|
};
|
|
|
|
# Home Manager configurations for non-NixOS hosts (e.g., Ubuntu)
|
|
homeConfigurations = {
|
|
# For non-NixOS usage on a machine named "carpates".
|
|
# Run: home-manager switch --flake ./nix#carpates
|
|
carpates = home-manager.lib.homeManagerConfiguration {
|
|
inherit pkgs;
|
|
modules = [ ./hosts/carpates/home.nix ];
|
|
};
|
|
};
|
|
};
|
|
}
|