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: Directly change to new config and make it default:
```shell ```shell
sudo nixos-rebuild -I nixos-config=yodaTab/configuration.nix switch sudo nixos-rebuild -I nixos-config=hosts/yodaTab/configuration.nix switch
``` ```
## System updates ## System updates
@ -32,7 +32,7 @@ sudo nix-channel --update
# #
#niv --sources-file=yodaTab/nix/sources.json update #niv --sources-file=yodaTab/nix/sources.json update
# #
(cd yodaTab && niv update) niv update
``` ```
Then run `nixos-rebuild switch`, see above. Then run `nixos-rebuild switch`, see above.
@ -64,7 +64,7 @@ This evaluates `configuration.nix` (single module):
```shell ```shell
NIXPKGS_ALLOW_UNFREE=1 nix-instantiate --strict --json --eval -E ' NIXPKGS_ALLOW_UNFREE=1 nix-instantiate --strict --json --eval -E '
import ./yodaTab/configuration.nix { import ./hosts/yodaTab/configuration.nix {
config = {}; config = {};
pkgs = import <nixpkgs> {}; pkgs = import <nixpkgs> {};
lib = import <nixpkgs/lib>; lib = import <nixpkgs/lib>;
@ -111,7 +111,7 @@ sudo nix-channel --list
Use the corresponding branch: Use the corresponding branch:
```shell ```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 ## disko and nixos-anywhere
@ -144,7 +144,7 @@ Summary:
* Re-generate hardware configuration: * Re-generate hardware configuration:
```shell ```shell
sudo nixos-generate-config --dir yodaTab sudo nixos-generate-config --dir hosts/yodaTab
``` ```
## GNOME extensions ## GNOME extensions

View File

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

View File

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

View File

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