From b86098bcfba72b9ac5fbd5a4276a033e2662b184 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Sun, 4 Feb 2024 22:26:36 -0300 Subject: [PATCH] chore: sync --- flake.lock | 37 ++++++++++++++++++++++++++++++++++++- flake.nix | 6 ++++++ nixos.nix | 15 +++++++++++++-- 3 files changed, 55 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 94368e0..a386be3 100644 --- a/flake.lock +++ b/flake.lock @@ -306,6 +306,24 @@ "type": "github" } }, + "musnix": { + "inputs": { + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1702456985, + "narHash": "sha256-mnjCk8mINY4t5uIwP2eR19FOQXHTCO68+KsgKFTv1NI=", + "owner": "musnix", + "repo": "musnix", + "rev": "cf93a72da8ad677864045e9a5dd32170378d9a62", + "type": "github" + }, + "original": { + "owner": "musnix", + "repo": "musnix", + "type": "github" + } + }, "nix-darwin": { "inputs": { "nixpkgs": [ @@ -394,6 +412,22 @@ } }, "nixpkgs_3": { + "locked": { + "lastModified": 1690272529, + "narHash": "sha256-MakzcKXEdv/I4qJUtq/k/eG+rVmyOZLnYNC2w1mB59Y=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ef99fa5c5ed624460217c31ac4271cfb5cb2502c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { "locked": { "lastModified": 1706550542, "narHash": "sha256-UcsnCG6wx++23yeER4Hg18CXWbgNpqNXcHIo5/1Y+hc=", @@ -483,7 +517,8 @@ "home-manager": "home-manager_2", "hyprland": "hyprland", "hyprland-hyprfocus": "hyprland-hyprfocus", - "nixpkgs": "nixpkgs_3" + "musnix": "musnix", + "nixpkgs": "nixpkgs_4" } }, "rustaceanvim": { diff --git a/flake.nix b/flake.nix index b0a06c7..ab028a9 100644 --- a/flake.nix +++ b/flake.nix @@ -21,6 +21,9 @@ # My neovim configuration using nixvim. custom-neovim.url = "github:wizardlink/neovim"; + + # Real time scheduling for audio work. + musnix.url = "github:musnix/musnix"; }; outputs = @@ -28,6 +31,7 @@ , home-manager , hyprland , nixpkgs + , musnix , ... }@inputs: { nixosConfigurations.nixos = @@ -36,6 +40,8 @@ modules = [ ./nixos.nix + musnix.nixosModules.musnix + hyprland.nixosModules.default { programs.hyprland.enable = true; diff --git a/nixos.nix b/nixos.nix index d9913a7..a7801d9 100644 --- a/nixos.nix +++ b/nixos.nix @@ -44,7 +44,14 @@ ## # Kernel - boot.kernelPackages = pkgs.linuxPackages_xanmod_stable; + musnix = { + enable = true; + + kernel = { + realtime = true; + packages = pkgs.linuxPackages_latest_rt; + }; + }; # Add AMD drivers. boot.initrd.kernelModules = [ "amdgpu" ]; @@ -109,6 +116,7 @@ description = "Alexandre Cavalheiro"; extraGroups = [ "networkmanager" "wheel" "postgresql" "docker" ]; + initialPassword = "wizardlink"; isNormalUser = true; openssh.authorizedKeys.keys = [ @@ -269,7 +277,10 @@ ## Tools # Utilities bat - btop + (btop.overrideAttrs { + # Support for AMD GPU monitoring. + nativeBuildInputs = [ rocmPackages.rocm-smi ]; + }) docker-compose duf fzf