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-14 17:23:01 -07:00
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-12-14 21:58:29 -07:00
|
|
|
outputs = inputs@{ self, nixpkgs, nixpkgs-stable, home-manager, ... }:
|
2023-12-14 17:23:01 -07:00
|
|
|
let
|
|
|
|
system = "x86_64-linux";
|
|
|
|
userName = "nate";
|
|
|
|
hostName = "winmax";
|
2023-12-14 21:58:29 -07:00
|
|
|
pkgs = import nixpkgs {
|
|
|
|
legacyPackages = system;
|
|
|
|
# smh steam
|
|
|
|
config.allowUnfree = true;
|
|
|
|
};
|
|
|
|
stablePkgs = import nixpkgs-stable {
|
|
|
|
legacyPackages = system;
|
|
|
|
config.allowUnfree = true;
|
|
|
|
};
|
2023-12-14 17:23:01 -07:00
|
|
|
in
|
|
|
|
{
|
|
|
|
nixosConfigurations = {
|
|
|
|
nixServer = nixpkgs.lib.nixosSystem {
|
|
|
|
specialArgs = { inherit inputs; };
|
|
|
|
modules = [
|
|
|
|
./nixos/configuration.nix
|
|
|
|
inputs.home-manager.nixosModules.default
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
nixSway = nixpkgs.lib.nixosSystem {
|
|
|
|
# Pass args to sway_configuration
|
|
|
|
specialArgs = {
|
2023-12-14 21:58:29 -07:00
|
|
|
inherit inputs;
|
2023-12-14 17:23:01 -07:00
|
|
|
inherit userName;
|
|
|
|
inherit hostName;
|
|
|
|
};
|
|
|
|
modules = [
|
|
|
|
./nixos/sway_configuration.nix
|
|
|
|
# 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;
|
|
|
|
# Pass args to home.nix
|
|
|
|
home-manager.extraSpecialArgs = {
|
|
|
|
inherit inputs;
|
|
|
|
inherit userName;
|
2023-12-14 21:58:29 -07:00
|
|
|
inherit stablePkgs;
|
2023-12-14 17:23:01 -07:00
|
|
|
inherit hostName;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|