diff --git a/assets/logo.svg b/assets/logo.svg new file mode 100644 index 0000000..7ca00e2 --- /dev/null +++ b/assets/logo.svg @@ -0,0 +1,228 @@ + + + + diff --git a/assets/logo2.svg b/assets/logo2.svg new file mode 100644 index 0000000..08baa43 --- /dev/null +++ b/assets/logo2.svg @@ -0,0 +1,238 @@ + + + +DashNixDashNix diff --git a/assets/logo3.svg b/assets/logo3.svg new file mode 100644 index 0000000..6076a01 --- /dev/null +++ b/assets/logo3.svg @@ -0,0 +1,238 @@ + + + +DashNixDashNix diff --git a/docs/src/README.md b/docs/src/README.md index 1fd255b..e1d2797 100644 --- a/docs/src/README.md +++ b/docs/src/README.md @@ -1,246 +1,246 @@ - -
- -# $${\color{cyan}DashNix}$$ - -![Logo of DashNix](./logo.svg) - -
- -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/DashNix"; - 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 { root = ./.; }; -``` - -This command will build each system that is placed within the hosts/ directory. -In this directory create one directory for each system you want to configure with DashNix. -This will automatically pick up the hostname for the system and look for 3 different files that are explained below. -(Optionally, you can also change the parameter root (./.) to define a different starting directory than hosts/) - -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. -The hardware.nix specifies additional NixOS configuration, while home.nix specifies additional home-manager configuration. (both optional) - -|- flake.nix\ -|- flake.lock\ -|- hosts/\ -|--- system1/\ -|------ configuration.nix (required)\ -|------ hardware.nix (optional)\ -|------ home.nix (optional)\ -|--- system2/\ -|------ configuration.nix (required)\ -|------ hardware.nix (optional)\ -|------ home.nix (optional)\ -|--- system3/\ -|------ configuration.nix (required)\ -|------ hardware.nix (optional)\ -|------ home.nix (optional) - -Here is a minimal required configuration.nix (the TODOs mention a required change): - -```nix -{config, ...}: { - # variables for system - # TODO important changes - conf = { - # change this to your monitor and your pc name - # should be something like DP-1 - defaultMonitor = "YOURMONITOR"; - # width x height @ refreshrate - defaultMonitorMode = "1920x1080@60"; - # scale for your main monitor - defaultMonitorScale = "1"; - # your username - username = "YOURNAME"; - # TODO only needed when you use intel -> amd is default - # cpu = "intel"; - locale = "something.UTF-8"; - timezone = "CONTINENT/CITY"; - }; - # modules - mods = { - # default disk config has root home boot and swap partition, overwrite if you want something different - drives = { - # default assumes ROOT, BOOT, HOME and SWAP labaled drives exist - # for an example without HOME see below - # defaultDrives.enable = false; - # extraDrives = [ - # { - # name = "boot"; - # drive = { - # device = "/dev/disk/by-label/BOOT"; - # fsType = "vfat"; - # options = [ "rw" "fmask=0022" "dmask=0022" "noatime" ]; - # }; - # } - # { - # name = ""; - # drive = { - # device = "/dev/disk/by-label/ROOT"; - # fsType = "ext4"; - # options = [ "noatime" "nodiratime" "discard" ]; - # }; - # } - # ]; - }; - sops.enable = false; - nextcloud.enable = false; - # default hyprland monitor config -> uncomment when necessary - # TODO: Add more monitors when needed - # hyprland.monitor = [ - # # default - # "${config.conf.defaultMonitor},${config.conf.defaultMonitorMode},0x0,${config.conf.defaultMonitorScale}" - # # second example monitor - # "DP-2,3440x1440@180,auto,1" - # # all others - # ",highrr,auto,1" - # ]; - # or amd, whatever you have - gpu.nvidia.enable = true; - kde_connect.enable = true; - # login manager: - # default is greetd - # greetd = { }; - # sddm = { }; - # gdm = { }; - }; -} -``` - -## First Login - -After logging in the first time, your password will be set to "firstlogin", please change this to whatever you like. - -## Nixos and Home-manager Modules - -You can add additional modules or remove all of them by overriding parameters to the build_systems command: - -```nix -nixosConfigurations = - let - additionalMods = { - nixos = [ - # your modules - ]; home = [ - # your modules - ]; - } - # passing this parameter will override the existing modules - mods = { - nixos = []; - home = []; - } - in - inputs.dashNix.dashNixLib.build_systems { root = ./.; inherit mods additionalMods; }; -``` - -## Additional Inputs - -Just like modules, you can add additional inputs to your configuration. - -```nix -nixosConfigurations = - let - additionalInputs = { - something.url = "yoururl" - } - in - inputs.dashNix.dashNixLib.build_systems { root = ./.; inherit additionalInputs; }; -``` - -## Stable/Unstable - -Sometimes you want to differentiate between systems that are stable and unstable, e.g. for servers and desktops/laptops. -This can be done with the overridePkgs flag for the lib function: - -```nix - nixosConfigurations = - inputs.dashNix.dashNixLib.build_systems { - root = ./stable; - inherit additionalInputs; - overridePkgs = true; - } - // inputs.dashNix.dashNixLib.build_systems { - root = ./unstable; - inherit additionalInputs; - }; -``` - -You can now place your systems in the respective directories. -Keep in mind that the hosts directory will still need to exist in each variant. -E.g. stable/hosts/yourserver and unstable/hosts/yourdesktop - -# Installation - -You can find a custom ISO on my NextCloud server: [Link](https://cloud.dashie.org/s/z7G3zS9SXeEt2ERD). -With this, you will receive the example config in /iso/example alongside the gnome desktop environment, -as well as a few tools like gnome-disks, neovim, vscodium, a browser etc. - -Alternatively, you can use whatever NixOS installer and just install your config from there, just make sure to set the drive configuration before. - -# Modules - -This configuration features several modules that can be used as preconfigured "recipies". -These modules attempt to combine the home-manager and nixos packages/options to one single configuration file for each new system. -For package lists, please check the individual modules, as the lists can be long. - -- Hyprland: Installs and configures Hyprland with various additional packages -- acpid : Enables the acpid daemon -- base packages : A list of system packages to be installed by default -- bluetooth : Configures/enables bluetooth and installs tools for bluetooth -- coding packages : A list of coding packages to be installed by default -- drives : A drive configuration module -- firefox: Enables and configures firefox (extensions and settings) -- fish: Enables and configures fish shell -- flatpak : Installs and enables declarative flatpak -- gaming : Configures gaming related features (launchers, gamemode) -- git : Git key and config module -- gnome_services : Gnome services for minimal enviroments -> Window managers etc -- gpu : GPU settings (AMD) -- greetd : Enables and configures the greetd/regreet login manager with Hyprland -- home packages : A list of home packages to be installed by default -- kde_connect : Enables KDE connect and opens its ports -- keepassxc : Configures keepassxc -- kitty: Enables and configures kitty terminal -- layout : Modules to configure keyboard layout system wide -- media packages : A list of media packages to be installed by default -- mime: Mime type configuration -- nextcloud : Handles synchronization via nextcloud cmd. (requires config.sops.secrets.nextcloud) -- oxi: My own programs, can be selectively disabled, or as a whole -- piper : Installs and enables piper alongside its daemon -- plymouth: enable or disable plymouth -- printing : Enables and configures printing services -- scripts: Various preconfigured scripts with the ability to add more -- sops: Enables sops-nix -- starship : Configures the starship prompt -- stylix : Configures system themes, can also be applied to dashvim if used. -- teams: For the poor souls that have to use this.... -- virtualbox : Enables and configures virtualbox -- xkb: Keyboard layout configuration -- xone : Installs the xone driver -- yazi: Installs yazi and sets custom keybinds - -# Credits - -- [Fufexan](https://github.com/fufexan) for the xdg-mime config: -- [Catppuccin](https://github.com/catppuccin) for base16 colors -- [Danth](https://github.com/danth) for providing a base for the nix docs -- [Nix-Artwork](https://github.com/NixOS/nixos-artwork/tree/master/logo) for the Nix/NixOS logo (Tim Cuthbertson (@timbertson)) + +
+ +# $${\color{cyan}DashNix}$$ + +![Logo of DashNix](logo.svg) + +
+ +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/DashNix"; + 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 { root = ./.; }; +``` + +This command will build each system that is placed within the hosts/ directory. +In this directory create one directory for each system you want to configure with DashNix. +This will automatically pick up the hostname for the system and look for 3 different files that are explained below. +(Optionally, you can also change the parameter root (./.) to define a different starting directory than hosts/) + +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. +The hardware.nix specifies additional NixOS configuration, while home.nix specifies additional home-manager configuration. (both optional) + +|- flake.nix\ +|- flake.lock\ +|- hosts/\ +|--- system1/\ +|------ configuration.nix (required)\ +|------ hardware.nix (optional)\ +|------ home.nix (optional)\ +|--- system2/\ +|------ configuration.nix (required)\ +|------ hardware.nix (optional)\ +|------ home.nix (optional)\ +|--- system3/\ +|------ configuration.nix (required)\ +|------ hardware.nix (optional)\ +|------ home.nix (optional) + +Here is a minimal required configuration.nix (the TODOs mention a required change): + +```nix +{config, ...}: { + # variables for system + # TODO important changes + conf = { + # change this to your monitor and your pc name + # should be something like DP-1 + defaultMonitor = "YOURMONITOR"; + # width x height @ refreshrate + defaultMonitorMode = "1920x1080@60"; + # scale for your main monitor + defaultMonitorScale = "1"; + # your username + username = "YOURNAME"; + # TODO only needed when you use intel -> amd is default + # cpu = "intel"; + locale = "something.UTF-8"; + timezone = "CONTINENT/CITY"; + }; + # modules + mods = { + # default disk config has root home boot and swap partition, overwrite if you want something different + drives = { + # default assumes ROOT, BOOT, HOME and SWAP labaled drives exist + # for an example without HOME see below + # defaultDrives.enable = false; + # extraDrives = [ + # { + # name = "boot"; + # drive = { + # device = "/dev/disk/by-label/BOOT"; + # fsType = "vfat"; + # options = [ "rw" "fmask=0022" "dmask=0022" "noatime" ]; + # }; + # } + # { + # name = ""; + # drive = { + # device = "/dev/disk/by-label/ROOT"; + # fsType = "ext4"; + # options = [ "noatime" "nodiratime" "discard" ]; + # }; + # } + # ]; + }; + sops.enable = false; + nextcloud.enable = false; + # default hyprland monitor config -> uncomment when necessary + # TODO: Add more monitors when needed + # hyprland.monitor = [ + # # default + # "${config.conf.defaultMonitor},${config.conf.defaultMonitorMode},0x0,${config.conf.defaultMonitorScale}" + # # second example monitor + # "DP-2,3440x1440@180,auto,1" + # # all others + # ",highrr,auto,1" + # ]; + # or amd, whatever you have + gpu.nvidia.enable = true; + kde_connect.enable = true; + # login manager: + # default is greetd + # greetd = { }; + # sddm = { }; + # gdm = { }; + }; +} +``` + +## First Login + +After logging in the first time, your password will be set to "firstlogin", please change this to whatever you like. + +## Nixos and Home-manager Modules + +You can add additional modules or remove all of them by overriding parameters to the build_systems command: + +```nix +nixosConfigurations = + let + additionalMods = { + nixos = [ + # your modules + ]; home = [ + # your modules + ]; + } + # passing this parameter will override the existing modules + mods = { + nixos = []; + home = []; + } + in + inputs.dashNix.dashNixLib.build_systems { root = ./.; inherit mods additionalMods; }; +``` + +## Additional Inputs + +Just like modules, you can add additional inputs to your configuration. + +```nix +nixosConfigurations = + let + additionalInputs = { + something.url = "yoururl" + } + in + inputs.dashNix.dashNixLib.build_systems { root = ./.; inherit additionalInputs; }; +``` + +## Stable/Unstable + +Sometimes you want to differentiate between systems that are stable and unstable, e.g. for servers and desktops/laptops. +This can be done with the overridePkgs flag for the lib function: + +```nix + nixosConfigurations = + inputs.dashNix.dashNixLib.build_systems { + root = ./stable; + inherit additionalInputs; + overridePkgs = true; + } + // inputs.dashNix.dashNixLib.build_systems { + root = ./unstable; + inherit additionalInputs; + }; +``` + +You can now place your systems in the respective directories. +Keep in mind that the hosts directory will still need to exist in each variant. +E.g. stable/hosts/yourserver and unstable/hosts/yourdesktop + +# Installation + +You can find a custom ISO on my NextCloud server: [Link](https://cloud.dashie.org/s/z7G3zS9SXeEt2ERD). +With this, you will receive the example config in /iso/example alongside the gnome desktop environment, +as well as a few tools like gnome-disks, neovim, vscodium, a browser etc. + +Alternatively, you can use whatever NixOS installer and just install your config from there, just make sure to set the drive configuration before. + +# Modules + +This configuration features several modules that can be used as preconfigured "recipies". +These modules attempt to combine the home-manager and nixos packages/options to one single configuration file for each new system. +For package lists, please check the individual modules, as the lists can be long. + +- Hyprland: Installs and configures Hyprland with various additional packages +- acpid : Enables the acpid daemon +- base packages : A list of system packages to be installed by default +- bluetooth : Configures/enables bluetooth and installs tools for bluetooth +- coding packages : A list of coding packages to be installed by default +- drives : A drive configuration module +- firefox: Enables and configures firefox (extensions and settings) +- fish: Enables and configures fish shell +- flatpak : Installs and enables declarative flatpak +- gaming : Configures gaming related features (launchers, gamemode) +- git : Git key and config module +- gnome_services : Gnome services for minimal enviroments -> Window managers etc +- gpu : GPU settings (AMD) +- greetd : Enables and configures the greetd/regreet login manager with Hyprland +- home packages : A list of home packages to be installed by default +- kde_connect : Enables KDE connect and opens its ports +- keepassxc : Configures keepassxc +- kitty: Enables and configures kitty terminal +- layout : Modules to configure keyboard layout system wide +- media packages : A list of media packages to be installed by default +- mime: Mime type configuration +- nextcloud : Handles synchronization via nextcloud cmd. (requires config.sops.secrets.nextcloud) +- oxi: My own programs, can be selectively disabled, or as a whole +- piper : Installs and enables piper alongside its daemon +- plymouth: enable or disable plymouth +- printing : Enables and configures printing services +- scripts: Various preconfigured scripts with the ability to add more +- sops: Enables sops-nix +- starship : Configures the starship prompt +- stylix : Configures system themes, can also be applied to dashvim if used. +- teams: For the poor souls that have to use this.... +- virtualbox : Enables and configures virtualbox +- xkb: Keyboard layout configuration +- xone : Installs the xone driver +- yazi: Installs yazi and sets custom keybinds + +# Credits + +- [Fufexan](https://github.com/fufexan) for the xdg-mime config: +- [Catppuccin](https://github.com/catppuccin) for base16 colors +- [Danth](https://github.com/danth) for providing a base for the nix docs +- [Nix-Artwork](https://github.com/NixOS/nixos-artwork/tree/master/logo) for the Nix/NixOS logo (Tim Cuthbertson (@timbertson)) diff --git a/docs/src/logo.svg b/docs/src/logo.svg new file mode 100644 index 0000000..08baa43 --- /dev/null +++ b/docs/src/logo.svg @@ -0,0 +1,238 @@ + + + +DashNixDashNix diff --git a/logo.svg b/logo.svg index eb92235..08baa43 100644 --- a/logo.svg +++ b/logo.svg @@ -2,40 +2,19 @@ DashNix + d="m 277.21377,-582.32585 178.97491,-166.45237 -53.52586,-16.99636 -47.88683,44.78006 -14.79485,-63.7204 -26.67512,-8.18413 -20.91172,19.40373 21.10703,90.68829 -48.74692,45.51646 z" + style="fill:#f8f641;fill-opacity:1" />DashNix