Compare commits

..

5 Commits

Author SHA1 Message Date
Dave Gallant
046b15b209 Add j alias for just and autocompletions 2024-03-14 22:46:36 -04:00
Dave Gallant
12c41d07ab Fix rollbacks 2024-03-14 22:32:45 -04:00
Dave Gallant
753c444ccd Cleanup machines/hephaestus/configuration.nix 2024-03-14 22:29:54 -04:00
Dave Gallant
8928c91fc3 Enable auto-save on neovim 2024-03-14 22:09:40 -04:00
Dave Gallant
60ba39bf00 nix flake update: 2024-03-15 02:08:16 UTC
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/51063ed4f2343a59fdeebb279bb81d87d453942b' (2024-03-12)
  → 'github:NixOS/nixpkgs/878ef7d9721bee9f81f8a80819f9211ad1f993da' (2024-03-14)
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/db001797591bf76f7b8d4c4ed3b49233391e0c97' (2024-03-14)
  → 'github:NixOS/nixpkgs/bd5ddf2c6bfafff031edf80221e1ee94e86ca10a' (2024-03-14)
2024-03-14 22:08:16 -04:00
6 changed files with 112 additions and 107 deletions

View File

@@ -11,13 +11,13 @@ The configuration is very specific to my own machines and setup, but it may be a
Recipes are stored in a justfile. [just](https://github.com/casey/just) is required. Recipes are stored in a justfile. [just](https://github.com/casey/just) is required.
To run a nixos rebuild: To run a NixOS rebuild:
```sh ```sh
just build-linux just build-linux
``` ```
To run a darwin rebuild: To run a macOS rebuild:
```sh ```sh
just build-mac just build-mac
@@ -38,7 +38,13 @@ If there are updates, they should be reflected in [flake.lock](./flake.lock).
To rollback to the previous generation: To rollback to the previous generation:
```sh ```sh
just rollback just rollback-linux
```
or on macOS:
```sh
just rollback-mac
``` ```
## Garbage collection ## Garbage collection

12
flake.lock generated
View File

@@ -155,11 +155,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1710283656, "lastModified": 1710420202,
"narHash": "sha256-nI+AOy4uK6jLGBi9nsbHjL1EdSIzoo8oa+9oeVhbyFc=", "narHash": "sha256-MvFKESbq4rUWuaf2RKPNYENaSZEw/jaCLo2gU6oREcM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "51063ed4f2343a59fdeebb279bb81d87d453942b", "rev": "878ef7d9721bee9f81f8a80819f9211ad1f993da",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -187,11 +187,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1710377395, "lastModified": 1710408871,
"narHash": "sha256-KMubsUWtVr7L55pXMBibBDBdmk3xrjbBPduc0E8z28c=", "narHash": "sha256-YpSGYZR96I8g5OK/Fdm0O4+mHLen6YPA1cPanqqNqT0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "db001797591bf76f7b8d4c4ed3b49233391e0c97", "rev": "bd5ddf2c6bfafff031edf80221e1ee94e86ca10a",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -9,6 +9,9 @@ in
{ {
home.stateVersion = "23.11"; home.stateVersion = "23.11";
home.packages = with pkgs; [ just ];
services = { services = {
gpg-agent = { gpg-agent = {
enable = stdenv.isLinux; enable = stdenv.isLinux;
@@ -164,21 +167,21 @@ in
g = "git"; g = "git";
gc = "git checkout $(git branch | fzf)"; gc = "git checkout $(git branch | fzf)";
gco = "git checkout $(git branch -r | sed -e 's/^ origin\\///' | fzf)"; gco = "git checkout $(git branch -r | sed -e 's/^ origin\\///' | fzf)";
gr = "cd $(git rev-parse --show-toplevel)";
gho = "gh repo view --web >/dev/null"; gho = "gh repo view --web >/dev/null";
gr = "cd $(git rev-parse --show-toplevel)";
grep = "rg --smart-case"; grep = "rg --smart-case";
j = "just";
k = "kubecolor"; k = "kubecolor";
kcx = "kubectx"; kcx = "kubectx";
kns = "kubens"; kns = "kubens";
l = "eza -la --git --group-directories-first"; l = "eza -la --git --group-directories-first";
m = "make"; m = "make";
nix-install = "nix-env -iA";
ps = "procs"; ps = "procs";
t = "tmux-sessionizer"; t = "tmux-sessionizer";
tf = "terraform"; tf = "terraform";
tree = "eza --tree"; tree = "eza --tree";
v = "nvim"; v = "nvim";
nix-install = "nix-env -iA";
brew-x86 = "arch -x86_64 /usr/local/homebrew/bin/brew";
}; };
"oh-my-zsh" = { "oh-my-zsh" = {
@@ -258,11 +261,6 @@ in
}; };
}; };
autojump = {
enable = true;
enableZshIntegration = true;
};
go = { go = {
enable = true; enable = true;
}; };
@@ -399,6 +397,7 @@ in
]; ];
plugins = { plugins = {
auto-save.enable = true;
copilot-vim.enable = true; copilot-vim.enable = true;
cmp-path.enable = true; cmp-path.enable = true;
cmp-treesitter.enable = true; cmp-treesitter.enable = true;

View File

@@ -1,15 +1,18 @@
set export set export
host := `hostname` config := "machines/$(hostname)/configuration.nix"
build-linux: build-linux:
nixos-rebuild --use-remote-sudo -I nixos-config=machines/$host/configuration.nix switch --flake . nixos-rebuild --use-remote-sudo -I nixos-config=$config switch --flake .
build-mac: build-mac:
darwin-rebuild switch -I nixos-config="machines/$host/configuration.nix" --flake . darwin-rebuild switch -I nixos-config=$config --flake .
rollback: rollback-linux:
nixos-rebuild --use-remote-sudo switch --rollback -I nixos-config="machines/$host/configuration.nix" nixos-rebuild --use-remote-sudo switch --rollback -I nixos-config=$config
rollback-mac:
darwin-rebuild --rollback -I nixos-config=$config
update: update:
@./nix-flake-update.sh @./nix-flake-update.sh

View File

@@ -65,30 +65,80 @@ in
}; };
}; };
fileSystems."/" = { console = {
font = "Lat2-Terminus16";
keyMap = "us";
};
environment.systemPackages = with pkgs;
[
android-tools
bitwarden
cryptsetup
deja-dup
discord
docker
docker-compose
foliate
ghostscript
gimp-with-plugins
glibcLocales
gnome.gnome-tweaks
iputils
kazam
legendary-gl
lm_sensors
mullvad-vpn
netdata
nfs-utils
pavucontrol
pinentry-curses
podman
psst
qemu
sbx-h6-rgb
strace
tailscale
traceroute
ungoogled-chromium
unstable.burpsuite
unstable.logseq
unstable.obsidian
unstable.ryujinx
unstable.signal-desktop
usbutils
virt-manager
vlc
whois
wine
wine64
wireshark-qt
zoom-us
]
++ gnomeExtensions;
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/a6723178-6f18-428e-b541-9ac901861125"; device = "/dev/disk/by-uuid/a6723178-6f18-428e-b541-9ac901861125";
fsType = "ext4"; fsType = "ext4";
}; };
"/home" = {
fileSystems."/home" = {
device = "/dev/disk/by-uuid/e3ab2e1a-bddf-4ae0-b00a-bf954c6c182b"; device = "/dev/disk/by-uuid/e3ab2e1a-bddf-4ae0-b00a-bf954c6c182b";
fsType = "ext4"; fsType = "ext4";
}; };
"/boot/efi" = {
fileSystems."/boot/efi" = {
device = "/dev/disk/by-uuid/3CFD-D749"; device = "/dev/disk/by-uuid/3CFD-D749";
fsType = "vfat"; fsType = "vfat";
}; };
"/mnt/synology-2b/media" = {
fileSystems."/mnt/synology-2b/media" = {
device = "192.168.1.178:/volume1/Media"; device = "192.168.1.178:/volume1/Media";
fsType = "nfs"; fsType = "nfs";
}; };
"/mnt/synology-2b/backups" = {
fileSystems."/mnt/synology-2b/backups" = {
device = "192.168.1.178:/volume1/Backups"; device = "192.168.1.178:/volume1/Backups";
fsType = "nfs"; fsType = "nfs";
}; };
};
swapDevices = [ swapDevices = [
{ device = "/dev/disk/by-uuid/5d6d0388-2b15-4ff1-9f0f-391818a76090"; } { device = "/dev/disk/by-uuid/5d6d0388-2b15-4ff1-9f0f-391818a76090"; }
@@ -139,10 +189,6 @@ in
}; };
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "us";
};
time.timeZone = "America/Toronto"; time.timeZone = "America/Toronto";
@@ -158,23 +204,16 @@ in
pulseaudio.support32Bit = true; pulseaudio.support32Bit = true;
}; };
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
};
virtualisation = {
docker.enable = true;
libvirtd.enable = true;
podman.enable = true;
};
programs = { programs = {
corectrl.enable = true; corectrl.enable = true;
gnupg.agent = { gnupg.agent = {
enable = true; enable = true;
enableSSHSupport = true; enableSSHSupport = true;
}; };
steam = {
enable = true;
remotePlay.openFirewall = true;
};
zsh.enable = true; zsh.enable = true;
}; };
@@ -200,7 +239,6 @@ in
udev.extraRules = '' udev.extraRules = ''
ACTION=="add", ATTR{idVendor}=="041e", ATTR{idProduct}=="3255", RUN+="${pkgs.sbx-h6-rgb}/bin/sbx-h6-ctl -c c010ff 041e:3255" ACTION=="add", ATTR{idVendor}=="041e", ATTR{idProduct}=="3255", RUN+="${pkgs.sbx-h6-rgb}/bin/sbx-h6-ctl -c c010ff 041e:3255"
''; '';
xserver.videoDrivers = [ "amdgpu" ];
xserver = { xserver = {
enable = true; enable = true;
displayManager = { displayManager = {
@@ -214,53 +252,13 @@ in
enable = true; enable = true;
}; };
}; };
videoDrivers = [ "amdgpu" ];
}; };
}; };
environment.systemPackages = with pkgs; virtualisation = {
[ docker.enable = true;
android-tools libvirtd.enable = true;
bitwarden podman.enable = true;
cryptsetup };
deja-dup
discord
docker
docker-compose
foliate
ghostscript
gimp-with-plugins
glibcLocales
gnome.gnome-tweaks
iputils
kazam
legendary-gl
lm_sensors
mullvad-vpn
netdata
nfs-utils
pavucontrol
pinentry-curses
podman
psst
qemu
sbx-h6-rgb
strace
tailscale
traceroute
ungoogled-chromium
unstable.burpsuite
unstable.logseq
unstable.obsidian
unstable.ryujinx
unstable.signal-desktop
usbutils
virt-manager
vlc
whois
wine
wine64
wireshark-qt
zoom-us
]
++ gnomeExtensions;
} }

View File

@@ -25,7 +25,6 @@ in
eza eza
fd fd
hadolint hadolint
just
nodePackages.eslint nodePackages.eslint
oha oha
pre-commit pre-commit