From 5c86bdd16a67d4663b7f4e885f76944a82c2905f Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Mon, 19 Apr 2021 13:42:29 +0200 Subject: [PATCH] home: setup home-manager --- flake.lock | 22 ++++++++++++++++++++++ flake.nix | 17 ++++++++++++++++- home/default.nix | 6 ++++++ 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 home/default.nix diff --git a/flake.lock b/flake.lock index 9ea516f..2677d02 100644 --- a/flake.lock +++ b/flake.lock @@ -16,6 +16,27 @@ "type": "github" } }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs-unstable" + ] + }, + "locked": { + "lastModified": 1618789951, + "narHash": "sha256-EoQxcVIiaqjUwwTl1YF3zGnXtzEvOUDL3SBZ8ASELvU=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "6aa6556bcab6dc0f6398b4daa8404d788fd7a6a2", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "master", + "repo": "home-manager", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1618149891, @@ -51,6 +72,7 @@ "root": { "inputs": { "emacs-overlay": "emacs-overlay", + "home-manager": "home-manager", "nixpkgs": "nixpkgs", "nixpkgs-unstable": "nixpkgs-unstable" } diff --git a/flake.nix b/flake.nix index 2dc0f8c..edb5671 100644 --- a/flake.nix +++ b/flake.nix @@ -21,9 +21,17 @@ repo = "emacs-overlay"; ref = "master"; }; + + home-manager = { + type = "github"; + owner = "nix-community"; + repo = "home-manager"; + ref = "master"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; }; - outputs = { self, nixpkgs, nixpkgs-unstable, emacs-overlay }: { + outputs = { self, nixpkgs, nixpkgs-unstable, emacs-overlay, home-manager }: { nixosConfigurations.poseidon = nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; modules = @@ -54,6 +62,13 @@ [ ./boreal.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.alarsyo = import ./home; + } + { nixpkgs.overlays = [ emacs-overlay.overlay diff --git a/home/default.nix b/home/default.nix new file mode 100644 index 0000000..5a16987 --- /dev/null +++ b/home/default.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + home.stateVersion = "20.09"; + + home.username = "alarsyo"; +}