diff --git a/flake.lock b/flake.lock index 83aef05..c0114c3 100644 --- a/flake.lock +++ b/flake.lock @@ -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" } diff --git a/flake.nix b/flake.nix index d73af25..5fb1080 100644 --- a/flake.nix +++ b/flake.nix @@ -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 - # ]; - # }; - # }; - # }; }; } diff --git a/home.nix b/home.nix new file mode 100644 index 0000000..7bacb7f --- /dev/null +++ b/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; +} \ No newline at end of file