Skip to content

Commit ebe58cd

Browse files
authored
fix quota command (#356)
* fix quota command * add quota alias to desktops as well
1 parent aac80f8 commit ebe58cd

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

flake.nix

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,15 @@
348348
ocf-niks3-push = final.callPackage ./pkgs/ocf-niks3-push {
349349
niks3 = niks3.packages.${final.stdenv.hostPlatform.system}.default;
350350
};
351+
352+
# nixpkgs quota is built without RPC support, it can't query
353+
# NFS quotas from the filehost via rquotad.
354+
# This wasn't necessary for old puppet hosts because debian packages quota with rpc enabled.
355+
quota = prev.quota.overrideAttrs (old: {
356+
buildInputs = (old.buildInputs or [ ]) ++ [ final.libtirpc ];
357+
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ final.rpcsvc-proto ];
358+
configureFlags = (old.configureFlags or [ ]) ++ [ "--enable-rpc" ];
359+
});
351360
};
352361

353362
agenix-rekey = agenix-rekey.configure {

modules/login-server.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ in
2525
python3Packages.cached-property
2626
];
2727

28+
# -s to display output in human friendly units by default
29+
# old puppet hosts had -Q as well, but can be removed? maybe?
30+
environment.shellAliases.quota = "quota -Qs";
31+
2832
ocf.cli.apps.enable = true;
2933

3034
ocf.nfs = {

profiles/desktop.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252

5353
documentation.dev.enable = true;
5454

55+
environment.shellAliases.quota = "quota -Qs";
56+
5557
environment.systemPackages = with pkgs; [
5658
lf
5759
dua

0 commit comments

Comments
 (0)