Compare commits

..

No commits in common. "c42a15d23527a36aa27ddc6b5e5c04b55bcce505" and "d44ef254fa1d3ae89c242aa5cdac89cc671dfcb4" have entirely different histories.

6 changed files with 16 additions and 75 deletions

View file

@ -1,29 +1,28 @@
Install a system via nixos-anywhere
```bash
$ nix run github:numtide/nixos-anywhere -- \
nix run github:numtide/nixos-anywhere -- \
--flake 'git+https://git.hoyer.xyz/harald/nixcfg'.#hostname \
root@hostname --no-reboot --tty -i $HOME/.ssh/id_ed25519
... enter disk password
$ ssh -t root@hostname systemd-cryptenroll /dev/luksdev --wipe-slot=tpm2 --tpm2-device=auto --tpm2-pcrs=1,15
ssh -t root@hostname systemd-cryptenroll /dev/luksdev --wipe-slot=tpm2 --tpm2-device=auto --tpm2-pcrs=1,15
```
nixos-rebuild remote git flake
```bash
$ nixos-rebuild --use-remote-sudo -L --show-trace --refresh --flake git+https://git.hoyer.xyz/harald/nixcfg boot
sudo nixos-rebuild boot --refresh --flake git+https://git.hoyer.xyz/harald/nixcfg
```
on darwin
```bash
$ darwin-rebuild --use-remote-sudo -L --show-trace --refresh --flake git+https://git.hoyer.xyz/harald/nixcfg switch
```
home-manager remote git flake
```bash
$ nix --refresh run 'git+https://git.hoyer.xyz/harald/nixcfg' -- \
nix --refresh run 'git+https://git.hoyer.xyz/harald/nixcfg' -- \
switch -b backup --flake 'git+https://git.hoyer.xyz/harald/nixcfg'
```
`command-not-found` unable to open database
```bash
sudo nix-channel --update
```

View file

@ -8,20 +8,19 @@
username = "harald";
homeDirectory = "/Users/${config.home.username}";
stateVersion = "23.11"; # Please read the comment before changing.
# sessionPath = [ "$HOME/bin" ];
sessionPath = [ "$HOME/bin" ];
};
metacfg = {
cli-apps = {
bash.enable = true;
fish.enable = true;
neovim.enable = true;
tmux.enable = true;
bat.enable = true;
starship.enable = true;
#home-manager.enable = true;
home-manager.enable = true;
};
tools = {
direnv.enable = true;
alacritty.enable = true;

View file

@ -11,7 +11,7 @@ in
{
options.metacfg.nix = with types; {
enable = mkBoolOpt true "Whether or not to manage nix configuration.";
package = mkOpt package pkgs.nix "Which nix package to use.";
package = mkOpt package pkgs.nixUnstable "Which nix package to use.";
};
config = mkIf cfg.enable {

View file

@ -1,57 +0,0 @@
{ options
, config
, lib
, pkgs
, ...
}:
with lib;
with lib.metacfg;
let
cfg = config.metacfg.base;
in
{
options.metacfg.base = with types; {
enable = mkBoolOpt false "Whether or not to enable the base config.";
};
config = mkIf cfg.enable {
environment = {
systemPackages = with pkgs; [
age
delta
git
git-crypt
git-delete-merged-branches
home-manager
htop
mosh
nixpkgs-fmt
openssl
restic
rrsync
sops
tmux
vim
wget
starship
];
shells = [ pkgs.fish pkgs.bash ];
};
programs = {
bash = {
## shellInit = ''
interactiveShellInit = ''
bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward'
'';
};
fish.enable = true;
};
security = {
pam.enableSudoTouchIdAuth = true;
};
};
}

View file

@ -16,8 +16,6 @@ in
metacfg = {
nix = enabled;
base = enabled;
system = {
fonts = enabled;
#input = enabled;

View file

@ -17,7 +17,9 @@ in
};
fonts = {
packages = with pkgs;
fontDir = enabled;
fonts = with pkgs;
[
noto-fonts
noto-fonts-cjk-sans