diff --git a/flake.lock b/flake.lock index 333393d..6f4b592 100644 --- a/flake.lock +++ b/flake.lock @@ -4,7 +4,9 @@ "inputs": { "flake-compat": "flake-compat", "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs", + "nixpkgs": [ + "nixpkgs" + ], "stable": "stable" }, "locked": { @@ -21,6 +23,28 @@ "type": "github" } }, + "disko": { + "inputs": { + "nixpkgs": [ + "nixos-anywhere", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1674131019, + "narHash": "sha256-NmbeqCEM9GwwlYPNmu4aWZX3nfBJuMvaJ7T7QzWd8MM=", + "owner": "nix-community", + "repo": "disko", + "rev": "e1eba38e8ea3ee6ca8ffef57668d4a37fff19ca4", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "master", + "repo": "disko", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -55,6 +79,27 @@ "type": "github" } }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": [ + "nixos-anywhere", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1673362319, + "narHash": "sha256-Pjp45Vnj7S/b3BRpZEVfdu8sqqA6nvVjvYu59okhOyI=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "82c16f1682cf50c01cb0280b38a1eed202b3fe9f", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "locked": { "lastModified": 1659877975, @@ -85,18 +130,94 @@ "type": "github" } }, - "nixpkgs": { + "nixos-2211": { "locked": { - "lastModified": 1674641431, - "narHash": "sha256-qfo19qVZBP4qn5M5gXc/h1MDgAtPA5VxJm9s8RUAkVk=", + "lastModified": 1674463419, + "narHash": "sha256-5PIilc8vqmz7jMwpr+pqCz07L+q0eR2vdwNEUkRxwE8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9b97ad7b4330aacda9b2343396eb3df8a853b4fc", + "rev": "6eb2af1b88814ca90e6a33761ff71ffd6c360839", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "release-22.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixos-anywhere": { + "inputs": { + "disko": "disko", + "flake-parts": "flake-parts_2", + "nixos-images": "nixos-images", + "nixpkgs": [ + "nixpkgs" + ], + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1680727722, + "narHash": "sha256-X360Gt8odtbTItWCM2aJ39YKqEXThuXka1hNmkjojxc=", + "owner": "numtide", + "repo": "nixos-anywhere", + "rev": "7563cf5863ca03a3b92f555e8baf959a1242b88a", + "type": "github" + }, + "original": { + "owner": "numtide", + "ref": "main", + "repo": "nixos-anywhere", + "type": "github" + } + }, + "nixos-images": { + "inputs": { + "nixos-2211": "nixos-2211", + "nixos-unstable": "nixos-unstable" + }, + "locked": { + "lastModified": 1674574673, + "narHash": "sha256-Bttq9LGgSaqjC7nn8AHRbuKYqe2foDK+0EXWTn9tZQw=", + "owner": "nix-community", + "repo": "nixos-images", + "rev": "b9b667b8b4a8d0c379b39c46408a8a5832195609", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixos-images", + "type": "github" + } + }, + "nixos-unstable": { + "locked": { + "lastModified": 1674365217, + "narHash": "sha256-lL3qUbAr/tnt/xGk1MTc8xuOTKqErqubYha4vhjA4+g=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "6c582bdf390948a6be049e81ecbab81bb160a5d3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable-small", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1681696129, + "narHash": "sha256-Ba2y1lmsWmmAOAoTD5G9UnTS/UqV0ZFyzysgdfu7qag=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "de66115c552acc4e0c0f92c5a5efb32e37dfa216", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-22.11", "repo": "nixpkgs", "type": "github" } @@ -119,28 +240,13 @@ "type": "github" } }, - "nixpkgs_2": { - "locked": { - "lastModified": 1681696129, - "narHash": "sha256-Ba2y1lmsWmmAOAoTD5G9UnTS/UqV0ZFyzysgdfu7qag=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "de66115c552acc4e0c0f92c5a5efb32e37dfa216", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-22.11", - "repo": "nixpkgs", - "type": "github" - } - }, "root": { "inputs": { "colmena": "colmena", "flake-parts": "flake-parts", "get-flake": "get-flake", - "nixpkgs": "nixpkgs_2" + "nixos-anywhere": "nixos-anywhere", + "nixpkgs": "nixpkgs" } }, "stable": { @@ -158,6 +264,21 @@ "repo": "nixpkgs", "type": "github" } + }, + "treefmt-nix": { + "locked": { + "lastModified": 1674297056, + "narHash": "sha256-IheUucTSpBsZ3JhAnrx2RWXf0Z5ekNGiW6ojct3FcZo=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "c117283f7482b99a89de0d6ae4b77318ad283294", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index ea8bbb1..1746cc4 100644 --- a/flake.nix +++ b/flake.nix @@ -2,11 +2,16 @@ { inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11"; + flake-parts.url = "github:hercules-ci/flake-parts"; + get-flake.url = "github:ursi/get-flake"; colmena.url = "github:zhaofengli/colmena"; - # colmena.url = "/home/steveej/src/others/colmena"; + colmena.inputs.nixpkgs.follows = "nixpkgs"; + + nixos-anywhere.url = github:numtide/nixos-anywhere/main; + nixos-anywhere.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = inputs @ { @@ -38,8 +43,12 @@ "elias-e525" "vmd102066.contaboserver.net" "sj-vps-htz0.infra.stefanjunker.de" + "justyna-p300" ]); + # this makes nixos-anywhere work + flake.nixosConfigurations = (inputs.colmena.lib.makeHive self.outputs.colmena).nodes; + inherit systems; perSystem = { @@ -54,6 +63,13 @@ ./nix/modules/flake-parts/perSystem/default.nix ]; + packages = let + dcpj4110dw = pkgs.callPackage (self + /nix/pkgs/dcpj4110dw) {}; + in { + dcpj4110dwDriver = dcpj4110dw.driver; + dcpj4110dwCupswrapper = dcpj4110dw.cupswrapper; + }; + formatter = pkgs.alejandra; devShells.default = import ./nix/devShells.nix {inherit inputs' pkgs;}; }; diff --git a/nix/devShells.nix b/nix/devShells.nix index 0fb8ff1..6d67c61 100644 --- a/nix/devShells.nix +++ b/nix/devShells.nix @@ -18,6 +18,7 @@ pkgs.stdenv.mkDerivation { inputs'.colmena.packages.colmena nixos-install-tools dconf2nix + inputs'.nixos-anywhere.packages.nixos-anywhere just git-crypt diff --git a/nix/os/devices/justyna-p300/boot.nix b/nix/os/devices/justyna-p300/boot.nix new file mode 100644 index 0000000..85006ed --- /dev/null +++ b/nix/os/devices/justyna-p300/boot.nix @@ -0,0 +1,11 @@ +{lib, ...}: { + boot.loader.grub.efiInstallAsRemovable = lib.mkForce false; + boot.loader.efi.canTouchEfiVariables = lib.mkForce false; + boot.loader.grub.efiSupport = lib.mkForce false; + + boot.loader.grub.version = 2; + boot.loader.grub.device = "/dev/sda"; + + # boot.initrd.availableKernelModules = stage1Modules; + boot.extraModprobeConfig = ""; +} diff --git a/nix/os/devices/justyna-p300/configuration.nix b/nix/os/devices/justyna-p300/configuration.nix new file mode 100644 index 0000000..44f116d --- /dev/null +++ b/nix/os/devices/justyna-p300/configuration.nix @@ -0,0 +1,12 @@ +{...}: { + imports = [ + ../../profiles/common/configuration.nix + ../../profiles/graphical/configuration.nix + + ./system.nix + ./hw.nix + ./pkg.nix + ./user.nix + ./boot.nix + ]; +} diff --git a/nix/os/devices/justyna-p300/default.nix b/nix/os/devices/justyna-p300/default.nix new file mode 100644 index 0000000..1d73e8e --- /dev/null +++ b/nix/os/devices/justyna-p300/default.nix @@ -0,0 +1,30 @@ +{repoFlake}: let + nodeName = "justyna-p300"; + # system = "i686-linux"; + system = "x86_64-linux"; + + nodeFlake = repoFlake.inputs.get-flake ./.; +in { + meta.nodeSpecialArgs.${nodeName} = { + inherit nodeName nodeFlake; + packages' = repoFlake.packages.${system}; + }; + + meta.nodeNixpkgs.${nodeName} = import nodeFlake.inputs.nixpkgs.outPath { + inherit system; + }; + + # TODO: build a module with "meta" and "freeformtype" for all the others + + ${nodeName} = { + deployment.targetHost = nodeName; + deployment.replaceUnknownProfiles = false; + # deployment.allowLocalDeployment = true; + + imports = [ + (repoFlake + "/nix/os/devices/${nodeName}/configuration.nix") + + nodeFlake.inputs.home-manager.nixosModules.home-manager + ]; + }; +} diff --git a/nix/os/devices/justyna-p300/flake.lock b/nix/os/devices/justyna-p300/flake.lock new file mode 100644 index 0000000..3a1d8b0 --- /dev/null +++ b/nix/os/devices/justyna-p300/flake.lock @@ -0,0 +1,86 @@ +{ + "nodes": { + "disko": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1682299489, + "narHash": "sha256-bqHo0/82KB+IyBMyjBd6QdyZWJl/YZeGggjBsAgRFlY=", + "owner": "nix-community", + "repo": "disko", + "rev": "8ab9e5609929379ab15f03fd3bdc1f85419e5a3a", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "disko", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "utils": "utils" + }, + "locked": { + "lastModified": 1681092193, + "narHash": "sha256-JerCqqOqbT2tBnXQW4EqwFl0hHnuZp21rIQ6lu/N4rI=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "f9edbedaf015013eb35f8caacbe0c9666bbc16af", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-22.11", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1682303062, + "narHash": "sha256-x+KAADp27lbxeoPXLUMxKcRsUUHDlg+qVjt5PjgBw9A=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "f5364316e314436f6b9c8fd50592b18920ab18f9", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-22.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "disko": "disko", + "home-manager": "home-manager", + "nixpkgs": "nixpkgs" + } + }, + "utils": { + "locked": { + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/nix/os/devices/justyna-p300/flake.nix b/nix/os/devices/justyna-p300/flake.nix new file mode 100644 index 0000000..a64a7ba --- /dev/null +++ b/nix/os/devices/justyna-p300/flake.nix @@ -0,0 +1,13 @@ +{ + inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11"; + + inputs.home-manager = { + url = "github:nix-community/home-manager/release-22.11"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + inputs.disko.url = github:nix-community/disko; + inputs.disko.inputs.nixpkgs.follows = "nixpkgs"; + + outputs = _: {}; +} diff --git a/nix/os/devices/justyna-p300/hw.nix b/nix/os/devices/justyna-p300/hw.nix new file mode 100644 index 0000000..0924dd2 --- /dev/null +++ b/nix/os/devices/justyna-p300/hw.nix @@ -0,0 +1,48 @@ +{ + repoFlake, + nodeFlake, + lib, + ... +}: { + imports = [ + nodeFlake.inputs.disko.nixosModules.disko + ]; + + disko.devices.disk.sda = { + device = "/dev/sda"; + type = "disk"; + content = { + type = "table"; + format = "gpt"; + partitions = [ + { + name = "boot"; + start = "0"; + end = "1M"; + part-type = "primary"; + flags = ["bios_grub"]; + } + { + name = "root"; + start = "1M"; + end = "100%"; + part-type = "primary"; + bootable = true; + content = { + type = "btrfs"; + extraArgs = ["-f"]; # Override existing partition + subvolumes = { + # Subvolume name is different from mountpoint + "/rootfs" = { + mountpoint = "/"; + }; + "/nix" = { + mountOptions = ["noatime"]; + }; + }; + }; + } + ]; + }; + }; +} diff --git a/nix/os/devices/justyna-p300/pkg.nix b/nix/os/devices/justyna-p300/pkg.nix new file mode 100644 index 0000000..3e86629 --- /dev/null +++ b/nix/os/devices/justyna-p300/pkg.nix @@ -0,0 +1,65 @@ +{ + pkgs, + lib, + packages', + ... +}: let + homeEnv = keyboard: { + imports = [ + ../../../home-manager/profiles/common.nix + + ../../../home-manager/configuration/graphical-gnome3.nix + + ../../../home-manager/programs/firefox.nix + ../../../home-manager/programs/libreoffice.nix + ../../../home-manager/programs/neovim.nix + ]; + + home.keyboard = keyboard; + + home.packages = with pkgs; [ + rhythmbox + lollypop + dia + + rustdesk + + kotatogram-desktop + jitsi-meet-electron + signal-desktop + ]; + }; +in { + services.gnome = builtins.mapAttrs (attr: value: lib.mkForce value) { + gnome-remote-desktop.enable = true; + }; + + services.printing.drivers = lib.mkForce (with packages'; [ + dcpj4110dwDriver + dcpj4110dwCupswrapper + ]); + + services.printing.extraConf = '' + LogLevel debug + ''; + + home-manager.users.steveej = homeEnv { + layout = "en"; + options = ["nodeadkey"]; + variant = "altgr-intl"; + }; + + home-manager.users.elias = homeEnv { + layout = "de"; + options = []; + variant = ""; + }; + + home-manager.users.justyna = homeEnv { + layout = "de"; + options = []; + variant = ""; + }; + + system.stateVersion = "21.11"; +} diff --git a/nix/os/devices/justyna-p300/system.nix b/nix/os/devices/justyna-p300/system.nix new file mode 100644 index 0000000..8b27cb7 --- /dev/null +++ b/nix/os/devices/justyna-p300/system.nix @@ -0,0 +1,44 @@ +{ + pkgs, + lib, + config, + ... +}: let +in { + networking.firewall.enable = true; + networking.firewall.allowedTCPPorts = [ + # iperf3 + 5201 + ]; + + networking.firewall.logRefusedConnections = false; + networking.usePredictableInterfaceNames = false; + + services.fprintd.enable = true; + security.pam.services = { + login.fprintAuth = true; + sudo.fprintAuth = true; + }; + + services = { + xserver = { + layout = lib.mkForce "de"; + xkbVariant = lib.mkForce ""; + xkbOptions = lib.mkForce ""; + displayManager.autoLogin.enable = true; + displayManager.autoLogin.user = lib.mkForce "justyna"; + displayManager.gdm.enable = lib.mkForce true; + displayManager.lightdm.enable = lib.mkForce false; + desktopManager.gnome.enable = true; + }; + + # dbus.packages = [ pkgs.gnome3.dconf ]; + # udev.packages = [ pkgs.gnome3.gnome-settings-daemon ]; + }; + + security.pki.certificateFiles = ["${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"]; + + services.xserver.videoDrivers = ["modesetting"]; + + boot.kernelPackages = lib.mkForce pkgs.linuxPackages_latest; +} diff --git a/nix/os/devices/justyna-p300/user.nix b/nix/os/devices/justyna-p300/user.nix new file mode 100644 index 0000000..1fe7f71 --- /dev/null +++ b/nix/os/devices/justyna-p300/user.nix @@ -0,0 +1,21 @@ +{ + config, + pkgs, + ... +}: let + passwords = import ../../../variables/passwords.crypt.nix; + keys = import ../../../variables/keys.nix; + inherit (import ../../lib/default.nix {}) mkUser; +in { + users.extraUsers.elias = mkUser { + uid = 1001; + openssh.authorizedKeys.keys = keys.users.steveej.openssh; + hashedPassword = passwords.users.elias; + }; + + users.extraUsers.justyna = mkUser { + uid = 1002; + openssh.authorizedKeys.keys = keys.users.steveej.openssh; + hashedPassword = passwords.users.justyna; + }; +} diff --git a/nix/os/devices/steveej-t14/flake.lock b/nix/os/devices/steveej-t14/flake.lock index 2a1267e..fb0ce90 100644 --- a/nix/os/devices/steveej-t14/flake.lock +++ b/nix/os/devices/steveej-t14/flake.lock @@ -24,11 +24,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1681759395, - "narHash": "sha256-7aaRtLxLAy8qFVIA26ulB+Q5nDVzuQ71qi0s0wMjAws=", + "lastModified": 1682303062, + "narHash": "sha256-x+KAADp27lbxeoPXLUMxKcRsUUHDlg+qVjt5PjgBw9A=", "owner": "nixos", "repo": "nixpkgs", - "rev": "cd749f58ba83f7155b7062dd49d08e5e47e44d50", + "rev": "f5364316e314436f6b9c8fd50592b18920ab18f9", "type": "github" }, "original": { @@ -40,11 +40,11 @@ }, "nixpkgs-master": { "locked": { - "lastModified": 1681895322, - "narHash": "sha256-dtduardGFljEIh0Whlnhzda7Au0s1WnnSdzh2ZhCu9c=", + "lastModified": 1682405840, + "narHash": "sha256-Eo9Pz3QqwNkt2VNJHgLKKdu5Yjq0IAOQyDBevCmh52g=", "owner": "nixos", "repo": "nixpkgs", - "rev": "57aad37a2eab85fb5522cbc8568fe27872071a1c", + "rev": "abdbf67a29e2985aa4ef669d8cf7a0de06d5b799", "type": "github" }, "original": { @@ -56,11 +56,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1681770396, - "narHash": "sha256-tq+GZOkRA3uF3I/jIzuBGfnTRQFT4QnnRCWJ8DKSaMg=", + "lastModified": 1682385804, + "narHash": "sha256-iK6k4jQ8jV3Lo79WkHQDugL/qTVqeynWXbdIcetZuMo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "4df48038a44e9f3a3da8e9b42ca182726b743de4", + "rev": "392218684aea34e48419ad57e690c6fd08aa3ea4", "type": "github" }, "original": { diff --git a/nix/pkgs/dcpj4110dw/default.nix b/nix/pkgs/dcpj4110dw/default.nix new file mode 100644 index 0000000..8a4f6a6 --- /dev/null +++ b/nix/pkgs/dcpj4110dw/default.nix @@ -0,0 +1,109 @@ +{ + pkgsi686Linux, + stdenv, + fetchurl, + dpkg, + makeWrapper, + coreutils, + ghostscript, + gnugrep, + gnused, + which, + lib, + cups, + a2ps, + gawk, + file, + proot, + bash, +}: let + model = "dcpj4110dw"; + version = "3.0.1-1"; + src = fetchurl { + url = "https://download.brother.com/welcome/dlf005595/${model}lpr-${version}.i386.deb"; + sha256 = "sha256-ryKDsSkabAD2X3WLmeqjdB3+4DXdJ0qUz3O64DV+ixw="; + }; + reldir = "opt/brother/Printers/${model}/"; +in rec { + driver = pkgsi686Linux.stdenv.mkDerivation rec { + inherit src version; + name = "${model}drv-${version}"; + + nativeBuildInputs = [dpkg makeWrapper]; + + unpackPhase = "dpkg-deb -x $src $out"; + + installPhase = '' + # need to use i686 glibc here, these are 32bit proprietary binaries + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ + $out/${reldir}/lpd/br${model}filter + + mkdir -p $out/lib/cups/filter/ + ln -s $out/${reldir}/lpd/filter${model} $out/lib/cups/filter/brother_lpdwrapper_${model} + + # use proot to bind /opt for the filter + mv $out/${reldir}/lpd/filter${model} $out/${reldir}/lpd/.wrapped_filter${model} + + cat <<-EOF >$out/${reldir}/lpd/.wrapper_inner_filter${model} + export PATH=\$PATH:${lib.makeBinPath [gawk file a2ps coreutils ghostscript gnugrep gnused which]} + exec $out/${reldir}/lpd/.wrapped_filter${model} + EOF + chmod +x $out/${reldir}/lpd/.wrapper_inner_filter${model} + + cat <<-EOF >$out/${reldir}/lpd/filter${model} + #!${bash}/bin/bash + exec ${proot}/bin/proot \ + -b /nix/store:/nix/store \ + -b $out/opt:/opt \ + -b ${cups}/share:/usr/share/cups \ + $out/${reldir}/lpd/.wrapper_inner_filter${model} + EOF + chmod +x $out/${reldir}/lpd/filter${model} + ''; + + meta = { + description = "Brother ${lib.strings.toUpper model} driver"; + homepage = "http://www.brother.com/"; + sourceProvenance = with lib.sourceTypes; [binaryNativeCode]; + # license = lib.licenses.unfree; + platforms = ["x86_64-linux" "i686-linux"]; + maintainers = [lib.maintainers.steveej]; + }; + }; + + cupswrapper = stdenv.mkDerivation rec { + inherit version; + + src = fetchurl { + url = "https://download.brother.com/welcome/dlf005597/${model}cupswrapper-${version}.i386.deb"; + sha256 = "sha256-nwpuuXqBrEh5tye14gFLrezktTz6kq7HtnGqdBbgGkk="; + }; + + name = "${model}cupswrapper-${version}"; + + nativeBuildInputs = [dpkg makeWrapper]; + buildInputs = [cups ghostscript a2ps gawk]; + + unpackPhase = "dpkg-deb -x $src $out"; + + installPhase = '' + wrapProgram $out/${reldir}/cupswrapper/cupswrapper${model} \ + --prefix PATH : ${lib.makeBinPath [coreutils ghostscript gnugrep gnused]} + + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ + $out/${reldir}/cupswrapper/brcupsconfpt1 + + mkdir -p $out/share/cups/model + ln -s $out/${reldir}/cupswrapper/brother_${model}_printer_en.ppd $out/share/cups/model/ + ''; + + meta = { + description = "Brother ${lib.strings.toUpper model} CUPS wrapper driver"; + homepage = "http://www.brother.com/"; + sourceProvenance = with lib.sourceTypes; [binaryNativeCode]; + license = lib.licenses.gpl2; + platforms = ["x86_64-linux" "i686-linux"]; + maintainers = [lib.maintainers.steveej]; + }; + }; +}