Add home manager configuraiton
This commit is contained in:
parent
92c095c8a5
commit
558ecfabd3
22
flake.lock
22
flake.lock
|
@ -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",
|
||||
|
|
|
@ -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"
|
||||
|
|
32
home-manager/machines/wsl/home.nix
Normal file
32
home-manager/machines/wsl/home.nix
Normal 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;
|
||||
}
|
||||
)
|
||||
];
|
||||
}
|
||||
);
|
||||
}
|
|
@ -27,13 +27,16 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
# WSL support
|
||||
# WSL support
|
||||
inputs.nixos-wsl.nixosModules.default
|
||||
# Our modules
|
||||
(import ../../modules/base.nix {inherit inputs;})
|
||||
(import ../../modules/user.nix {inherit inputs;mutableUsers = true;})
|
||||
# Our modules
|
||||
(import ../../modules/base.nix { inherit inputs; })
|
||||
(import ../../modules/user.nix {
|
||||
inherit inputs;
|
||||
mutableUsers = true;
|
||||
})
|
||||
];
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
||||
wsl.enable = true;
|
||||
wsl.defaultUser = "nathan";
|
||||
|
@ -43,12 +46,12 @@
|
|||
"flakes"
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
git
|
||||
tmux
|
||||
nixfmt-rfc-style
|
||||
];
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
git
|
||||
tmux
|
||||
nixfmt-rfc-style
|
||||
];
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
|
|
|
@ -12,19 +12,21 @@
|
|||
}:
|
||||
|
||||
{
|
||||
security.polkit = { enable = true; };
|
||||
users = {
|
||||
inherit mutableUsers;
|
||||
users.${username} = {
|
||||
home = homedir;
|
||||
description = "Nathan McCarty";
|
||||
shell = pkgs.nushell;
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
];
|
||||
hashedPassword = "$6$ShBAPGwzKZuB7eEv$cbb3erUqtVGFo/Vux9UwT2NkbVG9VGCxJxPiZFYL0DIc3t4GpYxjkM0M7fFnh.6V8MoSKLM/TvOtzdWbYwI58.";
|
||||
};
|
||||
security.polkit = {
|
||||
enable = true;
|
||||
};
|
||||
users = {
|
||||
inherit mutableUsers;
|
||||
users.${username} = {
|
||||
home = homedir;
|
||||
description = "Nathan McCarty";
|
||||
shell = pkgs.nushell;
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
];
|
||||
hashedPassword = "$6$ShBAPGwzKZuB7eEv$cbb3erUqtVGFo/Vux9UwT2NkbVG9VGCxJxPiZFYL0DIc3t4GpYxjkM0M7fFnh.6V8MoSKLM/TvOtzdWbYwI58.";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue