🛖 Use home-manager as nixos-module

main
Christian Ott 2 years ago
parent 4b89f8d1ab
commit b69bfdd120
  1. 7
      flake.lock
  2. 25
      flake.nix
  3. 26
      home.nix

@ -7,15 +7,16 @@
]
},
"locked": {
"lastModified": 1713294767,
"narHash": "sha256-LmaabaQZdx52MPGKPRt9Opoc9Gd9RbwvCdysUUYQoXI=",
"lastModified": 1712386041,
"narHash": "sha256-dA82pOMQNnCJMAsPG7AXG35VmCSMZsJHTFlTHizpKWQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "fa8c16e2452bf092ac76f09ee1fb1e9f7d0796e7",
"rev": "d6bb9f934f2870e5cbc5b94c79e9db22246141ff",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.11",
"repo": "home-manager",
"type": "github"
}

@ -4,7 +4,7 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-23.11";
home-manager = {
url = github:nix-community/home-manager;
url = github:nix-community/home-manager/release-23.11;
inputs.nixpkgs.follows = "nixpkgs";
};
};
@ -13,26 +13,21 @@
let
username = "chrigi";
lib = nixpkgs.lib;
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in {
nixosConfigurations.nix-fw16 = 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.${username} = import ./home.nix;
home-manager.extraSpecialArgs = {inherit inputs username; };
}
];
};
# home-manager-config = {
# fw16-chrigi = home-manager.lib.homeManagerConfiguration {
# inherit system pkgs;
# username = ${username};
# homeDirectory = "/home/${username}";
# stateVersion = "23.11";
# configuration = {
# imports = [
# ./home.nix
# ];
# };
# };
# };
};
}

@ -0,0 +1,26 @@
{ config, pkgs, ... }:
{
# TODO please change the username & home directory to your own
home.username = "chrigi";
home.homeDirectory = "/home/chrigi";
# Packages that should be installed to the user profile.
home.packages = with pkgs; [
eza
jq
];
# This value determines the home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new home Manager release introduces backwards
# incompatible changes.
#
# You can update home Manager without changing this value. See
# the home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "23.11";
# Let home Manager install and manage itself.
# programs.home-manager.enable = true;
}
Loading…
Cancel
Save

Powered by TurnKey Linux.