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.
To run a nixos rebuild:
To run a NixOS rebuild:
```sh
just build-linux
```
To run a darwin rebuild:
To run a macOS rebuild:
```sh
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:
```sh
just rollback
just rollback-linux
```
or on macOS:
```sh
just rollback-mac
```
## Garbage collection

12
flake.lock generated
View File

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

View File

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

View File

@@ -1,21 +1,24 @@
set export
host := `hostname`
config := "machines/$(hostname)/configuration.nix"
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:
darwin-rebuild switch -I nixos-config="machines/$host/configuration.nix" --flake .
darwin-rebuild switch -I nixos-config=$config --flake .
rollback:
nixos-rebuild --use-remote-sudo switch --rollback -I nixos-config="machines/$host/configuration.nix"
rollback-linux:
nixos-rebuild --use-remote-sudo switch --rollback -I nixos-config=$config
rollback-mac:
darwin-rebuild --rollback -I nixos-config=$config
update:
@./nix-flake-update.sh
@./nix-flake-update.sh
fmt:
nixpkgs-fmt .
nixpkgs-fmt .
clean:
echo 'Cleaning user...'

View File

@@ -65,29 +65,79 @@ in
};
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/a6723178-6f18-428e-b541-9ac901861125";
fsType = "ext4";
console = {
font = "Lat2-Terminus16";
keyMap = "us";
};
fileSystems."/home" = {
device = "/dev/disk/by-uuid/e3ab2e1a-bddf-4ae0-b00a-bf954c6c182b";
fsType = "ext4";
};
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."/boot/efi" = {
device = "/dev/disk/by-uuid/3CFD-D749";
fsType = "vfat";
};
fileSystems."/mnt/synology-2b/media" = {
device = "192.168.1.178:/volume1/Media";
fsType = "nfs";
};
fileSystems."/mnt/synology-2b/backups" = {
device = "192.168.1.178:/volume1/Backups";
fsType = "nfs";
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/a6723178-6f18-428e-b541-9ac901861125";
fsType = "ext4";
};
"/home" = {
device = "/dev/disk/by-uuid/e3ab2e1a-bddf-4ae0-b00a-bf954c6c182b";
fsType = "ext4";
};
"/boot/efi" = {
device = "/dev/disk/by-uuid/3CFD-D749";
fsType = "vfat";
};
"/mnt/synology-2b/media" = {
device = "192.168.1.178:/volume1/Media";
fsType = "nfs";
};
"/mnt/synology-2b/backups" = {
device = "192.168.1.178:/volume1/Backups";
fsType = "nfs";
};
};
swapDevices = [
@@ -139,10 +189,6 @@ in
};
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "us";
};
time.timeZone = "America/Toronto";
@@ -158,23 +204,16 @@ in
pulseaudio.support32Bit = true;
};
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
};
virtualisation = {
docker.enable = true;
libvirtd.enable = true;
podman.enable = true;
};
programs = {
corectrl.enable = true;
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
steam = {
enable = true;
remotePlay.openFirewall = true;
};
zsh.enable = true;
};
@@ -200,7 +239,6 @@ in
udev.extraRules = ''
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 = {
enable = true;
displayManager = {
@@ -214,53 +252,13 @@ in
enable = true;
};
};
videoDrivers = [ "amdgpu" ];
};
};
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;
virtualisation = {
docker.enable = true;
libvirtd.enable = true;
podman.enable = true;
};
}

View File

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