mirror of
https://github.com/nix-community/plasma-manager.git
synced 2025-01-07 15:30:48 +03:00
example: Add example flake.nix file
This commit is contained in:
parent
1492919230
commit
b3ac430d91
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/example/result
|
73
example/flake.lock
generated
Normal file
73
example/flake.lock
generated
Normal file
@ -0,0 +1,73 @@
|
||||
{
|
||||
"nodes": {
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1655880690,
|
||||
"narHash": "sha256-pO+EqUefNFolIWV1DHXPfI8NuUtD4fd7JFKoaCjVXOs=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "a839432a5c3d2a762d68168093349097e6affb07",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-22.05",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1656007306,
|
||||
"narHash": "sha256-MsC44YZ6wuBwn5Bu8T+RVoQWlp2l5BR6hhmNoAAHIEw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ccf8bdf72624521358be6bb7d9b524c4cbcf7aff",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-22.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"plasma-manager": {
|
||||
"inputs": {
|
||||
"home-manager": [
|
||||
"home-manager"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1656109003,
|
||||
"narHash": "sha256-UUhp5bBKEL370r5EphALfOrAiBO3w48U1B+97/HPlWY=",
|
||||
"owner": "pjones",
|
||||
"repo": "plasma-manager",
|
||||
"rev": "1492919230b9484f5b91abdf4759bdbbdd7b6aaa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "pjones",
|
||||
"repo": "plasma-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"plasma-manager": "plasma-manager"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
45
example/flake.nix
Normal file
45
example/flake.nix
Normal file
@ -0,0 +1,45 @@
|
||||
{
|
||||
description = "Plasma Manager Example";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.05";
|
||||
|
||||
home-manager.url = "github:nix-community/home-manager/release-22.05";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
plasma-manager.url = "github:pjones/plasma-manager";
|
||||
plasma-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
plasma-manager.inputs.home-manager.follows = "home-manager";
|
||||
};
|
||||
|
||||
outputs = inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
username = "jdoe";
|
||||
in
|
||||
{
|
||||
# Standalone Home Manager Setup:
|
||||
homeConfigurations.${username} =
|
||||
inputs.home-manager.lib.homeManagerConfiguration {
|
||||
# Ensure Plasma Manager is available:
|
||||
extraModules = [
|
||||
inputs.plasma-manager.homeManagerModules.plasma-manager
|
||||
];
|
||||
|
||||
# Specify the path to your home configuration here:
|
||||
configuration = import ./home.nix;
|
||||
|
||||
inherit system username;
|
||||
homeDirectory = "/home/${username}";
|
||||
};
|
||||
|
||||
# A shell where Home Manager can be used:
|
||||
devShells.${system}.default =
|
||||
let pkgs = import inputs.nixpkgs { inherit system; }; in
|
||||
pkgs.mkShell {
|
||||
buildInputs = [
|
||||
inputs.home-manager.packages.${system}.home-manager
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user