Skip to content

Commit

Permalink
Add printing service in chromium-vm and bussiness-vm
Browse files Browse the repository at this point in the history
CUPS is enabled in chromium-vm and bussines-vm
CUPS overlay is applied due to printer webpage bug. 
Avahi service reflection is added in net-vm

Signed-off-by: Berk Arslan <[email protected]>
  • Loading branch information
Nerox9 committed Sep 13, 2024
1 parent c54e0f4 commit 167ccd7
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/microvm/virtualization/microvm/netvm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ let
firewall.allowedTCPPorts = [ 53 ];
firewall.allowedUDPPorts = [ 53 ];
};
services.avahi = {
enable = true;
nssmdns4 = true;
reflector = true;
};

services.openssh = config.ghaf.security.sshKeys.sshAuthorizedKeysCommand;

Expand Down
7 changes: 7 additions & 0 deletions modules/reference/appvms/business.nix
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ in
# Set default PDF XDG handler
xdg.mime.defaultApplications."application/pdf" = "ghaf-pdf.desktop";

services.printing.enable = true;
services.avahi = {
enable = true;
nssmdns4 = true;
reflector = true;
};

# TODO: Add a way to configure the gpclient
# also check the openconnect cli options https://discourse.nixos.org/t/globalprotect-vpn/24014/5
services.globalprotect = {
Expand Down
7 changes: 7 additions & 0 deletions modules/reference/appvms/chromium.nix
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ in

# Set default PDF XDG handler
xdg.mime.defaultApplications."application/pdf" = "ghaf-pdf.desktop";

services.printing.enable = true;
services.avahi = {
enable = true;
nssmdns4 = true;
reflector = true;
};
}
];
borderColor = "#630505";
Expand Down
14 changes: 14 additions & 0 deletions overlays/custom-packages/cups/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2022-2024 TII (SSRC) and the Ghaf contributors
# SPDX-License-Identifier: Apache-2.0
{ final, prev }:
prev.cups.overrideAttrs (
_final: _prev: {
version = "17.5.229";
src = final.fetchFromGitHub {
owner = "OpenPrinting";
repo = "cups";
rev = "313c388dbc023bbcb75d1efed800d0cfc992a6cc";
hash = "sha256-weu12hlrYUYY90pe0dJ6CiLtm8ynrLA9nT4j7iRwA+Q=";
};
}
)
1 change: 1 addition & 0 deletions overlays/custom-packages/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@
mitmweb-ui = final.callPackage ../../packages/mitmweb-ui { };
gtklock = import ./gtklock { inherit prev; };
hardware-scan = final.callPackage ../../packages/hardware-scan { };
cups = import ./cups { inherit final prev; };
})

0 comments on commit 167ccd7

Please sign in to comment.