mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 08:53:56 -05:00
nixfmt changes
This commit is contained in:
parent
36176f647c
commit
f25c8638ee
36 changed files with 133 additions and 135 deletions
|
|
@ -1,5 +1,5 @@
|
|||
_:
|
||||
{ pkgs, config, ... }:
|
||||
{pkgs, config, ...}:
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{ nvim-flake, nixfmt, ... }:
|
||||
{ pkgs, config, ... }:
|
||||
{nvim-flake, nixfmt, ...}:
|
||||
{pkgs, config, ...}:
|
||||
{
|
||||
local = {
|
||||
remoteBuild.isBuilder = true;
|
||||
|
|
@ -13,9 +13,9 @@
|
|||
enable = true;
|
||||
kmscon.enable = true;
|
||||
};
|
||||
allowedUnfree = [ "nvidia-x11" ];
|
||||
allowedUnfree = ["nvidia-x11"];
|
||||
};
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
boot.binfmt.emulatedSystems = ["aarch64-linux"];
|
||||
hardware.nvidia = {
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
nvidiaPersistenced = false;
|
||||
|
|
@ -73,7 +73,7 @@
|
|||
# QMK configuration
|
||||
via
|
||||
qmk
|
||||
;
|
||||
;
|
||||
inherit (nvim-flake.packages) neovim;
|
||||
inherit fmt;
|
||||
lint = pkgs.writeShellApplication {
|
||||
|
|
@ -128,16 +128,16 @@
|
|||
networks = {
|
||||
"enp11s0" = {
|
||||
name = "enp11s0";
|
||||
bridge = [ "br0" ];
|
||||
bridge = ["br0"];
|
||||
linkConfig.RequiredForOnline = "enslaved";
|
||||
};
|
||||
"br0" = {
|
||||
name = "br0";
|
||||
address = [ "192.168.1.4/24" ];
|
||||
gateway = [ "192.168.1.1" ];
|
||||
dns = [ "192.168.1.1" ];
|
||||
address = ["192.168.1.4/24"];
|
||||
gateway = ["192.168.1.1"];
|
||||
dns = ["192.168.1.1"];
|
||||
DHCP = "no";
|
||||
bridgeConfig = { };
|
||||
bridgeConfig = {};
|
||||
linkConfig = {
|
||||
MACAddress = "D8:5E:D3:E5:47:90";
|
||||
RequiredForOnline = "routable";
|
||||
|
|
@ -177,7 +177,7 @@
|
|||
};
|
||||
};
|
||||
boot = {
|
||||
kernelModules = [ "amdgpu" ];
|
||||
kernelModules = ["amdgpu"];
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
"nvme"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
_:
|
||||
{ config, pkgs, ... }:
|
||||
{config, pkgs, ...}:
|
||||
{
|
||||
sops.secrets.cloudflare = { };
|
||||
sops.secrets.cloudflare = {};
|
||||
|
||||
systemd.services.ddns = {
|
||||
reloadIfChanged = false;
|
||||
|
|
@ -11,9 +11,9 @@ _:
|
|||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
wantedBy = ["multi-user.target"];
|
||||
wants = ["network-online.target"];
|
||||
after = ["network-online.target"];
|
||||
startAt = "*:0/30";
|
||||
|
||||
serviceConfig = {
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
_:
|
||||
{ config, ... }:
|
||||
{config, ...}:
|
||||
{
|
||||
users.users = {
|
||||
${config.services.gitea.user} = {
|
||||
openssh.authorizedKeys.keys = [ config.local.keys.gerg_gerg-desktop ];
|
||||
extraGroups = [ "postgres" ];
|
||||
openssh.authorizedKeys.keys = [config.local.keys.gerg_gerg-desktop];
|
||||
extraGroups = ["postgres"];
|
||||
};
|
||||
${config.services.nginx.user}.extraGroups = [ config.services.gitea.group ];
|
||||
${config.services.nginx.user}.extraGroups = [config.services.gitea.group];
|
||||
};
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
{ self, ... }:
|
||||
{ lib, ... }:
|
||||
{self, ...}:
|
||||
{lib, ...}:
|
||||
{
|
||||
# I manually switch this sometimes
|
||||
config = lib.mkIf false {
|
||||
networking.firewall.allowedTCPPorts = [ 25565 ];
|
||||
networking.firewall.allowedTCPPorts = [25565];
|
||||
|
||||
users.users.minecraft = {
|
||||
description = "Minecraft server service user";
|
||||
|
|
@ -12,10 +12,10 @@
|
|||
isSystemUser = true;
|
||||
group = "minecraft";
|
||||
};
|
||||
users.groups.minecraft = { };
|
||||
users.groups.minecraft = {};
|
||||
|
||||
systemd.sockets.minecraft-server = {
|
||||
bindsTo = [ "minecraft-server.service" ];
|
||||
bindsTo = ["minecraft-server.service"];
|
||||
socketConfig = {
|
||||
ListenFIFO = "/run/minecraft-server.stdin";
|
||||
SocketMode = "0660";
|
||||
|
|
@ -29,13 +29,13 @@
|
|||
systemd.services.minecraft-server = {
|
||||
enable = true;
|
||||
description = "Minecraft Server Service";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
requires = [ "minecraft-server.socket" ];
|
||||
wantedBy = ["multi-user.target"];
|
||||
requires = ["minecraft-server.socket"];
|
||||
after = [
|
||||
"network.target"
|
||||
"minecraft-server.socket"
|
||||
];
|
||||
path = [ self.packages.papermc ];
|
||||
path = [self.packages.papermc];
|
||||
script = ''
|
||||
minecraft-server \
|
||||
-Xms8G \
|
||||
|
|
@ -71,8 +71,8 @@
|
|||
StandardError = "journal";
|
||||
|
||||
# Hardening
|
||||
CapabilityBoundingSet = [ "" ];
|
||||
DeviceAllow = [ "" ];
|
||||
CapabilityBoundingSet = [""];
|
||||
DeviceAllow = [""];
|
||||
LockPersonality = true;
|
||||
PrivateDevices = true;
|
||||
PrivateTmp = true;
|
||||
|
|
|
|||
|
|
@ -6,13 +6,13 @@ _:
|
|||
...
|
||||
}:
|
||||
{
|
||||
sops.secrets.minifluxenv = { };
|
||||
sops.secrets.minifluxenv = {};
|
||||
|
||||
systemd.services = {
|
||||
miniflux = {
|
||||
description = "Miniflux service";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
requires = [ "miniflux-dbsetup.service" ];
|
||||
wantedBy = ["multi-user.target"];
|
||||
requires = ["miniflux-dbsetup.service"];
|
||||
after = [
|
||||
"network.target"
|
||||
"postgresql.service"
|
||||
|
|
@ -26,8 +26,8 @@ _:
|
|||
RuntimeDirectoryMode = "0770";
|
||||
EnvironmentFile = config.sops.secrets.minifluxenv.path;
|
||||
# Hardening
|
||||
CapabilityBoundingSet = [ "" ];
|
||||
DeviceAllow = [ "" ];
|
||||
CapabilityBoundingSet = [""];
|
||||
DeviceAllow = [""];
|
||||
LockPersonality = true;
|
||||
MemoryDenyWriteExecute = true;
|
||||
PrivateDevices = true;
|
||||
|
|
@ -67,15 +67,13 @@ _:
|
|||
};
|
||||
miniflux-dbsetup = {
|
||||
description = "Miniflux database setup";
|
||||
requires = [ "postgresql.service" ];
|
||||
requires = ["postgresql.service"];
|
||||
after = [
|
||||
"network.target"
|
||||
"postgresql.service"
|
||||
];
|
||||
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 = {
|
||||
Type = "oneshot";
|
||||
|
|
@ -90,11 +88,11 @@ _:
|
|||
users = {
|
||||
miniflux = {
|
||||
group = "miniflux";
|
||||
extraGroups = [ "postgres" ];
|
||||
extraGroups = ["postgres"];
|
||||
isSystemUser = true;
|
||||
uid = 377;
|
||||
};
|
||||
${config.services.nginx.user}.extraGroups = [ "miniflux" ];
|
||||
${config.services.nginx.user}.extraGroups = ["miniflux"];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
_:
|
||||
{ pkgs, config, ... }:
|
||||
{pkgs, config, ...}:
|
||||
{
|
||||
sops.secrets.nextcloud.owner = "nextcloud";
|
||||
|
||||
users.users.nextcloud.extraGroups = [ "postgres" ];
|
||||
users.users.nextcloud.extraGroups = ["postgres"];
|
||||
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
_:
|
||||
{ config, lib, ... }:
|
||||
{config, lib, ...}:
|
||||
{
|
||||
sops.secrets =
|
||||
lib.genAttrs
|
||||
|
|
@ -34,7 +34,7 @@ _:
|
|||
forceSSL = true;
|
||||
sslCertificate = config.sops.secrets.nixfu_ssl_cert.path;
|
||||
sslCertificateKey = config.sops.secrets.nixfu_ssl_key.path;
|
||||
serverAliases = [ "www.nix-fu.com" ];
|
||||
serverAliases = ["www.nix-fu.com"];
|
||||
globalRedirect = "github.com/Gerg-L";
|
||||
};
|
||||
"search.gerg-l.com" = {
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@ _:
|
|||
...
|
||||
}:
|
||||
{
|
||||
sops.secrets.discordenv = { };
|
||||
sops.secrets.discordenv = {};
|
||||
systemd.services.parrot = {
|
||||
enable = true;
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
wantedBy = ["multi-user.target"];
|
||||
wants = ["network-online.target"];
|
||||
after = ["network-online.target"];
|
||||
script = lib.getExe pkgs.parrot;
|
||||
serviceConfig = {
|
||||
EnvironmentFile = config.sops.secrets.discordenv.path;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
_:
|
||||
{ config, pkgs, ... }:
|
||||
{config, pkgs, ...}:
|
||||
{
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
_:
|
||||
{ config, pkgs, ... }:
|
||||
{config, pkgs, ...}:
|
||||
{
|
||||
sops.secrets.searxngenv = { };
|
||||
users.users.${config.services.nginx.user}.extraGroups = [ "searx" ];
|
||||
sops.secrets.searxngenv = {};
|
||||
users.users.${config.services.nginx.user}.extraGroups = ["searx"];
|
||||
services.searx = {
|
||||
enable = true;
|
||||
package = pkgs.searxng;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
{ spicetify-nix, ... }:
|
||||
{spicetify-nix, ...}:
|
||||
let
|
||||
spicePkgs = spicetify-nix.legacyPackages;
|
||||
in
|
||||
{
|
||||
imports = [ spicetify-nix.nixosModules.default ];
|
||||
local.allowedUnfree = [ "spotify" ];
|
||||
imports = [spicetify-nix.nixosModules.default];
|
||||
local.allowedUnfree = ["spotify"];
|
||||
programs.spicetify = {
|
||||
enable = true;
|
||||
enabledExtensions = builtins.attrValues {
|
||||
|
|
|
|||
|
|
@ -54,13 +54,13 @@ let
|
|||
in
|
||||
{
|
||||
environment.etc = {
|
||||
"Xorg/1_mon.conf".source = pkgs.runCommand "1_mon.conf" { } (
|
||||
"Xorg/1_mon.conf".source = pkgs.runCommand "1_mon.conf" {} (
|
||||
xserverbase
|
||||
+ ''
|
||||
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
|
||||
+ ''
|
||||
cat ${./2_mon.conf} >> $out
|
||||
|
|
@ -132,7 +132,7 @@ in
|
|||
"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 ''
|
||||
if ! [ -e "/etc/Xorg/ONE_MONITOR" ] ; then
|
||||
${lib.getExe cfg_monitors}
|
||||
|
|
|
|||
|
|
@ -18,11 +18,11 @@ _:
|
|||
mode = "0644";
|
||||
};
|
||||
#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 = {
|
||||
"/persist".neededForBoot = true;
|
||||
"/efi22".options = [ "nofail" ];
|
||||
"/efi0E".options = [ "nofail" ];
|
||||
"/efi22".options = ["nofail"];
|
||||
"/efi0E".options = ["nofail"];
|
||||
};
|
||||
|
||||
boot = {
|
||||
|
|
@ -32,22 +32,22 @@ _:
|
|||
};
|
||||
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||
#disable hibernate and set cache max
|
||||
kernelParams = [ "zfs.zfs_arc_max=17179869184" ];
|
||||
kernelParams = ["zfs.zfs_arc_max=17179869184"];
|
||||
initrd = {
|
||||
#module for multiple swap devices
|
||||
kernelModules = [ "dm_mod" ];
|
||||
kernelModules = ["dm_mod"];
|
||||
#keyboard module for zfs password
|
||||
availableKernelModules = [ "hid_generic" ];
|
||||
availableKernelModules = ["hid_generic"];
|
||||
systemd.services.rollback = {
|
||||
path = [ pkgs.zfs ];
|
||||
path = [pkgs.zfs];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
unitConfig.DefaultDependencies = "no";
|
||||
wantedBy = [ "initrd.target" ];
|
||||
after = [ "zfs-import.target" ];
|
||||
before = [ "sysroot.mount" ];
|
||||
wantedBy = ["initrd.target"];
|
||||
after = ["zfs-import.target"];
|
||||
before = ["sysroot.mount"];
|
||||
script = ''
|
||||
zfs rollback -r rpool/root@empty
|
||||
zfs rollback -r rpool/var@empty
|
||||
|
|
@ -67,11 +67,11 @@ _:
|
|||
mirroredBoots = [
|
||||
{
|
||||
path = "/efi22";
|
||||
devices = [ "nodev" ];
|
||||
devices = ["nodev"];
|
||||
}
|
||||
{
|
||||
path = "/efi0E";
|
||||
devices = [ "nodev" ];
|
||||
devices = ["nodev"];
|
||||
}
|
||||
];
|
||||
splashImage = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue