Skip to content

Commit

Permalink
nixfmt **/*.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
izumin5210 committed May 19, 2024
1 parent f791405 commit 0236a40
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 12 deletions.
36 changes: 26 additions & 10 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@
};
};

outputs = inputs@{ self, nixpkgs, home-manager, nix-darwin, ... }:
outputs =
inputs@{
self,
nixpkgs,
home-manager,
nix-darwin,
...
}:
let
system = "aarch64-darwin";
pkgs = nixpkgs.legacyPackages.${system};
Expand All @@ -32,9 +39,12 @@
}
];

genHomeConfigurations = usersList:
builtins.foldl' (acc: user:
acc // {
genHomeConfigurations =
usersList:
builtins.foldl' (
acc: user:
acc
// {
"${user.username}" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
Expand All @@ -45,17 +55,23 @@
./home.nix
];
};
}) { } usersList;
}
) { } usersList;

genDarwinConfigurations = usersList:
builtins.foldl' (acc: user:
acc // {
genDarwinConfigurations =
usersList:
builtins.foldl' (
acc: user:
acc
// {
"${user.hostname}" = nix-darwin.lib.darwinSystem {
inherit pkgs;
modules = [ ./darwin-configuration.nix ];
};
}) { } usersList;
in {
}
) { } usersList;
in
{
homeConfigurations = genHomeConfigurations users;
darwinConfigurations = genDarwinConfigurations users;
};
Expand Down
6 changes: 4 additions & 2 deletions overlays/sheldon.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ self: super: {
rev = version;
hash = "sha256-foIC60cD2U8/w40CVEgloa6lPKq/+dml70rBroY5p7Q=";
};
cargoDeps = oldAttrs.cargoDeps.overrideAttrs (super.lib.const {
cargoDeps = oldAttrs.cargoDeps.overrideAttrs (
super.lib.const {
inherit src;
name = "${pname}-${version}-vendor.tar.gz";
outputHash = "sha256-XY8FtZcTKoWB9GpooJv16OrqqRDKK86lor2TsyRxLtw=";
});
}
);
meta = oldAttrs.meta // {
platforms = super.lib.platforms.unix;
};
Expand Down

0 comments on commit 0236a40

Please sign in to comment.