Add home-manager
This commit is contained in:
parent
78992b130b
commit
7410af0502
21
flake.lock
21
flake.lock
@ -1,5 +1,25 @@
|
||||
{
|
||||
"nodes": {
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1708988456,
|
||||
"narHash": "sha256-RCz7Xe64tN2zgWk+MVHkzg224znwqknJ1RnB7rVqUWw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "1d085ea4444d26aa52297758b333b449b2aa6fca",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1708807242,
|
||||
@ -18,6 +38,7 @@
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,10 @@
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }@inputs:
|
||||
|
20
home/default.nix
Normal file
20
home/default.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{ inputs, self, user, ...}: {
|
||||
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
||||
home-manager = {
|
||||
useUserPackages = true;
|
||||
useGlobalPkgs= true;
|
||||
extraSpecialArgs = { inherit inputs user; };
|
||||
users.${user} = {
|
||||
imports = [
|
||||
./programs/firefox
|
||||
];
|
||||
firefox.enable = true;
|
||||
home = {
|
||||
username = "${user}";
|
||||
homeDirectory = "/home/${user}";
|
||||
stateVersion = "23.11";
|
||||
};
|
||||
programs.home-manager.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
9
home/programs/firefox/default.nix
Normal file
9
home/programs/firefox/default.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{ pkgs, config, lib, inputs, user, ...}: {
|
||||
options.firefox.enable = lib.mkEnableOption "Firefox";
|
||||
|
||||
config = lib.mkIf config.firefox.enable {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
@ -3,5 +3,6 @@
|
||||
./configuration.nix
|
||||
./hardware-configuration.nix
|
||||
../../system
|
||||
../../home
|
||||
];
|
||||
}
|
||||
|
@ -13,9 +13,6 @@
|
||||
extraGroups = [ "wheel" "networkmanager" ];
|
||||
# Install some user packages
|
||||
packages = with pkgs; [
|
||||
# Browser
|
||||
firefox
|
||||
|
||||
# Editors
|
||||
vscode
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user