Compare commits

...

7 commits

Author SHA1 Message Date
Harald Hoyer c42a15d235 feat: Enable alacritty in default.nix
Alacritty was previously commented out in default.nix configuration. This update has ensured it is now enabled.
2024-07-19 13:37:17 +02:00
Harald Hoyer 037bb4d88f feat: Update user configuration in default.nix
This commit comments out several configurations in the user's default.nix on harald@mpro. Namely, it disables the sessionPath, home-manager, and alacritty, establishing a new setup for future use.
2024-07-19 13:28:45 +02:00
Harald Hoyer b14804bbf8 feat(darwin suites): enable base in default.nix
This commit enables the 'base' edition in the default.nix configuration file within the Darwin suites module. This update provides the necessary settings for the base installation, enhancing the flexibility of system setup.
2024-07-19 13:28:14 +02:00
Harald Hoyer 5d9518fd1c feat: Add new base service config for Darwin system
This commit introduces a new base configuration for the Darwin service. It includes options for system packages, shell programs and security features. This base configuration is customizable with an enable option.
2024-07-19 13:28:03 +02:00
Harald Hoyer 9131236f36 docs: update command syntax in README.md
Replace `❯` prompt symbol with `$` for clarity and consistency. Add additional command for Darwin. Remove outdated `command-not-found` section. Update nix and ssh command syntax for better readability and usage.
2024-07-19 12:19:43 +02:00
Harald Hoyer 8202390990 feat: switch to stable nix package in darwin module
This commit modifies the `nix` configuration in the `darwin` module, changing from the unstable `nix` package use to the stable version. This change is intended to improve stability and reliability of the module.
2024-07-19 12:19:28 +02:00
Harald Hoyer 8feaad40a1 refactor: rename 'fonts' to 'packages' in darwin module
This commit renames the 'fonts' array in the darwin system fonts module to 'packages'. The refactor is aimed at improving the code readability and making the name more descriptive and representative of its content.
2024-07-19 12:19:18 +02:00
6 changed files with 75 additions and 16 deletions

View file

@ -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
```

View file

@ -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;

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.nixUnstable "Which nix package to use.";
package = mkOpt package pkgs.nix "Which nix package to use.";
};
config = mkIf cfg.enable {

View file

@ -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;
};
};
}

View file

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

View file

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