NixOS-Configuration/flake.nix

56 lines
1.6 KiB
Nix
Raw Normal View History

2024-01-09 17:29:12 +00:00
{
description = "My nixos config as a flake";
inputs = {
2024-01-16 02:25:58 +00:00
# Stable
nixpkgs.url = "nixpkgs/nixos-23.11";
2024-01-29 04:50:40 +00:00
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
2024-01-16 02:25:58 +00:00
# Unstable
2024-01-15 05:16:28 +00:00
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
2024-01-29 04:50:40 +00:00
home-manager-unstable.url = "github:nix-community/home-manager";
home-manager-unstable.inputs.nixpkgs.follows = "nixpkgs-unstable";
2024-01-09 17:29:12 +00:00
};
2024-01-29 04:50:40 +00:00
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, home-manager-unstable }:
2024-01-16 02:25:58 +00:00
let common_dir = ./common;
in {
2024-01-09 17:29:12 +00:00
nixosConfigurations = {
2024-01-15 05:16:28 +00:00
nixos = nixpkgs-unstable.lib.nixosSystem {
2024-01-09 17:29:12 +00:00
system = "x86_64-linux";
2024-01-16 02:25:58 +00:00
specialArgs = { inherit common_dir; };
2024-01-09 17:29:12 +00:00
modules = [
2024-01-10 00:41:10 +00:00
./hosts/nixos/configuration.nix
2024-01-29 04:50:40 +00:00
home-manager-unstable.nixosModules.home-manager {
2024-01-16 02:25:58 +00:00
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.cameron = import ./hosts/nixos/home-manager/cameron.nix;
2024-01-22 07:36:11 +00:00
home-manager.extraSpecialArgs = { inherit common_dir; };
2024-01-16 02:25:58 +00:00
}
2024-01-09 17:29:12 +00:00
];
};
2024-01-15 05:16:28 +00:00
nixserver = nixpkgs.lib.nixosSystem {
2024-01-10 23:07:25 +00:00
system = "x86_64-linux";
2024-01-16 02:25:58 +00:00
specialArgs = { inherit common_dir; };
2024-01-10 23:07:25 +00:00
modules = [
./hosts/nixserver/configuration.nix
2024-01-29 04:05:46 +00:00
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.cameron = import ./hosts/nixserver/home-manager/cameron.nix;
home-manager.extraSpecialArgs = { inherit common_dir; };
}
2024-01-10 23:07:25 +00:00
];
};
2024-01-09 17:29:12 +00:00
};
};
}