nixos_config/flake.nix

68 lines
2.1 KiB
Nix
Raw Normal View History

2025-07-20 17:46:39 +02:00
{
description = "NixOS configuration for all hosts";
inputs = {
2025-08-08 21:43:53 +02:00
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; #"github:NixOS/nixpkgs/nixos-25.05";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
2025-07-20 17:46:39 +02:00
flake-utils.url = "github:numtide/flake-utils";
2025-07-21 20:58:31 +02:00
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
2025-07-20 17:46:39 +02:00
};
2025-08-08 21:43:53 +02:00
outputs = { self, nixpkgs, nixpkgs-unstable, flake-utils, home-manager, ... }:
2025-07-21 20:58:31 +02:00
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
2025-08-08 21:43:53 +02:00
pkgs-unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
2025-07-23 19:46:19 +02:00
sharedModules = [
./hosts/common.nix
2025-08-08 21:43:53 +02:00
{
nixpkgs.config.allowUnfree = true;
}
home-manager.nixosModules.home-manager
({ config, ...}: {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {
inherit (config.networking) hostName;
}; # end extraSpecialArgs
home-manager.users.alisceon = import ./home/alisceon.nix;
home-manager.backupFileExtension = "backup";
}) # end home manager
2025-07-23 19:46:19 +02:00
];
2025-07-21 20:58:31 +02:00
in
{
2025-07-21 19:53:17 +02:00
nixosConfigurations = {
2025-07-23 13:16:55 +02:00
electra = nixpkgs.lib.nixosSystem {
2025-07-21 20:58:31 +02:00
inherit system;
2025-07-23 19:46:19 +02:00
modules = sharedModules ++ [
2025-07-23 19:56:00 +02:00
./hosts/electra/configuration.nix
2025-07-23 19:46:19 +02:00
]; # end modules
}; # end electra
2025-07-23 13:16:55 +02:00
tower = nixpkgs.lib.nixosSystem {
inherit system;
2025-07-23 19:46:19 +02:00
modules = sharedModules ++ [
2025-07-23 13:16:55 +02:00
./hosts/tower/configuration.nix
2025-07-23 19:46:19 +02:00
]; # end modules
}; # end tower
2025-08-12 21:00:01 +02:00
tesla-nixos = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
./hosts/tesla-nixos/configuration.nix
{
nixpkgs.config.allowUnfree = true;
}
]; # end modules
}; # end tesla-nixos
2025-07-23 19:46:19 +02:00
}; # end nixos conf
}; # end "in"
} # end file