This repository has been archived on 2024-12-15. You can view files and clone it, but cannot push or open issues or pull requests.
nixos-config/flake.nix

141 lines
4.3 KiB
Nix

{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:mandlm/nixos-hardware/p330";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, nixpkgs-unstable, nixos-hardware, home-manager }:
let
user = "mandlm";
theme = "dark"; # dark or light
# theme = "light"; # dark or light
nixpkgs-config = {
allowUnfreePredicate = (pkg: true);
};
overlay-unstable = final: prev: {
unstable = import nixpkgs-unstable {
system = "x86_64-linux";
config.allowUnfreePredicate = (pkg: true);
};
};
in
{
nixosConfigurations = {
apache = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
./swp/configuration.nix
./greetd.nix
./users.nix
./machines/apache/configuration.nix
./machines/apache/hardware-configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit user theme; };
home-manager.users.${user} = {
imports = [
./home-${user}.nix
./machines/apache/home-${user}.nix
./swp/home-${user}.nix
];
nixpkgs.config = nixpkgs-config;
nixpkgs.overlays = [ overlay-unstable ];
};
}
];
};
p330 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
./swp/configuration.nix
./greetd.nix
./users.nix
./machines/p330/configuration.nix
./machines/p330/hardware-configuration.nix
nixos-hardware.nixosModules.lenovo-thinkstation-p330
home-manager.nixosModules.home-manager
{
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit user theme; };
home-manager.users.${user} = {
imports = [
./home-${user}.nix
./machines/p330/home-${user}.nix
./swp/home-${user}.nix
];
nixpkgs.config = nixpkgs-config;
nixpkgs.overlays = [ overlay-unstable ];
};
}
];
};
yoga = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
./greetd.nix
./users.nix
./machines/yoga/configuration.nix
./machines/yoga/hardware-configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit user theme; };
home-manager.users.${user} = {
imports = [
./home-${user}.nix
./machines/yoga/home-${user}.nix
];
nixpkgs.config = nixpkgs-config;
nixpkgs.overlays = [ overlay-unstable ];
};
}
];
};
xps = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
./greetd.nix
./users.nix
./machines/xps/configuration.nix
./machines/xps/hardware-configuration.nix
nixos-hardware.nixosModules.dell-xps-13-9320
home-manager.nixosModules.home-manager
{
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit user theme; };
home-manager.users.${user} = {
imports = [
./home-${user}.nix
./machines/xps/home-${user}.nix
];
nixpkgs.config = nixpkgs-config;
nixpkgs.overlays = [ overlay-unstable ];
};
}
];
};
};
};
}