refactor: folder structure

This commit is contained in:
Daniel Langbein 2023-09-02 15:12:08 +02:00
parent 4d28b48065
commit 7aba10627c
16 changed files with 15 additions and 15 deletions

View File

@ -15,7 +15,7 @@ For each machine, there is a top-level directory, e.g. [yodaTab](yodaTab).
Directly change to new config and make it default:
```shell
sudo nixos-rebuild -I nixos-config=yodaTab/configuration.nix switch
sudo nixos-rebuild -I nixos-config=hosts/yodaTab/configuration.nix switch
```
## System updates
@ -32,7 +32,7 @@ sudo nix-channel --update
#
#niv --sources-file=yodaTab/nix/sources.json update
#
(cd yodaTab && niv update)
niv update
```
Then run `nixos-rebuild switch`, see above.
@ -64,7 +64,7 @@ This evaluates `configuration.nix` (single module):
```shell
NIXPKGS_ALLOW_UNFREE=1 nix-instantiate --strict --json --eval -E '
import ./yodaTab/configuration.nix {
import ./hosts/yodaTab/configuration.nix {
config = {};
pkgs = import <nixpkgs> {};
lib = import <nixpkgs/lib>;
@ -111,7 +111,7 @@ sudo nix-channel --list
Use the corresponding branch:
```shell
(cd yodaTab && niv add nix-community/home-manager -n home-manager -b release-23.05)
niv add nix-community/home-manager -n home-manager -b release-23.05
```
## disko and nixos-anywhere
@ -144,7 +144,7 @@ Summary:
* Re-generate hardware configuration:
```shell
sudo nixos-generate-config --dir yodaTab
sudo nixos-generate-config --dir hosts/yodaTab
```
## GNOME extensions

View File

@ -12,12 +12,12 @@
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./home-manager.nix
./programs.nix
./git.nix
./print-and-scan.nix
./nitrokey-ssh-gpg.nix
./fde-ssh-unlock.nix
./nextcloud-integration.nix
../../modules/programs.nix
../../modules/git.nix
../../modules/print-and-scan.nix
../../modules/nitrokey-ssh-gpg.nix
../../modules/fde-ssh-unlock.nix
../../modules/nextcloud-integration.nix
];
# Bootloader.

View File

@ -1,14 +1,14 @@
{ config, pkgs, ... }:
let
# Import Home Manager with niv.
home-manager = (import ./nix/sources.nix).home-manager;
home-manager = (import ../../nix/sources.nix).home-manager;
in
{
imports = [
(import "${home-manager}/nixos")
./git.home.nix
../../modules/git.home.nix
# TODO
#./nitrokey-ssh-gpg.home.nix
#../../modules/nitrokey-ssh-gpg.home.nix
];
/* Enable home-manager to configure GNOME */

View File

@ -5,7 +5,7 @@
programs.ssh = {
enable = true;
userKnownHostsFile = "~/.ssh/known_hosts ${../ssh/known_hosts}";
userKnownHostsFile = "~/.ssh/known_hosts ${../assets/ssh/known_hosts}";
matchBlocks = {
"nas" = {
hostname = "p1st.de";