Add home manager configuraiton

This commit is contained in:
Nathan McCarty 2024-11-28 02:25:07 +00:00
parent 92c095c8a5
commit 558ecfabd3
5 changed files with 90 additions and 26 deletions

View file

@ -85,6 +85,27 @@
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1732466619,
"narHash": "sha256-T1e5oceypZu3Q8vzICjv1X/sGs9XfJRMW5OuXHgpB3c=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "f3111f62a23451114433888902a55cf0692b408d",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-24.11",
"repo": "home-manager",
"type": "github"
}
},
"lix": {
"flake": false,
"locked": {
@ -204,6 +225,7 @@
"root": {
"inputs": {
"flake-parts": "flake-parts",
"home-manager": "home-manager",
"lix-module": "lix-module",
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_2",

View file

@ -10,6 +10,10 @@
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-2.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
@ -21,6 +25,7 @@
# 2. Add foo as a parameter to the outputs function
# 3. Add here: foo.flakeModule
./nixos/machines/wsl/configuration.nix
./home-manager/machines/wsl/home.nix
];
systems = [
"x86_64-linux"

View file

@ -0,0 +1,32 @@
{ withSystem, inputs, ... }:
{
# perSystem = { ... }: { config.packages.hello = ...; };
flake.homeConfigurations.wsl = withSystem "x86_64-linux" (
ctx@{ config, inputs', ... }:
inputs.home-manager.lib.homeManagerConfiguration {
pkgs = inputs.nixpkgs.legacyPackages.${"x86_64-linux"};
extraSpecialArgs = {
inherit inputs inputs';
packages = config.packages;
};
modules = [
(
{
config,
lib,
pkgs,
...
}:
{
home.username = "nathan";
home.homeDirectory = "/home/nathan/";
programs.command-not-found.enable = true;
home.stateVersion = "24.11";
programs.home-manager.enable = true;
}
)
];
}
);
}

View file

@ -30,8 +30,11 @@
# WSL support
inputs.nixos-wsl.nixosModules.default
# Our modules
(import ../../modules/base.nix {inherit inputs;})
(import ../../modules/user.nix {inherit inputs;mutableUsers = true;})
(import ../../modules/base.nix { inherit inputs; })
(import ../../modules/user.nix {
inherit inputs;
mutableUsers = true;
})
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";

View file

@ -12,7 +12,9 @@
}:
{
security.polkit = { enable = true; };
security.polkit = {
enable = true;
};
users = {
inherit mutableUsers;
users.${username} = {