forked from Shinonome/dots-hyprland
added flakes for nix
This commit is contained in:
@@ -8,17 +8,26 @@
|
||||
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";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
hyprland,
|
||||
quickshell,
|
||||
matugen,
|
||||
...
|
||||
}: let
|
||||
# A list of supported systems. We are restricting this to x86_64-linux.
|
||||
supportedSystems = ["x86_64-linux"];
|
||||
|
||||
# A helper function to apply a function to each supported system.
|
||||
# This ensures that all outputs are only built for x86_64-linux.
|
||||
supportedSystems = ["x86_64-linux" "aarch64-darwin"];
|
||||
eachSupportedSystem = f:
|
||||
nixpkgs.lib.genAttrs supportedSystems (system: let
|
||||
pkgs = import nixpkgs {
|
||||
@@ -27,19 +36,32 @@
|
||||
in
|
||||
f pkgs);
|
||||
in {
|
||||
# This output defines the NixOS modules.
|
||||
# It points to the `./modules` directory, which would contain your system configuration.
|
||||
nixosModules = rec {
|
||||
default = illogical-impulse;
|
||||
illogical-impulse = ./nix/modules;
|
||||
};
|
||||
|
||||
# The legacyPackages output is required for some Nix commands to work.
|
||||
# We set it to the standard nixpkgs set for our supported system.
|
||||
legacyPackages = eachSupportedSystem (pkgs: pkgs);
|
||||
legacyPackages = eachSupportedSystem (pkgs: {
|
||||
iiShellConfig = pkgs.stdenv.mkDerivation {
|
||||
pname = "ii-shell-config";
|
||||
version = "1.0";
|
||||
src = ./.;
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -d -m 755 $out/.config
|
||||
cp -r .config/quickshell $out/.config/
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
dontPatchShebangs = true;
|
||||
};
|
||||
});
|
||||
|
||||
devShells = eachSupportedSystem (pkgs: {
|
||||
default = pkgs.mkShell {
|
||||
default = pkgs.mkShellNoCC {
|
||||
packages = [
|
||||
self.legacyPackages.${pkgs.system}.iiShellConfig
|
||||
];
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user