major refactor and reorg

This commit is contained in:
Matt Nish-Lapidus 2025-02-04 13:13:24 -05:00
parent f43b32286c
commit e91cca9aeb
13 changed files with 614 additions and 591 deletions

72
flake.lock generated
View file

@ -129,6 +129,25 @@
"type": "gitlab" "type": "gitlab"
} }
}, },
"emacs-overlay": {
"inputs": {
"nixpkgs": "nixpkgs_2",
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1738686104,
"narHash": "sha256-PfG/bm33axdRPsi3nMB5ioOvq1xdJpdw+iptZVJVmE4=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "52f13caa3c3570bc59582578593b8fafd40f8aaa",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "emacs-overlay",
"type": "github"
}
},
"fenix": { "fenix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -489,16 +508,15 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1736373539, "lastModified": 1738667255,
"narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=", "narHash": "sha256-sMMQb9NydZqQ/MvvtPp+Ny0W9P0Jk0moU7SrTBlO5Vo=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "bd65bc3cde04c16755955630b344bc9e35272c56", "rev": "7abcf59a365430b36f84eaa452a466b11e469e33",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-24.11",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@ -950,7 +968,7 @@
"inputs": { "inputs": {
"flake-compat": "flake-compat_3", "flake-compat": "flake-compat_3",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"lastModified": 1725758175, "lastModified": 1725758175,
@ -1042,23 +1060,39 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-unstable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1738546358, "lastModified": 1738574474,
"narHash": "sha256-nLivjIygCiqLp5QcL7l56Tca/elVqM9FG1hGd9ZSsrg=", "narHash": "sha256-rvyfF49e/k6vkrRTV4ILrWd92W+nmBDfRYZgctOyolQ=",
"owner": "nixos", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c6e957d81b96751a3d5967a0fd73694f303cc914", "rev": "fecfeb86328381268e29e998ddd3ebc70bbd7f7c",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "NixOS",
"ref": "nixos-unstable", "ref": "nixos-24.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": {
"lastModified": 1738546358,
"narHash": "sha256-nLivjIygCiqLp5QcL7l56Tca/elVqM9FG1hGd9ZSsrg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c6e957d81b96751a3d5967a0fd73694f303cc914",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1725103162, "lastModified": 1725103162,
"narHash": "sha256-Ym04C5+qovuQDYL/rKWSR+WESseQBbNAe5DsXNx5trY=", "narHash": "sha256-Ym04C5+qovuQDYL/rKWSR+WESseQBbNAe5DsXNx5trY=",
@ -1074,18 +1108,18 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_3": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1738574474, "lastModified": 1738546358,
"narHash": "sha256-rvyfF49e/k6vkrRTV4ILrWd92W+nmBDfRYZgctOyolQ=", "narHash": "sha256-nLivjIygCiqLp5QcL7l56Tca/elVqM9FG1hGd9ZSsrg=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "fecfeb86328381268e29e998ddd3ebc70bbd7f7c", "rev": "c6e957d81b96751a3d5967a0fd73694f303cc914",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixos-24.11", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -1184,6 +1218,7 @@
"root": { "root": {
"inputs": { "inputs": {
"affinity-nix": "affinity-nix", "affinity-nix": "affinity-nix",
"emacs-overlay": "emacs-overlay",
"home-manager": "home-manager", "home-manager": "home-manager",
"hypridle": "hypridle", "hypridle": "hypridle",
"hyprlock": "hyprlock", "hyprlock": "hyprlock",
@ -1194,8 +1229,7 @@
"niri": "niri", "niri": "niri",
"nix-flatpak": "nix-flatpak", "nix-flatpak": "nix-flatpak",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_4",
"nixpkgs-unstable": "nixpkgs-unstable",
"paperwm": "paperwm", "paperwm": "paperwm",
"shikane": "shikane", "shikane": "shikane",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",

View file

@ -3,11 +3,10 @@
inputs = { inputs = {
nixos-hardware.url = "github:NixOS/nixos-hardware"; nixos-hardware.url = "github:NixOS/nixos-hardware";
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-24.11"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
@ -32,6 +31,8 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
emacs-overlay.url = "github:nix-community/emacs-overlay";
kmonad = { kmonad = {
url = "github:kmonad/kmonad?dir=nix"; url = "github:kmonad/kmonad?dir=nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -88,23 +89,70 @@
}; };
}; };
outputs = {nixpkgs, home-manager, self, ... } @ inputs: { outputs = {nixpkgs, home-manager, self, ... } @ inputs:
nixosConfigurations = { let
eddie = nixpkgs.lib.nixosSystem { inherit (nixpkgs.lib) nixosSystem genAttrs replaceStrings;
system = "x86_64-linux"; inherit (nixpkgs.lib.filesystem) packagesFromDirectoryRecursive listFilesRecursive;
specialArgs = {
inherit self inputs; forAllSystems =
function:
genAttrs [
"x86_64-linux"
] (system: function nixpkgs.legacyPackages.${system});
nameOf = path: replaceStrings [ ".nix" ] [ "" ] (baseNameOf (toString path));
in
{
packages = forAllSystems (
pkgs:
packagesFromDirectoryRecursive {
inherit (pkgs) callPackage;
directory = ./packages;
}
);
nixosModules = genAttrs (map nameOf (listFilesRecursive ./modules/system)) (
name: import ./modules/system/${name}.nix
);
homeModules = genAttrs (map nameOf (listFilesRecursive ./modules/home)) (name: import ./modules/home/${name}.nix);
overlays = genAttrs (map nameOf (listFilesRecursive ./overlays)) (
name: import ./overlays/${name}.nix
);
nixosConfigurations = {
eddie = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
nix-config = self;
};
modules = [
inputs.kmonad.nixosModules.default
inputs.musnix.nixosModules.musnix
./hosts/eddie/configuration.nix
];
};
};
homeConfigurations = {
"emenel" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {
inherit inputs;
nix-config = self;
};
modules = [
inputs.nix-flatpak.homeManagerModules.nix-flatpak
inputs.stylix.homeManagerModules.stylix
inputs.sops-nix.homeManagerModules.sops
./homes/emenel/default.nix
];
}; };
modules = [
inputs.sops-nix.nixosModules.sops
inputs.nix-flatpak.nixosModules.nix-flatpak
inputs.kmonad.nixosModules.default
inputs.musnix.nixosModules.musnix
home-manager.nixosModules.home-manager
./hosts/eddie
./homes/emenel/default.nix
];
}; };
}; };
};
} }

File diff suppressed because it is too large Load diff

View file

@ -2,23 +2,31 @@
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help). # and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, lib, inputs, musnix, outputs, ... }: { nix-config, config, pkgs, lib, inputs, ... }:
{ {
# imports = imports =
# [ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
# ./hardware-configuration.nix ./hardware-configuration.nix
# ./razer-speaker-fix.nix ./razer-speaker-fix.nix
# ]; ];
nixpkgs = { nixpkgs = {
config = { config = {
allowUnfree = true; allowUnfree = true;
}; };
overlays = builtins.attrValues nix-config.overlays
++ [ inputs.emacs-overlay.overlays.default
inputs.niri.overlays.default
];
}; };
# environment.etc."nix/inputs/nixpkgs".source = "${nixpkgs}";
nix = { nix = {
# registry.nixpkgs.flake = nixpkgs;
channel.enable = false;
settings = { settings = {
experimental-features = [ "nix-command" "flakes" ]; experimental-features = [ "nix-command" "flakes" ];
substituters = [ "https://nix-community.cachix.org" ]; substituters = [ "https://nix-community.cachix.org" ];
@ -63,7 +71,7 @@
systemd-boot.configurationLimit = 8; systemd-boot.configurationLimit = 8;
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
}; };
kernelPackages = pkgs.unstable.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
initrd.systemd.enable = true; initrd.systemd.enable = true;
initrd.kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" "snd-virmidi" ]; initrd.kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" "snd-virmidi" ];
kernelParams = [ "nvidia_drm.fbdev=1" "nvidia_drm.modeset=1" ]; kernelParams = [ "nvidia_drm.fbdev=1" "nvidia_drm.modeset=1" ];
@ -224,7 +232,7 @@
# wireless = { # wireless = {
# iwd = { # iwd = {
# enable = true; # enable = true;
# package = pkgs.unstable.iwd; # package = pkgs.iwd;
# settings = { # settings = {
# IPv6 = { # IPv6 = {
# enabled = true; # enabled = true;
@ -275,7 +283,7 @@
extraArgs = "--keep-since 4d --keep 3"; extraArgs = "--keep-since 4d --keep 3";
}; };
flake = "/home/emenel/source/nixos-config"; flake = "/home/emenel/source/nixos-config";
package = pkgs.unstable.nh; package = pkgs.nh;
}; };
programs.dconf.enable = true; programs.dconf.enable = true;
@ -311,7 +319,7 @@
}; };
# Enable sound with pipewire. # Enable sound with pipewire.
hardware.pulseaudio.enable = false; services.pulseaudio.enable = false;
services.pipewire = { services.pipewire = {
enable = true; enable = true;
@ -435,12 +443,12 @@
keyboards = { keyboards = {
sinc = { sinc = {
device = "/dev/input/by-id/usb-Keebio_Sinc_Rev._4-event-kbd"; device = "/dev/input/by-id/usb-Keebio_Sinc_Rev._4-event-kbd";
config = builtins.readFile ../../dotfiles/dot_config/kmonad/sinc.kbd; config = builtins.readFile ../../homes/emenel/dotfiles/dot_config/kmonad/sinc.kbd;
}; };
razer = { razer = {
extraGroups = [ "openrazer" ]; extraGroups = [ "openrazer" ];
device = "/dev/input/by-id/usb-Razer_Razer_Blade-if01-event-kbd"; device = "/dev/input/by-id/usb-Razer_Razer_Blade-if01-event-kbd";
config = builtins.readFile ../../dotfiles/dot_config/kmonad/razer.kbd; config = builtins.readFile ../../homes/emenel/dotfiles/dot_config/kmonad/razer.kbd;
}; };
}; };
}; };
@ -515,7 +523,7 @@
services.power-profiles-daemon = { services.power-profiles-daemon = {
enable = true; enable = true;
package = pkgs.unstable.power-profiles-daemon; package = pkgs.power-profiles-daemon;
}; };
# enable the OpenSSH daemon. # enable the OpenSSH daemon.

5
modules/system/niri.nix Normal file
View file

@ -0,0 +1,5 @@
{
programs.niri = {
enable = true;
};
}

View file

@ -1,8 +0,0 @@
{ inputs, config, lib, pkgs, ... }:
{
programs.niri = {
enable = true;
package = inputs.niri.packages.x86_64-linux.niri;
};
}

View file

@ -1,63 +0,0 @@
# This file defines overlays
{inputs, ...}: {
# This one brings our custom packages from the 'pkgs' directory
additions = final: _prev: import ../packages final.pkgs;
modifications = final: prev: {
networkmanager = prev.pkgs.unstable.networkmanager;
ulauncher = prev.ulauncher.overrideAttrs (old: {
propagatedBuildInputs = with prev.python3Packages;
old.propagatedBuildInputs
++ [
thefuzz
tornado
];
});
gnome47Extensions.paperwm = inputs.paperwm.packages.x86_64-linux.default;
wineWowPackages.stagingFull = prev.wineWowPackages.stagingFull.overrideAttrs (old: {
patches = old.patches ++ [ ./wine-6006.patch ];
waylandSupport = true;
fontconfigSupport = true;
vulkanSupport = true;
});
raylib = prev.raylib.overrideDerivation (previous: {
src = prev.fetchFromGitHub {
owner = "raysan5";
repo = "raylib";
hash = "sha256-PHYdAEhittShd1UhASdhmq0nGHEEVZEUGcjCUUJZl9g=";
rev = "c9c830cb971d7aa744fe3c7444b768ccd5176c4c";
};
patches = [""];
});
openrazer-daemon = prev.openrazer-daemon.overrideDerivation (previous: {
# name = "openrazer-daemon";
src = prev.fetchFromGitHub {
owner = "openrazer";
version = "latest";
repo = "openrazer";
hash = "sha256-GqmFpVNuPRNM95pJsihsk/d3s61t4Lw+qaukKip9BAM=";
rev = "5e677b178be7da08fb72d7cd0791bf68a129fcc5";
};
});
};
emacs-overlay = (import (builtins.fetchTarball {
url = "https://github.com/nix-community/emacs-overlay/archive/master.tar.gz";
sha256 = "0jlddbg2x6g6gi9aimd6ycxl86ndxd9lg3mz0xmyq174qmqij218";
}));
# When applied, the unstable nixpkgs set (declared in the flake inputs) will
# be accessible through 'pkgs.unstable'
unstable-packages = final: _prev: {
unstable = import inputs.nixpkgs-unstable {
system = final.system;
config.allowUnfree = true;
};
};
}

8
overlays/wineWow.nix Normal file
View file

@ -0,0 +1,8 @@
final: prev: {
wineWowPackages.stagingFull = prev.wineWowPackages.stagingFull.overrideAttrs (old: {
patches = old.patches ++ [ ../patches/wine-6006.patch ];
waylandSupport = true;
fontconfigSupport = true;
vulkanSupport = true;
});
}

View file

@ -3,7 +3,7 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "Excite Cymbal Pro"; pname = "Excite Cymbal Pro";
version = "latest"; version = "latest";
src = ../../binary-installers/excite_cymbal_pro-v1.0.1.zip; src = ../../assets/binary-installers/excite_cymbal_pro-v1.0.1.zip;
nativeBuildInputs = [ makeWrapper unzip autoPatchelfHook ]; nativeBuildInputs = [ makeWrapper unzip autoPatchelfHook ];
buildInputs = with pkgs; [ buildInputs = with pkgs; [
freetype freetype

View file

@ -3,7 +3,7 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "Excite Snare Pro"; pname = "Excite Snare Pro";
version = "latest"; version = "latest";
src = ../../binary-installers/excite_snare_drum_PRO_1.1.10.zip; src = ../../assets/binary-installers/excite_snare_drum_PRO_1.1.10.zip;
nativeBuildInputs = [ makeWrapper unzip autoPatchelfHook ]; nativeBuildInputs = [ makeWrapper unzip autoPatchelfHook ];
buildInputs = with pkgs; [ buildInputs = with pkgs; [
freetype freetype

View file

@ -1,21 +0,0 @@
# Custom packages, that can be defined similarly to ones from nixpkgs
# You can build them using 'nix build .#example'
pkgs: {
tal-bassline = pkgs.callPackage ./tal/bassline.nix {};
tal-j8 = pkgs.callPackage ./tal/j8.nix {};
tal-u-no-lx = pkgs.callPackage ./tal/u-no-lx.nix {};
amplocker = pkgs.callPackage ./amplocker/package.nix {};
chair-snare = pkgs.callPackage ./chair-audio/snare.nix {};
chair-cymb = pkgs.callPackage ./chair-audio/cymb.nix {};
tus-vavra = pkgs.callPackage ./the-usual-suspects/vavra/vavra.nix {};
tus-nodal-red = pkgs.callPackage ./the-usual-suspects/nodal-red/nodal-red.nix {};
tus-xenia = pkgs.callPackage ./the-usual-suspects/xenia/xenia.nix {};
tus-ostirus = pkgs.callPackage ./the-usual-suspects/ostirus/ostirus.nix {};
tus-osirus = pkgs.callPackage ./the-usual-suspects/osirus/osirus.nix {};
paulxstretch = pkgs.callPackage ./paulxstretch/paulxstretch.nix {};
mioctl = pkgs.callPackage ./mioctl/mioctl.nix {};
bitwig-studio-beta = pkgs.callPackage ./bitwig-beta/bitwig-studio-beta.nix {};
rbw-latest = pkgs.callPackage ./rbw/rbw.nix {};
}