Files
nixos/flake.nix
2026-03-20 19:26:48 +00:00

136 lines
4.3 KiB
Nix

{
description = "Stationette nix config";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nix-gaming.url = "github:fufexan/nix-gaming";
disko.url = "github:nix-community/disko/latest";
impermanence.url = "github:nix-community/impermanence";
home-manager = {
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
try-cli = {
url = "github:tobi/try-cli";
inputs.nixpkgs.follows = "nixpkgs";
};
elephant = {
url = "github:abenz1267/elephant";
# inputs.nixpkgs.follows = "nixpkgs";
};
walker = {
url = "github:abenz1267/walker";
inputs.elephant.follows = "elephant";
inputs.nixpkgs.follows = "nixpkgs";
};
voxtype = {
url = "github:peteonrails/voxtype";
inputs.nixpkgs.follows = "nixpkgs";
};
# hyprland-preview-share-picker = {
# url = "github:WhySoBad/hyprland-preview-share-picker";
# inputs.nixpkgs.follows = "nixpkgs";
# };
};
outputs = {
self,
nixpkgs,
nixpkgs-unstable,
nix-gaming,
impermanence,
disko,
home-manager,
try-cli,
voxtype,
walker,
# hyprland-preview-share-picker,
...
} @ inputs: let
lib = nixpkgs.lib;
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
nix-gaming = inputs.nix-gaming.packages.${system};
pkgs-unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
mkHost = hostname: nixpkgs.lib.nixosSystem {
modules = [
./hardware
./system
home-manager.nixosModules.home-manager
{
powerManagement.enable = true;
system.stateVersion = "25.11";
home-manager = {
users.chris = import ./home;
extraSpecialArgs = {
inherit inputs;
inherit pkgs-unstable;
inherit try-cli;
inherit voxtype;
inherit walker;
inherit impermanence;
inherit hostname;
};
};
}
];
specialArgs = {
inherit inputs;
inherit pkgs-unstable;
inherit impermanence;
inherit disko;
inherit hostname;
inherit nix-gaming;
};
};
in {
nixosConfigurations = {
stationette = mkHost "stationette";
station = mkHost "station";
};
# Standalone home-manager configuration entrypoint
homeConfigurations = {
chris = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit inputs;
inherit pkgs-unstable;
inherit try-cli;
inherit voxtype;
inherit walker;
inherit impermanence;
};
modules = [
./home
];
};
};
nix.settings = {
extra-substituters = [
"https://walker.cachix.org"
"https://walker-git.cachix.org"
];
extra-trusted-public-keys = [
"walker.cachix.org-1:fG8q+uAaMqhsMxWjwvk0IMb4mFPFLqHjuvfwQxE4oJM="
"walker-git.cachix.org-1:vmC0ocfPWh0S/vRAQGtChuiZBTAe4wiKDeyyXM0/7pM="
];
substituters = ["https://nix-gaming.cachix.org"];
trusted-public-keys = ["nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="];
};
};
}