build(nixos): add home-manager
This commit is contained in:
parent
9bc605b2eb
commit
ef89e56b6e
3 changed files with 73 additions and 2 deletions
21
flake.lock
generated
21
flake.lock
generated
|
@ -1,5 +1,25 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1740188029,
|
||||||
|
"narHash": "sha256-pnPs+XSpR633G/q0gj+SDyL4RaDfiKlom86zEBPtq+M=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "765cb91e9d5ab06ed8c92c25fc0e51d6c11d43cb",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739866667,
|
"lastModified": 1739866667,
|
||||||
|
@ -18,6 +38,7 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"home-manager": "home-manager",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
12
flake.nix
12
flake.nix
|
@ -1,15 +1,23 @@
|
||||||
{
|
{
|
||||||
description = "simple NixOS flake";
|
description = "simple NixOS flake with home-manager";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{ self, nixpkgs, ... }: {
|
outputs = inputs@{ self, nixpkgs, home-manager, ... }: {
|
||||||
nixosConfigurations.nemesis = nixpkgs.lib.nixosSystem {
|
nixosConfigurations.nemesis = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
|
|
||||||
|
home-manager.nixosModules.home-manager {
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.users.rafiq = import ./home.nix;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
42
home.nix
Normal file
42
home.nix
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.username = "rafiq";
|
||||||
|
home.homeDirectory = "/home/rafiq";
|
||||||
|
|
||||||
|
# home.file.".config/" = {
|
||||||
|
# source = ./.config;
|
||||||
|
# recursive = true;
|
||||||
|
# };
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
fastfetch
|
||||||
|
neovim
|
||||||
|
zip
|
||||||
|
unzip
|
||||||
|
ripgrep
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
userName = "Mohammad Rafiq";
|
||||||
|
userEmail = "mohammadrafiq567@gmail.com";
|
||||||
|
};
|
||||||
|
|
||||||
|
#TODO add neovim option
|
||||||
|
|
||||||
|
#TODO add starship
|
||||||
|
|
||||||
|
programs.bash = {
|
||||||
|
enable = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
shellAliases = {
|
||||||
|
ll = "ls -la";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.stateVersion = "24.11";
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue