crc.nix (664B)
1 { config, lib, pkgs, ... }: 2 3 with lib; 4 let 5 cfg = config.programs.crc; 6 in 7 { 8 options = { 9 programs.crc = { 10 enable = mkEnableOption "wether to enable crc"; 11 package = mkOption { 12 default = pkgs.my.crc; # FIXME use pkgs.crc at some point 13 description = "crc package to be used"; 14 type = types.package; 15 }; 16 }; 17 }; 18 19 config = mkIf cfg.enable { 20 environment.systemPackages = with pkgs; [ cfg.package ]; 21 networking.networkmanager.dns = "dnsmasq"; 22 environment.etc."NetworkManager/dnsmasq.d/crc.conf".text = '' 23 server=/apps-crc.testing/192.168.130.11 24 server=/crc.testing/192.168.130.11 25 ''; 26 }; 27 }