about summary refs log tree commit diff
path: root/users/glittershark/system/system/modules
diff options
context:
space:
mode:
Diffstat (limited to 'users/glittershark/system/system/modules')
-rw-r--r--users/glittershark/system/system/modules/common.nix86
-rw-r--r--users/glittershark/system/system/modules/desktop.nix25
-rw-r--r--users/glittershark/system/system/modules/fcitx.nix10
-rw-r--r--users/glittershark/system/system/modules/fonts.nix12
-rw-r--r--users/glittershark/system/system/modules/kernel.nix45
-rw-r--r--users/glittershark/system/system/modules/reusable/README.org2
-rw-r--r--users/glittershark/system/system/modules/reusable/battery.nix32
-rw-r--r--users/glittershark/system/system/modules/rtlsdr.nix17
-rw-r--r--users/glittershark/system/system/modules/sound.nix14
-rw-r--r--users/glittershark/system/system/modules/tvl.nix37
-rw-r--r--users/glittershark/system/system/modules/urbint.nix31
-rw-r--r--users/glittershark/system/system/modules/xserver.nix27
12 files changed, 0 insertions, 338 deletions
diff --git a/users/glittershark/system/system/modules/common.nix b/users/glittershark/system/system/modules/common.nix
deleted file mode 100644
index 711f686d8d..0000000000
--- a/users/glittershark/system/system/modules/common.nix
+++ /dev/null
@@ -1,86 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-let
-
-  depot = import ../../../../.. {};
-
-in
-
-with lib;
-
-{
-  boot.loader.systemd-boot.enable = true;
-  boot.loader.efi.canTouchEfiVariables = true;
-
-  networking.useDHCP = false;
-  networking.networkmanager.enable = true;
-
-  i18n = {
-    defaultLocale = "en_US.UTF-8";
-  };
-
-  time.timeZone = "America/New_York";
-
-  environment.systemPackages = with pkgs; [
-    wget
-    vim
-    zsh
-    git
-    w3m
-    libnotify
-    file
-    lm_sensors
-    dnsutils
-    depot.users.glittershark.system.system.rebuilder
-    htop
-  ];
-
-  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"
-      "docker"
-    ];
-    shell = pkgs.zsh;
-  };
-
-  # This value determines the NixOS release from which the default
-  # settings for stateful data, like file locations and database versions
-  # on your system were taken. It‘s perfectly fine and recommended to leave
-  # this value at the release version of the first install of this system.
-  # Before changing this value read the documentation for this option
-  # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
-  system.stateVersion = "20.03"; # Did you read the comment?
-
-  nixpkgs.config.allowUnfree = true;
-
-  nix = {
-    trustedUsers = [ "grfn" ];
-    autoOptimiseStore = true;
-    distributedBuilds = true;
-
-    gc = {
-      automatic = true;
-      dates = mkDefault "weekly";
-      options = "--delete-older-than 30d";
-    };
-  };
-
-  services.udev.packages = with pkgs; [
-    yubikey-personalization
-  ];
-
-  services.pcscd.enable = true;
-}
diff --git a/users/glittershark/system/system/modules/desktop.nix b/users/glittershark/system/system/modules/desktop.nix
deleted file mode 100644
index dc2847a779..0000000000
--- a/users/glittershark/system/system/modules/desktop.nix
+++ /dev/null
@@ -1,25 +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;
-
-  powerManagement = {
-    enable = true;
-    cpuFreqGovernor = lib.mkDefault "powersave";
-    powertop.enable = true;
-  };
-}
diff --git a/users/glittershark/system/system/modules/fcitx.nix b/users/glittershark/system/system/modules/fcitx.nix
deleted file mode 100644
index 812f598f9f..0000000000
--- a/users/glittershark/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/glittershark/system/system/modules/fonts.nix b/users/glittershark/system/system/modules/fonts.nix
deleted file mode 100644
index babe30d427..0000000000
--- a/users/glittershark/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/glittershark/system/system/modules/kernel.nix b/users/glittershark/system/system/modules/kernel.nix
deleted file mode 100644
index fb5319ee5c..0000000000
--- a/users/glittershark/system/system/modules/kernel.nix
+++ /dev/null
@@ -1,45 +0,0 @@
-{ config, lib, pkgs, ... }:
-with lib.versions;
-let
-  inherit (pkgs) stdenvNoCC;
-  kernelRelease = config.boot.kernelPackages.kernel.version;
-  mj = major kernelRelease;
-  mm = majorMinor kernelRelease;
-  patched-linux-ck = stdenvNoCC.mkDerivation {
-    name = "linux-ck";
-    src = builtins.fetchurl {
-      # example: http://ck.kolivas.org/patches/5.0/5.4/5.4-ck1/patch-5.4-ck1.xz
-      url = "http://ck.kolivas.org/patches/${mj}.0/${mm}/${mm}-ck1/patch-${mm}-ck1.xz";
-      sha256 = "01jyg9x2ligr0gjic8lg4f7hw3isz94kqwdbzdk9n8nghklh38p4";
-    };
-
-    unpackPhase = ''
-      ${pkgs.xz}/bin/unxz -kfdc $src > patch-${mm}-ck1
-    '';
-
-    patches = [
-      (builtins.fetchurl {
-        url = "https://aur.archlinux.org/cgit/aur.git/plain/fix_ck1_for_5.7.14.patch\?h\=linux-ck";
-        sha256 = "0l8f2kph4f2lvcjn0s2fg6n9xa6f4khjz7rqc4zxk58r7fh4s5v4";
-      })
-    ];
-
-    installPhase = ''
-      cp patch-${mm}-ck1 $out
-    '';
-  };
-in
-{
-  boot.kernelPackages = pkgs.linuxPackages_latest.extend (self: super: {
-    kernel = super.kernel.override {
-      ignoreConfigErrors = true;
-      kernelPatches = super.kernel.kernelPatches ++ [{
-        name = "linux-ck";
-        patch = patched-linux-ck;
-      }];
-      argsOverride = {
-        modDirVersion = super.kernel.modDirVersion + "-ck1";
-      };
-    };
-  });
-}
diff --git a/users/glittershark/system/system/modules/reusable/README.org b/users/glittershark/system/system/modules/reusable/README.org
deleted file mode 100644
index 34d9bfdcb7..0000000000
--- a/users/glittershark/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/glittershark/system/system/modules/reusable/battery.nix b/users/glittershark/system/system/modules/reusable/battery.nix
deleted file mode 100644
index d7043bf549..0000000000
--- a/users/glittershark/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 = 5;
-        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/glittershark/system/system/modules/rtlsdr.nix b/users/glittershark/system/system/modules/rtlsdr.nix
deleted file mode 100644
index ce58ebb0dc..0000000000
--- a/users/glittershark/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/glittershark/system/system/modules/sound.nix b/users/glittershark/system/system/modules/sound.nix
deleted file mode 100644
index 0d5ce3e318..0000000000
--- a/users/glittershark/system/system/modules/sound.nix
+++ /dev/null
@@ -1,14 +0,0 @@
-{ config, lib, pkgs, ... }:
-{
-  # Enable sound.
-  sound.enable = true;
-  hardware.pulseaudio.enable = true;
-  nixpkgs.config.pulseaudio = true;
-
-  environment.systemPackages = with pkgs; [
-    pulseaudio-ctl
-    paprefs
-    pasystray
-    pavucontrol
-  ];
-}
diff --git a/users/glittershark/system/system/modules/tvl.nix b/users/glittershark/system/system/modules/tvl.nix
deleted file mode 100644
index 69a02dbbb3..0000000000
--- a/users/glittershark/system/system/modules/tvl.nix
+++ /dev/null
@@ -1,37 +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
-    '';
-
-    binaryCaches = [
-      "ssh://nix-ssh@whitby.tvl.fyi"
-      "https://cache.nixos.org"
-    ];
-    trustedBinaryCaches = [
-      "ssh://nix-ssh@whitby.tvl.fyi"
-      "https://cache.nixos.org"
-    ];
-    binaryCachePublicKeys = [
-      "cache.tvl.fyi:fd+9d1ceCPvDX/xVhcfv8nAa6njEhAGAEe+oGJDEeoc="
-    ];
-  };
-
-  programs.ssh.knownHosts.whitby = {
-    hostNames = [ "whitby" "whitby.tvl.fyi" "49.12.129.211"];
-    publicKeyFile = pkgs.writeText "whitby.pub" ''
-      ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILNh/w4BSKov0jdz3gKBc98tpoLta5bb87fQXWBhAl2I
-    '';
-  };
-}
diff --git a/users/glittershark/system/system/modules/urbint.nix b/users/glittershark/system/system/modules/urbint.nix
deleted file mode 100644
index 9790b69dcb..0000000000
--- a/users/glittershark/system/system/modules/urbint.nix
+++ /dev/null
@@ -1,31 +0,0 @@
-{ config, pkgs, lib, ... }:
-
-with lib;
-
-{
-  virtualisation.docker.enable = true;
-
-  nix = rec {
-    binaryCaches = [ "https://nix.urbinternal.com" ];
-    trustedBinaryCaches = binaryCaches;
-    requireSignedBinaryCaches = false;
-  };
-
-  services.openvpn.servers.urbint = {
-    config = ''
-      config /root/openvpn/urbint.conf
-    '';
-    autoStart = false;
-  };
-
-  users.users."grfn".extraGroups = [ "docker" ];
-
-  services.clamav = {
-    daemon.enable = true;
-    updater = {
-      enable = true;
-      interval = "daily";
-      frequency = 1; # per day
-    };
-  };
-}
diff --git a/users/glittershark/system/system/modules/xserver.nix b/users/glittershark/system/system/modules/xserver.nix
deleted file mode 100644
index 07e9a4fdf7..0000000000
--- a/users/glittershark/system/system/modules/xserver.nix
+++ /dev/null
@@ -1,27 +0,0 @@
-{ config, pkgs, ... }:
-{
-  # Enable the X11 windowing system.
-  services.xserver = {
-    enable = true;
-    layout = "us";
-
-    libinput.enable = true;
-
-    displayManager = {
-      defaultSession = "none+i3";
-
-      autoLogin = {
-        enable = true;
-        user = "grfn";
-      };
-    };
-
-    windowManager.i3.enable = true;
-#       enable = true;
-#       extraPackages = with pkgs; [
-#         i3status
-#         i3lock
-#       ];
-#     };
-  };
-}