nixfmt changes

This commit is contained in:
Gerg-L 2023-12-03 21:59:58 -05:00
parent 36176f647c
commit f25c8638ee
Signed by: gerg-l
SSH key fingerprint: SHA256:FPYDHIkvMocr4wdmZXpgpJjsb2Tw6rASs2ISPbOb0KI
36 changed files with 133 additions and 135 deletions

View file

@ -62,7 +62,7 @@ _:
useDefaultShell = true; useDefaultShell = true;
uid = 1000; uid = 1000;
isNormalUser = true; isNormalUser = true;
extraGroups = [ "audio" ]; extraGroups = ["audio"];
initialHashedPassword = ""; initialHashedPassword = "";
}; };
"root" = { "root" = {
@ -85,7 +85,7 @@ _:
modesetting.enable = true; modesetting.enable = true;
}; };
services.xserver = { services.xserver = {
videoDrivers = [ "nvidia" ]; videoDrivers = ["nvidia"];
#disable DPMS #disable DPMS
monitorSection = '' monitorSection = ''
Option "DPMS" "false" Option "DPMS" "false"
@ -107,7 +107,7 @@ _:
"xhci_pci" "xhci_pci"
"ahci" "ahci"
]; ];
kernelModules = [ "kvm-amd" ]; kernelModules = ["kvm-amd"];
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
}; };
swapDevices = [ swapDevices = [

View file

@ -1,5 +1,5 @@
_: _:
{ pkgs, config, ... }: {pkgs, config, ...}:
{ {
programs.git = { programs.git = {
enable = true; enable = true;

View file

@ -1,5 +1,5 @@
{ nvim-flake, nixfmt, ... }: {nvim-flake, nixfmt, ...}:
{ pkgs, config, ... }: {pkgs, config, ...}:
{ {
local = { local = {
remoteBuild.isBuilder = true; remoteBuild.isBuilder = true;
@ -13,9 +13,9 @@
enable = true; enable = true;
kmscon.enable = true; kmscon.enable = true;
}; };
allowedUnfree = [ "nvidia-x11" ]; allowedUnfree = ["nvidia-x11"];
}; };
boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; boot.binfmt.emulatedSystems = ["aarch64-linux"];
hardware.nvidia = { hardware.nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.beta; package = config.boot.kernelPackages.nvidiaPackages.beta;
nvidiaPersistenced = false; nvidiaPersistenced = false;
@ -128,16 +128,16 @@
networks = { networks = {
"enp11s0" = { "enp11s0" = {
name = "enp11s0"; name = "enp11s0";
bridge = [ "br0" ]; bridge = ["br0"];
linkConfig.RequiredForOnline = "enslaved"; linkConfig.RequiredForOnline = "enslaved";
}; };
"br0" = { "br0" = {
name = "br0"; name = "br0";
address = [ "192.168.1.4/24" ]; address = ["192.168.1.4/24"];
gateway = [ "192.168.1.1" ]; gateway = ["192.168.1.1"];
dns = [ "192.168.1.1" ]; dns = ["192.168.1.1"];
DHCP = "no"; DHCP = "no";
bridgeConfig = { }; bridgeConfig = {};
linkConfig = { linkConfig = {
MACAddress = "D8:5E:D3:E5:47:90"; MACAddress = "D8:5E:D3:E5:47:90";
RequiredForOnline = "routable"; RequiredForOnline = "routable";
@ -177,7 +177,7 @@
}; };
}; };
boot = { boot = {
kernelModules = [ "amdgpu" ]; kernelModules = ["amdgpu"];
initrd = { initrd = {
availableKernelModules = [ availableKernelModules = [
"nvme" "nvme"

View file

@ -1,7 +1,7 @@
_: _:
{ config, pkgs, ... }: {config, pkgs, ...}:
{ {
sops.secrets.cloudflare = { }; sops.secrets.cloudflare = {};
systemd.services.ddns = { systemd.services.ddns = {
reloadIfChanged = false; reloadIfChanged = false;
@ -11,9 +11,9 @@ _:
Type = "oneshot"; Type = "oneshot";
RemainAfterExit = true; RemainAfterExit = true;
}; };
wantedBy = [ "multi-user.target" ]; wantedBy = ["multi-user.target"];
wants = [ "network-online.target" ]; wants = ["network-online.target"];
after = [ "network-online.target" ]; after = ["network-online.target"];
startAt = "*:0/30"; startAt = "*:0/30";
serviceConfig = { serviceConfig = {

View file

@ -1,12 +1,12 @@
_: _:
{ config, ... }: {config, ...}:
{ {
users.users = { users.users = {
${config.services.gitea.user} = { ${config.services.gitea.user} = {
openssh.authorizedKeys.keys = [ config.local.keys.gerg_gerg-desktop ]; openssh.authorizedKeys.keys = [config.local.keys.gerg_gerg-desktop];
extraGroups = [ "postgres" ]; extraGroups = ["postgres"];
}; };
${config.services.nginx.user}.extraGroups = [ config.services.gitea.group ]; ${config.services.nginx.user}.extraGroups = [config.services.gitea.group];
}; };
services.gitea = { services.gitea = {
enable = true; enable = true;

View file

@ -1,9 +1,9 @@
{ self, ... }: {self, ...}:
{ lib, ... }: {lib, ...}:
{ {
# I manually switch this sometimes # I manually switch this sometimes
config = lib.mkIf false { config = lib.mkIf false {
networking.firewall.allowedTCPPorts = [ 25565 ]; networking.firewall.allowedTCPPorts = [25565];
users.users.minecraft = { users.users.minecraft = {
description = "Minecraft server service user"; description = "Minecraft server service user";
@ -12,10 +12,10 @@
isSystemUser = true; isSystemUser = true;
group = "minecraft"; group = "minecraft";
}; };
users.groups.minecraft = { }; users.groups.minecraft = {};
systemd.sockets.minecraft-server = { systemd.sockets.minecraft-server = {
bindsTo = [ "minecraft-server.service" ]; bindsTo = ["minecraft-server.service"];
socketConfig = { socketConfig = {
ListenFIFO = "/run/minecraft-server.stdin"; ListenFIFO = "/run/minecraft-server.stdin";
SocketMode = "0660"; SocketMode = "0660";
@ -29,13 +29,13 @@
systemd.services.minecraft-server = { systemd.services.minecraft-server = {
enable = true; enable = true;
description = "Minecraft Server Service"; description = "Minecraft Server Service";
wantedBy = [ "multi-user.target" ]; wantedBy = ["multi-user.target"];
requires = [ "minecraft-server.socket" ]; requires = ["minecraft-server.socket"];
after = [ after = [
"network.target" "network.target"
"minecraft-server.socket" "minecraft-server.socket"
]; ];
path = [ self.packages.papermc ]; path = [self.packages.papermc];
script = '' script = ''
minecraft-server \ minecraft-server \
-Xms8G \ -Xms8G \
@ -71,8 +71,8 @@
StandardError = "journal"; StandardError = "journal";
# Hardening # Hardening
CapabilityBoundingSet = [ "" ]; CapabilityBoundingSet = [""];
DeviceAllow = [ "" ]; DeviceAllow = [""];
LockPersonality = true; LockPersonality = true;
PrivateDevices = true; PrivateDevices = true;
PrivateTmp = true; PrivateTmp = true;

View file

@ -6,13 +6,13 @@ _:
... ...
}: }:
{ {
sops.secrets.minifluxenv = { }; sops.secrets.minifluxenv = {};
systemd.services = { systemd.services = {
miniflux = { miniflux = {
description = "Miniflux service"; description = "Miniflux service";
wantedBy = [ "multi-user.target" ]; wantedBy = ["multi-user.target"];
requires = [ "miniflux-dbsetup.service" ]; requires = ["miniflux-dbsetup.service"];
after = [ after = [
"network.target" "network.target"
"postgresql.service" "postgresql.service"
@ -26,8 +26,8 @@ _:
RuntimeDirectoryMode = "0770"; RuntimeDirectoryMode = "0770";
EnvironmentFile = config.sops.secrets.minifluxenv.path; EnvironmentFile = config.sops.secrets.minifluxenv.path;
# Hardening # Hardening
CapabilityBoundingSet = [ "" ]; CapabilityBoundingSet = [""];
DeviceAllow = [ "" ]; DeviceAllow = [""];
LockPersonality = true; LockPersonality = true;
MemoryDenyWriteExecute = true; MemoryDenyWriteExecute = true;
PrivateDevices = true; PrivateDevices = true;
@ -67,15 +67,13 @@ _:
}; };
miniflux-dbsetup = { miniflux-dbsetup = {
description = "Miniflux database setup"; description = "Miniflux database setup";
requires = [ "postgresql.service" ]; requires = ["postgresql.service"];
after = [ after = [
"network.target" "network.target"
"postgresql.service" "postgresql.service"
]; ];
script = '' script = ''
${ ${lib.getExe' config.services.postgresql.package "psql"} "miniflux" -c "CREATE EXTENSION IF NOT EXISTS hstore"
lib.getExe' config.services.postgresql.package "psql"
} "miniflux" -c "CREATE EXTENSION IF NOT EXISTS hstore"
''; '';
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
@ -90,11 +88,11 @@ _:
users = { users = {
miniflux = { miniflux = {
group = "miniflux"; group = "miniflux";
extraGroups = [ "postgres" ]; extraGroups = ["postgres"];
isSystemUser = true; isSystemUser = true;
uid = 377; uid = 377;
}; };
${config.services.nginx.user}.extraGroups = [ "miniflux" ]; ${config.services.nginx.user}.extraGroups = ["miniflux"];
}; };
}; };
} }

View file

@ -1,9 +1,9 @@
_: _:
{ pkgs, config, ... }: {pkgs, config, ...}:
{ {
sops.secrets.nextcloud.owner = "nextcloud"; sops.secrets.nextcloud.owner = "nextcloud";
users.users.nextcloud.extraGroups = [ "postgres" ]; users.users.nextcloud.extraGroups = ["postgres"];
services.nextcloud = { services.nextcloud = {
enable = true; enable = true;

View file

@ -1,5 +1,5 @@
_: _:
{ config, lib, ... }: {config, lib, ...}:
{ {
sops.secrets = sops.secrets =
lib.genAttrs lib.genAttrs
@ -34,7 +34,7 @@ _:
forceSSL = true; forceSSL = true;
sslCertificate = config.sops.secrets.nixfu_ssl_cert.path; sslCertificate = config.sops.secrets.nixfu_ssl_cert.path;
sslCertificateKey = config.sops.secrets.nixfu_ssl_key.path; sslCertificateKey = config.sops.secrets.nixfu_ssl_key.path;
serverAliases = [ "www.nix-fu.com" ]; serverAliases = ["www.nix-fu.com"];
globalRedirect = "github.com/Gerg-L"; globalRedirect = "github.com/Gerg-L";
}; };
"search.gerg-l.com" = { "search.gerg-l.com" = {

View file

@ -6,12 +6,12 @@ _:
... ...
}: }:
{ {
sops.secrets.discordenv = { }; sops.secrets.discordenv = {};
systemd.services.parrot = { systemd.services.parrot = {
enable = true; enable = true;
wantedBy = [ "multi-user.target" ]; wantedBy = ["multi-user.target"];
wants = [ "network-online.target" ]; wants = ["network-online.target"];
after = [ "network-online.target" ]; after = ["network-online.target"];
script = lib.getExe pkgs.parrot; script = lib.getExe pkgs.parrot;
serviceConfig = { serviceConfig = {
EnvironmentFile = config.sops.secrets.discordenv.path; EnvironmentFile = config.sops.secrets.discordenv.path;

View file

@ -1,5 +1,5 @@
_: _:
{ config, pkgs, ... }: {config, pkgs, ...}:
{ {
services.postgresql = { services.postgresql = {
enable = true; enable = true;

View file

@ -1,8 +1,8 @@
_: _:
{ config, pkgs, ... }: {config, pkgs, ...}:
{ {
sops.secrets.searxngenv = { }; sops.secrets.searxngenv = {};
users.users.${config.services.nginx.user}.extraGroups = [ "searx" ]; users.users.${config.services.nginx.user}.extraGroups = ["searx"];
services.searx = { services.searx = {
enable = true; enable = true;
package = pkgs.searxng; package = pkgs.searxng;

View file

@ -1,10 +1,10 @@
{ spicetify-nix, ... }: {spicetify-nix, ...}:
let let
spicePkgs = spicetify-nix.legacyPackages; spicePkgs = spicetify-nix.legacyPackages;
in in
{ {
imports = [ spicetify-nix.nixosModules.default ]; imports = [spicetify-nix.nixosModules.default];
local.allowedUnfree = [ "spotify" ]; local.allowedUnfree = ["spotify"];
programs.spicetify = { programs.spicetify = {
enable = true; enable = true;
enabledExtensions = builtins.attrValues { enabledExtensions = builtins.attrValues {

View file

@ -54,13 +54,13 @@ let
in in
{ {
environment.etc = { environment.etc = {
"Xorg/1_mon.conf".source = pkgs.runCommand "1_mon.conf" { } ( "Xorg/1_mon.conf".source = pkgs.runCommand "1_mon.conf" {} (
xserverbase xserverbase
+ '' + ''
cat ${./1_mon.conf} >> $out cat ${./1_mon.conf} >> $out
'' ''
); );
"Xorg/2_mon.conf".source = pkgs.runCommand "2_mon.conf" { } ( "Xorg/2_mon.conf".source = pkgs.runCommand "2_mon.conf" {} (
xserverbase xserverbase
+ '' + ''
cat ${./2_mon.conf} >> $out cat ${./2_mon.conf} >> $out
@ -132,7 +132,7 @@ in
"libvirtd" "libvirtd"
]; ];
services.xserver.displayManager.xserverArgs = lib.mkAfter [ "-config /etc/Xorg/active.conf" ]; services.xserver.displayManager.xserverArgs = lib.mkAfter ["-config /etc/Xorg/active.conf"];
services.xserver.displayManager.sessionCommands = lib.mkBefore '' services.xserver.displayManager.sessionCommands = lib.mkBefore ''
if ! [ -e "/etc/Xorg/ONE_MONITOR" ] ; then if ! [ -e "/etc/Xorg/ONE_MONITOR" ] ; then
${lib.getExe cfg_monitors} ${lib.getExe cfg_monitors}

View file

@ -18,11 +18,11 @@ _:
mode = "0644"; mode = "0644";
}; };
#make sure the sopskey is found #make sure the sopskey is found
sops.age.sshKeyPaths = lib.mkForce [ "/persist/ssh/ssh_host_ed25519_key" ]; sops.age.sshKeyPaths = lib.mkForce ["/persist/ssh/ssh_host_ed25519_key"];
fileSystems = { fileSystems = {
"/persist".neededForBoot = true; "/persist".neededForBoot = true;
"/efi22".options = [ "nofail" ]; "/efi22".options = ["nofail"];
"/efi0E".options = [ "nofail" ]; "/efi0E".options = ["nofail"];
}; };
boot = { boot = {
@ -32,22 +32,22 @@ _:
}; };
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages; kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
#disable hibernate and set cache max #disable hibernate and set cache max
kernelParams = [ "zfs.zfs_arc_max=17179869184" ]; kernelParams = ["zfs.zfs_arc_max=17179869184"];
initrd = { initrd = {
#module for multiple swap devices #module for multiple swap devices
kernelModules = [ "dm_mod" ]; kernelModules = ["dm_mod"];
#keyboard module for zfs password #keyboard module for zfs password
availableKernelModules = [ "hid_generic" ]; availableKernelModules = ["hid_generic"];
systemd.services.rollback = { systemd.services.rollback = {
path = [ pkgs.zfs ]; path = [pkgs.zfs];
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
RemainAfterExit = true; RemainAfterExit = true;
}; };
unitConfig.DefaultDependencies = "no"; unitConfig.DefaultDependencies = "no";
wantedBy = [ "initrd.target" ]; wantedBy = ["initrd.target"];
after = [ "zfs-import.target" ]; after = ["zfs-import.target"];
before = [ "sysroot.mount" ]; before = ["sysroot.mount"];
script = '' script = ''
zfs rollback -r rpool/root@empty zfs rollback -r rpool/root@empty
zfs rollback -r rpool/var@empty zfs rollback -r rpool/var@empty
@ -67,11 +67,11 @@ _:
mirroredBoots = [ mirroredBoots = [
{ {
path = "/efi22"; path = "/efi22";
devices = [ "nodev" ]; devices = ["nodev"];
} }
{ {
path = "/efi0E"; path = "/efi0E";
devices = [ "nodev" ]; devices = ["nodev"];
} }
]; ];
splashImage = null; splashImage = null;

View file

@ -1,4 +1,4 @@
{ disko, nixos-generators, ... }: {disko, nixos-generators, ...}:
{ {
lib, lib,
modulesPath, modulesPath,

View file

@ -28,7 +28,7 @@ _:
chromium chromium
; ;
}; };
services.xserver.videoDrivers = [ "intel" ]; services.xserver.videoDrivers = ["intel"];
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
@ -72,7 +72,7 @@ _:
"sr_mod" "sr_mod"
"rtsx_usb_sdmmc" "rtsx_usb_sdmmc"
]; ];
kernelModules = [ "kvm-intel" ]; kernelModules = ["kvm-intel"];
}; };
systemd.user.tmpfiles.users.media.rules = [ systemd.user.tmpfiles.users.media.rules = [
"L+ %h/Desktop/chromium-browser.desktop - - - - ${pkgs.chromium}/share/applications/chromium-browser.desktop" "L+ %h/Desktop/chromium-browser.desktop - - - - ${pkgs.chromium}/share/applications/chromium-browser.desktop"

View file

@ -51,20 +51,20 @@ rec {
gerg-utils = gerg-utils =
config: outputs: config: outputs:
lib.foldAttrs lib.mergeAttrs { } ( lib.foldAttrs lib.mergeAttrs {} (
map map
( (
system: system:
let let
pkgs = pkgs =
if config == { } then if config == {} then
unstable.legacyPackages.${system} unstable.legacyPackages.${system}
else else
import unstable { inherit system config; }; import unstable {inherit system config;};
in in
lib.mapAttrs (name: value: if needsSystem name then { ${system} = value pkgs; } else value) outputs lib.mapAttrs (name: value: if needsSystem name then {${system} = value pkgs;} else value) outputs
) )
[ "x86_64-linux" ] ["x86_64-linux"]
); );
mkHosts = mkHosts =

View file

@ -1,4 +1,4 @@
{ suckless, self, ... }: {suckless, self, ...}:
{ {
pkgs, pkgs,
config, config,
@ -11,7 +11,7 @@
config = lib.mkIf config.local.DE.dwm.enable { config = lib.mkIf config.local.DE.dwm.enable {
systemd.user.services = { systemd.user.services = {
sxhkd = { sxhkd = {
path = [ pkgs.sxhkd ]; path = [pkgs.sxhkd];
script = "sxhkd -c /etc/sxhkd/sxhkdrc"; script = "sxhkd -c /etc/sxhkd/sxhkdrc";
serviceConfig = { serviceConfig = {
Restart = "always"; Restart = "always";
@ -21,7 +21,7 @@
}; };
picom = { picom = {
path = [ pkgs.picom ]; path = [pkgs.picom];
script = "picom"; script = "picom";
serviceConfig = { serviceConfig = {
Restart = "always"; Restart = "always";

View file

@ -10,7 +10,7 @@ _:
config = lib.mkIf config.local.DE.gnome.enable { config = lib.mkIf config.local.DE.gnome.enable {
environment = { environment = {
systemPackages = [ pkgs.gnome.gnome-calculator ]; systemPackages = [pkgs.gnome.gnome-calculator];
gnome.excludePackages = builtins.attrValues { gnome.excludePackages = builtins.attrValues {
inherit (pkgs) inherit (pkgs)
gnome-photos gnome-photos

View file

@ -9,7 +9,7 @@ _:
options.local.DE.xfce.enable = lib.mkEnableOption ""; options.local.DE.xfce.enable = lib.mkEnableOption "";
config = lib.mkIf config.local.DE.xfce.enable { config = lib.mkIf config.local.DE.xfce.enable {
environment.systemPackages = [ pkgs.xfce.xfce4-whiskermenu-plugin ]; environment.systemPackages = [pkgs.xfce.xfce4-whiskermenu-plugin];
services.xserver = { services.xserver = {
enable = true; enable = true;
desktopManager.xfce = { desktopManager.xfce = {

View file

@ -1,5 +1,5 @@
_: _:
{ config, lib, ... }: {config, lib, ...}:
{ {
options.local.DM = { options.local.DM = {
autoLogin = lib.mkEnableOption ""; autoLogin = lib.mkEnableOption "";

View file

@ -1,5 +1,5 @@
{ self, ... }: {self, ...}:
{ config, lib, ... }: {config, lib, ...}:
{ {
options.local.DM.lightdm.enable = lib.mkEnableOption ""; options.local.DM.lightdm.enable = lib.mkEnableOption "";

View file

@ -1,5 +1,5 @@
_: _:
{ pkgs, lib, ... }: {pkgs, lib, ...}:
{ {
services.xserver = { services.xserver = {
tty = lib.mkDefault 1; tty = lib.mkDefault 1;
@ -7,7 +7,7 @@ _:
layout = "us"; layout = "us";
libinput.enable = true; libinput.enable = true;
xautolock.enable = false; xautolock.enable = false;
excludePackages = [ pkgs.xterm ]; excludePackages = [pkgs.xterm];
desktopManager.xterm.enable = false; desktopManager.xterm.enable = false;
}; };
_file = ./X11.nix; _file = ./X11.nix;

View file

@ -1,4 +1,4 @@
{ self, ... }: {self, ...}:
{ {
lib, lib,
pkgs, pkgs,
@ -15,7 +15,7 @@
}; };
}; };
boot = { boot = {
blacklistedKernelModules = [ "pcspkr" ]; blacklistedKernelModules = ["pcspkr"];
kernelParams = lib.mkBefore [ kernelParams = lib.mkBefore [
"acpi_call" "acpi_call"
"pti=auto" "pti=auto"
@ -78,8 +78,8 @@
Type = "oneshot"; Type = "oneshot";
RemainAfterExit = true; RemainAfterExit = true;
}; };
path = [ pkgs.efibootmgr ]; path = [pkgs.efibootmgr];
wantedBy = [ "default.target" ]; wantedBy = ["default.target"];
script = '' script = ''
efibootmgr -t 0 efibootmgr -t 0
''; '';

View file

@ -1,5 +1,5 @@
_: _:
{ config, lib, ... }: {config, lib, ...}:
{ {
options.local.remoteBuild = { options.local.remoteBuild = {
enable = lib.mkEnableOption ""; enable = lib.mkEnableOption "";
@ -13,8 +13,8 @@ _:
keep-derivations = false; keep-derivations = false;
builders-use-substitutes = true; builders-use-substitutes = true;
max-jobs = 0; max-jobs = 0;
substituters = [ "ssh-ng://nix-ssh@gerg-desktop" ]; substituters = ["ssh-ng://nix-ssh@gerg-desktop"];
trusted-public-keys = [ "gerg-desktop:6p1+h6jQnb1MOt3ra3PlQpfgEEF4zRrQWiEuAqcjBj8=" ]; trusted-public-keys = ["gerg-desktop:6p1+h6jQnb1MOt3ra3PlQpfgEEF4zRrQWiEuAqcjBj8="];
}; };
distributedBuilds = true; distributedBuilds = true;
buildMachines = [ buildMachines = [
@ -40,7 +40,7 @@ _:
}; };
programs.ssh.knownHosts = { programs.ssh.knownHosts = {
gerg-desktop = { gerg-desktop = {
extraHostNames = [ "gerg-desktop.lan" ]; extraHostNames = ["gerg-desktop.lan"];
publicKey = config.local.keys.root_gerg-desktop; publicKey = config.local.keys.root_gerg-desktop;
}; };
}; };
@ -54,9 +54,9 @@ _:
]; ];
in in
lib.mkIf config.local.remoteBuild.isBuilder { lib.mkIf config.local.remoteBuild.isBuilder {
sops.secrets.store_key = { }; sops.secrets.store_key = {};
users = { users = {
groups.builder = { }; groups.builder = {};
users.builder = { users.builder = {
createHome = false; createHome = false;
isSystemUser = true; isSystemUser = true;

View file

@ -1,5 +1,5 @@
_: _:
{ config, lib, ... }: {config, lib, ...}:
let let
cfg = config.local.hardware; cfg = config.local.hardware;
in in

View file

@ -1,7 +1,7 @@
_: _:
{ lib, ... }: {lib, ...}:
{ {
options.local.keys = lib.mkOption { }; options.local.keys = lib.mkOption {};
config.local.keys = { config.local.keys = {
gerg_gerg-phone = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDU6BnoHIgMLgZVGuvi03J9l5Z1yP1P5Q8QPyjRHyi77"; gerg_gerg-phone = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDU6BnoHIgMLgZVGuvi03J9l5Z1yP1P5Q8QPyjRHyi77";

View file

@ -8,7 +8,7 @@ _:
{ {
options.local.allowedUnfree = lib.mkOption { options.local.allowedUnfree = lib.mkOption {
type = lib.types.listOf lib.types.str; type = lib.types.listOf lib.types.str;
default = [ ]; default = [];
}; };
config = { config = {
@ -39,7 +39,7 @@ _:
programs.mtr.enable = true; # ping and traceroute programs.mtr.enable = true; # ping and traceroute
services.openssh = { services.openssh = {
enable = true; enable = true;
hostKeys = lib.mkForce [ ]; hostKeys = lib.mkForce [];
settings = { settings = {
PermitRootLogin = lib.mkDefault "no"; PermitRootLogin = lib.mkDefault "no";
PasswordAuthentication = false; PasswordAuthentication = false;

View file

@ -1,13 +1,13 @@
inputs: inputs:
{ lib, config, ... }: {lib, config, ...}:
{ {
# #
# Flake registry and $NIX_PATH pinning # Flake registry and $NIX_PATH pinning
# #
nix.registry = lib.pipe inputs [ nix.registry = lib.pipe inputs [
(lib.filterAttrs (_: lib.isType "flake")) (lib.filterAttrs (_: lib.isType "flake"))
(lib.mapAttrs (_: flake: { inherit flake; })) (lib.mapAttrs (_: flake: {inherit flake;}))
(x: x // { nixpkgs.flake = inputs.unstable; }) (x: x // {nixpkgs.flake = inputs.unstable;})
]; ];
environment.etc = environment.etc =
@ -17,7 +17,7 @@ inputs:
value.source = value.flake; value.source = value.flake;
}) })
config.nix.registry; config.nix.registry;
nix.nixPath = [ "/etc/nix/path" ]; nix.nixPath = ["/etc/nix/path"];
# #
# Ignore global registry # Ignore global registry
# #
@ -51,8 +51,8 @@ inputs:
# Use for testing # Use for testing
# #
#allow-import-from-derivation = false; #allow-import-from-derivation = false;
trusted-users = [ "root" ]; trusted-users = ["root"];
allowed-users = [ "@wheel" ]; allowed-users = ["@wheel"];
use-xdg-base-directories = true; use-xdg-base-directories = true;
auto-allocate-uids = true; auto-allocate-uids = true;
}; };

View file

@ -1,4 +1,4 @@
{ fetch-rs, ... }: {fetch-rs, ...}:
{ {
pkgs, pkgs,
config, config,
@ -6,7 +6,7 @@
... ...
}: }:
{ {
systemd.tmpfiles.rules = [ "d /tmp/neovim-page 0777 root root - -" ]; systemd.tmpfiles.rules = ["d /tmp/neovim-page 0777 root root - -"];
environment = { environment = {
systemPackages = builtins.attrValues { systemPackages = builtins.attrValues {
inherit (pkgs) page eza fzf; inherit (pkgs) page eza fzf;

View file

@ -1,4 +1,4 @@
{ sops-nix, self, ... }: {sops-nix, self, ...}:
{ {
pkgs, pkgs,
config, config,
@ -6,13 +6,13 @@
... ...
}: }:
{ {
imports = [ sops-nix.nixosModules.sops ]; imports = [sops-nix.nixosModules.sops];
options.local.sops.disable = lib.mkEnableOption ""; options.local.sops.disable = lib.mkEnableOption "";
config = lib.mkIf (!config.local.sops.disable) { config = lib.mkIf (!config.local.sops.disable) {
environment.systemPackages = [ pkgs.sops ]; environment.systemPackages = [pkgs.sops];
sops = { sops = {
defaultSopsFile = "${self}/hosts/${config.networking.hostName}/secrets.yaml"; defaultSopsFile = "${self}/hosts/${config.networking.hostName}/secrets.yaml";
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
}; };
}; };
_file = ./sops.nix; _file = ./sops.nix;

View file

@ -62,16 +62,16 @@ in
fonts = { fonts = {
packages = [ packages = [
pkgs.overpass pkgs.overpass
(pkgs.nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; }) (pkgs.nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];})
]; ];
enableDefaultPackages = false; enableDefaultPackages = false;
fontDir.enable = true; fontDir.enable = true;
fontconfig = { fontconfig = {
enable = true; enable = true;
defaultFonts = { defaultFonts = {
serif = [ "Overpass" ]; serif = ["Overpass"];
sansSerif = [ "Overpass" ]; sansSerif = ["Overpass"];
monospace = [ "Overpass Mono" ]; monospace = ["Overpass Mono"];
}; };
hinting.enable = true; hinting.enable = true;
antialias = true; antialias = true;

View file

@ -2,7 +2,7 @@ inputs:
let let
lib = import ./lib inputs; lib = import ./lib inputs;
in in
lib.gerg-utils { } { lib.gerg-utils {} {
inherit lib; inherit lib;
nixosConfigurations = lib.mkHosts "x86_64-linux" [ nixosConfigurations = lib.mkHosts "x86_64-linux" [
"gerg-desktop" "gerg-desktop"
@ -38,7 +38,7 @@ lib.gerg-utils { } {
''; '';
}; };
devShells = pkgs: { default = pkgs.mkShell { packages = [ pkgs.sops ]; }; }; devShells = pkgs: {default = pkgs.mkShell {packages = [pkgs.sops];};};
packages = lib.mkPackages ./packages; packages = lib.mkPackages ./packages;
} }

View file

@ -13,7 +13,7 @@ runCommand "images"
url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/376ed4ba8dc2e611b7e8a62fdc680967ead5bd87/logo/nix-snowflake.svg"; url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/376ed4ba8dc2e611b7e8a62fdc680967ead5bd87/logo/nix-snowflake.svg";
sha256 = "sha256-SCuQlSPB14GFTq4XvExJ0QEuK2VIbrd5YYKHLRG/q5I="; sha256 = "sha256-SCuQlSPB14GFTq4XvExJ0QEuK2VIbrd5YYKHLRG/q5I=";
}; };
buildInputs = [ imagemagick ]; buildInputs = [imagemagick];
} }
'' ''
mkdir -p $out mkdir -p $out

View file

@ -23,12 +23,12 @@ runCommandNoCC "papermc"
hash = "sha256-HQpc3MOXa1wkXqgm9ciQj04FUIyuupnYiu+2RZ/sXE4="; hash = "sha256-HQpc3MOXa1wkXqgm9ciQj04FUIyuupnYiu+2RZ/sXE4=";
}; };
nativeBuildInputs = [ makeBinaryWrapper ]; nativeBuildInputs = [makeBinaryWrapper];
meta = { meta = {
description = "High-performance Minecraft Server"; description = "High-performance Minecraft Server";
homepage = "https://papermc.io/"; homepage = "https://papermc.io/";
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ]; sourceProvenance = with lib.sourceTypes; [binaryBytecode];
license = lib.licenses.gpl3Only; license = lib.licenses.gpl3Only;
platforms = lib.platforms.unix; platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ maintainers = with lib.maintainers; [