treewide: yet another restructure

modules, overlays, and packages have their own default.nix re-exporting
things instead of reading file paths. slightly improves declarativeness.

wine-osu is removed; we're just using nix-gaming (for now).

our custom packages will now have to be accessed via pkgs.me instead of
just pkgs. helps know where it came from

future goals: get rid of our overlays completely, or at least not make
it replace anything from nixpkgs
This commit is contained in:
LavaDesu 2021-11-17 10:57:56 +07:00
parent eb0f2cb733
commit 8c75ba2a2d
Signed by: cilly
GPG key ID: 6500251E087653C9
14 changed files with 96 additions and 11552 deletions

51
modules/default.nix Normal file
View file

@ -0,0 +1,51 @@
{ lib }:
let
getName = path: lib.removeSuffix ".nix" ( # Strip extension
lib.last ( # Gets the last part (filename)
lib.splitString "/" ( # Splits the path into components
builtins.toString path # Converts the path into a string
)
)
);
mkAttrsFromPaths = paths: builtins.listToAttrs (
builtins.map (path: {
name = getName path;
value = path;
}) paths
);
in {
system = mkAttrsFromPaths [
./system/audio.nix
./system/base.nix
./system/gui.nix
./system/input.nix
./system/kernel.nix
./system/nix.nix
./system/packages.nix
./system/security.nix
./system/snapper.nix
./system/transmission.nix
./system/wireguard.nix
];
user = mkAttrsFromPaths [
./user/bspwm.nix
./user/direnv.nix
./user/dunst.nix
./user/git.nix
./user/gpg.nix
./user/kitty.nix
./user/mpv.nix
./user/neovim.nix
./user/npm.nix
./user/packages-rin.nix
./user/picom.nix
./user/polybar.nix
./user/rofi.nix
./user/sessionVariables.nix
./user/sxhkd.nix
./user/theming.nix
./user/xdg.nix
./user/xorg.nix
./user/zsh.nix
];
}

View file

@ -20,7 +20,6 @@
};
nix.registry.config.flake = inputs.self;
nix.registry.nixpkgs.flake = inputs.nixpkgs;
nixpkgs.overlays = overlays;
home-manager = {
useGlobalPkgs = true;

View file

@ -45,12 +45,12 @@ in {
(nvim-treesitter.withPlugins (p: with p; [
tree-sitter-comment
tree-sitter-c-sharp
pkgs.tree-sitter-glimmer
pkgs.me.tree-sitter-glimmer
tree-sitter-html
tree-sitter-javascript
tree-sitter-jsdoc
tree-sitter-json
pkgs.tree-sitter-jsonc
pkgs.me.tree-sitter-jsonc
tree-sitter-lua
tree-sitter-nix
tree-sitter-php

View file

@ -32,7 +32,7 @@
inputs.who-reacted
];
themes = [
pkgs.discord-tokyonight
pkgs.me.discord-tokyonight
inputs.radialstatus
inputs.tokyonight
inputs.zelk