Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/felschr/nixos-config
Mirror of my NixOS configuration on GitLab
https://github.com/felschr/nixos-config
dotfiles nix-dotfiles nix-flake nixos-configuration
Last synced: about 14 hours ago
JSON representation
Mirror of my NixOS configuration on GitLab
- Host: GitHub
- URL: https://github.com/felschr/nixos-config
- Owner: felschr
- License: mit
- Created: 2019-08-24T08:47:47.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-08-27T11:16:14.000Z (2 months ago)
- Last Synced: 2024-08-28T12:12:40.554Z (2 months ago)
- Topics: dotfiles, nix-dotfiles, nix-flake, nixos-configuration
- Language: Nix
- Homepage: https://gitlab.com/felschr/nixos-config
- Size: 1.12 MB
- Stars: 13
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# felschr's NixOS configuration
## Installation
Clone the configuration into `/etc/nixos`.
On a new machine run:
```sh
scripts/setup-partitions
```Then move the resulting `/mnt/etc/nixos/hardware-configuration.nix` to `./hardware/.nix`.
Update the configuration according to the script output, if necessary. Btrfs mount options likely need to be added, for example.
Copy the configuration from `/etc/nixos` to `/mnt/etc/nixos`.Reference this hardware config in a `nixosConfigurations.` section in `flake.nix`.
Now set up a device key that will be used by agenix.
Create a new key and re-encrypt the secrets on an existing device & pull the changes.
To create a new key run:
```sh
mkdir -p /mnt/etc/secrets/initrd
ssh-keygen -t ed25519 -N "" -f /mnt/etc/secrets/initrd/ssh_host_ed25519_key
```You will likely need to temporarily set `age.identityPaths` for the installation to succeed:
```sh
age.identityPaths = "/etc/secrets/initrd/ssh_host_ed25519_key";
```To install run the following command where `` matches `outputs.nixosConfigurations.` in `flake.nix`:
```sh
nixos-install --flake '/mnt/etc/nixos#'
```After the installation finished, set a password for the user:
```
passwd
```## Updating
Update all flake inputs:
```sh
nix flake update
```Update a specific flake input:
```
nix flake lock --update-input
```## Rebuilding the system
Rebuild the system:
```sh
sudo nixos-rebuild switch
```Rebuild the system for a remote machine:
```sh
sudo nixos-rebuild switch --flake '/etc/nixos#' --target-host user@hostname --use-remote-sudo
```