-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathflake.nix
More file actions
38 lines (35 loc) · 1.19 KB
/
flake.nix
File metadata and controls
38 lines (35 loc) · 1.19 KB
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
{
description = "Home Manager configuration";
inputs = {
# Specify the source of Home Manager and Nixpkgs.
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
systems.url = "github:nix-systems/default";
};
outputs = { self, nixpkgs, home-manager, systems, ... }:
let
eachSystem = nixpkgs.lib.genAttrs (import systems);
userConfig = builtins.fromTOML (builtins.readFile "${builtins.getEnv "HOME"}/.codespaces/config.toml");
specialArgs = {
inherit userConfig;
};
in
{
packages = eachSystem (system: {
homeConfigurations = {
"${builtins.getEnv "USER"}" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.${system};
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [ .config/home-manager/home.nix ];
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
extraSpecialArgs = specialArgs;
};
};
});
};
}