1

README + comments

This commit is contained in:
2022-08-11 14:35:36 +02:00
parent e903b048e9
commit a4e3b7a175
6 changed files with 26 additions and 17 deletions

View File

@ -8,7 +8,7 @@ I heavily borrowed from:
- [hlissner](https://github.com/hlissner/dotfiles) - [hlissner](https://github.com/hlissner/dotfiles)
- [misterio77](https://github.com/Misterio77/nix-config) - [misterio77](https://github.com/Misterio77/nix-config)
# ./nixos # ./system
This folder contains all the system configurations. This folder contains all the system configurations.
@ -27,3 +27,10 @@ This folder contains all the home-manager configurations.
When creating a NixOS configuration inside the ``NixFlake/flake.nix`` the common configuration is imported. When creating a NixOS configuration inside the ``NixFlake/flake.nix`` the common configuration is imported.
Because the hostname is propagated to the common configuration, it can import the host-specific config by itself. Because the hostname is propagated to the common configuration, it can import the host-specific config by itself.
# Notes
- I didn't organize the modules in folders with a ``default.nix`` for every module as this reduces readability
- Modules are split into system modules and home modules
- The ``NixFlake/overlays/default.nix`` imports all the derivations
- ``NixFlake/config`` contains all the dotfiles that are symlinked by HomeManager

View File

@ -1,5 +1,5 @@
{ pkgs }: { pkgs }:
{ {
vital-synth = pkgs.callPackage ./vital-synth {}; # vital-synth = pkgs.callPackage ./vital-synth {}; # Kept as an example, don't know if I will fix this or keep using distrho
} }

View File

@ -1,3 +1,5 @@
# Has a problem with vertically offset UI, replaced by distrho for now but kept as an example
# Damn I hate this style # Damn I hate this style
{ lib { lib
, stdenv , stdenv
@ -62,8 +64,6 @@ in stdenv.mkDerivation rec {
alsa-lib freetype gcc.cc.lib gcc.cc glib glibc curlWithGnuTls libGL libglvnd libsecret alsa-lib freetype gcc.cc.lib gcc.cc glib glibc curlWithGnuTls libGL libglvnd libsecret
]; ];
# TODO: Somehow/somehwere (in HomeManager?) we need to make a link to ~/.vst3
# Copy the contents of the .deb package to the $out directory that nix creates for built derivations # Copy the contents of the .deb package to the $out directory that nix creates for built derivations
# Very simple as the vital .deb has a very basic format (only [ usr/bin usr/lib usr/share ]) # Very simple as the vital .deb has a very basic format (only [ usr/bin usr/lib usr/share ])
installPhase = '' installPhase = ''

View File

@ -24,7 +24,7 @@ in {
# Instruments/Plugins # Instruments/Plugins
vcvrack.enable = mkEnableOpt "VCV-Rack (Eurorack simulator)"; vcvrack.enable = mkEnableOpt "VCV-Rack (Eurorack simulator)";
# vital.enable = mkEnableOpt "Vital (Wavetable synthesizer)"; # vital.enable = mkEnableOpt "Vital (Wavetable synthesizer)"; # Replaced by distrho
distrho.enable = mkEnableOpt "Distrho (Linux VST ports)"; distrho.enable = mkEnableOpt "Distrho (Linux VST ports)";
# Misc # Misc
@ -95,7 +95,7 @@ in {
(optionals cfg.noisesuppression.noisetorch.enable [ noisetorch ]) (optionals cfg.noisesuppression.noisetorch.enable [ noisetorch ])
(optionals cfg.vcvrack.enable [ vcv-rack ]) (optionals cfg.vcvrack.enable [ vcv-rack ])
# (optionals cfg.vital.enable [ vital-synth ]) # (optionals cfg.vital.enable [ vital-synth ]) # Replaced by distrho
(optionals cfg.distrho.enable [ distrho ]) (optionals cfg.distrho.enable [ distrho ])
]; ];
@ -159,14 +159,15 @@ in {
(mkUnlink "${config.home.homeDirectory}/.config/carla"); (mkUnlink "${config.home.homeDirectory}/.config/carla");
}) })
# (mkIf cfg.vital.enable { # Replaced by distrho
# linkVitalVST3 = hm.dag.entryAfter [ "writeBoundary" ] # (mkIf cfg.vital.enable {
# (mkLink "${pkgs.vital-synth}/lib/vst3/Vital.vst3" "${config.home.homeDirectory}/.vst3/Vital.vst3"); # linkVitalVST3 = hm.dag.entryAfter [ "writeBoundary" ]
# }) # (mkLink "${pkgs.vital-synth}/lib/vst3/Vital.vst3" "${config.home.homeDirectory}/.vst3/Vital.vst3");
# (mkElse cfg.vital.enable { # })
# unlinkVitalVST3 = hm.dag.entryAfter [ "writeBoundary" ] # (mkElse cfg.vital.enable {
# (mkUnlink "${config.home.homeDirectory}/.vst3/Vital.vst3"); # unlinkVitalVST3 = hm.dag.entryAfter [ "writeBoundary" ]
# }) # (mkUnlink "${config.home.homeDirectory}/.vst3/Vital.vst3");
# })
(mkIf cfg.distrho.enable { (mkIf cfg.distrho.enable {
linkDistrhoLV2 = hm.dag.entryAfter [ "writeBoundary" ] linkDistrhoLV2 = hm.dag.entryAfter [ "writeBoundary" ]

View File

@ -18,6 +18,8 @@ in {
# This module defines only the "emacs" option and suboptions "enable" and "doom" # This module defines only the "emacs" option and suboptions "enable" and "doom"
options.modules.emacs = { options.modules.emacs = {
enable = mkEnableOpt "Emacs module"; enable = mkEnableOpt "Emacs module";
# TODO: Use an enum for this not individual options
nativeComp = mkBoolOpt false "Use Emacs 28.x branch with native comp support"; nativeComp = mkBoolOpt false "Use Emacs 28.x branch with native comp support";
pgtkNativeComp = mkBoolOpt false "Use Emacs 29.x branch with native comp and pure gtk support"; pgtkNativeComp = mkBoolOpt false "Use Emacs 29.x branch with native comp and pure gtk support";

View File

@ -7,8 +7,6 @@ with mylib.modules;
# It is important that every flatpak interaction is handled through this module # It is important that every flatpak interaction is handled through this module
# to prevent that anything is removed by a module although it is required by another one # to prevent that anything is removed by a module although it is required by another one
# TODO: Also need a library function to enable and concatenate different flatpak overrides (also global overrides)
let let
cfg = config.modules.flatpak; cfg = config.modules.flatpak;
in { in {
@ -78,11 +76,12 @@ in {
{ {
".local/share/flatpak/overrides/global".text = let ".local/share/flatpak/overrides/global".text = let
default_overrides = [ default_overrides = [
"/nix/store:ro"
# These are not necessary # These are not necessary
# Make sure flatpaks are allowed to use the icons/fonts that are symlinked by icon/font fix # Make sure flatpaks are allowed to use the icons/fonts that are symlinked by icon/font fix
# "/run/current-system/sw/share/X11/fonts:ro" # "/run/current-system/sw/share/X11/fonts:ro"
# "/run/current-system/sw/share/icons:ro" # "/run/current-system/sw/share/icons:ro"
"/nix/store:ro"
]; ];
all_overrides = builtins.concatLists [ default_overrides cfg.extraGlobalOverride ]; all_overrides = builtins.concatLists [ default_overrides cfg.extraGlobalOverride ];