{ inputs, pkgs, ... }: { imports = [ ]; networking = { hostName = "music-workstation"; }; nix = let flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs; in { settings = { # Enable flakes and new 'nix' command experimental-features = "nix-command flakes"; # Opinionated: disable global registry flake-registry = ""; # Workaround for https://github.com/Nixos/nix/issues/9574 nix-path = config.nix.nixPath; }; # Opinionated: disable channels channel.enable = false; # Opinonated: make flake registry and nix paths match flake inputs registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs; nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs; }; musnix.enable = true; musnix.rtcqs.enable = true; musnix.kernel.realtime = true; users.users = { root = { }; }; security.rtkit.enable = true; services.pipewire = { enable = true; alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; jack.enable = true; }; services.pipewire.extraConfig."92-low-latency" = { "context.properties" = { "default.clock.rate" = 48000; "default.clock.quantum" = 32; "default.clock.min-quantum" = 32; "default.clock.max-quantum" = 32; }; }; environment.systemPackages = [ pkgs.pijul ]; # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion system.stateVersion = "24.05"; }