diff --git a/README.md b/README.md index 901c6fc..3274c0e 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,29 @@ 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 -❯ sudo nixos-rebuild boot --refresh --flake git+https://git.hoyer.xyz/harald/nixcfg +$ nixos-rebuild --use-remote-sudo -L --show-trace --refresh --flake git+https://git.hoyer.xyz/harald/nixcfg boot ``` +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 -``` diff --git a/homes/x86_64-darwin/harald@mpro/default.nix b/homes/x86_64-darwin/harald@mpro/default.nix index f7f8d31..c9bab11 100644 --- a/homes/x86_64-darwin/harald@mpro/default.nix +++ b/homes/x86_64-darwin/harald@mpro/default.nix @@ -8,19 +8,20 @@ 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; diff --git a/modules/darwin/nix/default.nix b/modules/darwin/nix/default.nix index ea488df..50bc1b4 100644 --- a/modules/darwin/nix/default.nix +++ b/modules/darwin/nix/default.nix @@ -11,7 +11,7 @@ in { options.metacfg.nix = with types; { enable = mkBoolOpt true "Whether or not to manage nix configuration."; - package = mkOpt package pkgs.nixUnstable "Which nix package to use."; + package = mkOpt package pkgs.nix "Which nix package to use."; }; config = mkIf cfg.enable { diff --git a/modules/darwin/services/base/default.nix b/modules/darwin/services/base/default.nix new file mode 100644 index 0000000..eb10d63 --- /dev/null +++ b/modules/darwin/services/base/default.nix @@ -0,0 +1,57 @@ +{ 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; + }; + }; +} diff --git a/modules/darwin/suites/common/default.nix b/modules/darwin/suites/common/default.nix index 64686a2..c684f73 100644 --- a/modules/darwin/suites/common/default.nix +++ b/modules/darwin/suites/common/default.nix @@ -16,6 +16,8 @@ in metacfg = { nix = enabled; + base = enabled; + system = { fonts = enabled; #input = enabled; diff --git a/modules/darwin/system/fonts/default.nix b/modules/darwin/system/fonts/default.nix index 0c90510..f8eecf8 100644 --- a/modules/darwin/system/fonts/default.nix +++ b/modules/darwin/system/fonts/default.nix @@ -17,9 +17,7 @@ in }; fonts = { - fontDir = enabled; - - fonts = with pkgs; + packages = with pkgs; [ noto-fonts noto-fonts-cjk-sans