zaneyos/flake.nix

66 lines
2.2 KiB
Nix
Raw Normal View History

2024-01-09 23:50:24 +01:00
{
description = "ZaneyOS";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
home-manager.url = "github:nix-community/home-manager/release-23.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
hyprland.url = "github:hyprwm/Hyprland";
nix-colors.url = "github:misterio77/nix-colors";
2024-01-09 23:50:24 +01:00
};
outputs = inputs@{ nixpkgs, home-manager, ... }:
let
system = "x86_64-linux";
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";
theTimezone = "America/Chicago";
2024-01-09 23:50:24 +01:00
pkgs = import nixpkgs {
inherit system;
config = {
allowUnfree = true;
};
};
in {
nixosConfigurations = {
laptop = nixpkgs.lib.nixosSystem {
2024-01-13 06:53:25 +01:00
specialArgs = { inherit system; inherit inputs;
inherit username; inherit hostname; inherit gitUsername;
2024-01-13 07:05:01 +01:00
inherit gitEmail; inherit theLocale; inherit theTimezone;
2024-01-13 06:53:25 +01:00
};
2024-01-09 23:50:24 +01:00
modules = [ ./laptop/configuration.nix
home-manager.nixosModules.home-manager {
2024-01-13 06:53:25 +01:00
home-manager.extraSpecialArgs = { inherit username;
2024-01-15 09:04:58 +01:00
inherit gitUsername; inherit gitEmail;
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;
2024-01-12 09:00:46 +01:00
home-manager.users.${username} = import ./home.nix;
2024-01-09 23:50:24 +01:00
}
];
};
workstation = nixpkgs.lib.nixosSystem {
2024-01-13 06:53:25 +01:00
specialArgs = { inherit system; inherit inputs;
inherit username; inherit hostname; inherit gitUsername;
2024-01-13 07:05:01 +01:00
inherit gitEmail; inherit theLocale; inherit theTimezone;
2024-01-13 06:53:25 +01:00
};
2024-01-09 23:50:24 +01:00
modules = [ ./workstation/configuration.nix
home-manager.nixosModules.home-manager {
2024-01-13 06:53:25 +01:00
home-manager.extraSpecialArgs = { inherit username;
2024-01-14 08:54:57 +01:00
inherit gitUsername; inherit gitEmail; inherit inputs;
2024-01-15 09:04:58 +01:00
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
}
];
};
};
};
}