Skip to content

Commit

Permalink
Merge pull request #3 from nix-open-org/format-with-nixfmt-rfc-style
Browse files Browse the repository at this point in the history
  • Loading branch information
infinisil authored Feb 23, 2024
2 parents 6923bcf + 22cb077 commit 6a0a494
Show file tree
Hide file tree
Showing 5 changed files with 220 additions and 161 deletions.
13 changes: 4 additions & 9 deletions data.nix
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,7 @@
homepage = "https://github.com/NixOS/foundation";
matrixRoom = "#foundation:nixos.org";
leader = null;
members = [
"edolstra"
];
members = [ "edolstra" ];
};

moderation = {
Expand All @@ -124,8 +122,7 @@
'';
homepage = "https://github.com/NixOS/moderation";
matrixRoom = "#moderation:nixos.org";
members = [
];
members = [ ];
};

marketing = {
Expand All @@ -138,8 +135,7 @@
'';
homepage = "https://github.com/NixOS/marketing";
matrixRoom = "#marketing:nixos.org";
members = [
];
members = [ ];
};

nix = {
Expand All @@ -150,8 +146,7 @@
'';
homepage = "https://github.com/NixOS/nix";
matrixRoom = "#nix-dev:nixos.org";
members = [
];
members = [ ];
};
};

Expand Down
39 changes: 32 additions & 7 deletions flake.lock

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

54 changes: 37 additions & 17 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,24 +1,44 @@
{
description = "A very basic flake";
description = "NixOS organization";

inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.systems.url = "github:nix-systems/default";
inputs.treefmt-nix.url = "github:numtide/treefmt-nix";
inputs.treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";

outputs = { self, nixpkgs, systems }:
outputs =
{
self,
nixpkgs,
systems,
treefmt-nix,
}:
let
eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system:
f nixpkgs.legacyPackages.${system});
eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system});
in
{
devShells = eachSystem (pkgs:
{
devShells = eachSystem (
pkgs: {
default = pkgs.mkShell {
packages = [
pkgs.findutils
pkgs.gnumake
];
};
});
packages = eachSystem (pkgs:
}
);

formatter = eachSystem (
pkgs:
treefmt-nix.lib.mkWrapper pkgs {
projectRootFile = "flake.nix";
# See https://github.com/numtide/treefmt-nix#supported-programs
programs.nixfmt-rfc-style.enable = true;
}
);

packages = eachSystem (
pkgs:
let
eval = nixpkgs.lib.evalModules {
modules = [
Expand All @@ -36,14 +56,14 @@
cat ${readmeFile}
'';
};
updateReadme =
pkgs.writeShellApplication {
name = "update-readme";
text = ''
gitRoot=$(git rev-parse --show-toplevel)
cp ${readmeFile} "$gitRoot/README.md"
'';
};
});
updateReadme = pkgs.writeShellApplication {
name = "update-readme";
text = ''
gitRoot=$(git rev-parse --show-toplevel)
cp ${readmeFile} "$gitRoot/README.md"
'';
};
}
);
};
}
8 changes: 4 additions & 4 deletions peribolos.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ lib
, buildGoModule
, fetchFromGitHub
{
lib,
buildGoModule,
fetchFromGitHub,
}:

buildGoModule rec {
Expand All @@ -27,4 +28,3 @@ buildGoModule rec {
mainProgram = "peribolos";
};
}

Loading

0 comments on commit 6a0a494

Please sign in to comment.