NixOS-Configuration/flake.nix

47 lines
1.2 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-16 02:25:58 +00:00
# Unstable
2024-01-15 05:16:28 +00:00
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
2024-01-16 02:25:58 +00:00
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs-unstable";
2024-01-09 17:29:12 +00:00
};
2024-01-16 02:25:58 +00:00
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager }:
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-16 02:25:58 +00:00
home-manager.nixosModules.home-manager {
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-09 17:29:12 +00:00
};
};
}