added just commands, updated flake
This commit is contained in:
parent
11702e8bf8
commit
006814d6c1
|
@ -27,16 +27,15 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1715381426,
|
"lastModified": 1715486357,
|
||||||
"narHash": "sha256-wPuqrAQGdv3ISs74nJfGb+Yprm23U/rFpcHFFNWgM94=",
|
"narHash": "sha256-4pRuzsHZOW5W4CsXI9uhKtiJeQSUoe1d2M9mWU98HC4=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "ab5542e9dbd13d0100f8baae2bc2d68af901f4b4",
|
"rev": "44677a1c96810a8e8c4ffaeaad10c842402647c1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"ref": "release-23.11",
|
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
# Home manager
|
# Home manager
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-23.11";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
|
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
ll = "ls -l";
|
ll = "ls -l";
|
||||||
update = "sudo nixos-rebuild switch --flake $(readlink -f /etc/nixos)#fileserver";
|
|
||||||
};
|
};
|
||||||
history.size = 10000;
|
history.size = 10000;
|
||||||
history.path = "${config.xdg.dataHome}/zsh/history";
|
history.path = "${config.xdg.dataHome}/zsh/history";
|
||||||
|
|
|
@ -25,10 +25,6 @@
|
||||||
|
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
ll = "ls -l";
|
ll = "ls -l";
|
||||||
update = "sudo nixos-rebuild switch --flake $(readlink -f /etc/nixos)#nixdev";
|
|
||||||
update-home = "home-manager switch --flake $(readlink -f /etc/nixos)#sam@nixdev";
|
|
||||||
nix-home = "nvim $HOME/nixos/hosts/workmachine/home.nix";
|
|
||||||
nix-conf = "nvim $HOME/nixos/hosts/workmachine/configuration.nix";
|
|
||||||
};
|
};
|
||||||
history.size = 10000;
|
history.size = 10000;
|
||||||
history.path = "${config.xdg.dataHome}/zsh/history";
|
history.path = "${config.xdg.dataHome}/zsh/history";
|
||||||
|
|
|
@ -3,4 +3,10 @@
|
||||||
./sops.nix
|
./sops.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.rsync
|
||||||
|
pkgs.curl
|
||||||
|
pkgs.just
|
||||||
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,9 +20,5 @@ in
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.rsync
|
|
||||||
pkgs.curl
|
|
||||||
pkgs.tmux
|
|
||||||
pkgs.neovim
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,8 +31,5 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.rsync
|
|
||||||
pkgs.curl
|
|
||||||
pkgs.just
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
SOPS_FILE := "../nix-secrets/secrets.yaml"
|
||||||
|
|
||||||
|
# default recipe to display help information
|
||||||
|
default:
|
||||||
|
@just --list
|
||||||
|
|
||||||
|
# ensure the latest revisions of nix-secrets are used next time a rebuild occurs
|
||||||
|
update-nix-secrets:
|
||||||
|
(cd ../nix-secrets && git fetch && git rebase) || true
|
||||||
|
nix flake lock --update-input nix-secrets
|
||||||
|
|
||||||
|
# full system rebuild from flake (stages changes and automatically detects host)
|
||||||
|
rebuild-system:
|
||||||
|
git add *.nix
|
||||||
|
sudo nixos-rebuild switch --flake $(readlink -f /etc/nixos)#$(hostname)
|
||||||
|
|
||||||
|
# updates all flake inputs for system
|
||||||
|
update-flake:
|
||||||
|
nix flake update
|
||||||
|
|
||||||
|
# edit sops file
|
||||||
|
edit-sops:
|
||||||
|
echo "Editing {{SOPS_FILE}}"
|
||||||
|
nix-shell -p sops --run "SOPS_AGE_KEY_FILE=~/.config/sops/age/keys.txt sops {{SOPS_FILE}}"
|
||||||
|
|
||||||
|
# update
|
||||||
|
update-secrets:
|
||||||
|
cd $HOME/nix-secrets && (\
|
||||||
|
nix-shell -p sops --run "sops updatekeys -y secrets.yaml" && \
|
||||||
|
git add -u && (git commit -m "updated secrets" || true) && git push \
|
||||||
|
)
|
Loading…
Reference in New Issue