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
Raw Normal View History

2022-06-17 15:00:08 +00:00
{
inputs = {
2023-11-30 14:11:22 +00:00
nixpkgs.url = github:NixOS/nixpkgs/nixos-23.11;
2023-03-13 12:52:54 +00:00
nixpkgs-unstable.url = github:NixOS/nixpkgs/nixos-unstable;
2022-06-17 15:00:08 +00:00
2024-01-12 22:31:01 +00:00
nixos-hardware.url = github:mandlm/nixos-hardware/p330;
2022-06-17 15:00:08 +00:00
home-manager = {
2023-11-30 14:11:22 +00:00
url = github:nix-community/home-manager/release-23.11;
2022-06-17 15:00:08 +00:00
inputs.nixpkgs.follows = "nixpkgs";
};
};
2024-01-12 22:31:01 +00:00
outputs = { self, nixpkgs, nixpkgs-unstable, nixos-hardware, home-manager }:
2022-06-26 12:44:53 +00:00
let
2022-06-17 15:00:08 +00:00
user = "mandlm";
2024-03-30 08:19:56 +00:00
theme = "dark"; # dark or light
2023-09-01 06:06:14 +00:00
# theme = "light"; # dark or light
2023-03-13 12:52:54 +00:00
nixpkgs-config = {
allowUnfreePredicate = (pkg: true);
2023-03-13 12:52:54 +00:00
};
overlay-unstable = final: prev: {
unstable = import nixpkgs-unstable {
system = "x86_64-linux";
config.allowUnfreePredicate = (pkg: true);
2023-03-13 12:52:54 +00:00
};
};
2022-06-26 12:44:53 +00:00
in
2022-06-17 15:00:08 +00:00
{
2022-06-26 13:03:45 +00:00
nixosConfigurations = {
apache = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
2024-02-08 12:48:37 +00:00
./swp/configuration.nix
2023-09-24 19:56:38 +00:00
./greetd.nix
2022-06-26 13:03:45 +00:00
./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
{
home-manager.useUserPackages = true;
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
2024-02-08 12:48:37 +00:00
./swp/home-${user}.nix
2022-07-07 13:33:38 +00:00
];
2023-03-13 12:52:54 +00:00
nixpkgs.config = nixpkgs-config;
nixpkgs.overlays = [ overlay-unstable ];
2022-07-07 13:33:38 +00:00
};
}
];
};
p330 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
2024-02-08 12:48:37 +00:00
./swp/configuration.nix
2023-09-25 12:18:11 +00:00
./greetd.nix
2022-07-07 13:33:38 +00:00
./users.nix
./machines/p330/configuration.nix
./machines/p330/hardware-configuration.nix
2024-01-12 22:31:01 +00:00
nixos-hardware.nixosModules.lenovo-thinkstation-p330
2022-07-07 13:33:38 +00:00
home-manager.nixosModules.home-manager
{
home-manager.useUserPackages = true;
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
2024-02-08 12:48:37 +00:00
./swp/home-${user}.nix
2022-07-07 13:33:38 +00:00
];
2023-03-13 12:52:54 +00:00
nixpkgs.config = nixpkgs-config;
nixpkgs.overlays = [ overlay-unstable ];
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
2023-09-25 12:18:11 +00:00
./greetd.nix
2022-08-25 18:42:40 +00:00
./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
];
2023-03-13 12:52:54 +00:00
nixpkgs.config = nixpkgs-config;
nixpkgs.overlays = [ overlay-unstable ];
2022-08-25 18:42:40 +00:00
};
}
];
};
2024-01-12 22:31:01 +00:00
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 ];
};
}
];
};
2022-06-17 15:00:08 +00:00
};
};
}