Add system configuration documentation

This commit is contained in:
DashieTM 2024-08-24 18:19:17 +02:00
parent e0be13c2cb
commit fbd32d90f5

View file

@ -1,15 +1,83 @@
```
_____ _ _____ _
| __ \ | | | __ \ | |
| | | | __ _ ___| |__ | | | | ___ | |_ ___
| | | |/ _` / __| '_ \| | | |/ _ \| __/ __|
| |__| | (_| \__ \ | | | |__| | (_) | |_\__ \
|_____/ \__,_|___/_| |_|_____/ \___/ \__|___/
██████ █████ ███████ ██ ██ ███ ██ ██ ██ ██
██ ██ ██ ██ ██ ██ ██ ████ ██ ██ ██ ██
██ ██ ███████ ███████ ███████ ██ ██ ██ ██ ███
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██████ ██ ██ ███████ ██ ██ ██ ████ ██ ██ ██
```
My personal configuration for NixOS/home-manager.
While not intended to be used by someone else, feel free to do so anyway or use it as a template for your configuration if you wish to.
A very opinionated (technically only for me) configuration that allows easy adding and removing of systems alongside custom configurations for each system.
# Usage
This flake is intended to be used as an input to your own NixOS configuration:
```nix
dashNix = {
url = "github:DashieTM/dotFiles";
inputs = {
# ensure these are here to update the packages on your own
nixpkgs.follows = "nixpkgs";
stable.follows = "stable";
};
};
```
You can then configure your systems in your flake outputs with a provided library command:
```nix
nixosConfigurations = (inputs.dashNix.dashNixLib.build_systems [
"system1"
"system2"
"system3"
] ./.);
```
In order for your configuration to work, you are required to at least provide a single config file with a further config file being optional for custom configuration.
|- flake.nix\
|- flake.lock\
|- system1/\
|---- system1.nix (required)\
|---- configuration.nix (optional)\
|- system2/\
|---- system2.nix (required)\
|---- configuration.nix (optional)\
|- system3/\
|---- system3.nix (required)\
|---- configuration.nix (optional)
Here is a minimal required configuration (the TODOs mention a required change):
```nix
{
# variables for system
conf = {
# TODO change this to your monitor and your pc name
monitor = "YOURMONITOR";
hostname = "YOURNAME";
# TODO only needed when you use intel -> amd is default
# cpu = "intel";
};
# modules
mods = {
sops.enable = false;
nextcloud.enable = false;
hyprland.monitor = [
# default
# TODO change this to your resolution
"DP-1,1920x1080@144,0x0,1"
# all others
",highrr,auto,1"
];
# or amd, whatever you have
nvidia.enable = true;
kde_connect.enable = true;
# TODO change this to your main resolution
# -> this will be your login manager
greetd = { resolution = "3440x1440@180"; };
};
}
```
# Modules