forked from nix-community/home-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
flake: add templates (nix-community#2892)
Add example flakes from `docs/nix-flakes.adoc` as templates.
- Loading branch information
1 parent
375631f
commit 8e4220e
Showing
5 changed files
with
120 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
description = "NixOS configuration"; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; | ||
darwin.url = "github:lnl7/nix-darwin"; | ||
darwin.inputs.nixpkgs.follows = "nixpkgs"; | ||
home-manager.url = "github:nix-community/home-manager"; | ||
home-manager.inputs.nixpkgs.follows = "nixpkgs"; | ||
}; | ||
|
||
outputs = inputs@{ nixpkgs, home-manager, darwin, ... }: { | ||
darwinConfigurations = { | ||
hostname = darwin.lib.darwinSystem { | ||
system = "x86_64-darwin"; | ||
modules = [ | ||
./configuration.nix | ||
home-manager.darwinModules.home-manager | ||
{ | ||
home-manager.useGlobalPkgs = true; | ||
home-manager.useUserPackages = true; | ||
home-manager.users.jdoe = import ./home.nix; | ||
|
||
# Optionally, use home-manager.extraSpecialArgs to pass | ||
# arguments to home.nix | ||
} | ||
]; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
description = "NixOS configuration"; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; | ||
home-manager.url = "github:nix-community/home-manager"; | ||
home-manager.inputs.nixpkgs.follows = "nixpkgs"; | ||
}; | ||
|
||
outputs = inputs@{ nixpkgs, home-manager, ... }: { | ||
nixosConfigurations = { | ||
hostname = nixpkgs.lib.nixosSystem { | ||
system = "x86_64-linux"; | ||
modules = [ | ||
./configuration.nix | ||
home-manager.nixosModules.home-manager | ||
{ | ||
home-manager.useGlobalPkgs = true; | ||
home-manager.useUserPackages = true; | ||
home-manager.users.jdoe = import ./home.nix; | ||
|
||
# Optionally, use home-manager.extraSpecialArgs to pass | ||
# arguments to home.nix | ||
} | ||
]; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
description = "Home Manager configuration of Jane Doe"; | ||
|
||
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"; | ||
}; | ||
}; | ||
|
||
outputs = { nixpkgs, home-manager, ... }: | ||
let | ||
system = "x86_64-linux"; | ||
pkgs = nixpkgs.legacyPackages.${system}; | ||
in { | ||
homeConfigurations.jdoe = home-manager.lib.homeManagerConfiguration { | ||
inherit pkgs; | ||
|
||
# Specify your home configuration modules here, for example, | ||
# the path to your home.nix. | ||
modules = [ ./home.nix ]; | ||
|
||
# Optionally use extraSpecialArgs | ||
# to pass through arguments to home.nix | ||
}; | ||
}; | ||
} |