From a815367e073c5e16076488870b6287b7377bd6e6 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 19 Sep 2022 10:35:50 +0800 Subject: [PATCH] nixops: remove cnc machine --- nixops/light.nix | 140 ---------------------------------------------- nixops/nixops.nix | 1 - 2 files changed, 141 deletions(-) delete mode 100644 nixops/light.nix diff --git a/nixops/light.nix b/nixops/light.nix deleted file mode 100644 index 1227ccc..0000000 --- a/nixops/light.nix +++ /dev/null @@ -1,140 +0,0 @@ -{ host }: - -{ config, pkgs, ... }: -let - artiq = builtins.getFlake git+https://github.com/m-labs/artiq.git; -in -{ - deployment.targetHost = host; - deployment.hasFastConnection = true; - nix.nixPath = [ "nixpkgs=${pkgs.path}" ]; - programs.command-not-found.dbPath = "${pkgs.path}/programs.sqlite"; - - imports = - [ - (./. + "/${host}-hardware-configuration.nix") - ]; - nixpkgs.config.packageOverrides = super: let self = super.pkgs; in { - pam_p11 = super.pam_p11.overrideAttrs(oa: { - patchPhase = oa.patchPhase or "" + '' - substituteInPlace src/match_openssh.c --replace \ - '"%s/.ssh/authorized_keys", pw->pw_dir)' \ - '"/etc/ssh/authorized_keys.d/%s", pw->pw_name)' - ''; - }); - }; - - networking.hostName = host; - - time.timeZone = "Asia/Hong_Kong"; - - # List packages installed in system profile. To search, run: - # $ nix search wget - documentation.enable = false; - nixpkgs.config.allowUnfree = true; - environment.systemPackages = with pkgs; [ - opensc yubikey-manager yubikey-manager-qt yubico-piv-tool - wget vim git firefox usbutils pciutils file lm_sensors acpi - gimp imagemagick - evince - (python3.withPackages(ps: with ps; [ numpy scipy ])) - psmisc - unzip zip gnupg - sublime3 rink - tmux screen tigervnc - artiq.packages.x86_64-linux.openocd-bscanspi - any-nix-shell - ]; - programs.wireshark.enable = true; - - services.openssh.enable = true; - services.openssh.forwardX11 = true; - services.openssh.passwordAuthentication = false; - services.openssh.extraConfig = - '' - StreamLocalBindUnlink yes - ''; - programs.mosh.enable = true; - - services.pcscd.enable = true; - programs.ssh.extraConfig = - '' - PKCS11Provider "${pkgs.opensc}/lib/opensc-pkcs11.so" - ''; - programs.ssh.startAgent = true; - programs.ssh.agentPKCS11Whitelist = "${pkgs.opensc}/lib/opensc-pkcs11.so"; - security.pam.p11.enable = true; - - # Enable CUPS to print documents. - services.printing = { - enable = true; - extraConf = - '' - Browsing Off - BrowseLocalProtocols none - ''; - browsedConf = - '' - BrowseRemoteProtocols none - BrowseProtocols none - ''; - }; - services.avahi = { - enable = true; - nssmdns = true; - }; - - # Enable sound. - sound.enable = true; - hardware.pulseaudio = { - enable = true; - package = pkgs.pulseaudioFull; - }; - - i18n.inputMethod = { - enabled = "fcitx"; - fcitx.engines = with pkgs.fcitx-engines; [ table-extra m17n ]; - }; - fonts.fonts = [ pkgs.noto-fonts pkgs.noto-fonts-cjk pkgs.noto-fonts-emoji pkgs.noto-fonts-extra ]; - - # Enable the X11 windowing system. - services.xserver.enable = true; - services.xserver.layout = "us"; - services.xserver.xkbOptions = "eurosign:e"; - - services.xserver.displayManager.lightdm.enable = true; - services.xserver.desktopManager.xfce.enable = true; - - systemd.suppressedSystemUnits = [ - "hibernate.target" - "suspend.target" - "suspend-then-hibernate.target" - "sleep.target" - "hybrid-sleep.target" - "systemd-hibernate.service" - "systemd-hybrid-sleep.service" - "systemd-suspend.service" - "systemd-suspend-then-hibernate.service" - ]; - - programs.fish.enable = true; - programs.fish.promptInit = '' - any-nix-shell fish --info-right | source - ''; - users.mutableUsers = false; - users.defaultUserShell = pkgs.fish; - users.extraGroups.plugdev = { }; - users.extraUsers = import ./common-users.nix { inherit pkgs; }; - - security.sudo.wheelNeedsPassword = false; - services.udev.packages = [ artiq.packages.x86_64-linux.openocd-bscanspi ]; - services.udev.extraRules = (import ./extra-udev.nix); - - nix.binaryCachePublicKeys = ["nixbld.m-labs.hk-1:5aSRVA5b320xbNvu30tqxVPXpld73bhtOeH6uAjRyHc="]; - nix.binaryCaches = ["https://nixbld.m-labs.hk" "https://cache.nixos.org"]; - nix.sandboxPaths = ["/opt"]; - - nix.extraOptions = '' - experimental-features = nix-command flakes impure-derivations - ''; -} diff --git a/nixops/nixops.nix b/nixops/nixops.nix index 24b9364..a074cf9 100644 --- a/nixops/nixops.nix +++ b/nixops/nixops.nix @@ -17,5 +17,4 @@ chiron = import ./desktop.nix { host = "chiron"; }; old-nixbld = import ./desktop.nix { host = "old-nixbld"; }; franz = import ./desktop.nix { host = "franz"; }; - cnc = import ./light.nix { host = "cnc"; }; }