1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-11 07:10:39 +02:00

feat: enable zoxide, nix-index-database, comma and a deadnix check

This commit is contained in:
oddlama 2023-09-18 02:10:44 +02:00
parent ecd7eece1f
commit 905ea34de9
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
10 changed files with 50 additions and 15 deletions

21
flake.lock generated
View file

@ -542,6 +542,26 @@
"type": "github"
}
},
"nix-index-database": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1694921880,
"narHash": "sha256-yU36cs5UdzhTwsM9bUWUz43N//ELzQ1ro69C07pU/8E=",
"owner": "Mic92",
"repo": "nix-index-database",
"rev": "9d2bcc47110b3b6217dfebd6761ba20bc78aedf2",
"type": "github"
},
"original": {
"owner": "Mic92",
"repo": "nix-index-database",
"type": "github"
}
},
"nixlib": {
"locked": {
"lastModified": 1693701915,
@ -806,6 +826,7 @@
"impermanence": "impermanence",
"lib-net": "lib-net",
"microvm": "microvm",
"nix-index-database": "nix-index-database",
"nixos-generators": "nixos-generators",
"nixos-hardware": "nixos-hardware",
"nixos-nftables-firewall": "nixos-nftables-firewall",

View file

@ -35,6 +35,11 @@
flake = false;
};
nix-index-database = {
url = "github:Mic92/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "github:NixOS/nixos-hardware";
nixos-generators = {
@ -188,8 +193,11 @@
checks.pre-commit-hooks = pre-commit-hooks.lib.${system}.run {
src = lib.cleanSource ./.;
hooks = {
# Nix
alejandra.enable = true;
deadnix.enable = true;
statix.enable = true;
# Lua (for neovim)
luacheck.enable = true;
stylua.enable = true;
};

View file

@ -1,9 +1,14 @@
{config, ...}: {
{
inputs,
config,
...
}: {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
verbose = true;
sharedModules = [
inputs.nix-index-database.hmModules.nix-index
{
home.stateVersion = config.system.stateVersion;
}

View file

@ -1,4 +1,4 @@
{pkgs, ...}: {
{...}: {
imports = [
./documentation.nix
./yubikey.nix

View file

@ -1,8 +1,4 @@
{
lib,
pkgs,
...
}: let
{lib, ...}: let
inherit
(lib)
mkOption

View file

@ -29,8 +29,8 @@
modules
++ [
{node.name = name;}
agenix.nixosModules.default
agenix-rekey.nixosModules.default
agenix.nixosModules.default
disko.nixosModules.disko
elewrap.nixosModules.default
home-manager.nixosModules.default

View file

@ -14,7 +14,6 @@ in {
[
".cache/fontconfig"
".cache/nix" # nix eval cache
".cache/nix-index"
".config/dconf" # some apps store their configuration using dconf
]
++ optionals nixosConfig.hardware.nvidia.modesetting.enable [

View file

@ -5,7 +5,18 @@
./zsh
];
programs.zoxide = {
enable = true;
options = ["--cmd p"];
};
# nix-index-database is enabled globally for each user in modules/config/home-manager.nix
programs.nix-index.enable = true;
programs.nix-index-database.comma.enable = true;
home.persistence."/state".directories = [
".local/share/zoxide"
];
home.shellAliases = {
l = "ls -lahF --group-directories-first --show-control-chars --quoting-style=escape --color=auto";

View file

@ -59,11 +59,6 @@
# TODO gpg switch to sk
# TODO some font icons not showing neovim because removed from nerdfonts, replace with bertter .
shellAliases = {
p = "cd ~/projects";
zf = "zathura --fork"; # XXX: do i need this or can i just xdg-open?
};
persistence."/persist".directories = [
"projects"
];

View file

@ -12,7 +12,7 @@
in {
accounts.email.accounts =
lib.flip lib.mapAttrs' config.userSecrets.accounts.email
(n: v:
(_n: v:
lib.nameValuePair v.address ({
# TODO genericize
passwordCommand =