Skip to content

Commit

Permalink
feat: remove flake-parts
Browse files Browse the repository at this point in the history
  • Loading branch information
sioodmy committed Nov 26, 2024
1 parent 58c37cb commit 38df86a
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 59 deletions.
31 changes: 0 additions & 31 deletions flake.lock

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

70 changes: 42 additions & 28 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,39 +1,53 @@
{
description = "Consequence of allowing autistic people on the internet. Stay mad one-proper-config-structure purists :3";

outputs = inputs @ {flake-parts, ...}: let
outputs = inputs @ {nixpkgs, ...}: let
theme = import ./theme;
user = import ./user theme;
in
flake-parts.lib.mkFlake {inherit inputs;} {
flake = {
nixosModules =
{
# This module is not meant to be imported by anyone but me
# it's just so I can easily avoid ../../../../../ mess
system = import ./system;

user = user.module;

# place for my home brew modules
}
// import ./modules;
nixosConfigurations = import ./hosts inputs;
};
systems = [
"x86_64-linux"
"aarch64-linux"
];
perSystem = {pkgs, ...}: {
formatter = pkgs.alejandra;
packages = user.packages pkgs;
devShells.default = user.shell pkgs;
};
};

forAllSystems = nixpkgs.lib.genAttrs [
"aarch64-linux"
"x86_64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
in {
packages = forAllSystems (
system: let
pkgs = nixpkgs.legacyPackages.${system};
in
user.packages pkgs
);

formatter = forAllSystems (
system: let
pkgs = nixpkgs.legacyPackages.${system};
in
pkgs.alejandra
);

devShells = forAllSystems (
system: let
pkgs = nixpkgs.legacyPackages.${system};
in {default = user.shell pkgs;}
);
nixosModules =
{
# This module is not meant to be imported by anyone but me
# it's just so I can easily avoid ../../../../../ mess
system = import ./system;

user = user.module;

# place for my home brew modules
}
// import ./modules;

nixosConfigurations = import ./hosts inputs;
};

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
apple-silicon-support = {
url = "github:tpwrules/nixos-apple-silicon";
inputs.nixpkgs.follows = "nixpkgs";
Expand Down

0 comments on commit 38df86a

Please sign in to comment.