Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 26 additions & 68 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

75 changes: 32 additions & 43 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,52 +1,41 @@
{
description = "fluffychat nix";
description = "A beginning of an awesome project bootstrapped with github:bleur-org/templates";

# Flake inputs
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1"; # 0 Stable Nixpkgs (use 0.1 for unstable)
inputs.android-nixpkgs = {
url = "github:tadfisher/android-nixpkgs";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
inputs = {
# Stable for keeping thins clean
# nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";

# Flake outputs
outputs = inputs: let
linuxSystems = [
"x86_64-linux"
"aarch64-linux"
];
# Fresh and new for testing
nixpkgs.url = "github:xinux-org/upstream";

darwinSystems = [
"x86_64-darwin"
"aarch64-darwin"
];
# The flake-parts library
flake-parts.url = "github:hercules-ci/flake-parts";
};

supportedSystems = linuxSystems ++ darwinSystems;
outputs = {
self,
flake-parts,
...
} @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} ({...}: {
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
perSystem = {pkgs, ...}: {
# Nix script formatter
formatter = pkgs.alejandra;

eachSystems = systems: f:
inputs.nixpkgs.lib.genAttrs systems (
system:
f {
inherit system;
attrs = import ./nix/attrs.nix {inherit system inputs;};
}
);
# Development environment
devShells.default = import ./nix/shell.nix self {inherit pkgs;};

package = args: target: import ./nix/package.nix args.attrs target;
in {
packages = eachSystems supportedSystems (args: {
linux = package args "linux";
web = package args "web";
# Output package
packages = {
default = pkgs.callPackage ./nix { };
web = pkgs.callPackage ./nix {targetFlutterPlatform = "web"; };
};
};
});
devShells =
eachSystems linuxSystems (args: {
default = import ./nix/shell_linux.nix args.attrs;
})
// (
eachSystems darwinSystems (args: {
default = import ./nix/shell_darwin.nix args.attrs;
})
);
};
}
52 changes: 52 additions & 0 deletions flake.nix.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
description = "fluffychat nix";

# Flake inputs
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1"; # 0 Stable Nixpkgs (use 0.1 for unstable)
inputs.android-nixpkgs = {
url = "github:tadfisher/android-nixpkgs";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};

# Flake outputs
outputs = inputs: let
linuxSystems = [
"x86_64-linux"
"aarch64-linux"
];

darwinSystems = [
"x86_64-darwin"
"aarch64-darwin"
];

supportedSystems = linuxSystems ++ darwinSystems;

eachSystems = systems: f:
inputs.nixpkgs.lib.genAttrs systems (
system:
f {
inherit system;
attrs = import ./nix/attrs.nix {inherit system inputs;};
}
);

package = args: target: import ./nix/package.nix args.attrs target;
in {
packages = eachSystems supportedSystems (args: {
linux = package args "linux";
web = inputs.nixpkgs.callPackage ./nix/package.nix {inherit inputs.nixpkgs;} "web";
});
devShells =
eachSystems linuxSystems (args: {
default = import ./nix/shell_linux.nix args.attrs;
})
// (
eachSystems darwinSystems (args: {
default = import ./nix/shell_darwin.nix args.attrs;
})
);
};
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Loading