about summary refs log tree commit diff
path: root/users/grfn/system/system/modules
diff options
context:
space:
mode:
Diffstat (limited to 'users/grfn/system/system/modules')
-rw-r--r--users/grfn/system/system/modules/common.nix89
-rw-r--r--users/grfn/system/system/modules/desktop.nix19
-rw-r--r--users/grfn/system/system/modules/development.nix15
-rw-r--r--users/grfn/system/system/modules/fcitx.nix10
-rw-r--r--users/grfn/system/system/modules/fonts.nix12
-rw-r--r--users/grfn/system/system/modules/laptop.nix15
-rw-r--r--users/grfn/system/system/modules/reusable/README.org2
-rw-r--r--users/grfn/system/system/modules/reusable/battery.nix32
-rw-r--r--users/grfn/system/system/modules/rtlsdr.nix17
-rw-r--r--users/grfn/system/system/modules/sound.nix16
-rw-r--r--users/grfn/system/system/modules/tvl.nix38
-rw-r--r--users/grfn/system/system/modules/work/kolide.debbin25094998 -> 0 bytes
-rw-r--r--users/grfn/system/system/modules/work/kolide.nix51
-rw-r--r--users/grfn/system/system/modules/xserver.nix16
14 files changed, 0 insertions, 332 deletions
diff --git a/users/grfn/system/system/modules/common.nix b/users/grfn/system/system/modules/common.nix
deleted file mode 100644
index fb3a976f6e..0000000000
--- a/users/grfn/system/system/modules/common.nix
+++ /dev/null
@@ -1,89 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-let
-
-  depot = import ../../../../.. { };
-
-in
-
-with lib;
-
-{
-  boot = {
-    loader.systemd-boot.enable = true;
-    loader.efi.canTouchEfiVariables = true;
-    cleanTmpDir = true;
-  };
-
-  networking.useDHCP = false;
-  networking.networkmanager.enable = true;
-
-  i18n = {
-    defaultLocale = "en_US.UTF-8";
-  };
-
-  time.timeZone = lib.mkDefault "America/New_York";
-
-  environment.systemPackages = with pkgs; [
-    wget
-    vim
-    zsh
-    git
-    w3m
-    libnotify
-    file
-    lm_sensors
-    dnsutils
-    htop
-    man-pages
-    man-pages-posix
-  ];
-
-  documentation.dev.enable = true;
-  documentation.man.generateCaches = true;
-
-  services.openssh.enable = true;
-
-  programs.ssh.startAgent = true;
-
-  networking.firewall.enable = mkDefault false;
-
-  users.mutableUsers = true;
-  programs.zsh.enable = true;
-  environment.pathsToLink = [ "/share/zsh" ];
-  users.users.grfn = {
-    isNormalUser = true;
-    initialPassword = "password";
-    extraGroups = [
-      "wheel"
-      "networkmanager"
-      "audio"
-    ];
-    shell = pkgs.zsh;
-  };
-
-  nix = {
-    settings.trusted-users = [ "grfn" ];
-    distributedBuilds = true;
-
-    gc = {
-      automatic = true;
-      dates = mkDefault "weekly";
-      options = "--delete-older-than 30d";
-    };
-  };
-
-  services.udev.packages = with pkgs; [
-    yubikey-personalization
-  ];
-
-  services.pcscd.enable = true;
-
-  services.udev.extraRules = ''
-    # UDEV rules for Teensy USB devices
-    ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", ENV{ID_MM_DEVICE_IGNORE}="1"
-    ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789A]?", ENV{MTP_NO_PROBE}="1"
-    SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789ABCD]?", MODE:="0666"
-    KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", MODE:="0666"
-  '';
-}
diff --git a/users/grfn/system/system/modules/desktop.nix b/users/grfn/system/system/modules/desktop.nix
deleted file mode 100644
index 3adbd9d9b0..0000000000
--- a/users/grfn/system/system/modules/desktop.nix
+++ /dev/null
@@ -1,19 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-{
-  imports = [
-    ./xserver.nix
-    ./fonts.nix
-    ./sound.nix
-    ./kernel.nix
-  ];
-
-  programs.nm-applet.enable = true;
-
-  users.users.grfn.extraGroups = [
-    "audio"
-    "video"
-  ];
-
-  services.geoclue2.enable = true;
-}
diff --git a/users/grfn/system/system/modules/development.nix b/users/grfn/system/system/modules/development.nix
deleted file mode 100644
index d17e9d424c..0000000000
--- a/users/grfn/system/system/modules/development.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-{
-  virtualisation.docker.enable = true;
-  users.users.grfn.extraGroups = [ "docker" ];
-
-  security.pam.loginLimits = [
-    {
-      domain = "grfn";
-      type = "soft";
-      item = "nofile";
-      value = "65535";
-    }
-  ];
-}
diff --git a/users/grfn/system/system/modules/fcitx.nix b/users/grfn/system/system/modules/fcitx.nix
deleted file mode 100644
index 812f598f9f..0000000000
--- a/users/grfn/system/system/modules/fcitx.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-{
-  i18n.inputMethod = {
-    enabled = "fcitx";
-    fcitx.engines = with pkgs.fcitx-engines; [
-      cloudpinyin
-    ];
-  };
-}
diff --git a/users/grfn/system/system/modules/fonts.nix b/users/grfn/system/system/modules/fonts.nix
deleted file mode 100644
index f30600b28b..0000000000
--- a/users/grfn/system/system/modules/fonts.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{ config, lib, pkgs, ... }:
-{
-  fonts = {
-    fonts = with pkgs; [
-      nerdfonts
-      noto-fonts-emoji
-      twitter-color-emoji
-    ];
-
-    fontconfig.defaultFonts.emoji = [ "Twitter Color Emoji" ];
-  };
-}
diff --git a/users/grfn/system/system/modules/laptop.nix b/users/grfn/system/system/modules/laptop.nix
deleted file mode 100644
index 05c5333e51..0000000000
--- a/users/grfn/system/system/modules/laptop.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-{
-  imports = [
-    ./reusable/battery.nix
-  ];
-
-  laptop.onLowBattery.enable = true;
-
-  services.logind.extraConfig = ''
-    HandlePowerKey=hibernate
-  '';
-
-  services.tlp.enable = true;
-}
diff --git a/users/grfn/system/system/modules/reusable/README.org b/users/grfn/system/system/modules/reusable/README.org
deleted file mode 100644
index 34d9bfdcb7..0000000000
--- a/users/grfn/system/system/modules/reusable/README.org
+++ /dev/null
@@ -1,2 +0,0 @@
-This directory contains things I'm eventually planning on contributing upstream
-to nixpkgs
diff --git a/users/grfn/system/system/modules/reusable/battery.nix b/users/grfn/system/system/modules/reusable/battery.nix
deleted file mode 100644
index 151c2a246f..0000000000
--- a/users/grfn/system/system/modules/reusable/battery.nix
+++ /dev/null
@@ -1,32 +0,0 @@
-{ config, lib, pkgs, ... }:
-with lib;
-{
-  options = {
-    laptop.onLowBattery = {
-      enable = mkEnableOption "Perform action on low battery";
-
-      thresholdPercentage = mkOption {
-        description = "Threshold battery percentage on which to perform the action";
-        default = 8;
-        type = types.int;
-      };
-
-      action = mkOption {
-        description = "Action to perform on low battery";
-        default = "hibernate";
-        type = types.enum [ "hibernate" "suspend" "suspend-then-hibernate" ];
-      };
-    };
-  };
-
-  config =
-    let cfg = config.laptop.onLowBattery;
-    in mkIf cfg.enable {
-      services.udev.extraRules = concatStrings [
-        ''SUBSYSTEM=="power_supply", ''
-        ''ATTR{status}=="Discharging", ''
-        ''ATTR{capacity}=="[0-${toString cfg.thresholdPercentage}]", ''
-        ''RUN+="${pkgs.systemd}/bin/systemctl ${cfg.action}"''
-      ];
-    };
-}
diff --git a/users/grfn/system/system/modules/rtlsdr.nix b/users/grfn/system/system/modules/rtlsdr.nix
deleted file mode 100644
index ce58ebb0dc..0000000000
--- a/users/grfn/system/system/modules/rtlsdr.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-{
-
-  environment.systemPackages = with pkgs; [
-    rtl-sdr
-  ];
-
-  services.udev.packages = with pkgs; [
-    rtl-sdr
-  ];
-
-  # blacklist for rtl-sdr
-  boot.blacklistedKernelModules = [
-    "dvb_usb_rtl28xxu"
-  ];
-}
diff --git a/users/grfn/system/system/modules/sound.nix b/users/grfn/system/system/modules/sound.nix
deleted file mode 100644
index 07a67a1ec4..0000000000
--- a/users/grfn/system/system/modules/sound.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-{
-  # Enable sound.
-  sound.enable = true;
-  hardware.pulseaudio.enable = true;
-
-  environment.systemPackages = with pkgs; [
-    pulseaudio-ctl
-    paprefs
-    pasystray
-    pavucontrol
-  ];
-
-  hardware.pulseaudio.package = pkgs.pulseaudioFull;
-}
diff --git a/users/grfn/system/system/modules/tvl.nix b/users/grfn/system/system/modules/tvl.nix
deleted file mode 100644
index fc189972da..0000000000
--- a/users/grfn/system/system/modules/tvl.nix
+++ /dev/null
@@ -1,38 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-{
-  nix = {
-    buildMachines = [{
-      hostName = "whitby.tvl.fyi";
-      sshUser = "grfn";
-      sshKey = "/root/.ssh/id_rsa";
-      system = "x86_64-linux";
-      maxJobs = 64;
-      supportedFeatures = [ "big-parallel" "kvm" "nixos-test" "benchmark" ];
-    }];
-
-    extraOptions = ''
-      builders-use-substitutes = true
-    '';
-
-    settings = {
-      substituters = [
-        "https://cache.nixos.org"
-      ];
-      trusted-substituters = [
-        "https://cache.nixos.org"
-        "ssh://nix-ssh@whitby.tvl.fyi"
-      ];
-      trusted-public-keys = [
-        "cache.tvl.fyi:fd+9d1ceCPvDX/xVhcfv8nAa6njEhAGAEe+oGJDEeoc="
-      ];
-    };
-  };
-
-  programs.ssh.knownHosts.whitby = {
-    extraHostNames = [ "whitby" "whitby.tvl.fyi" "49.12.129.211" ];
-    publicKeyFile = pkgs.writeText "whitby.pub" ''
-      ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILNh/w4BSKov0jdz3gKBc98tpoLta5bb87fQXWBhAl2I
-    '';
-  };
-}
diff --git a/users/grfn/system/system/modules/work/kolide.deb b/users/grfn/system/system/modules/work/kolide.deb
deleted file mode 100644
index a319a5806f..0000000000
--- a/users/grfn/system/system/modules/work/kolide.deb
+++ /dev/null
Binary files differdiff --git a/users/grfn/system/system/modules/work/kolide.nix b/users/grfn/system/system/modules/work/kolide.nix
deleted file mode 100644
index e4ee786f0c..0000000000
--- a/users/grfn/system/system/modules/work/kolide.nix
+++ /dev/null
@@ -1,51 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-let
-  deb = ./kolide.deb;
-
-  kolide = pkgs.runCommand "kolide-data"
-    {
-      buildInputs = [ pkgs.binutils-unwrapped ];
-    } ''
-    cp ${deb} ./kolide.deb
-    ar x kolide.deb
-    mkdir result
-    tar xzf data.tar.gz -C result
-    patchelf \
-      --set-interpreter ${pkgs.glibc}/lib/ld-linux-x86-64.so.2 \
-      --set-rpath "${lib.makeLibraryPath (with pkgs; [
-        zlib
-      ])}" \
-      result/usr/local/kolide-k2/bin/osqueryd
-    mv result $out
-  '';
-
-in
-{
-  systemd.services."launcher.kolide-k2" = {
-    wantedBy = [ "multi-user.target" ];
-    after = [ "network.target" "syslog.service" ];
-    description = "The Kolide Launcher";
-    serviceConfig = {
-      ExecStart = ''
-        ${kolide}/usr/local/kolide-k2/bin/launcher \
-          -config \
-          ${pkgs.writeText "launcher.flags" ''
-            with_initial_runner
-            control
-            autoupdate
-            root_directory /var/lib/kolide
-            osqueryd_path ${kolide}/usr/local/kolide-k2/bin/osqueryd
-            enroll_secret_path ${kolide}/etc/kolide-k2/secret
-            control_hostname k2control.kolide.com
-            update_channel stable
-            transport jsonrpc
-            hostname k2device.kolide.com
-          ''}
-      '';
-      StateDirectory = "kolide";
-      Restart = "on-failure";
-      RestartSec = 3;
-    };
-  };
-}
diff --git a/users/grfn/system/system/modules/xserver.nix b/users/grfn/system/system/modules/xserver.nix
deleted file mode 100644
index 35ee44112e..0000000000
--- a/users/grfn/system/system/modules/xserver.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-{ config, pkgs, ... }:
-{
-  # Enable the X11 windowing system.
-  services.xserver = {
-    enable = true;
-    layout = "us";
-
-    libinput.enable = true;
-
-    displayManager = {
-      defaultSession = "none+i3";
-    };
-
-    windowManager.i3.enable = true;
-  };
-}