Compare commits
7 commits
d44ef254fa
...
c42a15d235
Author | SHA1 | Date | |
---|---|---|---|
|
c42a15d235 | ||
|
037bb4d88f | ||
|
b14804bbf8 | ||
|
5d9518fd1c | ||
|
9131236f36 | ||
|
8202390990 | ||
|
8feaad40a1 |
19
README.md
19
README.md
|
@ -1,28 +1,29 @@
|
||||||
Install a system via nixos-anywhere
|
Install a system via nixos-anywhere
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
❯ nix run github:numtide/nixos-anywhere -- \
|
$ nix run github:numtide/nixos-anywhere -- \
|
||||||
--flake 'git+https://git.hoyer.xyz/harald/nixcfg'.#hostname \
|
--flake 'git+https://git.hoyer.xyz/harald/nixcfg'.#hostname \
|
||||||
root@hostname --no-reboot --tty -i $HOME/.ssh/id_ed25519
|
root@hostname --no-reboot --tty -i $HOME/.ssh/id_ed25519
|
||||||
... enter disk password
|
... 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
|
nixos-rebuild remote git flake
|
||||||
|
|
||||||
```bash
|
```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
|
home-manager remote git flake
|
||||||
|
|
||||||
```bash
|
```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'
|
switch -b backup --flake 'git+https://git.hoyer.xyz/harald/nixcfg'
|
||||||
```
|
```
|
||||||
|
|
||||||
`command-not-found` unable to open database
|
|
||||||
|
|
||||||
```bash
|
|
||||||
❯ sudo nix-channel --update
|
|
||||||
```
|
|
||||||
|
|
|
@ -8,19 +8,20 @@
|
||||||
username = "harald";
|
username = "harald";
|
||||||
homeDirectory = "/Users/${config.home.username}";
|
homeDirectory = "/Users/${config.home.username}";
|
||||||
stateVersion = "23.11"; # Please read the comment before changing.
|
stateVersion = "23.11"; # Please read the comment before changing.
|
||||||
sessionPath = [ "$HOME/bin" ];
|
# sessionPath = [ "$HOME/bin" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
metacfg = {
|
metacfg = {
|
||||||
|
|
||||||
cli-apps = {
|
cli-apps = {
|
||||||
bash.enable = true;
|
bash.enable = true;
|
||||||
fish.enable = true;
|
fish.enable = true;
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
tmux.enable = true;
|
|
||||||
bat.enable = true;
|
bat.enable = true;
|
||||||
starship.enable = true;
|
starship.enable = true;
|
||||||
home-manager.enable = true;
|
#home-manager.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
tools = {
|
tools = {
|
||||||
direnv.enable = true;
|
direnv.enable = true;
|
||||||
alacritty.enable = true;
|
alacritty.enable = true;
|
||||||
|
|
|
@ -11,7 +11,7 @@ in
|
||||||
{
|
{
|
||||||
options.metacfg.nix = with types; {
|
options.metacfg.nix = with types; {
|
||||||
enable = mkBoolOpt true "Whether or not to manage nix configuration.";
|
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 {
|
config = mkIf cfg.enable {
|
||||||
|
|
57
modules/darwin/services/base/default.nix
Normal file
57
modules/darwin/services/base/default.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -16,6 +16,8 @@ in
|
||||||
metacfg = {
|
metacfg = {
|
||||||
nix = enabled;
|
nix = enabled;
|
||||||
|
|
||||||
|
base = enabled;
|
||||||
|
|
||||||
system = {
|
system = {
|
||||||
fonts = enabled;
|
fonts = enabled;
|
||||||
#input = enabled;
|
#input = enabled;
|
||||||
|
|
|
@ -17,9 +17,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
fontDir = enabled;
|
packages = with pkgs;
|
||||||
|
|
||||||
fonts = with pkgs;
|
|
||||||
[
|
[
|
||||||
noto-fonts
|
noto-fonts
|
||||||
noto-fonts-cjk-sans
|
noto-fonts-cjk-sans
|
||||||
|
|
Loading…
Reference in a new issue