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

View file

@ -3,11 +3,10 @@
inputs = {
nixos-hardware.url = "github:NixOS/nixos-hardware";
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
@ -32,6 +31,8 @@
inputs.nixpkgs.follows = "nixpkgs";
};
emacs-overlay.url = "github:nix-community/emacs-overlay";
kmonad = {
url = "github:kmonad/kmonad?dir=nix";
inputs.nixpkgs.follows = "nixpkgs";
@ -88,23 +89,70 @@
};
};
outputs = {nixpkgs, home-manager, self, ... } @ inputs: {
nixosConfigurations = {
eddie = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit self inputs;
outputs = {nixpkgs, home-manager, self, ... } @ inputs:
let
inherit (nixpkgs.lib) nixosSystem genAttrs replaceStrings;
inherit (nixpkgs.lib.filesystem) packagesFromDirectoryRecursive listFilesRecursive;
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
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, lib, inputs, musnix, outputs, ... }:
{ nix-config, config, pkgs, lib, inputs, ... }:
{
# imports =
# [ # Include the results of the hardware scan.
# ./hardware-configuration.nix
# ./razer-speaker-fix.nix
# ];
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./razer-speaker-fix.nix
];
nixpkgs = {
config = {
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 = {
# registry.nixpkgs.flake = nixpkgs;
channel.enable = false;
settings = {
experimental-features = [ "nix-command" "flakes" ];
substituters = [ "https://nix-community.cachix.org" ];
@ -63,7 +71,7 @@
systemd-boot.configurationLimit = 8;
efi.canTouchEfiVariables = true;
};
kernelPackages = pkgs.unstable.linuxPackages_latest;
kernelPackages = pkgs.linuxPackages_latest;
initrd.systemd.enable = true;
initrd.kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" "snd-virmidi" ];
kernelParams = [ "nvidia_drm.fbdev=1" "nvidia_drm.modeset=1" ];
@ -224,7 +232,7 @@
# wireless = {
# iwd = {
# enable = true;
# package = pkgs.unstable.iwd;
# package = pkgs.iwd;
# settings = {
# IPv6 = {
# enabled = true;
@ -275,7 +283,7 @@
extraArgs = "--keep-since 4d --keep 3";
};
flake = "/home/emenel/source/nixos-config";
package = pkgs.unstable.nh;
package = pkgs.nh;
};
programs.dconf.enable = true;
@ -311,7 +319,7 @@
};
# Enable sound with pipewire.
hardware.pulseaudio.enable = false;
services.pulseaudio.enable = false;
services.pipewire = {
enable = true;
@ -435,12 +443,12 @@
keyboards = {
sinc = {
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 = {
extraGroups = [ "openrazer" ];
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 = {
enable = true;
package = pkgs.unstable.power-profiles-daemon;
package = pkgs.power-profiles-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 {
pname = "Excite Cymbal Pro";
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 ];
buildInputs = with pkgs; [
freetype

View file

@ -3,7 +3,7 @@
stdenv.mkDerivation rec {
pname = "Excite Snare Pro";
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 ];
buildInputs = with pkgs; [
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 {};
}