style: format entire depot with nixpkgs-fmt
This CL can be used to compare the style of nixpkgs-fmt against other formatters (nixpkgs, alejandra). Change-Id: I87c6abff6bcb546b02ead15ad0405f81e01b6d9e Reviewed-on: https://cl.tvl.fyi/c/depot/+/4397 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: lukegb <lukegb@tvl.fyi> Reviewed-by: wpcarro <wpcarro@gmail.com> Reviewed-by: Profpatsch <mail@profpatsch.de> Reviewed-by: kanepyork <rikingcoding@gmail.com> Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: cynthia <cynthia@tvl.fyi> Reviewed-by: edef <edef@edef.eu> Reviewed-by: eta <tvl@eta.st> Reviewed-by: grfn <grfn@gws.fyi>
This commit is contained in:
parent
2d10d60fac
commit
aa122cbae7
310 changed files with 7278 additions and 5490 deletions
|
|
@ -1,7 +1,8 @@
|
|||
# This file configures camden.tazj.in, my homeserver.
|
||||
{ depot, pkgs, lib, ... }:
|
||||
|
||||
config: let
|
||||
config:
|
||||
let
|
||||
nginxRedirect = { from, to, acmeHost }: {
|
||||
serverName = from;
|
||||
useACMEHost = acmeHost;
|
||||
|
|
@ -9,18 +10,21 @@ config: let
|
|||
|
||||
extraConfig = "return 301 https://${to}$request_uri;";
|
||||
};
|
||||
in lib.fix(self: {
|
||||
in
|
||||
lib.fix (self: {
|
||||
# Disable the current ACME module and use the old one from 19.09
|
||||
# instead, until the various regressions have been sorted out.
|
||||
# TODO(tazjin): Remove this once the new ACME module works.
|
||||
disabledModules = [ "security/acme" ];
|
||||
imports =
|
||||
let oldChannel = fetchTarball {
|
||||
# NixOS 19.09 on 2020-10-04
|
||||
url = "https://github.com/NixOS/nixpkgs-channels/archive/75f4ba05c63be3f147bcc2f7bd4ba1f029cedcb1.tar.gz";
|
||||
sha256 = "157c64220lf825ll4c0cxsdwg7cxqdx4z559fdp7kpz0g6p8fhhr";
|
||||
};
|
||||
in [
|
||||
let
|
||||
oldChannel = fetchTarball {
|
||||
# NixOS 19.09 on 2020-10-04
|
||||
url = "https://github.com/NixOS/nixpkgs-channels/archive/75f4ba05c63be3f147bcc2f7bd4ba1f029cedcb1.tar.gz";
|
||||
sha256 = "157c64220lf825ll4c0cxsdwg7cxqdx4z559fdp7kpz0g6p8fhhr";
|
||||
};
|
||||
in
|
||||
[
|
||||
"${depot.path}/ops/modules/quassel.nix"
|
||||
"${depot.path}/ops/modules/smtprelay.nix"
|
||||
"${oldChannel}/nixos/modules/security/acme.nix"
|
||||
|
|
@ -37,8 +41,14 @@ in lib.fix(self: {
|
|||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
"ahci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"
|
||||
"rtsx_usb_sdmmc" "r8169"
|
||||
"ahci"
|
||||
"xhci_pci"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
"sdhci_pci"
|
||||
"rtsx_usb_sdmmc"
|
||||
"r8169"
|
||||
];
|
||||
|
||||
kernelModules = [ "dm-snapshot" ];
|
||||
|
|
@ -152,7 +162,7 @@ in lib.fix(self: {
|
|||
};
|
||||
|
||||
# Set up a user & group for general git shenanigans
|
||||
groups.git = {};
|
||||
groups.git = { };
|
||||
users.git = {
|
||||
group = "git";
|
||||
isSystemUser = true;
|
||||
|
|
@ -220,9 +230,9 @@ in lib.fix(self: {
|
|||
|
||||
# Forward logs to Google Cloud Platform
|
||||
services.journaldriver = {
|
||||
enable = true;
|
||||
logStream = "home";
|
||||
googleCloudProject = "tazjins-infrastructure";
|
||||
enable = true;
|
||||
logStream = "home";
|
||||
googleCloudProject = "tazjins-infrastructure";
|
||||
applicationCredentials = "/etc/gcp/key.json";
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{ depot, lib, pkgs, ... }:
|
||||
|
||||
config: let
|
||||
config:
|
||||
let
|
||||
inherit (pkgs) lieer;
|
||||
|
||||
quasselClient = pkgs.quassel.override {
|
||||
|
|
@ -8,7 +9,8 @@ config: let
|
|||
enableDaemon = false;
|
||||
monolithic = false;
|
||||
};
|
||||
in lib.fix(self: {
|
||||
in
|
||||
lib.fix (self: {
|
||||
imports = [
|
||||
"${depot.path}/ops/modules/v4l2loopback.nix"
|
||||
];
|
||||
|
|
@ -61,8 +63,8 @@ in lib.fix(self: {
|
|||
|
||||
nix = {
|
||||
maxJobs = 48;
|
||||
binaryCaches = ["ssh://nix-ssh@whitby.tvl.fyi"];
|
||||
binaryCachePublicKeys = ["cache.tvl.fyi:fd+9d1ceCPvDX/xVhcfv8nAa6njEhAGAEe+oGJDEeoc="];
|
||||
binaryCaches = [ "ssh://nix-ssh@whitby.tvl.fyi" ];
|
||||
binaryCachePublicKeys = [ "cache.tvl.fyi:fd+9d1ceCPvDX/xVhcfv8nAa6njEhAGAEe+oGJDEeoc=" ];
|
||||
};
|
||||
|
||||
networking = {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{ depot, lib, pkgs, ... }:
|
||||
|
||||
config: let
|
||||
config:
|
||||
let
|
||||
quasselClient = pkgs.quassel.override {
|
||||
client = true;
|
||||
enableDaemon = false;
|
||||
|
|
@ -15,7 +16,8 @@ config: let
|
|||
${pkgs.xorg.setxkbmap}/bin/setxkbmap -option caps:super
|
||||
exec ${pkgs.xsecurelock}/bin/xsecurelock
|
||||
'';
|
||||
in lib.fix(self: {
|
||||
in
|
||||
lib.fix (self: {
|
||||
imports = [
|
||||
"${depot.third_party.impermanence}/nixos.nix"
|
||||
"${pkgs.home-manager.src}/nixos"
|
||||
|
|
@ -43,7 +45,7 @@ in lib.fix(self: {
|
|||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
"/" = {
|
||||
device = "tmpfs";
|
||||
fsType = "tmpfs";
|
||||
options = [ "defaults" "size=8G" "mode=755" ];
|
||||
|
|
@ -320,109 +322,109 @@ in lib.fix(self: {
|
|||
zoxide
|
||||
]);
|
||||
|
||||
systemd.user.services.lieer-tazjin = {
|
||||
description = "Synchronise mail@tazj.in via lieer";
|
||||
script = "${pkgs.lieer}/bin/gmi sync";
|
||||
systemd.user.services.lieer-tazjin = {
|
||||
description = "Synchronise mail@tazj.in via lieer";
|
||||
script = "${pkgs.lieer}/bin/gmi sync";
|
||||
|
||||
serviceConfig = {
|
||||
WorkingDirectory = "%h/mail/account.tazjin";
|
||||
Type = "oneshot";
|
||||
serviceConfig = {
|
||||
WorkingDirectory = "%h/mail/account.tazjin";
|
||||
Type = "oneshot";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.timers.lieer-tazjin = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
|
||||
timerConfig = {
|
||||
OnActiveSec = "1";
|
||||
OnUnitActiveSec = "180";
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.users.tazjin = { config, lib, ... }: {
|
||||
imports = [ "${depot.third_party.impermanence}/home-manager.nix" ];
|
||||
|
||||
home.persistence."/persist/tazjin/home" = {
|
||||
allowOther = true;
|
||||
|
||||
directories = [
|
||||
".cargo"
|
||||
".config/audacity"
|
||||
".config/google-chrome"
|
||||
".config/quassel-irc.org"
|
||||
".config/spotify"
|
||||
".config/syncthing"
|
||||
".elfeed"
|
||||
".gnupg"
|
||||
".local/share/Steam"
|
||||
".local/share/audacity"
|
||||
".local/share/direnv"
|
||||
".local/share/fish"
|
||||
".local/share/keyrings"
|
||||
".local/share/zoxide"
|
||||
".mozilla/firefox"
|
||||
".password-store"
|
||||
".rustup"
|
||||
".ssh"
|
||||
".steam"
|
||||
".telega"
|
||||
"go"
|
||||
"mail"
|
||||
];
|
||||
|
||||
files = [
|
||||
".notmuch-config"
|
||||
];
|
||||
};
|
||||
|
||||
home.activation.screenshots = lib.hm.dag.entryAnywhere ''
|
||||
$DRY_RUN_CMD mkdir -p $HOME/screenshots
|
||||
'';
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Vincent Ambo";
|
||||
userEmail = "mail@tazj.in";
|
||||
extraConfig = {
|
||||
pull.rebase = true;
|
||||
init.defaultBranch = "canon";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.timers.lieer-tazjin = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
|
||||
timerConfig = {
|
||||
OnActiveSec = "1";
|
||||
OnUnitActiveSec = "180";
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.users.tazjin = { config, lib, ... }: {
|
||||
imports = [ "${depot.third_party.impermanence}/home-manager.nix" ];
|
||||
|
||||
home.persistence."/persist/tazjin/home" = {
|
||||
allowOther = true;
|
||||
|
||||
directories = [
|
||||
".cargo"
|
||||
".config/audacity"
|
||||
".config/google-chrome"
|
||||
".config/quassel-irc.org"
|
||||
".config/spotify"
|
||||
".config/syncthing"
|
||||
".elfeed"
|
||||
".gnupg"
|
||||
".local/share/Steam"
|
||||
".local/share/audacity"
|
||||
".local/share/direnv"
|
||||
".local/share/fish"
|
||||
".local/share/keyrings"
|
||||
".local/share/zoxide"
|
||||
".mozilla/firefox"
|
||||
".password-store"
|
||||
".rustup"
|
||||
".ssh"
|
||||
".steam"
|
||||
".telega"
|
||||
"go"
|
||||
"mail"
|
||||
];
|
||||
|
||||
files = [
|
||||
".notmuch-config"
|
||||
];
|
||||
};
|
||||
|
||||
home.activation.screenshots = lib.hm.dag.entryAnywhere ''
|
||||
$DRY_RUN_CMD mkdir -p $HOME/screenshots
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
interactiveShellInit = ''
|
||||
${pkgs.zoxide}/bin/zoxide init fish | source
|
||||
'';
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Vincent Ambo";
|
||||
userEmail = "mail@tazj.in";
|
||||
extraConfig = {
|
||||
pull.rebase = true;
|
||||
init.defaultBranch = "canon";
|
||||
};
|
||||
};
|
||||
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
interactiveShellInit = ''
|
||||
${pkgs.zoxide}/bin/zoxide init fish | source
|
||||
'';
|
||||
};
|
||||
|
||||
services.screen-locker = {
|
||||
enable = true;
|
||||
enableDetectSleep = true;
|
||||
inactiveInterval = 10; # minutes
|
||||
lockCmd = "${screenLock}/bin/tazjin-screen-lock";
|
||||
};
|
||||
|
||||
services.picom = {
|
||||
enable = true;
|
||||
vSync = true;
|
||||
backend = "glx";
|
||||
};
|
||||
|
||||
# Enable the dunst notification daemon, but force the
|
||||
# configuration file separately instead of going via the strange
|
||||
# Nix->dunstrc encoding route.
|
||||
services.dunst.enable = true;
|
||||
xdg.configFile."dunst/dunstrc" = {
|
||||
source = depot.users.tazjin.dotfiles.dunstrc;
|
||||
onChange = ''
|
||||
${pkgs.procps}/bin/pkill -u "$USER" ''${VERBOSE+-e} dunst || true
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.user.startServices = true;
|
||||
};
|
||||
|
||||
system.stateVersion = "20.09";
|
||||
services.screen-locker = {
|
||||
enable = true;
|
||||
enableDetectSleep = true;
|
||||
inactiveInterval = 10; # minutes
|
||||
lockCmd = "${screenLock}/bin/tazjin-screen-lock";
|
||||
};
|
||||
|
||||
services.picom = {
|
||||
enable = true;
|
||||
vSync = true;
|
||||
backend = "glx";
|
||||
};
|
||||
|
||||
# Enable the dunst notification daemon, but force the
|
||||
# configuration file separately instead of going via the strange
|
||||
# Nix->dunstrc encoding route.
|
||||
services.dunst.enable = true;
|
||||
xdg.configFile."dunst/dunstrc" = {
|
||||
source = depot.users.tazjin.dotfiles.dunstrc;
|
||||
onChange = ''
|
||||
${pkgs.procps}/bin/pkill -u "$USER" ''${VERBOSE+-e} dunst || true
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.user.startServices = true;
|
||||
};
|
||||
|
||||
system.stateVersion = "20.09";
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue