diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0309149 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/example/result diff --git a/example/flake.lock b/example/flake.lock new file mode 100644 index 0000000..be60bf2 --- /dev/null +++ b/example/flake.lock @@ -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 +} diff --git a/example/flake.nix b/example/flake.nix new file mode 100644 index 0000000..159e67f --- /dev/null +++ b/example/flake.nix @@ -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 + ]; + }; + }; +}