Compare commits

...

4 Commits

Author SHA1 Message Date
ae6d5f799d Fmt 2025-11-11 09:41:32 -05:00
4dd0fde56a Remove hooks 2025-11-11 09:40:26 -05:00
352d664ecc Update README.md 2025-11-11 09:33:32 -05:00
376c3685b4 Cleanup fish 2025-11-11 09:30:10 -05:00
4 changed files with 38 additions and 132 deletions

View File

@@ -4,6 +4,8 @@ This repo stores nix configuration to manage my hosts running [NixOS](https://ni
The configuration is very specific to my own machines and setup, but it may be a useful reference for anyone else learning or experimenting with nix, whether it be on a personal workstation or a server environment.
<img width="1903" height="986" alt="Image" src="https://github.com/user-attachments/assets/6cba837c-2b5e-4f6c-803e-dbbde81a8047" />
## Prerequisites
- [NixOS](nixos.org) (Linux)
@@ -43,7 +45,3 @@ To cleanup previous files, run nix garbage collection:
```sh
just clean
```
## Pre-commit hooks
Run `nix develop` to install the pre-commit hooks.

80
flake.lock generated
View File

@@ -182,22 +182,6 @@
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1747046372,
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
@@ -339,27 +323,6 @@
"url": "https://flakehub.com/f/cachix/git-hooks.nix/0.1.941"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"gnome-shell": {
"flake": false,
"locked": {
@@ -603,22 +566,6 @@
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1759417375,
"narHash": "sha256-O7eHcgkQXJNygY6AypkF9tFhsoDQjpNEojw3eFs73Ow=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "dc704e6102e76aad573f63b74c742cd96f8f1e6c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_7": {
"locked": {
"lastModified": 1751211869,
"narHash": "sha256-1Cu92i1KSPbhPCKxoiVG5qnoRiKTgR5CcGSRyLpOd7Y=",
@@ -634,7 +581,7 @@
"type": "github"
}
},
"nixpkgs_8": {
"nixpkgs_7": {
"locked": {
"lastModified": 1743814133,
"narHash": "sha256-drDyYyUmjeYGiHmwB9eOPTQRjmrq3Yz26knwmMPLZFk=",
@@ -723,26 +670,6 @@
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat_2",
"gitignore": "gitignore",
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1762441963,
"narHash": "sha256-j+rNQ119ffYUkYt2YYS6rnd6Jh/crMZmbqpkGLXaEt0=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "8e7576e79b88c16d7ee3bbd112c8d90070832885",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"root": {
"inputs": {
"darwin": "darwin",
@@ -753,7 +680,6 @@
"nixpkgs-master": "nixpkgs-master",
"nixpkgs-unstable": "nixpkgs-unstable",
"nixvim": "nixvim",
"pre-commit-hooks": "pre-commit-hooks",
"stylix": "stylix",
"vpngate": "vpngate"
}
@@ -767,7 +693,7 @@
"firefox-gnome-theme": "firefox-gnome-theme",
"flake-parts": "flake-parts_3",
"gnome-shell": "gnome-shell",
"nixpkgs": "nixpkgs_7",
"nixpkgs": "nixpkgs_6",
"nur": "nur",
"systems": "systems_3",
"tinted-foot": "tinted-foot",
@@ -957,7 +883,7 @@
"vpngate": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_8"
"nixpkgs": "nixpkgs_7"
},
"locked": {
"lastModified": 1753748785,

View File

@@ -7,7 +7,6 @@
nixpkgs-master.url = "github:NixOS/nixpkgs/master";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
nixos-needsreboot.url = "github:thefossguy/nixos-needsreboot/master";
pre-commit-hooks.url = "github:cachix/git-hooks.nix";
darwin = {
url = "github:lnl7/nix-darwin/nix-darwin-25.05";
inputs.nixpkgs.follows = "nixpkgs";
@@ -46,20 +45,6 @@
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
in
{
checks = forAllSystems (system: {
pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
nixfmt-rfc-style.enable = true;
};
};
});
devShells = forAllSystems (system: {
default = nixpkgs.legacyPackages.${system}.mkShell {
inherit (self.checks.${system}.pre-commit-check) shellHook;
buildInputs = self.checks.${system}.pre-commit-check.enabledPackages;
};
});
nixosConfigurations =
let
unstable = import nixpkgs-unstable {

View File

@@ -67,7 +67,6 @@ in
d = "diff";
dc = "diff --cached";
dcn = "diff --cached --name-only";
ds = "! git diff origin | sed -r 's/value: (.*)/value: \"************\"/'";
l = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
ms = "merge --squash";
p = "push origin";
@@ -126,39 +125,37 @@ in
enable = true;
interactiveShellInit = ''
set fish_greeting # Disable greeting
set fish_greeting
# environment variables
set -x PAGER less
set -x EDITOR vim
set -x DOCKER_CLI_HINTS false
set -x TERM xterm-256color
set -x DOCKER_DEFAULT_PLATFORM linux/amd64
set -x NNN_FIFO "$XDG_RUNTIME_DIR/nnn.fifo"
set -x DOCKER_CLI_HINTS false
set -x DOCKER_DEFAULT_PLATFORM linux/amd64
set -x EDITOR vim
set -x NNN_FIFO "$XDG_RUNTIME_DIR/nnn.fifo"
set -x PAGER less
set -x TERM xterm-256color
# PATH
set -x PATH $PATH ~/.cargo/bin
set -x PATH $PATH ~/.local/bin
set -x PATH $PATH ~/.npm-packages/bin
set -x PATH $PATH /opt/homebrew/bin
set -x PATH $PATH ~/.krew/bin
set -x PATH $PATH ~/bin
set -x PATH $PATH \
~/.cargo/bin \
~/.local/bin \
~/.npm-packages/bin \
/opt/homebrew/bin \
~/.krew/bin \
~/bin
# Go-related environment
set -x GOPATH ~/go
set -x GOBIN $GOPATH/bin
set -x PATH $PATH $GOBIN
# golang
set -x GOPATH ~/go
set -x GOBIN $GOPATH/bin
set -x PATH $PATH $GOBIN
source $HOME/work.fish
source $HOME/work.fish
atuin init fish | source
helm completion fish | source
kubectl completion fish | source
# '';
atuin init fish | source
helm completion fish | source
kubectl completion fish | source
# '';
shellAliases = {
".." = "cd ..";
c = "code";
g = "git";
gc = "git checkout $(git branch | fzf)";
gco = "git checkout $(git branch -r | sed -e 's/^ origin\\///' | fzf)";
@@ -425,16 +422,16 @@ in
buffer_font_size = lib.mkForce 18;
};
userKeymaps = [
{
context = "Editor && !menu";
bindings = {
"ctrl-c" = "editor::Copy";
"ctrl-x" = "editor::Cut";
"ctrl-v" = "editor::Paste";
"ctrl-z" = "editor::Undo";
};
}
];
{
context = "Editor && !menu";
bindings = {
"ctrl-shift-c" = "editor::Copy";
"ctrl-shift-x" = "editor::Cut";
"ctrl-shift-v" = "editor::Paste";
"ctrl-z" = "editor::Undo";
};
}
];
};
firefox = {