1
0
mirror of https://github.com/ellmau/nixos.git synced 2025-12-19 09:29:36 +01:00
Stefan Ellmauthaler 0d0ca74c8a
flake.lock: Update
Flake lock file updates:

• Updated input 'emacs-overlay':
    'github:nix-community/emacs-overlay/60fe647be71d6f433f4a8f9f22d7430bf0ef58a4' (2023-04-28)
  → 'github:nix-community/emacs-overlay/5f9bc90bd2fd0bf53cc4e2643b083fa75b358461' (2023-05-04)
• Updated input 'nixos-hardware':
    'github:NixOS/nixos-hardware/3006d2860a6ed5e01b0c3e7ffb730e9b293116e2' (2023-04-07)
  → 'github:NixOS/nixos-hardware/7dc46304675f4ff2d6be921ef60883efd31363c4' (2023-05-02)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/15b75800dce80225b44f067c9012b09de37dfad2' (2023-04-26)
  → 'github:NixOS/nixpkgs/54495a4eafe99c537695a87fe04cb50bf17e651d' (2023-05-03)
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/d6b863fd9b7bb962e6f9fdf292419a775e772891' (2023-04-26)
  → 'github:NixOS/nixpkgs/1a411f23ba299db155a5b45d5e145b85a7aafc42' (2023-05-02)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/4a330ead6a990365c9bb48f30523ac048fb6d8ae' (2023-04-26)
  → 'github:Mic92/sops-nix/4f308f76633f81253a12b80e7b05b80d325005b2' (2023-04-30)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/ee7ec1c71adc47d2e3c2d5eb0d6b8fbbd42a8d1c' (2023-04-22)
  → 'github:NixOS/nixpkgs/db1e4eeb0f9a9028bcb920e00abbc1409dd3ef36' (2023-04-30)
2023-05-04 11:58:18 +02:00
2022-08-22 16:39:47 +02:00
2023-04-24 09:57:02 +02:00
2023-04-11 13:16:22 +02:00
2023-01-20 13:17:23 +01:00
2023-04-10 12:04:52 +02:00
2022-08-22 16:39:47 +02:00
2022-08-22 16:39:47 +02:00
2022-08-22 16:39:47 +02:00
2023-05-04 11:58:18 +02:00
2023-03-26 16:05:07 +02:00
2022-07-19 10:50:37 +02:00

Nix-configuration

Deploy on a new machine

  • setup the filesystem as you see fit
  • check out repository to /mnt/etc/nixos
  • run nixos-generate-config --root /mnt in /mnt/etc/nixos
  • create machines/<machine-name>/default.nix and configure the machine
  • move hardware-configuration.nix to machines/<machine-name>/hardware-configuration.nix
  • stage the machine-folder
  • run
  • nix-install --no-root-passwd --flake .#hostname --option experimental-features "nix-command flakes"

nix-sops

  • generate on your (sshd-enabled) machine a pgp key:
    • nix shell nixpkgs#ssh-to-pgp
    • sudo ssh-to-pgp -i /etc/ssh/ssh_host_rsa_key > /etc/nixos/secrets/keys/hosts/<hostname>.asc
  • add the fingerprint of the new key to the /etc/nixos/.sops.yaml file
  • Rekey the secrets with either
    • a master key
    • or after a git push on another machine with enough permissions to rekey
  • the flakes dev-shell (nix develop) allows to use sops <sops-file> as well as sops-rekey <sops-file> to manage the keys on the system
Description
No description provided
Readme 3.2 MiB
Languages
Nix 79.6%
Emacs Lisp 12.4%
Haskell 4.6%
CSS 3%
Shell 0.4%