modifié : README.md
This commit is contained in:
parent
fd4a6d32ac
commit
bb6e4d268a
70
README.md
70
README.md
|
@ -1,6 +1,66 @@
|
||||||
# dotconf
|
# nixos-config
|
||||||
* backup
|
This repository contain all my nixos config
|
||||||
|
|
||||||
git clone
|
hosts :
|
||||||
change /etc/nixos to link to ~/git/nixos-config/hosts/backup
|
* backup
|
||||||
add ln -s /home/alexandre/git/nixos-config/modules /etc/modules
|
backup server : online
|
||||||
|
* web
|
||||||
|
server web : OVH
|
||||||
|
* dell-5590
|
||||||
|
pro laptop
|
||||||
|
* services
|
||||||
|
VM on personal PX server. Hosting grafana - prometheus - loki
|
||||||
|
* x201
|
||||||
|
personnal laptop
|
||||||
|
* next
|
||||||
|
VM on personnal PX server. Nosting personnal nextcloud
|
||||||
|
|
||||||
|
modules :
|
||||||
|
* common.nix : common config like environnement variable and common system packages base
|
||||||
|
* gitea.nix : use on web server
|
||||||
|
* prometheus-node.nix : prometheus node-exporter. use by all machine
|
||||||
|
* rest-server.nix : use by backup server. Restic server
|
||||||
|
* users.nix : user configuration. use by all machine
|
||||||
|
|
||||||
|
# How to use
|
||||||
|
## First boot
|
||||||
|
After first boot :
|
||||||
|
|
||||||
|
nix-shell -p git
|
||||||
|
git clone gitea@git.atlanticaweb.fr:alexandre/nixos-config.git
|
||||||
|
cd nix-os-config
|
||||||
|
cp modules/users.nix /etc/nixos/
|
||||||
|
cp modules/common.nix /etc/nixos/
|
||||||
|
nano /etc/nixos/configuration.nix
|
||||||
|
|
||||||
|
add **./users.nix** and **./common.nix** after **./hardware-configuration.nix** and exit
|
||||||
|
|
||||||
|
nixos-rebuild switch
|
||||||
|
rm -rf ~/nixos-config
|
||||||
|
exit
|
||||||
|
|
||||||
|
Copy your personnal private key to account
|
||||||
|
|
||||||
|
scp -i .ssh/privatekey .ssh/privatekey machine:/home/alexandre/.ssh/
|
||||||
|
|
||||||
|
Logging with user
|
||||||
|
|
||||||
|
mkdir git;cd git
|
||||||
|
git clone gitea@git.atlanticaweb.fr:alexandre/nixos-config.git
|
||||||
|
cd nixos-config/hosts
|
||||||
|
mkdir newhosts
|
||||||
|
cd newhosts
|
||||||
|
cp /etc/nixos/* .
|
||||||
|
|
||||||
|
edit configuration.nix and change **./users.nix** to **../modules/users.nix** and change ./common.nix to ../modules/common.nix
|
||||||
|
|
||||||
|
rm /etc/nixos
|
||||||
|
ln -s /home/alexandre/git/nixos-config/hosts/machine /etc/nixos
|
||||||
|
ln -s /home/alexandre/git/
|
||||||
|
|
||||||
|
## Exploit
|
||||||
|
to rebuild system, just :
|
||||||
|
|
||||||
|
sudo nixos-rebuild switch
|
||||||
|
|
||||||
|
Users have not a password.
|
||||||
|
|
Loading…
Reference in New Issue