From fbd32d90f53caa8f3c527982451305b625b5d709 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sat, 24 Aug 2024 18:19:17 +0200 Subject: [PATCH] Add system configuration documentation --- README.md | 86 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 77 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 13cd64f..1cbe37a 100644 --- a/README.md +++ b/README.md @@ -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