127 lines
3.4 KiB
Nix
127 lines
3.4 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = github:NixOS/nixpkgs/nixos-22.11;
|
|
nixpkgs-unstable.url = github:NixOS/nixpkgs/nixos-unstable;
|
|
|
|
home-manager = {
|
|
url = github:nix-community/home-manager/release-22.11;
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
};
|
|
|
|
outputs = inputs@{ self, nixpkgs, nixpkgs-unstable, home-manager, ... }:
|
|
let
|
|
user = "mandlm";
|
|
theme = "dark"; # dark or light
|
|
|
|
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);
|
|
};
|
|
};
|
|
in
|
|
{
|
|
|
|
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
|
|
|
|
home-manager.nixosModules.home-manager
|
|
{
|
|
home-manager.extraSpecialArgs = { inherit user theme; };
|
|
home-manager.users.${user} = {
|
|
imports = [ ./home-${user}.nix ];
|
|
nixpkgs = nixpkgs_config;
|
|
};
|
|
}
|
|
];
|
|
};
|
|
|
|
apache = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
./configuration.nix
|
|
./users.nix
|
|
./machines/apache/configuration.nix
|
|
./machines/apache/hardware-configuration.nix
|
|
|
|
home-manager.nixosModules.home-manager
|
|
{
|
|
home-manager.extraSpecialArgs = { inherit user theme; };
|
|
home-manager.users.${user} = {
|
|
imports = [
|
|
./home-${user}.nix
|
|
./machines/apache/home-${user}.nix
|
|
];
|
|
nixpkgs = nixpkgs_config;
|
|
};
|
|
}
|
|
];
|
|
};
|
|
|
|
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
|
|
{
|
|
home-manager.extraSpecialArgs = { inherit user theme; };
|
|
home-manager.users.${user} = {
|
|
imports = [
|
|
./home-${user}.nix
|
|
./machines/p330/home-${user}.nix
|
|
];
|
|
nixpkgs = nixpkgs_config;
|
|
};
|
|
}
|
|
];
|
|
};
|
|
|
|
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
|
|
];
|
|
nixpkgs = nixpkgs_config;
|
|
};
|
|
}
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|