Ran nix fmt against nixfmt-rfc-style

This commit is contained in:
William 2024-09-23 11:54:59 -03:00
parent 43e53f8fb2
commit 8bcd4fc6b8
62 changed files with 784 additions and 287 deletions

View file

@ -49,13 +49,30 @@
stylix.url = "github:baduhai/stylix/wezterm-fancy-tab-bar";
};
outputs = inputs@{ self, nixpkgs, home-manager, nixpkgs-stable, deploy-rs
, agenix, nixos-generators, homepage, nix-minecraft, impermanence
, nix-flatpak, nix-index-db, stylix, ... }: {
outputs =
inputs@{
self,
nixpkgs,
home-manager,
nixpkgs-stable,
deploy-rs,
agenix,
nixos-generators,
homepage,
nix-minecraft,
impermanence,
nix-flatpak,
nix-index-db,
stylix,
...
}:
{
nixosConfigurations = {
rotterdam = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
specialArgs = {
inherit inputs;
};
modules = [
./hosts/desktops/rotterdam.nix
agenix.nixosModules.default
@ -65,15 +82,19 @@
nix-flatpak.nixosModules.nix-flatpak
stylix.nixosModules.stylix
{
nixpkgs.overlays =
[ agenix.overlays.default self.overlays.custom ];
nixpkgs.overlays = [
agenix.overlays.default
self.overlays.custom
];
}
];
};
io = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
specialArgs = {
inherit inputs;
};
modules = [
./hosts/desktops/io.nix
agenix.nixosModules.default
@ -83,42 +104,49 @@
nix-flatpak.nixosModules.nix-flatpak
stylix.nixosModules.stylix
{
nixpkgs.overlays =
[ agenix.overlays.default self.overlays.custom ];
nixpkgs.overlays = [
agenix.overlays.default
self.overlays.custom
];
}
];
};
alexandria = nixpkgs-stable.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
specialArgs = {
inherit inputs;
};
modules = [
./hosts/servers/alexandria.nix
agenix.nixosModules.default
self.nixosModules.qbittorrent
({ config, pkgs, ... }:
(
{ config, pkgs, ... }:
let
unstable-overlay = final: prev: {
unstable = nixpkgs.legacyPackages.x86_64-linux;
};
in {
in
{
nixpkgs.overlays = [
unstable-overlay
agenix.overlays.default
nix-minecraft.overlay
];
imports = [ nix-minecraft.nixosModules.minecraft-servers ];
})
}
)
];
};
};
overlays = {
custom = final: prev: {
chromeos-ectool = nixpkgs.legacyPackages."x86_64-linux".callPackage
./packages/chromeos-ectool.nix { };
plasticity = nixpkgs.legacyPackages."x86_64-linux".callPackage
./packages/plasticity.nix { };
chromeos-ectool =
nixpkgs.legacyPackages."x86_64-linux".callPackage ./packages/chromeos-ectool.nix
{ };
plasticity = nixpkgs.legacyPackages."x86_64-linux".callPackage ./packages/plasticity.nix { };
};
};
@ -133,8 +161,7 @@
user = "root";
sshUser = "root";
remoteBuild = true;
path = deploy-rs.lib.x86_64-linux.activate.nixos
self.nixosConfigurations.alexandria;
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.alexandria;
};
};
};
@ -146,26 +173,21 @@
user = "root";
sshUser = "root";
remoteBuild = true;
path = deploy-rs.lib.x86_64-linux.activate.nixos
self.nixosConfigurations.io;
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.io;
};
};
};
};
};
devShells = {
"x86_64-linux".default = nixpkgs.legacyPackages."x86_64-linux".mkShell {
packages = with nixpkgs.legacyPackages."x86_64-linux"; [ nil nixfmt ];
};
"aarch64-linux".default =
nixpkgs.legacyPackages."aarch64-linux".mkShell {
packages = with nixpkgs.legacyPackages."aarch64-linux"; [
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style;
devShells."x86_64-linux".default = nixpkgs.legacyPackages."x86_64-linux".mkShell {
packages = with nixpkgs.legacyPackages."x86_64-linux"; [
nil
nixfmt
nixfmt-rfc-style
];
};
};
nixosModules.qbittorrent = import ./modules/qbittorrent.nix;
};

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
boot = {

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
console = {

View file

@ -3,7 +3,6 @@
{
environment.shellAliases = {
neofetch = "fastfetch";
syscleanup =
"sudo nix-collect-garbage -d; sudo /run/current-system/bin/switch-to-configuration boot";
syscleanup = "sudo nix-collect-garbage -d; sudo /run/current-system/bin/switch-to-configuration boot";
};
}

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
time.timeZone = "America/Bahia";

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
networking = {

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
nix = {

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
nixpkgs.config.allowUnfree = true;

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
security = {

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
services = {

View file

@ -1,17 +1,26 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
users.users = {
user = {
isNormalUser = true;
shell = pkgs.fish;
extraGroups = [ "networkmanager" "docker" "wheel" ];
extraGroups = [
"networkmanager"
"docker"
"wheel"
];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKcwF1yuWEfYGScNocEbs0AmGxyTIzGc4/IhpU587SJE"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA1v3+q3EaruiiStWjubEJWvtejam/r41uoOpCdwJtLL"
];
hashedPassword =
"$6$Pj7v/CpstyuWQQV0$cNujVDhfMBdwlGVEnnd8t71.kZPixbo0u25cd.874iaqLTH4V5fa1f98V5zGapjQCz5JyZmsR94xi00sUrntT0";
hashedPassword = "$6$Pj7v/CpstyuWQQV0$cNujVDhfMBdwlGVEnnd8t71.kZPixbo0u25cd.874iaqLTH4V5fa1f98V5zGapjQCz5JyZmsR94xi00sUrntT0";
};
root = {
shell = pkgs.fish;

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
virtualisation.podman = {

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
boot = {
@ -9,7 +15,9 @@
extraModprobeConfig = ''
options bluetooth disable_ertm=1
'';
kernel.sysctl = { "net.ipv4.tcp_mtu_probing" = 1; };
kernel.sysctl = {
"net.ipv4.tcp_mtu_probing" = 1;
};
kernelParams = [
"quiet"
"splash"

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
hardware = {
@ -10,6 +16,5 @@
i2c.enable = true;
};
security.rtkit.enable =
true; # Needed for pipewire to acquire realtime priority
security.rtkit.enable = true; # Needed for pipewire to acquire realtime priority
}

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
home-manager = {

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
{
environment.persistence.main = {

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
environment.etc."channels/nixpkgs".source = inputs.nixpkgs.outPath;

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
let
kdepkgs = with pkgs.kdePackages; [
ark
@ -9,8 +15,10 @@ let
merkuro
kdepim-addons
];
in {
environment.systemPackages = with pkgs;
in
{
environment.systemPackages =
with pkgs;
[
aspell
aspellDicts.de
@ -64,7 +72,8 @@ in {
ventoy
virt-manager
wezterm
] ++ kdepkgs;
]
++ kdepkgs;
services.flatpak = {
enable = true;
@ -100,9 +109,22 @@ in {
fonts = {
fontDir.enable = true;
packages = with pkgs; [ corefonts maple-mono noto-fonts-cjk roboto ];
packages = with pkgs; [
corefonts
maple-mono
noto-fonts-cjk
roboto
];
};
environment.plasma6.excludePackages =
(with pkgs.kdePackages; [ elisa gwenview khelpcenter konsole oxygen ]);
environment.plasma6.excludePackages = (
with pkgs.kdePackages;
[
elisa
gwenview
khelpcenter
konsole
oxygen
]
);
}

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
services = {
@ -20,12 +26,12 @@
greetd = {
enable = true;
settings = {
default_session.command = let
xSessions =
"${config.services.displayManager.sessionData.desktops}/share/xsessions";
wlSessions =
"${config.services.displayManager.sessionData.desktops}/share/wayland-sessions";
in ''
default_session.command =
let
xSessions = "${config.services.displayManager.sessionData.desktops}/share/xsessions";
wlSessions = "${config.services.displayManager.sessionData.desktops}/share/wayland-sessions";
in
''
${pkgs.greetd.tuigreet}/bin/tuigreet \
--remember \
--asterisks \
@ -46,6 +52,9 @@
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = with pkgs; [ xdg-desktop-portal-kde xdg-desktop-portal-gtk ];
extraPortals = with pkgs; [
xdg-desktop-portal-kde
xdg-desktop-portal-gtk
];
};
}

View file

@ -4,8 +4,7 @@
stylix = {
enable = true;
image = pkgs.fetchurl {
url =
"https://github.com/notAxon/wallpapers/blob/main/Nature/Pink_Flowers_Photograph_by_Lisa_Fotios.jpeg?raw=true";
url = "https://github.com/notAxon/wallpapers/blob/main/Nature/Pink_Flowers_Photograph_by_Lisa_Fotios.jpeg?raw=true";
sha256 = "sha256-PyK/LuR7IR+FpGFZXdpYkShjKrwaqCtu64SY/wl/RvY=";
};
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";

View file

@ -1,11 +1,15 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
environment.sessionVariables = rec {
KDEHOME =
"$XDG_CONFIG_HOME/kde4"; # Stops kde from placing a .kde4 folder in the home dir
NIXOS_OZONE_WL =
"1"; # Forces chromium and most electron apps to run in wayland
KDEHOME = "$XDG_CONFIG_HOME/kde4"; # Stops kde from placing a .kde4 folder in the home dir
NIXOS_OZONE_WL = "1"; # Forces chromium and most electron apps to run in wayland
};
users.users.user = {

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
virtualisation = {

View file

@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
cml-ucm-conf = pkgs.alsa-ucm-conf.overrideAttrs {
@ -14,7 +19,8 @@ let
cp -R $wttsrc/{cml,sof-rt5682} $out/share/alsa/ucm2/conf.d
'';
};
in {
in
{
imports = [
# Host-common imports
../common
@ -34,7 +40,11 @@ in {
};
boot = {
kernelParams = [ "nosgx" "i915.fastboot=1" "mem_sleep_default=deep" ];
kernelParams = [
"nosgx"
"i915.fastboot=1"
"mem_sleep_default=deep"
];
extraModprobeConfig = ''
options snd-intel-dspcfg dsp_driver=3
'';
@ -51,7 +61,9 @@ in {
# TODO: remove once gmodena/nix-flatpak/issues/45 fixed
systemd.services."flatpak-managed-install" = {
serviceConfig = { ExecStartPre = "${pkgs.coreutils}/bin/sleep 5"; };
serviceConfig = {
ExecStartPre = "${pkgs.coreutils}/bin/sleep 5";
};
};
services = {

View file

@ -1,5 +1,8 @@
{ ... }:
{
imports = [ ./ephermal.nix ./hardware-configuration.nix ];
imports = [
./ephermal.nix
./hardware-configuration.nix
];
}

View file

@ -1,10 +1,18 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
{
boot.initrd.systemd.services.recreate-root = {
description = "Rolling over and creating new filesystem root";
requires = [ "initrd-root-device.target" ];
after = [ "local-fs-pre.target" "initrd-root-device.target" ];
after = [
"local-fs-pre.target"
"initrd-root-device.target"
];
requiredBy = [ "initrd-root-fs.target" ];
before = [ "sysroot.mount" ];
unitConfig = {

View file

@ -1,14 +1,24 @@
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot = {
initrd = {
availableKernelModules =
[ "xhci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
luks.devices."enc".device =
"/dev/disk/by-uuid/8018720e-42dd-453c-b374-adaa02eb48c9";
availableKernelModules = [
"xhci_pci"
"ahci"
"usb_storage"
"sd_mod"
"sdhci_pci"
];
luks.devices."enc".device = "/dev/disk/by-uuid/8018720e-42dd-453c-b374-adaa02eb48c9";
};
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
@ -18,27 +28,47 @@
"/" = {
device = "/dev/disk/by-uuid/3638cea6-5503-43cc-aa4f-3d37ebedad2f";
fsType = "btrfs";
options = [ "subvol=@root" "noatime" "compress=zstd" ];
options = [
"subvol=@root"
"noatime"
"compress=zstd"
];
};
"/home" = {
device = "/dev/disk/by-uuid/3638cea6-5503-43cc-aa4f-3d37ebedad2f";
fsType = "btrfs";
options = [ "subvol=@home" "noatime" "compress=zstd" ];
options = [
"subvol=@home"
"noatime"
"compress=zstd"
];
};
"/nix" = {
device = "/dev/disk/by-uuid/3638cea6-5503-43cc-aa4f-3d37ebedad2f";
fsType = "btrfs";
options = [ "subvol=@nix" "noatime" "compress=zstd" ];
options = [
"subvol=@nix"
"noatime"
"compress=zstd"
];
};
"/persistent" = {
device = "/dev/disk/by-uuid/3638cea6-5503-43cc-aa4f-3d37ebedad2f";
fsType = "btrfs";
options = [ "subvol=@persistent" "noatime" "compress=zstd" ];
options = [
"subvol=@persistent"
"noatime"
"compress=zstd"
];
};
"/boot/efi" = {
device = "/dev/disk/by-uuid/34AD-002A";
fsType = "vfat";
options = [ "noatime" "fmask=0077" "dmask=0077" ];
options = [
"noatime"
"fmask=0077"
"dmask=0077"
];
};
};
@ -48,7 +78,5 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
let
qubesnsh = pkgs.writeTextFile {
@ -9,8 +15,7 @@ let
reboot-into-qubes = pkgs.makeDesktopItem {
name = "reboot-into-qubes";
icon = pkgs.fetchurl {
url =
"https://raw.githubusercontent.com/vinceliuice/Qogir-icon-theme/31f267e1f5fd4e9596bfd78dfb41a03d3a9f33ee/src/scalable/apps/distributor-logo-qubes.svg";
url = "https://raw.githubusercontent.com/vinceliuice/Qogir-icon-theme/31f267e1f5fd4e9596bfd78dfb41a03d3a9f33ee/src/scalable/apps/distributor-logo-qubes.svg";
sha256 = "sha256-QbHr7s5Wcs7uFtfqZctMyS0iDbMfiiZOKy2nHhDOfn0=";
};
desktopName = "Qubes OS";
@ -28,7 +33,8 @@ let
fi
'';
};
in {
in
{
imports = [
# Host-common imports
../common

View file

@ -1,5 +1,8 @@
{ ... }:
{
imports = [ ./hardware-configuration.nix ./ephermal.nix ];
imports = [
./hardware-configuration.nix
./ephermal.nix
];
}

View file

@ -1,10 +1,18 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
{
boot.initrd.systemd.services.recreate-root = {
description = "Rolling over and creating new filesystem root";
requires = [ "initrd-root-device.target" ];
after = [ "local-fs-pre.target" "initrd-root-device.target" ];
after = [
"local-fs-pre.target"
"initrd-root-device.target"
];
requiredBy = [ "initrd-root-fs.target" ];
before = [ "sysroot.mount" ];
unitConfig = {

View file

@ -1,14 +1,24 @@
{ config, lib, modulesPath, ... }:
{
config,
lib,
modulesPath,
...
}:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot = {
initrd = {
availableKernelModules =
[ "amdgpu" "nvme" "xhci_pci" "ahci" "usbhid" "sd_mod" ];
luks.devices."cryptroot".device =
"/dev/disk/by-uuid/f7dd4142-7109-4493-834d-4a831777f08d";
availableKernelModules = [
"amdgpu"
"nvme"
"xhci_pci"
"ahci"
"usbhid"
"sd_mod"
];
luks.devices."cryptroot".device = "/dev/disk/by-uuid/f7dd4142-7109-4493-834d-4a831777f08d";
};
kernelModules = [ "kvm-amd" ];
};
@ -17,32 +27,55 @@
"/" = {
device = "/dev/disk/by-uuid/3287dbc3-c0fa-4096-a0b3-59b017cfecc8";
fsType = "btrfs";
options = [ "subvol=@root" "noatime" "compress=zstd" ];
options = [
"subvol=@root"
"noatime"
"compress=zstd"
];
};
"/home" = {
device = "/dev/disk/by-uuid/3287dbc3-c0fa-4096-a0b3-59b017cfecc8";
fsType = "btrfs";
options = [ "subvol=@home" "noatime" "compress=zstd" ];
options = [
"subvol=@home"
"noatime"
"compress=zstd"
];
};
"/boot/efi" = {
device = "/dev/disk/by-uuid/1F5A-8945";
fsType = "vfat";
options = [ "noatime" "fmask=0077" "dmask=0077" ];
options = [
"noatime"
"fmask=0077"
"dmask=0077"
];
};
"/nix" = {
device = "/dev/disk/by-uuid/3287dbc3-c0fa-4096-a0b3-59b017cfecc8";
fsType = "btrfs";
options = [ "subvol=@nix" "noatime" "compress=zstd" ];
options = [
"subvol=@nix"
"noatime"
"compress=zstd"
];
};
"/persistent" = {
device = "/dev/disk/by-uuid/3287dbc3-c0fa-4096-a0b3-59b017cfecc8";
fsType = "btrfs";
options = [ "subvol=@persistent" "noatime" "compress=zstd" ];
options = [
"subvol=@persistent"
"noatime"
"compress=zstd"
];
};
"/swap" = {
device = "/dev/disk/by-uuid/3287dbc3-c0fa-4096-a0b3-59b017cfecc8";
fsType = "btrfs";
options = [ "subvol=@swap" "noatime" ];
options = [
"subvol=@swap"
"noatime"
];
};
};
@ -52,6 +85,5 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
imports = [
@ -12,15 +18,22 @@
nix.nixPath = [ "nixos-config=${./alexandria.nix}" ];
swapDevices = [{
swapDevices = [
{
device = "/swapfile";
size = 8192;
}];
}
];
networking = {
hostName = "alexandria";
firewall = {
allowedTCPPorts = [ 80 443 8010 9666 ];
allowedTCPPorts = [
80
443
8010
9666
];
allowedUDPPorts = [ 24454 ];
};
};

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
services = {
@ -14,8 +20,7 @@
useACMEHost = "baduhai.dev";
forceSSL = true;
kTLS = true;
locations."/".proxyPass =
"http://127.0.0.1:${config.ports.changedetection-io}";
locations."/".proxyPass = "http://127.0.0.1:${config.ports.changedetection-io}";
};
};
}

View file

@ -1,13 +1,23 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
virtualisation.oci-containers.containers."cinny" = {
image = "ghcr.io/cinnyapp/cinny:latest";
ports = [ "${config.ports.cinny}:80" ];
environment = { TZ = "America/Bahia"; };
environment = {
TZ = "America/Bahia";
};
volumes = [ "/data/matrix/cinny-config.json:/app/config.json" ];
extraOptions =
[ "--pull=newer" "--label=io.containers.autoupdate=registry" ];
extraOptions = [
"--pull=newer"
"--label=io.containers.autoupdate=registry"
];
};
services.nginx.virtualHosts."cinny.baduhai.dev" = {

View file

@ -1,13 +1,24 @@
# 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, pkgs, lib, modulesPath, ... }:
{
config,
pkgs,
lib,
modulesPath,
...
}:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules =
[ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
@ -32,6 +43,5 @@
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
services = {

View file

@ -1,12 +1,22 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
virtualisation.oci-containers.containers."librespeed" = {
image = "lscr.io/linuxserver/librespeed:latest";
environment = { TZ = "America/Bahia"; };
environment = {
TZ = "America/Bahia";
};
ports = [ "${config.ports.librespeed}:80" ];
extraOptions =
[ "--pull=newer" "--label=io.containers.autoupdate=registry" ];
extraOptions = [
"--pull=newer"
"--label=io.containers.autoupdate=registry"
];
};
services.nginx.virtualHosts."librespeed.baduhai.dev" = {

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
services.minecraft-servers = {
@ -16,68 +22,58 @@
online-mode = false;
spawn-protection = false;
};
symlinks."mods" = pkgs.linkFarmFromDrvs "mods" (builtins.attrValues {
symlinks."mods" = pkgs.linkFarmFromDrvs "mods" (
builtins.attrValues {
villagerNames = pkgs.fetchurl {
url =
"https://cdn.modrinth.com/data/gqRXDo8B/versions/rzXhJ2pH/villagernames-1.20.1-8.1.jar";
url = "https://cdn.modrinth.com/data/gqRXDo8B/versions/rzXhJ2pH/villagernames-1.20.1-8.1.jar";
sha256 = "0hcbbp3zi3nnr12kian9l645f22jr7495bcrlbng46nxp9h08pg5";
};
lithium = pkgs.fetchurl {
url =
"https://cdn.modrinth.com/data/gvQqBUqZ/versions/ZSNsJrPI/lithium-fabric-mc1.20.1-0.11.2.jar";
url = "https://cdn.modrinth.com/data/gvQqBUqZ/versions/ZSNsJrPI/lithium-fabric-mc1.20.1-0.11.2.jar";
sha256 = "1ycdvrs46bbdxsa6i38sfx70v47nvzzbmblfpy3hq3k8blsrbid0";
};
lootr = pkgs.fetchurl {
url =
"https://cdn.modrinth.com/data/EltpO5cN/versions/fqmzdpE2/lootr-fabric-1.20-0.7.33.81.jar";
url = "https://cdn.modrinth.com/data/EltpO5cN/versions/fqmzdpE2/lootr-fabric-1.20-0.7.33.81.jar";
sha256 = "0db0472rb07nbc9i925qp3n7s7nmrq6q3alhprflgc9gqg0j0f14";
};
malilib = pkgs.fetchurl {
url =
"https://cdn.modrinth.com/data/GcWjdA9I/versions/V7yLDtJV/malilib-fabric-1.20.1-0.16.3.jar";
url = "https://cdn.modrinth.com/data/GcWjdA9I/versions/V7yLDtJV/malilib-fabric-1.20.1-0.16.3.jar";
sha256 = "129m1jnk58p0wid5fmagqx13wp6pw4gja01yx14aljdxgzr8kqas";
};
immersivePaintings = pkgs.fetchurl {
url =
"https://cdn.modrinth.com/data/6txNkua3/versions/UjL11A4h/immersive_paintings-0.6.7%2B1.20.1-fabric.jar";
url = "https://cdn.modrinth.com/data/6txNkua3/versions/UjL11A4h/immersive_paintings-0.6.7%2B1.20.1-fabric.jar";
sha256 = "1di9a67q372z6lplnsa1kmh86armya83mimn61c8ai7izjlsfnid";
};
entityCulling = pkgs.fetchurl {
url =
"https://cdn.modrinth.com/data/NNAgCjsB/versions/mahLIqpj/entityculling-fabric-1.6.7-mc1.20.1.jar";
url = "https://cdn.modrinth.com/data/NNAgCjsB/versions/mahLIqpj/entityculling-fabric-1.6.7-mc1.20.1.jar";
sha256 = "01iz8rgljgzl0d8gcwpmr6wcvv3b0cf1siggp3dn8q5hv9przk9k";
};
fabricAPI = pkgs.fetchurl {
url =
"https://cdn.modrinth.com/data/P7dR8mSH/versions/P7uGFii0/fabric-api-0.92.2%2B1.20.1.jar";
url = "https://cdn.modrinth.com/data/P7dR8mSH/versions/P7uGFii0/fabric-api-0.92.2%2B1.20.1.jar";
sha256 = "1z3hcxng2p9ymph1c0k729vxxaasi34n6fcdsqwx0wsmqi2gh025";
};
fallingTree = pkgs.fetchurl {
url =
"https://cdn.modrinth.com/data/Fb4jn8m6/versions/NrtzFkZE/FallingTree-1.20.1-4.3.4.jar";
url = "https://cdn.modrinth.com/data/Fb4jn8m6/versions/NrtzFkZE/FallingTree-1.20.1-4.3.4.jar";
sha256 = "0sfv2laxzgmkhmr0kizi7g09r6fkccjhj9p5j0viqywnwx02r7fs";
};
carryOn = pkgs.fetchurl {
url =
"https://cdn.modrinth.com/data/joEfVgkn/versions/Mkla4B3q/carryon-fabric-1.20.1-2.1.2.7.jar";
url = "https://cdn.modrinth.com/data/joEfVgkn/versions/Mkla4B3q/carryon-fabric-1.20.1-2.1.2.7.jar";
sha256 = "1pgbqrjrxw7bgwn6phpywgpjfmf5h341ba93j76ibk649wbgn9cd";
};
collective = pkgs.fetchurl {
url =
"https://cdn.modrinth.com/data/e0M1UDsY/versions/jo7YkyNS/collective-1.20.1-7.84.jar";
url = "https://cdn.modrinth.com/data/e0M1UDsY/versions/jo7YkyNS/collective-1.20.1-7.84.jar";
sha256 = "01qvaqmd5kmxq7sins6703xq5ckc47qs5kd62gnjyfq1dbjp2y2b";
};
dynamicLights = pkgs.fetchurl {
url =
"https://cdn.modrinth.com/data/7YjclEGc/versions/eU6PA0pr/dynamiclights-v1.8.3-mc1.17x-1.21x-mod.jar";
url = "https://cdn.modrinth.com/data/7YjclEGc/versions/eU6PA0pr/dynamiclights-v1.8.3-mc1.17x-1.21x-mod.jar";
sha256 = "0vdv525gis1vj514iqh4rbl6byp7k0ls3lsyj0c3db8g58d784gm";
};
appleSkin = pkgs.fetchurl {
url =
"https://cdn.modrinth.com/data/EsAfCjCV/versions/xcauwnEB/appleskin-fabric-mc1.20.1-2.5.1.jar";
url = "https://cdn.modrinth.com/data/EsAfCjCV/versions/xcauwnEB/appleskin-fabric-mc1.20.1-2.5.1.jar";
sha256 = "1d9qmzjlk763ycmizqpmhcq0hhqw9j8hij6xk8p8l11ljr13mql5";
};
});
}
);
};
};
}

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
services = {
@ -25,7 +31,9 @@
dbtype = "pgsql";
adminpassFile = config.age.secrets.nextcloud-adminpass.path;
};
phpOptions = { "opcache.interned_strings_buffer" = "16"; };
phpOptions = {
"opcache.interned_strings_buffer" = "16";
};
};
nginx.virtualHosts.${config.services.nextcloud.hostName} = {

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
services.nginx = {

View file

@ -1,11 +1,18 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
virtualisation.oci-containers.containers."pairdrop" = {
image = "lscr.io/linuxserver/pairdrop:latest";
ports = [ "${config.ports.pairdrop}:3000" ];
extraOptions =
[ "--pull=newer" "--label=io.containers.autoupdate=registry" ];
extraOptions = [
"--pull=newer"
"--label=io.containers.autoupdate=registry"
];
};
}

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
services = {
@ -9,7 +15,9 @@
passwordFile = config.age.secrets.paperless.path;
port = lib.toInt "${config.ports.paperless}";
consumptionDirIsPublic = true;
settings = { PAPERLESS_OCR_LANGUAGE = "eng+por+deu"; };
settings = {
PAPERLESS_OCR_LANGUAGE = "eng+por+deu";
};
};
nginx.virtualHosts."paperless.baduhai.dev" = {

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
services = {

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
security.acme = {
@ -9,7 +15,9 @@
dnsProvider = "cloudflare";
credentialsFile = config.age.secrets.cloudflare.path;
};
certs."baduhai.dev" = { extraDomainNames = [ "*.baduhai.dev" ]; };
certs."baduhai.dev" = {
extraDomainNames = [ "*.baduhai.dev" ];
};
};
boot.kernel.sysctl = {

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
services.postgresql.enable = true;

View file

@ -1,12 +1,25 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
users = {
users = { nginx.extraGroups = [ "acme" ]; };
users = {
nginx.extraGroups = [ "acme" ];
};
groups = {
hosted = {
gid = 1005;
members = [ "user" "minecraft" "paperless" "vaultwarden" ];
members = [
"user"
"minecraft"
"paperless"
"vaultwarden"
];
};
};
};

View file

@ -1,13 +1,21 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
let
mkStringOption = default:
mkStringOption =
default:
lib.mkOption {
inherit default;
type = lib.types.str;
};
in {
in
{
options.ports = {
bazaar = mkStringOption "6767";
radarr = mkStringOption "7878";

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
services = {

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
boot.kernelPackages = pkgs.linuxPackages_hardened;

View file

@ -1,5 +1,8 @@
{ ... }:
{
imports = [ ./boot.nix ./nix.nix ];
imports = [
./boot.nix
./nix.nix
];
}

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }:
{
inputs,
config,
pkgs,
lib,
...
}:
{
environment.etc."channels/nixpkgs".source = inputs.nixpkgs-stable.outPath;

View file

@ -1,10 +1,16 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.services.qbittorrent;
configDir = "${cfg.dataDir}/.config";
openFilesLimit = 4096;
in {
in
{
options.services.qbittorrent = {
enable = mkOption {
type = types.bool;
@ -107,7 +113,10 @@ in {
};
};
users.groups =
mkIf (cfg.group == "qbittorrent") { qbittorrent = { gid = null; }; };
users.groups = mkIf (cfg.group == "qbittorrent") {
qbittorrent = {
gid = null;
};
};
};
}

View file

@ -1,8 +1,18 @@
{ stdenv, pkgs, lib }:
{
stdenv,
pkgs,
lib,
}:
pkgs.stdenv.mkDerivation rec {
name = "cros-ectool";
nativeBuildInputs = with pkgs; [ cmake ninja pkg-config libusb libftdi1 ];
nativeBuildInputs = with pkgs; [
cmake
ninja
pkg-config
libusb
libftdi1
];
src = pkgs.fetchFromGitLab {
domain = "gitlab.howett.net";
owner = "DHowett";

View file

@ -1,21 +1,54 @@
{ alsa-lib, at-spi2-atk, autoPatchelfHook, cairo, cups, dbus, desktop-file-utils
, expat, fetchurl, gdk-pixbuf, gtk3, gvfs, hicolor-icon-theme, lib, libdrm
, libglvnd, libnotify, libsForQt5, libxkbcommon, mesa, nspr, nss, openssl, pango
, rpmextract, stdenv, systemd, trash-cli, vulkan-loader, wrapGAppsHook3
, xdg-utils, xorg }:
{
alsa-lib,
at-spi2-atk,
autoPatchelfHook,
cairo,
cups,
dbus,
desktop-file-utils,
expat,
fetchurl,
gdk-pixbuf,
gtk3,
gvfs,
hicolor-icon-theme,
lib,
libdrm,
libglvnd,
libnotify,
libsForQt5,
libxkbcommon,
mesa,
nspr,
nss,
openssl,
pango,
rpmextract,
stdenv,
systemd,
trash-cli,
vulkan-loader,
wrapGAppsHook3,
xdg-utils,
xorg,
}:
stdenv.mkDerivation rec {
pname = "plasticity";
version = "24.2.3";
src = fetchurl {
url =
"https://github.com/nkallen/plasticity/releases/download/v${version}/Plasticity-${version}-1.x86_64.rpm";
url = "https://github.com/nkallen/plasticity/releases/download/v${version}/Plasticity-${version}-1.x86_64.rpm";
hash = "sha256-iiVh4k5r5PXN1/VJZcropTMu36N2B/ECq2L5e59QxJY=";
};
passthru.updateScript = ./update.sh;
nativeBuildInputs = [ wrapGAppsHook3 autoPatchelfHook rpmextract mesa ];
nativeBuildInputs = [
wrapGAppsHook3
autoPatchelfHook
rpmextract
mesa
];
buildInputs = [
alsa-lib

View file

@ -1,24 +1,26 @@
let
io-user =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKcwF1yuWEfYGScNocEbs0AmGxyTIzGc4/IhpU587SJE";
io-host =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKCIrKJk5zWzWEHvLMPMK8T3PyeBjsCsqzxPN+OrXfhA";
io = [ io-user io-host ];
io-user = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKcwF1yuWEfYGScNocEbs0AmGxyTIzGc4/IhpU587SJE";
io-host = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKCIrKJk5zWzWEHvLMPMK8T3PyeBjsCsqzxPN+OrXfhA";
io = [
io-user
io-host
];
rotterdam-user =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA1v3+q3EaruiiStWjubEJWvtejam/r41uoOpCdwJtLL";
rotterdam-host =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK7zAxgU8LNi5/O5XgoOcLKjbNMmO2S7jAuCI9Nr/V4v";
rotterdam = [ rotterdam-user rotterdam-host ];
rotterdam-user = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA1v3+q3EaruiiStWjubEJWvtejam/r41uoOpCdwJtLL";
rotterdam-host = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK7zAxgU8LNi5/O5XgoOcLKjbNMmO2S7jAuCI9Nr/V4v";
rotterdam = [
rotterdam-user
rotterdam-host
];
alexandria-host =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK95QueW+jp1ZmF299Xr3XkgHJ6dL7aZVsfWxqbOKVKA";
alexandria-host = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK95QueW+jp1ZmF299Xr3XkgHJ6dL7aZVsfWxqbOKVKA";
alexandria = [ alexandria-host ];
desktops = io ++ rotterdam;
servers = alexandria;
all-hosts = desktops ++ servers;
in {
in
{
"nextcloud-secrets.json.age".publicKeys = all-hosts;
"nextcloud-adminpass.age".publicKeys = all-hosts;
"cloudflare.age".publicKeys = all-hosts;

View file

@ -1,5 +1,8 @@
{ ... }:
{
imports = [ ./home.nix ./programs.nix ];
imports = [
./home.nix
./programs.nix
];
}

View file

@ -1,11 +1,18 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
{
home = {
username = "user";
homeDirectory = "/home/user";
stateVersion = "22.05";
sessionVariables = { EDITOR = "hx"; };
sessionVariables = {
EDITOR = "hx";
};
packages = with pkgs; [ nix-your-shell ];
};
}

View file

@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
{
programs = {
@ -29,15 +34,20 @@
space = "file_picker";
w = ":w";
q = ":q";
esc = [ "collapse_selection" "keep_primary_selection" ];
esc = [
"collapse_selection"
"keep_primary_selection"
];
};
};
languages = {
language = [{
language = [
{
name = "nix";
auto-format = true;
formatter.command = "nixfmt";
}];
}
];
};
};

View file

@ -1,5 +1,8 @@
{ ... }:
{
imports = [ ./programs.nix ./programs ];
imports = [
./programs.nix
./programs
];
}

View file

@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
{
fonts.fontconfig.enable = true;
@ -21,8 +26,7 @@
functions = {
sysrebuild = "nh os switch --ask";
sysrebuild-boot = "nh os boot --ask";
sysupdate =
"nix flake update --commit-lock-file /home/user/Projects/personal/nix-config";
sysupdate = "nix flake update --commit-lock-file /home/user/Projects/personal/nix-config";
code = ''
wezterm cli split-pane --top --percent=75 -- hx
wezterm cli activate-pane-direction up

View file

@ -1,5 +1,8 @@
{ ... }:
{
imports = [ ./wezterm.nix ./webapps.nix ];
imports = [
./wezterm.nix
./webapps.nix
];
}

View file

@ -1,8 +1,11 @@
{ lib, pkgs, ... }:
let
mkWebApp = webAppName: webAppLink: webAppIconLink: webAppIconHash:
let name = lib.strings.replaceStrings [ " " ] [ "" ] webAppName;
in pkgs.makeDesktopItem {
mkWebApp =
webAppName: webAppLink: webAppIconLink: webAppIconHash:
let
name = lib.strings.replaceStrings [ " " ] [ "" ] webAppName;
in
pkgs.makeDesktopItem {
inherit name;
icon = pkgs.fetchurl {
url = webAppIconLink;
@ -12,15 +15,25 @@ let
categories = [ "Network" ];
startupNotify = true;
startupWMClass = "chrome-${
lib.strings.replaceStrings [ "https://" "/" ] [ "" "" ] webAppLink
lib.strings.replaceStrings
[
"https://"
"/"
]
[
""
""
]
webAppLink
}__-Default";
exec =
"${pkgs.ungoogled-chromium}/bin/chromium --no-first-run --no-default-browser-check --no-crash-upload --app=${webAppLink} --class=${name}";
exec = "${pkgs.ungoogled-chromium}/bin/chromium --no-first-run --no-default-browser-check --no-crash-upload --app=${webAppLink} --class=${name}";
};
in {
in
{
home.packages = [
(mkWebApp "YT Music" "https://music.youtube.com"
"https://raw.githubusercontent.com/vinceliuice/Qogir-icon-theme/fff0c7f3747b9b9ddf94c6f997847d47896097c2/src/scalable/apps/youtube-music.svg"
"sha256-T+v2JOOW+nEwH/9W2PFOrw/315/bCoKHw01KNh2U8IE=")
"sha256-T+v2JOOW+nEwH/9W2PFOrw/315/bCoKHw01KNh2U8IE="
)
];
}

View file

@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
{
programs.wezterm = {