summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorJasper Ras <jaspert.ras@gmail.com>2024-11-13 22:33:37 +0100
committerJasper Ras <jaspert.ras@gmail.com>2024-11-13 22:39:43 +0100
commitf1d8afcc156b14ce44dde407bd76661bdc821e03 (patch)
treeba0b24b0c869d5c68ca8f1e5acb29d325979837f /flake.nix
parent6c181cdefe9d8d7b2b6bd47d97c7c6768b7c2ae0 (diff)
Use flake-utils-plus and set-up multiple hosts
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix53
1 files changed, 35 insertions, 18 deletions
diff --git a/flake.nix b/flake.nix
index f1542ff..9ff6906 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,31 +1,44 @@
{
- description = "My NixOS Flake";
+ description = "NixOS Flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
home-manager.url = "github:nix-community/home-manager/release-24.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
helix.url = "github:helix-editor/helix/master";
- zen-browser.url = "github:MarceColl/zen-browser-flake";
hyprland.url = "github:hyprwm/Hyprland";
+ utils.url = "github:gytis-ivaskevicius/flake-utils-plus";
};
- outputs = { nixpkgs, home-manager, ... }@inputs: {
- nixosConfigurations.tarrel = nixpkgs.lib.nixosSystem {
- specialArgs = { inherit inputs; };
-
- modules = [
- ./configuration.nix
- ./hardware-configuration.nix
- ./gaming.nix
- ./networking.nix
- ./keyd.nix
- ./services.nix
- ./packages.nix
- ./compositor.nix
- ./nvidia.nix
- ./virt.nix
+ outputs = { self, nixpkgs, utils, home-manager, helix, hyprland }@inputs:
+ utils.lib.mkFlake {
+ inherit self inputs;
+ channelsConfig.allowUnfree = true;
+
+ hostDefaults.modules = [
+ ./modules/compositor.nix
+ ./modules/keyd.nix
+ ./modules/services.nix
+ ./modules/packages.nix
+ ./modules/nix-settings.nix
+ ];
+
+ hosts.work.modules = [
+ home-manager.nixosModules.home-manager
+ {
+ home-manager.useGlobalPkgs = true;
+ home-manager.useUserPackages = true;
+ home-manager.users.jras = import ./home-manager/entrypoints/work.nix;
+
+ home-manager.extraSpecialArgs = { inherit inputs; };
+ }
+
+ ./hosts/work.nix
+ ./modules/gaming.nix
+ ];
+
+ hosts.tarrel.modules = [
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
@@ -34,7 +47,11 @@
home-manager.extraSpecialArgs = { inherit inputs; };
}
+
+ ./hosts/tarrel.nix
+ ./modules/gaming.nix
+ ./modules/virt.nix
+ ./modules/sunshine.nix
];
};
- };
}