75 lines
2.1 KiB
Nix
75 lines
2.1 KiB
Nix
{
|
|
description = "NixOS system flake.";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11";
|
|
|
|
nix-ld = {
|
|
url = "github:Mic92/nix-ld";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
nur.url = "github:nix-community/NUR";
|
|
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# firefox-addons = {
|
|
# url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
|
# inputs.nixpkgs.follows = "nixpkgs";
|
|
# };
|
|
};
|
|
|
|
outputs = { self, nixpkgs, nixpkgs-stable, nix-ld, nur, home-manager, ... } @ inputs:
|
|
let
|
|
inherit (self) outputs;
|
|
system = "x86_64-linux";
|
|
userName = "nate";
|
|
fullName = "Nate Anderson";
|
|
email = "n8r@tuta.io";
|
|
hostName = "winmax";
|
|
desktop = "sway";
|
|
gaming = true;
|
|
timeZone = "America/Denver";
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
stablePkgs = nixpkgs-stable.legacyPackages.${system};
|
|
in
|
|
{
|
|
|
|
nixosConfigurations = {
|
|
nixServer = nixpkgs.lib.nixosSystem {
|
|
specialArgs = { inherit inputs; };
|
|
modules = [
|
|
# nixpkgs.overlays = [ nur.overlay ];
|
|
./nixos/server_configuration.nix
|
|
inputs.home-manager.nixosModules.default
|
|
];
|
|
};
|
|
nixDesktop = nixpkgs.lib.nixosSystem {
|
|
# Pass args to desktop configuration
|
|
specialArgs = {
|
|
inherit inputs outputs userName hostName desktop timeZone gaming system;
|
|
};
|
|
modules = [
|
|
./nixos/desktop_configuration.nix
|
|
# Setup nix-ld
|
|
nix-ld.nixosModules.nix-ld
|
|
# Setup home manager
|
|
home-manager.nixosModules.home-manager {
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.users.${userName} = import ./modules/home-manager/home.nix;
|
|
home-manager.extraSpecialArgs = {
|
|
inherit inputs outputs userName fullName email hostName desktop gaming;
|
|
};
|
|
}
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|