style(treewide): Switch to nixfmt
This commit is contained in:
parent
4b0e6f0a8c
commit
82c1d22d3d
8 changed files with 154 additions and 126 deletions
123
flake.nix
123
flake.nix
|
|
@ -14,70 +14,77 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
dream2nix,
|
||||
fenix,
|
||||
}: let
|
||||
# At the moment, we only deploy to x86_64-linux. Update when we
|
||||
# care about another platform.
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
fenixPkgs = fenix.packages.${system};
|
||||
ownPkgs = self.packages.${system};
|
||||
in {
|
||||
packages.${system} = dream2nix.lib.importPackages {
|
||||
projectRoot = ./.;
|
||||
projectRootFile = "flake.nix";
|
||||
packagesDir = ./packages;
|
||||
packageSets = {
|
||||
nixpkgs = pkgs;
|
||||
fenix = fenixPkgs;
|
||||
};
|
||||
};
|
||||
|
||||
apps.${system} = {
|
||||
default = let
|
||||
inherit (ownPkgs) server templates;
|
||||
inherit (pkgs) writeShellScript;
|
||||
in {
|
||||
type = "app";
|
||||
program = builtins.toString (writeShellScript "tlaternet-webserver" ''
|
||||
${server}/bin/tlaternet-webserver --template-directory ${templates}
|
||||
'');
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
dream2nix,
|
||||
fenix,
|
||||
}:
|
||||
let
|
||||
# At the moment, we only deploy to x86_64-linux. Update when we
|
||||
# care about another platform.
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
fenixPkgs = fenix.packages.${system};
|
||||
ownPkgs = self.packages.${system};
|
||||
in
|
||||
{
|
||||
packages.${system} = dream2nix.lib.importPackages {
|
||||
projectRoot = ./.;
|
||||
projectRootFile = "flake.nix";
|
||||
packagesDir = ./packages;
|
||||
packageSets = {
|
||||
nixpkgs = pkgs;
|
||||
fenix = fenixPkgs;
|
||||
};
|
||||
};
|
||||
|
||||
update = let
|
||||
update-script = pkgs.callPackage ./nix/update.nix {inherit self;};
|
||||
in {
|
||||
type = "app";
|
||||
program = "${update-script}/bin/update";
|
||||
apps.${system} = {
|
||||
default =
|
||||
let
|
||||
inherit (ownPkgs) server templates;
|
||||
inherit (pkgs) writeShellScript;
|
||||
in
|
||||
{
|
||||
type = "app";
|
||||
program = builtins.toString (
|
||||
writeShellScript "tlaternet-webserver" ''
|
||||
${server}/bin/tlaternet-webserver --template-directory ${templates}
|
||||
''
|
||||
);
|
||||
};
|
||||
|
||||
update =
|
||||
let
|
||||
update-script = pkgs.callPackage ./nix/update.nix { inherit self; };
|
||||
in
|
||||
{
|
||||
type = "app";
|
||||
program = "${update-script}/bin/update";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nixosModules.default = import ./nix/module.nix {inherit self system;};
|
||||
nixosModules.default = import ./nix/module.nix { inherit self system; };
|
||||
|
||||
devShells.${system} = {
|
||||
server = pkgs.mkShell {
|
||||
packages = [
|
||||
(fenixPkgs.stable.withComponents [
|
||||
"rustc"
|
||||
"cargo"
|
||||
"rustfmt"
|
||||
"rust-std"
|
||||
"rust-docs"
|
||||
"clippy"
|
||||
"rust-src"
|
||||
"rust-analysis"
|
||||
])
|
||||
fenixPkgs.rust-analyzer
|
||||
];
|
||||
devShells.${system} = {
|
||||
server = pkgs.mkShell {
|
||||
packages = [
|
||||
(fenixPkgs.stable.withComponents [
|
||||
"rustc"
|
||||
"cargo"
|
||||
"rustfmt"
|
||||
"rust-std"
|
||||
"rust-docs"
|
||||
"clippy"
|
||||
"rust-src"
|
||||
"rust-analysis"
|
||||
])
|
||||
fenixPkgs.rust-analyzer
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
checks.${system} = import ./nix/checks {
|
||||
inherit self pkgs;
|
||||
checks.${system} = import ./nix/checks { inherit self pkgs; };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue