cleanup: statix
This commit is contained in:
parent
6055c9e63a
commit
f177fde0ef
39
flake.nix
39
flake.nix
@ -33,37 +33,22 @@
|
|||||||
pkgsM = makePkgs master;
|
pkgsM = makePkgs master;
|
||||||
pkgsJ = makePkgs jellyfin;
|
pkgsJ = makePkgs jellyfin;
|
||||||
overlays = [ (import ./overlay.nix { inherit pkgs pkgsU pkgsM pkgsJ; }) ];
|
overlays = [ (import ./overlay.nix { inherit pkgs pkgsU pkgsM pkgsJ; }) ];
|
||||||
|
createConfig = name: {
|
||||||
|
inherit system;
|
||||||
|
specialArgs = { inherit inputs outputs; };
|
||||||
|
modules = [
|
||||||
|
./hosts/${name}/configuration.nix
|
||||||
|
sops-nix.nixosModules.sops
|
||||||
|
({ ... }: { nixpkgs.overlays = overlays; })
|
||||||
|
];
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
inherit lib pkgs;
|
inherit lib pkgs;
|
||||||
formatter = pkgs.alejandra;
|
formatter = pkgs.alejandra;
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
workstation = lib.nixosSystem {
|
workstation = lib.nixosSystem (createConfig "workstation");
|
||||||
inherit system;
|
miniserver = lib.nixosSystem (createConfig "miniserver");
|
||||||
specialArgs = { inherit inputs outputs; };
|
server = lib.nixosSystem (createConfig "server");
|
||||||
modules = [
|
|
||||||
./hosts/workstation/configuration.nix
|
|
||||||
sops-nix.nixosModules.sops
|
|
||||||
({ ... }: { nixpkgs.overlays = overlays; })
|
|
||||||
];
|
|
||||||
};
|
|
||||||
miniserver = lib.nixosSystem {
|
|
||||||
inherit system;
|
|
||||||
specialArgs = { inherit inputs outputs; };
|
|
||||||
modules = [
|
|
||||||
./hosts/miniserver/configuration.nix
|
|
||||||
sops-nix.nixosModules.sops
|
|
||||||
({ ... }: { nixpkgs.overlays = overlays; })
|
|
||||||
];
|
|
||||||
};
|
|
||||||
server = lib.nixosSystem {
|
|
||||||
inherit system;
|
|
||||||
specialArgs = { inherit inputs outputs; };
|
|
||||||
modules = [
|
|
||||||
./hosts/server/configuration.nix
|
|
||||||
sops-nix.nixosModules.sops
|
|
||||||
({ ... }: { nixpkgs.overlays = overlays; })
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
{ pkgs, config, ... }: {
|
{ pkgs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../base.nix
|
../../base.nix
|
||||||
@ -78,11 +78,11 @@
|
|||||||
users = {
|
users = {
|
||||||
groups.nixremote.gid = 555;
|
groups.nixremote.gid = 555;
|
||||||
users = {
|
users = {
|
||||||
jawz.packages = (with pkgs; [
|
jawz.packages = with pkgs; [
|
||||||
gocryptfs # encrypted filesystem! shhh!!!
|
gocryptfs # encrypted filesystem! shhh!!!
|
||||||
torrenttools # create torrent files from the terminal!
|
torrenttools # create torrent files from the terminal!
|
||||||
vcsi # video thumbnails for torrents, can I replace it with ^?
|
vcsi # video thumbnails for torrents, can I replace it with ^?
|
||||||
]);
|
];
|
||||||
nixremote = {
|
nixremote = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
createHome = true;
|
createHome = true;
|
||||||
|
|||||||
@ -51,11 +51,11 @@
|
|||||||
[ "xhci_pci" "ahci" "usbhid" "nvme" "usb_storage" "sd_mod" ];
|
[ "xhci_pci" "ahci" "usbhid" "nvme" "usb_storage" "sd_mod" ];
|
||||||
};
|
};
|
||||||
fileSystems = let
|
fileSystems = let
|
||||||
nfsMount = (server: nfsDisk: {
|
nfsMount = server: nfsDisk: {
|
||||||
device = "${server}:/${nfsDisk}";
|
device = "${server}:/${nfsDisk}";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
options = [ "x-systemd.automount" "noauto" "x-systemd.idle-timeout=600" ];
|
options = [ "x-systemd.automount" "noauto" "x-systemd.idle-timeout=600" ];
|
||||||
});
|
};
|
||||||
btrfsMount = subvol: {
|
btrfsMount = subvol: {
|
||||||
device = "/dev/mapper/nvme";
|
device = "/dev/mapper/nvme";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
lib.nameValuePair "${script.name}"
|
lib.nameValuePair "${script.name}"
|
||||||
(lib.mkIf (script.enable && script.service) {
|
(lib.mkIf (script.enable && script.service) {
|
||||||
restartIfChanged = true;
|
restartIfChanged = true;
|
||||||
description = script.description;
|
inherit (script) description;
|
||||||
wantedBy = [ "default.target" ];
|
wantedBy = [ "default.target" ];
|
||||||
path = [ pkgs.nix script.package ];
|
path = [ pkgs.nix script.package ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
@ -51,7 +51,7 @@
|
|||||||
lib.nameValuePair "${script.name}"
|
lib.nameValuePair "${script.name}"
|
||||||
(lib.mkIf (script.enable && script.service) {
|
(lib.mkIf (script.enable && script.service) {
|
||||||
enable = true;
|
enable = true;
|
||||||
description = script.description;
|
inherit (script) description;
|
||||||
wantedBy = [ "timers.target" ];
|
wantedBy = [ "timers.target" ];
|
||||||
timerConfig = { OnCalendar = script.timer; };
|
timerConfig = { OnCalendar = script.timer; };
|
||||||
})) config.my.scripts;
|
})) config.my.scripts;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{ lib, config, pkgs, serviceBase, ... }:
|
{ lib, config, pkgs, serviceBase, ... }:
|
||||||
let
|
let
|
||||||
localhost = config.my.localhost;
|
inherit (config.my) localhost;
|
||||||
port = 8096;
|
port = 8096;
|
||||||
in {
|
in {
|
||||||
options.my.servers.jellyfin = {
|
options.my.servers.jellyfin = {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{ lib, config, pkgs, ... }:
|
{ lib, config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
localhost = config.my.localhost;
|
inherit (config.my) localhost;
|
||||||
collaboraPort = 9980;
|
collaboraPort = 9980;
|
||||||
url = "cloud.${config.my.domain}";
|
url = "cloud.${config.my.domain}";
|
||||||
collaboraProxy = "http://${localhost}:${toString collaboraPort}";
|
collaboraProxy = "http://${localhost}:${toString collaboraPort}";
|
||||||
@ -36,7 +36,7 @@ in {
|
|||||||
users.users.nextcloud = {
|
users.users.nextcloud = {
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
extraGroups = [ "render" ];
|
extraGroups = [ "render" ];
|
||||||
packages = (with pkgs; [
|
packages = with pkgs; [
|
||||||
mediainfo
|
mediainfo
|
||||||
nodejs
|
nodejs
|
||||||
(python3.withPackages (ps: with ps; [ tensorflow ]))
|
(python3.withPackages (ps: with ps; [ tensorflow ]))
|
||||||
@ -49,7 +49,7 @@ in {
|
|||||||
hash = "sha256-TLJSJEXMPj870TkExq6uraX8Wl4kmNerrSlX3LQsr/4=";
|
hash = "sha256-TLJSJEXMPj870TkExq6uraX8Wl4kmNerrSlX3LQsr/4=";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
]);
|
];
|
||||||
};
|
};
|
||||||
programs.msmtp = {
|
programs.msmtp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@ -35,7 +35,7 @@ in {
|
|||||||
ensureDatabases = dbNames;
|
ensureDatabases = dbNames;
|
||||||
package = pkgs.postgresql_16;
|
package = pkgs.postgresql_16;
|
||||||
ensureUsers = map (name: {
|
ensureUsers = map (name: {
|
||||||
name = name;
|
inherit name;
|
||||||
ensureDBOwnership = true;
|
ensureDBOwnership = true;
|
||||||
}) dbNames;
|
}) dbNames;
|
||||||
authentication = pkgs.lib.mkOverride 10 ''
|
authentication = pkgs.lib.mkOverride 10 ''
|
||||||
|
|||||||
12
overlay.nix
12
overlay.nix
@ -21,12 +21,12 @@ _self: super: {
|
|||||||
nerdfonts = super.nerdfonts.override {
|
nerdfonts = super.nerdfonts.override {
|
||||||
fonts = [ "CascadiaCode" "ComicShannsMono" "Iosevka" ];
|
fonts = [ "CascadiaCode" "ComicShannsMono" "Iosevka" ];
|
||||||
};
|
};
|
||||||
jellyfin = pkgsJ.jellyfin;
|
inherit (pkgsJ) jellyfin;
|
||||||
planify = pkgsU.planify;
|
inherit (pkgsU) planify;
|
||||||
gdtoolkit = pkgsU.gdtoolkit;
|
inherit (pkgsU) gdtoolkit;
|
||||||
gallery-dl = pkgsM.gallery-dl;
|
inherit (pkgsM) gallery-dl;
|
||||||
yt-dlp = pkgsM.yt-dlp;
|
inherit (pkgsM) yt-dlp;
|
||||||
ns-usbloader = pkgsU.ns-usbloader;
|
inherit (pkgsU) ns-usbloader;
|
||||||
handbrake = super.handbrake.override { useGtk = true; };
|
handbrake = super.handbrake.override { useGtk = true; };
|
||||||
discord = super.discord.override { withOpenASAR = true; };
|
discord = super.discord.override { withOpenASAR = true; };
|
||||||
ripgrep = super.ripgrep.override { withPCRE2 = true; };
|
ripgrep = super.ripgrep.override { withPCRE2 = true; };
|
||||||
|
|||||||
@ -45,8 +45,8 @@ stdenv.mkDerivation rec {
|
|||||||
++ lib.optional enableFdk "-DENABLE_FDK=ON";
|
++ lib.optional enableFdk "-DENABLE_FDK=ON";
|
||||||
|
|
||||||
postPatch = let
|
postPatch = let
|
||||||
branchCaptialized =
|
branchCaptialized = lib.toUpper (lib.substring 0 1 branch)
|
||||||
(lib.toUpper (lib.substring 0 1 branch) + lib.substring 1 (-1) branch);
|
+ lib.substring 1 (-1) branch;
|
||||||
in ''
|
in ''
|
||||||
# Fix file not found when looking in var/empty instead of opt
|
# Fix file not found when looking in var/empty instead of opt
|
||||||
mkdir externals/dynarmic/src/dynarmic/ir/var
|
mkdir externals/dynarmic/src/dynarmic/ir/var
|
||||||
|
|||||||
@ -8,22 +8,21 @@ let
|
|||||||
polymc = let
|
polymc = let
|
||||||
binpath = lib.makeBinPath [ xorg.xrandr glxinfo pciutils ];
|
binpath = lib.makeBinPath [ xorg.xrandr glxinfo pciutils ];
|
||||||
|
|
||||||
libpath = with xorg;
|
libpath = lib.makeLibraryPath [
|
||||||
lib.makeLibraryPath [
|
xorg.libX11
|
||||||
libX11
|
xorg.libXext
|
||||||
libXext
|
xorg.libXcursor
|
||||||
libXcursor
|
xorg.libXrandr
|
||||||
libXrandr
|
xorg.libXxf86vm
|
||||||
libXxf86vm
|
libpulseaudio
|
||||||
libpulseaudio
|
libGL
|
||||||
libGL
|
vulkan-loader
|
||||||
vulkan-loader
|
glfw
|
||||||
glfw
|
openal
|
||||||
openal
|
udev
|
||||||
udev
|
flite
|
||||||
flite
|
stdenv.cc.cc.lib
|
||||||
stdenv.cc.cc.lib
|
];
|
||||||
];
|
|
||||||
|
|
||||||
gameLibraryPath = libpath + ":${addOpenGLRunpath.driverLink}/lib";
|
gameLibraryPath = libpath + ":${addOpenGLRunpath.driverLink}/lib";
|
||||||
|
|
||||||
@ -84,7 +83,7 @@ let
|
|||||||
, withWaylandGLFW ? false, withMangohud ? true, withGamemode ? true }:
|
, withWaylandGLFW ? false, withMangohud ? true, withGamemode ? true }:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "${polymc.pname}-wrapped";
|
pname = "${polymc.pname}-wrapped";
|
||||||
version = polymc.version;
|
inherit (polymc) version;
|
||||||
libsPath = (lib.makeLibraryPath
|
libsPath = (lib.makeLibraryPath
|
||||||
(extraLibs ++ lib.optional withGamemode gamemode.lib))
|
(extraLibs ++ lib.optional withGamemode gamemode.lib))
|
||||||
+ lib.optionalString withMangohud "${mangohud + "/lib/mangohud"}";
|
+ lib.optionalString withMangohud "${mangohud + "/lib/mangohud"}";
|
||||||
@ -119,7 +118,7 @@ let
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
meta = polymc.meta;
|
inherit (polymc) meta;
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user