Format code with alejandra

This commit is contained in:
2022-04-23 17:52:45 +01:00
parent 0d56231235
commit d90883e404
27 changed files with 743 additions and 677 deletions

View File

@@ -1,6 +1,9 @@
{ config, pkgs, lib, ...}:
{
config,
pkgs,
lib,
...
}: {
# Use the systemd-boot EFI boot loader.
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.loader.systemd-boot.enable = lib.mkDefault true;
@@ -37,7 +40,7 @@
isNormalUser = true;
home = "/home/daniel";
initialPassword = "password";
extraGroups = [ "wheel" "networkmanager" "docker" "video" "syncthing" ];
extraGroups = ["wheel" "networkmanager" "docker" "video" "syncthing"];
shell = pkgs.zsh;
};
@@ -58,7 +61,7 @@
];
environment.homeBinInPath = true;
environment.variables = {
EDITOR = "hx";
};
@@ -67,7 +70,7 @@
enable = true;
ohMyZsh = {
enable = true;
plugins = [ "git" "fzf" ];
plugins = ["git" "fzf"];
theme = "agnoster";
};
};

View File

@@ -1,6 +1,9 @@
{ config, pkgs, inputs, ...}:
{
config,
pkgs,
inputs,
...
}: {
security.pam.services.gdm.enableGnomeKeyring = true;
# Enable the X11 windowing system.
hardware.opengl.driSupport32Bit = true;
@@ -9,13 +12,12 @@
networking.networkmanager.enable = true;
programs.nm-applet.enable = true;
services = {
gnome.gnome-keyring.enable = true;
pipewire = {
enable = true;
pulse.enable = true;
enable = true;
pulse.enable = true;
};
xserver = {
@@ -46,4 +48,3 @@
};
};
}

View File

@@ -1,27 +1,26 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
../common
../common/graphical
];
config,
pkgs,
...
}: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
../common
../common/graphical
];
services.xserver = {
dpi = 144;
videoDrivers = [ "nvidia" ];
videoDrivers = ["nvidia"];
screenSection = ''
Option "metamodes" "nvidia-auto-select +0+0 {ForceCompositionPipeline=On}"
Option "AllowIndirectGLXProtocol" "off"
Option "TripleBuffer" "on"
'';
};
hardware.nvidia.modesetting.enable = true;
@@ -38,4 +37,3 @@
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "21.05"; # Did you read the comment?
}

View File

@@ -1,29 +1,33 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/1c0e1988-4420-4485-bf16-ffb8ec854c69";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/1c0e1988-4420-4485-bf16-ffb8ec854c69";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/F5EA-A9CB";
fsType = "vfat";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/F5EA-A9CB";
fsType = "vfat";
};
swapDevices = [ ];
swapDevices = [];
# high-resolution display
hardware.video.hidpi.enable = lib.mkDefault true;

View File

@@ -1,12 +1,13 @@
{ pkgs, lib, ... }:
{
networking.firewall.allowedTCPPorts = [ 80 8448 443 ];
pkgs,
lib,
...
}: {
networking.firewall.allowedTCPPorts = [80 8448 443];
services.caddy = {
enable = true;
virtualHosts = {
"matrix.broccoli.town" = {
extraConfig = ''
reverse_proxy /_matrix/* http://localhost:8008
@@ -37,14 +38,15 @@
X-Content-Type-Options "nosniff"
X-Robots-Tag "noindex, noarchive, nofollow"
}
root * ${pkgs.element-web.override {
conf = {
default_server_config."m.homeserver" = {
"base_url" = "https://broccoli.town";
"server_name" = "broccoli.town";
root * ${
pkgs.element-web.override {
conf = {
default_server_config."m.homeserver" = {
"base_url" = "https://broccoli.town";
"server_name" = "broccoli.town";
};
};
};
}
}
}
file_server
'';
@@ -57,7 +59,6 @@
file_server
'';
};
};
};
}

View File

@@ -1,14 +1,17 @@
{ config, pkgs, lib, ... }:
{
imports =
[ # Include the results of the hardware scan.
../common
./hardware-configuration.nix
./caddy.nix
./synapse.nix
./syncthing.nix
];
config,
pkgs,
lib,
...
}: {
imports = [
# Include the results of the hardware scan.
../common
./hardware-configuration.nix
./caddy.nix
./synapse.nix
./syncthing.nix
];
# Force disable the common boot loader
boot.loader.systemd-boot.enable = lib.mkForce false;
@@ -29,6 +32,4 @@
];
system.stateVersion = "21.11"; # Did you read the comment?
}

View File

@@ -1,24 +1,28 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = [];
boot.extraModulePackages = [];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/f91229ad-de6b-49ad-8858-e49fea85e8a1";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/f91229ad-de6b-49ad-8858-e49fea85e8a1";
fsType = "ext4";
};
swapDevices = [ ];
swapDevices = [];
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@@ -1,8 +1,11 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}: {
services.grafana = {
enable = true;
enable = true;
};
services.prometheus = {
@@ -14,9 +17,11 @@
{
job_name = "synapse";
metrics_path = "/_synapse/metrics";
static_configs = [{
targets = ["localhost:9000"];
}];
static_configs = [
{
targets = ["localhost:9000"];
}
];
}
];
};

View File

@@ -1,5 +1,9 @@
{ config, pkgs, lib, ... }:
let
{
config,
pkgs,
lib,
...
}: let
fqdn = "matrix.broccoli.town";
in {
services.matrix-synapse = {
@@ -16,7 +20,7 @@ in {
x_forwarded = true;
resources = [
{
names = [ "client" "federation" ];
names = ["client" "federation"];
compress = false;
}
];

View File

@@ -1,5 +1,9 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}: {
services.syncthing = {
enable = true;
};

View File

@@ -1,16 +1,17 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
../common
../common/graphical
];
config,
pkgs,
...
}: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
../common
../common/graphical
];
networking = {
hostName = "miniding";
@@ -21,7 +22,7 @@
services.xserver = {
dpi = 144;
};
# 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. Its perfectly fine and recommended to leave
@@ -30,4 +31,3 @@
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "21.05"; # Did you read the comment?
}

View File

@@ -1,28 +1,31 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/6a362ee7-854b-4a5b-8989-e65af01b9b99";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/6a362ee7-854b-4a5b-8989-e65af01b9b99";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/C103-FFC1";
fsType = "vfat";
};
swapDevices = [ ];
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/C103-FFC1";
fsType = "vfat";
};
swapDevices = [];
}

View File

@@ -1,16 +1,17 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
../common
../common/graphical
];
config,
pkgs,
...
}: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
../common
../common/graphical
];
powerManagement = {
enable = true;
@@ -55,6 +56,4 @@
# 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 = "21.05"; # Did you read the comment?
}

View File

@@ -1,29 +1,33 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/3d0e0831-a08a-4d97-ad5b-d07448346dee";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/3d0e0831-a08a-4d97-ad5b-d07448346dee";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/C4F1-BE4C";
fsType = "vfat";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/C4F1-BE4C";
fsType = "vfat";
};
swapDevices = [ ];
swapDevices = [];
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config