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

View file

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

View file

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

View file

@ -3,7 +3,6 @@
{ {
environment.shellAliases = { environment.shellAliases = {
neofetch = "fastfetch"; neofetch = "fastfetch";
syscleanup = syscleanup = "sudo nix-collect-garbage -d; sudo /run/current-system/bin/switch-to-configuration boot";
"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"; time.timeZone = "America/Bahia";

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
{ {
environment.persistence.main = { 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; environment.etc."channels/nixpkgs".source = inputs.nixpkgs.outPath;

View file

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

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }: {
inputs,
config,
pkgs,
lib,
...
}:
{ {
services = { services = {
@ -20,12 +26,12 @@
greetd = { greetd = {
enable = true; enable = true;
settings = { settings = {
default_session.command = let default_session.command =
xSessions = let
"${config.services.displayManager.sessionData.desktops}/share/xsessions"; xSessions = "${config.services.displayManager.sessionData.desktops}/share/xsessions";
wlSessions = wlSessions = "${config.services.displayManager.sessionData.desktops}/share/wayland-sessions";
"${config.services.displayManager.sessionData.desktops}/share/wayland-sessions"; in
in '' ''
${pkgs.greetd.tuigreet}/bin/tuigreet \ ${pkgs.greetd.tuigreet}/bin/tuigreet \
--remember \ --remember \
--asterisks \ --asterisks \
@ -46,6 +52,9 @@
xdg.portal = { xdg.portal = {
enable = true; enable = true;
xdgOpenUsePortal = 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 = { stylix = {
enable = true; enable = true;
image = pkgs.fetchurl { image = pkgs.fetchurl {
url = url = "https://github.com/notAxon/wallpapers/blob/main/Nature/Pink_Flowers_Photograph_by_Lisa_Fotios.jpeg?raw=true";
"https://github.com/notAxon/wallpapers/blob/main/Nature/Pink_Flowers_Photograph_by_Lisa_Fotios.jpeg?raw=true";
sha256 = "sha256-PyK/LuR7IR+FpGFZXdpYkShjKrwaqCtu64SY/wl/RvY="; sha256 = "sha256-PyK/LuR7IR+FpGFZXdpYkShjKrwaqCtu64SY/wl/RvY=";
}; };
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml"; 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 { environment.sessionVariables = rec {
KDEHOME = KDEHOME = "$XDG_CONFIG_HOME/kde4"; # Stops kde from placing a .kde4 folder in the home dir
"$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
NIXOS_OZONE_WL =
"1"; # Forces chromium and most electron apps to run in wayland
}; };
users.users.user = { users.users.user = {

View file

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

View file

@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }: {
config,
pkgs,
lib,
...
}:
let let
cml-ucm-conf = pkgs.alsa-ucm-conf.overrideAttrs { 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 cp -R $wttsrc/{cml,sof-rt5682} $out/share/alsa/ucm2/conf.d
''; '';
}; };
in { in
{
imports = [ imports = [
# Host-common imports # Host-common imports
../common ../common
@ -34,7 +40,11 @@ in {
}; };
boot = { boot = {
kernelParams = [ "nosgx" "i915.fastboot=1" "mem_sleep_default=deep" ]; kernelParams = [
"nosgx"
"i915.fastboot=1"
"mem_sleep_default=deep"
];
extraModprobeConfig = '' extraModprobeConfig = ''
options snd-intel-dspcfg dsp_driver=3 options snd-intel-dspcfg dsp_driver=3
''; '';
@ -51,7 +61,9 @@ in {
# TODO: remove once gmodena/nix-flatpak/issues/45 fixed # TODO: remove once gmodena/nix-flatpak/issues/45 fixed
systemd.services."flatpak-managed-install" = { systemd.services."flatpak-managed-install" = {
serviceConfig = { ExecStartPre = "${pkgs.coreutils}/bin/sleep 5"; }; serviceConfig = {
ExecStartPre = "${pkgs.coreutils}/bin/sleep 5";
};
}; };
services = { 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 = { boot.initrd.systemd.services.recreate-root = {
description = "Rolling over and creating new filesystem root"; description = "Rolling over and creating new filesystem root";
requires = [ "initrd-root-device.target" ]; 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" ]; requiredBy = [ "initrd-root-fs.target" ];
before = [ "sysroot.mount" ]; before = [ "sysroot.mount" ];
unitConfig = { unitConfig = {

View file

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

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }: {
inputs,
config,
pkgs,
lib,
...
}:
let let
qubesnsh = pkgs.writeTextFile { qubesnsh = pkgs.writeTextFile {
@ -9,8 +15,7 @@ let
reboot-into-qubes = pkgs.makeDesktopItem { reboot-into-qubes = pkgs.makeDesktopItem {
name = "reboot-into-qubes"; name = "reboot-into-qubes";
icon = pkgs.fetchurl { icon = pkgs.fetchurl {
url = url = "https://raw.githubusercontent.com/vinceliuice/Qogir-icon-theme/31f267e1f5fd4e9596bfd78dfb41a03d3a9f33ee/src/scalable/apps/distributor-logo-qubes.svg";
"https://raw.githubusercontent.com/vinceliuice/Qogir-icon-theme/31f267e1f5fd4e9596bfd78dfb41a03d3a9f33ee/src/scalable/apps/distributor-logo-qubes.svg";
sha256 = "sha256-QbHr7s5Wcs7uFtfqZctMyS0iDbMfiiZOKy2nHhDOfn0="; sha256 = "sha256-QbHr7s5Wcs7uFtfqZctMyS0iDbMfiiZOKy2nHhDOfn0=";
}; };
desktopName = "Qubes OS"; desktopName = "Qubes OS";
@ -28,7 +33,8 @@ let
fi fi
''; '';
}; };
in { in
{
imports = [ imports = [
# Host-common imports # Host-common imports
../common ../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 = { boot.initrd.systemd.services.recreate-root = {
description = "Rolling over and creating new filesystem root"; description = "Rolling over and creating new filesystem root";
requires = [ "initrd-root-device.target" ]; 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" ]; requiredBy = [ "initrd-root-fs.target" ];
before = [ "sysroot.mount" ]; before = [ "sysroot.mount" ];
unitConfig = { unitConfig = {

View file

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

View file

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

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }: {
inputs,
config,
pkgs,
lib,
...
}:
{ {
services = { services = {
@ -14,8 +20,7 @@
useACMEHost = "baduhai.dev"; useACMEHost = "baduhai.dev";
forceSSL = true; forceSSL = true;
kTLS = true; kTLS = true;
locations."/".proxyPass = locations."/".proxyPass = "http://127.0.0.1:${config.ports.changedetection-io}";
"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" = { virtualisation.oci-containers.containers."cinny" = {
image = "ghcr.io/cinnyapp/cinny:latest"; image = "ghcr.io/cinnyapp/cinny:latest";
ports = [ "${config.ports.cinny}:80" ]; ports = [ "${config.ports.cinny}:80" ];
environment = { TZ = "America/Bahia"; }; environment = {
TZ = "America/Bahia";
};
volumes = [ "/data/matrix/cinny-config.json:/app/config.json" ]; volumes = [ "/data/matrix/cinny-config.json:/app/config.json" ];
extraOptions = extraOptions = [
[ "--pull=newer" "--label=io.containers.autoupdate=registry" ]; "--pull=newer"
"--label=io.containers.autoupdate=registry"
];
}; };
services.nginx.virtualHosts."cinny.baduhai.dev" = { services.nginx.virtualHosts."cinny.baduhai.dev" = {

View file

@ -1,13 +1,24 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, pkgs, lib, modulesPath, ... }: {
config,
pkgs,
lib,
modulesPath,
...
}:
{ {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = boot.initrd.availableKernelModules = [
[ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; "xhci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
@ -32,6 +43,5 @@
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true; # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

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

View file

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

View file

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

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }: {
inputs,
config,
pkgs,
lib,
...
}:
{ {
services = { services = {
@ -25,7 +31,9 @@
dbtype = "pgsql"; dbtype = "pgsql";
adminpassFile = config.age.secrets.nextcloud-adminpass.path; 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} = { nginx.virtualHosts.${config.services.nextcloud.hostName} = {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,12 +1,25 @@
{ inputs, config, pkgs, lib, ... }: {
inputs,
config,
pkgs,
lib,
...
}:
{ {
users = { users = {
users = { nginx.extraGroups = [ "acme" ]; }; users = {
nginx.extraGroups = [ "acme" ];
};
groups = { groups = {
hosted = { hosted = {
gid = 1005; 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 let
mkStringOption = default: mkStringOption =
default:
lib.mkOption { lib.mkOption {
inherit default; inherit default;
type = lib.types.str; type = lib.types.str;
}; };
in { in
{
options.ports = { options.ports = {
bazaar = mkStringOption "6767"; bazaar = mkStringOption "6767";
radarr = mkStringOption "7878"; radarr = mkStringOption "7878";

View file

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

View file

@ -1,4 +1,10 @@
{ inputs, config, pkgs, lib, ... }: {
inputs,
config,
pkgs,
lib,
...
}:
{ {
boot.kernelPackages = pkgs.linuxPackages_hardened; 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; environment.etc."channels/nixpkgs".source = inputs.nixpkgs-stable.outPath;

View file

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

View file

@ -1,8 +1,18 @@
{ stdenv, pkgs, lib }: {
stdenv,
pkgs,
lib,
}:
pkgs.stdenv.mkDerivation rec { pkgs.stdenv.mkDerivation rec {
name = "cros-ectool"; name = "cros-ectool";
nativeBuildInputs = with pkgs; [ cmake ninja pkg-config libusb libftdi1 ]; nativeBuildInputs = with pkgs; [
cmake
ninja
pkg-config
libusb
libftdi1
];
src = pkgs.fetchFromGitLab { src = pkgs.fetchFromGitLab {
domain = "gitlab.howett.net"; domain = "gitlab.howett.net";
owner = "DHowett"; 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 alsa-lib,
, libglvnd, libnotify, libsForQt5, libxkbcommon, mesa, nspr, nss, openssl, pango at-spi2-atk,
, rpmextract, stdenv, systemd, trash-cli, vulkan-loader, wrapGAppsHook3 autoPatchelfHook,
, xdg-utils, xorg }: 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 { stdenv.mkDerivation rec {
pname = "plasticity"; pname = "plasticity";
version = "24.2.3"; version = "24.2.3";
src = fetchurl { src = fetchurl {
url = url = "https://github.com/nkallen/plasticity/releases/download/v${version}/Plasticity-${version}-1.x86_64.rpm";
"https://github.com/nkallen/plasticity/releases/download/v${version}/Plasticity-${version}-1.x86_64.rpm";
hash = "sha256-iiVh4k5r5PXN1/VJZcropTMu36N2B/ECq2L5e59QxJY="; hash = "sha256-iiVh4k5r5PXN1/VJZcropTMu36N2B/ECq2L5e59QxJY=";
}; };
passthru.updateScript = ./update.sh; passthru.updateScript = ./update.sh;
nativeBuildInputs = [ wrapGAppsHook3 autoPatchelfHook rpmextract mesa ]; nativeBuildInputs = [
wrapGAppsHook3
autoPatchelfHook
rpmextract
mesa
];
buildInputs = [ buildInputs = [
alsa-lib alsa-lib

View file

@ -1,24 +1,26 @@
let let
io-user = io-user = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKcwF1yuWEfYGScNocEbs0AmGxyTIzGc4/IhpU587SJE";
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKcwF1yuWEfYGScNocEbs0AmGxyTIzGc4/IhpU587SJE"; io-host = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKCIrKJk5zWzWEHvLMPMK8T3PyeBjsCsqzxPN+OrXfhA";
io-host = io = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKCIrKJk5zWzWEHvLMPMK8T3PyeBjsCsqzxPN+OrXfhA"; io-user
io = [ io-user io-host ]; io-host
];
rotterdam-user = rotterdam-user = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA1v3+q3EaruiiStWjubEJWvtejam/r41uoOpCdwJtLL";
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA1v3+q3EaruiiStWjubEJWvtejam/r41uoOpCdwJtLL"; rotterdam-host = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK7zAxgU8LNi5/O5XgoOcLKjbNMmO2S7jAuCI9Nr/V4v";
rotterdam-host = rotterdam = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK7zAxgU8LNi5/O5XgoOcLKjbNMmO2S7jAuCI9Nr/V4v"; rotterdam-user
rotterdam = [ rotterdam-user rotterdam-host ]; rotterdam-host
];
alexandria-host = alexandria-host = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK95QueW+jp1ZmF299Xr3XkgHJ6dL7aZVsfWxqbOKVKA";
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK95QueW+jp1ZmF299Xr3XkgHJ6dL7aZVsfWxqbOKVKA";
alexandria = [ alexandria-host ]; alexandria = [ alexandria-host ];
desktops = io ++ rotterdam; desktops = io ++ rotterdam;
servers = alexandria; servers = alexandria;
all-hosts = desktops ++ servers; all-hosts = desktops ++ servers;
in { in
{
"nextcloud-secrets.json.age".publicKeys = all-hosts; "nextcloud-secrets.json.age".publicKeys = all-hosts;
"nextcloud-adminpass.age".publicKeys = all-hosts; "nextcloud-adminpass.age".publicKeys = all-hosts;
"cloudflare.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 = { home = {
username = "user"; username = "user";
homeDirectory = "/home/user"; homeDirectory = "/home/user";
stateVersion = "22.05"; stateVersion = "22.05";
sessionVariables = { EDITOR = "hx"; }; sessionVariables = {
EDITOR = "hx";
};
packages = with pkgs; [ nix-your-shell ]; packages = with pkgs; [ nix-your-shell ];
}; };
} }

View file

@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }: {
config,
pkgs,
lib,
...
}:
{ {
programs = { programs = {
@ -29,15 +34,20 @@
space = "file_picker"; space = "file_picker";
w = ":w"; w = ":w";
q = ":q"; q = ":q";
esc = [ "collapse_selection" "keep_primary_selection" ]; esc = [
"collapse_selection"
"keep_primary_selection"
];
}; };
}; };
languages = { languages = {
language = [{ language = [
{
name = "nix"; name = "nix";
auto-format = true; auto-format = true;
formatter.command = "nixfmt"; 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; fonts.fontconfig.enable = true;
@ -21,8 +26,7 @@
functions = { functions = {
sysrebuild = "nh os switch --ask"; sysrebuild = "nh os switch --ask";
sysrebuild-boot = "nh os boot --ask"; sysrebuild-boot = "nh os boot --ask";
sysupdate = sysupdate = "nix flake update --commit-lock-file /home/user/Projects/personal/nix-config";
"nix flake update --commit-lock-file /home/user/Projects/personal/nix-config";
code = '' code = ''
wezterm cli split-pane --top --percent=75 -- hx wezterm cli split-pane --top --percent=75 -- hx
wezterm cli activate-pane-direction up 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, ... }: { lib, pkgs, ... }:
let let
mkWebApp = webAppName: webAppLink: webAppIconLink: webAppIconHash: mkWebApp =
let name = lib.strings.replaceStrings [ " " ] [ "" ] webAppName; webAppName: webAppLink: webAppIconLink: webAppIconHash:
in pkgs.makeDesktopItem { let
name = lib.strings.replaceStrings [ " " ] [ "" ] webAppName;
in
pkgs.makeDesktopItem {
inherit name; inherit name;
icon = pkgs.fetchurl { icon = pkgs.fetchurl {
url = webAppIconLink; url = webAppIconLink;
@ -12,15 +15,25 @@ let
categories = [ "Network" ]; categories = [ "Network" ];
startupNotify = true; startupNotify = true;
startupWMClass = "chrome-${ startupWMClass = "chrome-${
lib.strings.replaceStrings [ "https://" "/" ] [ "" "" ] webAppLink lib.strings.replaceStrings
[
"https://"
"/"
]
[
""
""
]
webAppLink
}__-Default"; }__-Default";
exec = exec = "${pkgs.ungoogled-chromium}/bin/chromium --no-first-run --no-default-browser-check --no-crash-upload --app=${webAppLink} --class=${name}";
"${pkgs.ungoogled-chromium}/bin/chromium --no-first-run --no-default-browser-check --no-crash-upload --app=${webAppLink} --class=${name}";
}; };
in { in
{
home.packages = [ home.packages = [
(mkWebApp "YT Music" "https://music.youtube.com" (mkWebApp "YT Music" "https://music.youtube.com"
"https://raw.githubusercontent.com/vinceliuice/Qogir-icon-theme/fff0c7f3747b9b9ddf94c6f997847d47896097c2/src/scalable/apps/youtube-music.svg" "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 = { programs.wezterm = {