feat(homes/rafiq): add comma and nix-index

This commit is contained in:
Mohammad Rafiq 2025-05-18 18:05:09 +08:00
parent 36d522f7f4
commit 1b8b7f35e9
No known key found for this signature in database
4 changed files with 62 additions and 30 deletions

21
flake.lock generated
View file

@ -108,6 +108,26 @@
"type": "github"
}
},
"nix-index-database": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1747540584,
"narHash": "sha256-cxCQ413JTUuRv9Ygd8DABJ1D6kuB/nTfQqC0Lu9C0ls=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "ec179dd13fb7b4c6844f55be91436f7857226dce",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-index-database",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1747327360,
@ -129,6 +149,7 @@
"disko": "disko",
"home-manager": "home-manager",
"impermanence": "impermanence",
"nix-index-database": "nix-index-database",
"nixpkgs": "nixpkgs",
"snowfall-lib": "snowfall-lib"
}

View file

@ -8,6 +8,8 @@
impermanence.url = "github:nix-community/impermanence";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nix-index-database.url = "github:nix-community/nix-index-database";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs:
@ -21,6 +23,7 @@
];
homes.modules = with inputs; [
impermanence.homeManagerModules.impermanence
nix-index-database.hmModules.nix-index
];
};
}

View file

@ -0,0 +1,29 @@
{ config, lib, pkgs, osConfig, ... }:
{
imports = [
./programs/git.nix
./programs/zsh.nix
];
home.packages = with pkgs; [
neovim
ripgrep
(pkgs.writeShellScriptBin "rebuild" # sh
''
if [ ! -f "flake.nix" ]; then
echo "flake.nix not found in current directory. exiting..."
exit 1
fi
git add . && \
nixos-rebuild switch --flake . --use-remote-sudo && \
git commit -a
'')
];
home.sessionVariables = {
EDITOR = "nvim";
};
programs.nix-index.enable = true;
programs.nix-index-database.comma.enable = true;
}

View file

@ -2,42 +2,21 @@
{
imports = [
./programs/git.nix
./programs/hyprland.nix
./programs/zsh.nix
./cli.nix
];
home.stateVersion = "24.11";
home.file = {
};
home.packages = with pkgs; [
neovim
ripgrep
kitty
(pkgs.writeShellScriptBin "rebuild" # sh
''
if [ ! -f "flake.nix" ]; then
echo "flake.nix not found in current directory. exiting..."
exit 1
fi
git add . && \
nixos-rebuild switch --flake . --use-remote-sudo && \
git commit -a
'')
kitty
];
home.sessionVariables = {
EDITOR = "nvim";
home.persistence."/persist/home/rafiq" = {
directories = [
".ssh"
"repos"
];
allowOther = true;
};
home.persistence."/persist/home/rafiq" = {
directories = [
".ssh"
"repos"
];
allowOther = true;
};
home.stateVersion = "24.11";
}