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