63 lines
1.5 KiB
Nix
63 lines
1.5 KiB
Nix
{
|
|
description = "A very basic flake";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
|
home-manager.url = "github:nix-community/home-manager";
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs"; # ensures version follows nixpkgs
|
|
|
|
hyprland.url = "github:hyprwm/Hyprland";
|
|
|
|
astal = {
|
|
url = "github:aylur/astal";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
ags = {
|
|
url = "github:aylur/ags";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = { self, nixpkgs, home-manager, ags, astal, ... } @ inputs:
|
|
let
|
|
lib = nixpkgs.lib;
|
|
system = "x86_64-linux";
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
in {
|
|
packages.${system}.default = pkgs.stdenvNoCC.mkDerivation rec {
|
|
name = "my-shell";
|
|
src = ./.;
|
|
nativeBuildInputs = [
|
|
ags.packages.${system}.default
|
|
pkgs.wrapGAppsHook
|
|
pkgs.gobject-introspection
|
|
];
|
|
buildInputs = with astal.packages.${system}; [
|
|
astal3
|
|
io
|
|
];
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
ags bundle app.ts $out/bin/${name}
|
|
'';
|
|
};
|
|
|
|
nixosConfigurations = {
|
|
biscuit = lib.nixosSystem {
|
|
specialArgs = { inherit inputs system; };
|
|
inherit system;
|
|
modules = [ ./nixos/configuration.nix ];
|
|
};
|
|
};
|
|
homeConfigurations = {
|
|
biscuit = home-manager.lib.homeManagerConfiguration {
|
|
extraSpecialArgs = { inherit inputs system; };
|
|
inherit pkgs;
|
|
modules = [ ./home-manager/home.nix
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|