Files
illogical-impulse/flake.nix
T
2025-08-11 20:20:02 -05:00

110 lines
2.9 KiB
Nix

{
description = "A simple NixOS flake for a single system architecture.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
hyprland = {
url = "github:hyprwm/Hyprland";
inputs.nixpkgs.follows = "nixpkgs";
};
quickshell = {
url = "git+https://git.outfoxxed.me/outfoxxed/quickshell";
inputs.nixpkgs.follows = "nixpkgs";
};
matugen = {
url = "github:/InioX/Matugen";
inputs.nixpkgs.follows = "nixpkgs";
# ref = "refs/tags/matugen-v0.10.0";
};
oneUI = {
url = "github:/end-4/OneUI4-Icons";
inputs.nixpkgs.follows = "nixpkgs";
flake = false;
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
hyprland,
quickshell,
matugen,
oneUI,
...
}: let
supportedSystems = ["x86_64-linux"];
eachSupportedSystem = f:
nixpkgs.lib.genAttrs supportedSystems (system: let
pkgs = import nixpkgs {
inherit system;
};
in
f pkgs);
in {
homeManagerModules = rec {
default = illogical-impulse;
illogical-impulse = import ./modules/desktop/default.nix;
};
legacyPackages = eachSupportedSystem (pkgs: {
quickshellWithQT = quickshell.packages.${pkgs.system}.default.overrideAttrs (oldAttrs: {
propagatedBuildInputs =
oldAttrs.propagatedBuildInputs or []
++ [
pkgs.kdePackages.qt5compat
pkgs.kdePackages.qtpositioning
];
});
iiShellConfig = pkgs.stdenv.mkDerivation {
pname = "ii-shell-config";
version = "1.0";
src = ./.;
installPhase = ''
runHook preInstall
install -d -m 755 $out/share/ii
cp -r .config/quickshell/ii/* $out/share/ii
runHook postInstall
'';
dontPatchShebangs = true;
};
iiOneUI4Icons = pkgs.stdenv.mkDerivation rec {
pname = "ii-oneui4-icons";
version = "r70.55eada4";
src = oneUI;
installPhase = ''
runHook preInstall
install -d -m 755 $out/share/icons
cp -dr --no-preserve=mode OneUI $out/share/icons/OneUI
cp -dr --no-preserve=mode OneUI-dark $out/share/icons/OneUI-dark
cp -dr --no-preserve=mode OneUI-light $out/share/icons/OneUI-light
runHook postInstall
'';
dontStrip = true;
dontFixup = true;
};
});
packages = eachSupportedSystem (pkgs: {
default = pkgs.symlinkJoin {
name = "illogical-impulse-packages";
paths = builtins.attrValues self.legacyPackages.${pkgs.system};
};
});
devShells = eachSupportedSystem (pkgs: {
default = pkgs.mkShell {
packages = import ./modules/packages.nix {inherit pkgs;};
};
});
};
}