nixos/flake.nix

79 lines
2.5 KiB
Nix
Raw Normal View History

2023-12-14 17:23:01 -07:00
{
description = "NixOS system flake.";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
2023-12-14 21:58:29 -07:00
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11";
2023-12-18 20:12:41 -07:00
nur.url = "github:nix-community/NUR";
2023-12-14 17:23:01 -07:00
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, nixpkgs-stable, nur, home-manager, ... } @ inputs:
2023-12-14 17:23:01 -07:00
let
2023-12-15 09:24:13 -07:00
inherit (self) outputs;
2023-12-14 17:23:01 -07:00
system = "x86_64-linux";
2023-12-16 16:36:03 -07:00
timeZone = "America/Denver";
2023-12-15 09:24:13 -07:00
pkgs = nixpkgs.legacyPackages.${system};
2023-12-16 16:36:03 -07:00
stablePkgs = nixpkgs-stable.legacyPackages.${system};
2023-12-14 17:23:01 -07:00
in
{
nixosConfigurations = {
luci = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs outputs timeZone system;
};
2023-12-14 17:23:01 -07:00
modules = [
inputs.home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.luci = import ./luci/modules/home-manager/home.nix;
home-manager.extraSpecialArgs = {
inherit inputs outputs;
};
}
./luci/default.nix
2023-12-14 17:23:01 -07:00
];
};
nate = nixpkgs.lib.nixosSystem {
2023-12-16 16:36:03 -07:00
# Pass args to desktop configuration
2023-12-14 17:23:01 -07:00
specialArgs = {
inherit inputs outputs timeZone system;
2023-12-14 17:23:01 -07:00
};
modules = [
# Setup home manager
inputs.home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.nate = import ./nate/modules/home-manager/home.nix;
home-manager.extraSpecialArgs = {
inherit inputs outputs;
};
}
./nate/default.nix
2023-12-14 17:23:01 -07:00
];
};
jaci = nixpkgs.lib.nixosSystem {
# Pass args to desktop configuration
specialArgs = {
inherit inputs outputs timeZone system;
};
modules = [
# Setup home manager
inputs.home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.jaci = import ./jaci/modules/home-manager/home.nix;
home-manager.extraSpecialArgs = {
inherit inputs outputs;
};
}
./jaci/default.nix
];
};
2023-12-14 17:23:01 -07:00
};
};
}