Skip to content

Commit

Permalink
use Brother printer driver derivation flake
Browse files Browse the repository at this point in the history
  • Loading branch information
hfxbse committed Jan 23, 2025
1 parent 1e50544 commit 84405cf
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 89 deletions.
22 changes: 22 additions & 0 deletions flake.lock

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

11 changes: 9 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};

cups-brother-hl3172cdw = {
url = "github:hfxbse/nixos-config?ref=derivation/cups-brother-hl3172cdw";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = { self, nixpkgs, nixvim, disko }@attrs:
outputs = { self, cups-brother-hl3172cdw, disko, nixpkgs, nixvim }@attrs:
let
defaultModules = [
# Nixvim needs to be an top level import
Expand All @@ -26,14 +31,15 @@
./modules/localization.nix
./modules/text-processing.nix
./modules/workplace-compliance.nix
./modules/hardware/printers.nix
./modules/printing.nix
./modules/hardware/Wooting/wootility.nix
./modules/development.nix
];
in
{
nixosConfigurations.home-pc = nixpkgs.lib.nixosSystem {
specialArgs = with attrs; {
cups-brother-hl3172cdw = cups-brother-hl3172cdw.packages.x86_64-linux.default;
host = {
user.name = "fxbse";
user.description = "Fabian Haas";
Expand All @@ -47,6 +53,7 @@

nixosConfigurations.nt-laptop = nixpkgs.lib.nixosSystem {
specialArgs = with attrs; {
cups-brother-hl3172cdw = cups-brother-hl3172cdw.packages.x86_64-linux.default;
host = rec {
user.name = "fhs";
user.description = "Fabian Haas";
Expand Down
3 changes: 3 additions & 0 deletions modules/desktop/desktop.nix
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,14 @@ in

services.libinput.enable = lib.mkDefault cfg.touchpad.enable;

services.printing.enable = true;

# Enable automatic login for the user.
services.displayManager.autoLogin.enable = cfg.login == "auto";
services.displayManager.autoLogin.user = lib.mkDefault username;

boot.supportedFilesystems = [ "ntfs" ];
# Support mounting MTP devices
services.gvfs.enable = lib.mkDefault true;

nixpkgs.config.allowUnfree = true;
Expand Down
77 changes: 0 additions & 77 deletions modules/hardware/Brother/hl3172cdw.nix

This file was deleted.

10 changes: 0 additions & 10 deletions modules/hardware/printers.nix

This file was deleted.

10 changes: 10 additions & 0 deletions modules/printing.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{ config, cups-brother-hl3172cdw, lib, pkgs, ... }:
let
allowUnfree = config.nixpkgs.config.allowUnfree;
in
{
services.printing = {
logLevel = "debug";
drivers = lib.optional allowUnfree cups-brother-hl3172cdw;
};
}

0 comments on commit 84405cf

Please sign in to comment.