nixos-home-flake/flake.nix

52 lines
1.4 KiB
Nix

{
description = "Pwnix: NixOS Dotfiles focused on Hacking and Productivity.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
hypr-contrib.url = "github:hyprwm/contrib";
};
outputs = { nixpkgs, home-manager, ... }@inputs:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
lib = nixpkgs.lib;
# ---CUSTOM SETTINGS---
user = "spagnologasper";
hostName = "yoga";
# ---CUSTOM SETTINGS---
mkSystem = pkgs: system: hostname:
pkgs.lib.nixosSystem {
system = system;
modules = [
./modules/system/configuration.nix
(./. + "/hosts/${hostname}/hardware-configuration.nix")
(./. + "/hosts/${hostname}/default.nix")
home-manager.nixosModules.home-manager
{
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
extraSpecialArgs = { inherit inputs user; };
users.${user} = (./. + "/hosts/${hostname}/user.nix");
};
}
];
specialArgs = {inherit inputs user hostName; };
};
in {
nixosConfigurations = {
yoga = mkSystem inputs.nixpkgs "x86_64-linux" "yoga";
};
};
}