nixos-config/flake.nix

127 lines
3.4 KiB
Nix
Raw Normal View History

2022-06-17 15:00:08 +00:00
{
inputs = {
2022-12-07 14:11:38 +00:00
nixpkgs.url = github:NixOS/nixpkgs/nixos-22.11;
2023-03-13 11:13:08 +00:00
nixpkgs-unstable.url = github:NixOS/nixpkgs/nixos-unstable;
2022-06-17 15:00:08 +00:00
home-manager = {
2022-12-07 14:11:38 +00:00
url = github:nix-community/home-manager/release-22.11;
2022-06-17 15:00:08 +00:00
inputs.nixpkgs.follows = "nixpkgs";
};
2023-03-13 11:13:08 +00:00
2022-06-17 15:00:08 +00:00
};
2023-03-13 11:13:08 +00:00
outputs = inputs@{ self, nixpkgs, nixpkgs-unstable, home-manager, ... }:
2022-06-26 12:44:53 +00:00
let
2022-06-17 15:00:08 +00:00
user = "mandlm";
2022-08-18 19:15:03 +00:00
theme = "dark"; # dark or light
2023-03-13 11:13:08 +00:00
overlays = {
unstable-packages = _final: _prev: {
unstable = import nixpkgs-unstable {
system = "x86_64-linux";
config.allowUnfree = true;
};
};
};
nixpkgs_config = {
overlays = [
overlays.unstable-packages
];
config = {
allowUnfree = true;
allowUnfreePredicate = (_: true);
};
};
2022-06-26 12:44:53 +00:00
in
2022-06-17 15:00:08 +00:00
{
2023-03-13 11:13:08 +00:00
2022-06-26 13:03:45 +00:00
nixosConfigurations = {
nixos-vm = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
./users.nix
./machines/nixos-vm/configuration.nix
./machines/nixos-vm/hardware-configuration.nix
2022-06-20 06:53:37 +00:00
2022-06-26 13:03:45 +00:00
home-manager.nixosModules.home-manager
{
2022-08-18 19:15:03 +00:00
home-manager.extraSpecialArgs = { inherit user theme; };
2022-06-26 13:03:45 +00:00
home-manager.users.${user} = {
imports = [ ./home-${user}.nix ];
2023-03-13 11:13:08 +00:00
nixpkgs = nixpkgs_config;
2022-06-26 13:03:45 +00:00
};
}
];
};
2022-06-18 17:48:25 +00:00
2022-06-26 13:03:45 +00:00
apache = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
./users.nix
./machines/apache/configuration.nix
./machines/apache/hardware-configuration.nix
2022-06-18 17:48:25 +00:00
2022-06-26 13:03:45 +00:00
home-manager.nixosModules.home-manager
{
2022-08-18 19:15:03 +00:00
home-manager.extraSpecialArgs = { inherit user theme; };
2022-06-26 13:03:45 +00:00
home-manager.users.${user} = {
2022-07-07 13:33:38 +00:00
imports = [
./home-${user}.nix
./machines/apache/home-${user}.nix
];
2023-03-13 11:13:08 +00:00
nixpkgs = nixpkgs_config;
2022-07-07 13:33:38 +00:00
};
}
];
};
p330 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
./users.nix
./machines/p330/configuration.nix
./machines/p330/hardware-configuration.nix
home-manager.nixosModules.home-manager
{
2022-08-18 19:15:03 +00:00
home-manager.extraSpecialArgs = { inherit user theme; };
2022-07-07 13:33:38 +00:00
home-manager.users.${user} = {
imports = [
./home-${user}.nix
./machines/p330/home-${user}.nix
];
2023-03-13 11:13:08 +00:00
nixpkgs = nixpkgs_config;
2022-06-26 13:03:45 +00:00
};
}
];
};
2022-08-25 18:42:40 +00:00
yoga = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
./users.nix
./machines/yoga/configuration.nix
./machines/yoga/hardware-configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.extraSpecialArgs = { inherit user theme; };
home-manager.users.${user} = {
imports = [
./home-${user}.nix
./machines/yoga/home-${user}.nix
];
2023-03-13 11:13:08 +00:00
nixpkgs = nixpkgs_config;
2022-08-25 18:42:40 +00:00
};
}
];
};
2022-06-17 15:00:08 +00:00
};
};
}