zaneyos/flake.nix

76 lines
2.4 KiB
Nix
Raw Normal View History

2024-01-09 23:50:24 +01:00
{
description = "ZaneyOS";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager/master";
2024-01-09 23:50:24 +01:00
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nix-colors.url = "github:misterio77/nix-colors";
hyprland.url = "github:hyprwm/Hyprland";
hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland";
};
2024-01-09 23:50:24 +01:00
};
outputs = inputs@{ nixpkgs, home-manager, ... }:
let
system = "x86_64-linux";
2024-01-15 22:49:11 +01:00
# User Variables
hostname = "hyprnix";
username = "zaney";
2024-01-13 06:53:25 +01:00
gitUsername = "Tyler Kelley";
gitEmail = "tylerzanekelley@gmail.com";
2024-01-13 07:05:01 +01:00
theLocale = "en_US.UTF-8";
theKBDLayout = "us";
theLCVariables = "en_US.UTF-8";
2024-01-13 07:05:01 +01:00
theTimezone = "America/Chicago";
2024-01-24 03:44:34 +01:00
theme = "gigavolt";
browser = "firefox";
wallpaperGit = "https://gitlab.com/Zaney/my-wallpapers.git";
2024-01-17 09:17:12 +01:00
wallpaperDir = "/home/${username}/Pictures/Wallpapers";
flakeDir = "/home/${username}/zaneyos";
# Driver selection profile
# default options amd, intel, nvidia, vm (WIP)
cpuType = "amd";
gpuType = "amd";
2024-01-15 22:49:11 +01:00
2024-01-09 23:50:24 +01:00
pkgs = import nixpkgs {
inherit system;
config = {
allowUnfree = true;
2024-01-09 23:50:24 +01:00
};
};
in {
nixosConfigurations = {
"${hostname}" = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit system; inherit inputs;
inherit username; inherit hostname;
inherit gitUsername; inherit theTimezone;
inherit gitEmail; inherit theLocale;
inherit wallpaperDir; inherit wallpaperGit;
inherit cpuType; inherit theKBDLayout;
inherit theLCVariables; inherit gpuType;
2024-01-13 06:53:25 +01:00
};
modules = [ ./system.nix
2024-01-09 23:50:24 +01:00
home-manager.nixosModules.home-manager {
2024-01-13 06:53:25 +01:00
home-manager.extraSpecialArgs = { inherit username;
inherit gitUsername; inherit gitEmail;
inherit inputs; inherit theme;
inherit browser; inherit wallpaperDir;
inherit wallpaperGit; inherit flakeDir;
2024-01-24 01:18:39 +01:00
inherit gpuType; inherit cpuType;
inherit (inputs.nix-colors.lib-contrib {inherit pkgs;}) gtkThemeFromScheme;
2024-01-13 06:53:25 +01:00
};
2024-01-09 23:50:24 +01:00
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${username} = import ./home.nix;
2024-01-09 23:50:24 +01:00
}
];
};
};
};
}