-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
56 lines (52 loc) · 1.73 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{
description = "My fabulous config";
inputs = {
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
# Home manager
home-manager = { url = "github:nix-community/home-manager/release-23.05"; inputs.nixpkgs.follows = "nixpkgs"; };
# nix utils
utils.url = "github:numtide/flake-utils";
};
outputs = { nixpkgs, home-manager, utils, ... }@inputs:
let
pkgsForSystem = system: import nixpkgs {
overlays = [
];
inherit system;
config.allowUnfree = true;
};
mkHomeConfiguration = args: home-manager.lib.homeManagerConfiguration (rec {
pkgs = pkgsForSystem (args.system or "x86_64-linux");
} // { inherit (args) extraSpecialArgs modules; });
in utils.lib.eachSystem [ "x86_64-linux" "aarch64-darwin"] (system: rec {
legacyPackages = pkgsForSystem system;
}) // {
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = {
# FIXME replace with your hostname
your-hostname = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; }; # Pass flake inputs to our config
# > Our main nixos configuration file <
modules = [ ./nixos/configuration.nix ];
};
};
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
"root@vmpod" = mkHomeConfiguration {
modules = [ ./home-manager/vmpod-home.nix ];
extraSpecialArgs = {
inherit inputs;
};
};
"azhwkd@havok" = mkHomeConfiguration {
modules = [ ./home-manager/havok.nix ];
extraSpecialArgs = {
inherit inputs;
};
};
};
};
}