fmt: alejandra

This commit is contained in:
♥ Minnie ♥ 2024-08-08 09:02:42 +08:00
parent 53378cdfc9
commit 3350d19a45
Signed by: jasmine
GPG key ID: 8563E358D4E8040E
79 changed files with 432 additions and 511 deletions

View file

@ -31,8 +31,12 @@
nixvim.url = "git+https://git.sajenim.dev/jasmine/nvim.nix.git"; nixvim.url = "git+https://git.sajenim.dev/jasmine/nvim.nix.git";
}; };
outputs = { self, nixpkgs, home-manager, ... }@inputs: outputs = {
let self,
nixpkgs,
home-manager,
...
} @ inputs: let
inherit (self) outputs; inherit (self) outputs;
# Supported systems for your flake packages, shell, etc. # Supported systems for your flake packages, shell, etc.
systems = [ systems = [
@ -45,8 +49,7 @@
# This is a function that generates an attribute by calling a function you # This is a function that generates an attribute by calling a function you
# pass to it, with each system as an argument # pass to it, with each system as an argument
forAllSystems = nixpkgs.lib.genAttrs systems; forAllSystems = nixpkgs.lib.genAttrs systems;
in in {
{
# Your custom packages # Your custom packages
# Acessible through 'nix build', 'nix shell', etc # Acessible through 'nix build', 'nix shell', etc
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system}); packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
imports = [ imports = [
./git.nix ./git.nix
./nvim.nix ./nvim.nix

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
home.packages = with pkgs; [ home.packages = with pkgs; [
lazygit lazygit
]; ];

View file

@ -1,7 +1,8 @@
{ inputs, pkgs, ... }:
{ {
inputs,
pkgs,
...
}: {
# Install our nixvim configuration for neovim. # Install our nixvim configuration for neovim.
home.packages = [inputs.nixvim.packages.${pkgs.system}.default]; home.packages = [inputs.nixvim.packages.${pkgs.system}.default];
} }

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
home.packages = with pkgs; [ home.packages = with pkgs; [
fzf # command-line fuzzy finder fzf # command-line fuzzy finder
]; ];
@ -66,4 +64,3 @@
''; '';
}; };
} }

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: let
let
awesome = pkgs.awesome.overrideAttrs (oa: { awesome = pkgs.awesome.overrideAttrs (oa: {
version = "ad0290bc1aac3ec2391aa14784146a53ebf9d1f0"; version = "ad0290bc1aac3ec2391aa14784146a53ebf9d1f0";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
@ -15,10 +14,12 @@ let
patchShebangs tests/examples/_postprocess.lua patchShebangs tests/examples/_postprocess.lua
''; '';
}); });
in in {
{
xdg.configFile = { xdg.configFile = {
awesome = { source = ./config; recursive = true; }; awesome = {
source = ./config;
recursive = true;
};
}; };
xsession.windowManager.awesome = { xsession.windowManager.awesome = {
@ -26,4 +27,3 @@ in
package = awesome; package = awesome;
}; };
} }

View file

@ -1,6 +1,8 @@
{ inputs, pkgs, ... }:
{ {
inputs,
pkgs,
...
}: {
imports = [ imports = [
./discord ./discord
./rofi ./rofi

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
nixpkgs.overlays = [ nixpkgs.overlays = [
(final: prev: { (final: prev: {
discord = prev.discord.override {withOpenASAR = true;}; discord = prev.discord.override {withOpenASAR = true;};

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
home.packages = with pkgs; [ home.packages = with pkgs; [
# protonmail-bridge requires password manager # protonmail-bridge requires password manager
pass pass
@ -115,4 +113,3 @@
]; ];
}; };
} }

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
home.packages = with pkgs; [ home.packages = with pkgs; [
weechat weechat
]; ];
@ -16,4 +14,3 @@
]; ];
}; };
} }

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
services.mpd = { services.mpd = {
enable = true; enable = true;
musicDirectory = "nfs://viridian.kanto.dev/srv/multimedia/library/music"; musicDirectory = "nfs://viridian.kanto.dev/srv/multimedia/library/music";

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
services.picom = { services.picom = {
enable = true; enable = true;
shadow = true; shadow = true;

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
programs.rofi = { programs.rofi = {
enable = true; enable = true;
font = "Fisa Code 10"; font = "Fisa Code 10";
@ -16,4 +14,3 @@
recursive = true; recursive = true;
}; };
} }

View file

@ -1,12 +1,12 @@
{ pkgs, ... }: {pkgs, ...}: {
{
home.packages = with pkgs.unstable; [ home.packages = with pkgs.unstable; [
wezterm wezterm
]; ];
xdg.configFile = { xdg.configFile = {
wezterm = { source = ./config; recursive = true; }; wezterm = {
source = ./config;
recursive = true;
};
}; };
} }

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
imports = [ imports = [
./mangohud.nix ./mangohud.nix
]; ];

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
programs.mangohud = { programs.mangohud = {
enable = true; enable = true;
package = pkgs.mangohud; package = pkgs.mangohud;

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
home = { home = {
packages = with pkgs; [ packages = with pkgs; [
blender blender

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
imports = [ imports = [
./global ./global
./features/desktop ./features/desktop
@ -51,4 +49,3 @@
}; };
}; };
} }

View file

@ -1,4 +1,8 @@
{ inputs, outputs, ... }: { {
inputs,
outputs,
...
}: {
imports = [ imports = [
inputs.impermanence.nixosModules.home-manager.impermanence inputs.impermanence.nixosModules.home-manager.impermanence
../features/cli ../features/cli
@ -12,7 +16,7 @@
]; ];
config = { config = {
allowUnfree = true; allowUnfree = true;
allowUnfreePredicate = (_: true); allowUnfreePredicate = _: true;
}; };
}; };

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./global ./global
]; ];

View file

@ -1,6 +1,5 @@
# Add your reusable home-manager modules to this directory, on their own file (https://nixos.wiki/wiki/Module). # Add your reusable home-manager modules to this directory, on their own file (https://nixos.wiki/wiki/Module).
# These should be stuff you would like to share with others, not your personal configurations. # These should be stuff you would like to share with others, not your personal configurations.
{ {
# List your module files here # List your module files here
# my-module = import ./my-module.nix; # my-module = import ./my-module.nix;

View file

@ -1,6 +1,5 @@
# Add your reusable NixOS modules to this directory, on their own file (https://nixos.wiki/wiki/Module). # Add your reusable NixOS modules to this directory, on their own file (https://nixos.wiki/wiki/Module).
# These should be stuff you would like to share with others, not your personal configurations. # These should be stuff you would like to share with others, not your personal configurations.
{ {
# List your module files here # List your module files here
# my-module = import ./my-module.nix; # my-module = import ./my-module.nix;

View file

@ -1,8 +1,11 @@
{ config, pkgs, inputs, ... }:
let
hostname = config.networking.hostName;
in
{ {
config,
pkgs,
inputs,
...
}: let
hostname = config.networking.hostName;
in {
imports = [ imports = [
inputs.agenix.nixosModules.default inputs.agenix.nixosModules.default
inputs.agenix-rekey.nixosModules.default inputs.agenix-rekey.nixosModules.default

View file

@ -1,6 +1,4 @@
{ outputs, ... }: {outputs, ...}: {
{
imports = [ imports = [
./age.nix ./age.nix
./env.nix ./env.nix

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
environment = { environment = {
binsh = "${pkgs.bash}/bin/bash"; binsh = "${pkgs.bash}/bin/bash";
shells = with pkgs; [zsh]; shells = with pkgs; [zsh];

View file

@ -1,6 +1,9 @@
{ config, inputs, lib, ... }:
{ {
config,
inputs,
lib,
...
}: {
nix = { nix = {
gc = { gc = {
# Automatically run the garbage collector an a specified time. # Automatically run the garbage collector an a specified time.

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
services.openssh = { services.openssh = {
enable = true; enable = true;
settings = { settings = {

View file

@ -1,8 +1,10 @@
{ lib, config, ... }:
let
hostname = config.networking.hostName;
in
{ {
lib,
config,
...
}: let
hostname = config.networking.hostName;
in {
imports = [ imports = [
./persist.nix ./persist.nix
]; ];

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# Enables files to be encrypted to age identities stored on YubiKeys # Enables files to be encrypted to age identities stored on YubiKeys
age-plugin-yubikey age-plugin-yubikey

View file

@ -1,6 +1,4 @@
{ inputs, ... }: {inputs, ...}: {
{
imports = [ imports = [
inputs.impermanence.nixosModules.impermanence inputs.impermanence.nixosModules.impermanence
]; ];

View file

@ -1,6 +1,10 @@
{ inputs, outputs, pkgs, config, ... }:
{ {
inputs,
outputs,
pkgs,
config,
...
}: {
imports = [ imports = [
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
]; ];

View file

@ -1,6 +1,8 @@
{ pkgs, config, ... }:
{ {
pkgs,
config,
...
}: {
age.secrets.smb-secrets = { age.secrets.smb-secrets = {
rekeyFile = ./smb-secrets.age; rekeyFile = ./smb-secrets.age;
}; };
@ -14,7 +16,6 @@
options = let options = let
# this line prevents hanging on network split # this line prevents hanging on network split
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users";
in ["${automount_opts},credentials=/etc/nixos/smb-secrets,uid=1000,gid=100"]; in ["${automount_opts},credentials=/etc/nixos/smb-secrets,uid=1000,gid=100"];
}; };
@ -22,4 +23,3 @@
"nixos/smb-secrets".source = config.age.secrets.smb-secrets.path; "nixos/smb-secrets".source = config.age.secrets.smb-secrets.path;
}; };
} }

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
fileSystems."/home/sajenim/.local/share/Steam" = { fileSystems."/home/sajenim/.local/share/Steam" = {
device = "/dev/disk/by-label/data"; device = "/dev/disk/by-label/data";
fsType = "btrfs"; fsType = "btrfs";

View file

@ -1,6 +1,8 @@
{ inputs, pkgs, ... }:
{ {
inputs,
pkgs,
...
}: {
imports = [ imports = [
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
]; ];

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
imports = [ imports = [
../common/global ../common/global
@ -15,7 +13,7 @@
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
/* Boot configuration */ # Boot configuration
boot = { boot = {
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
kernelParams = [ kernelParams = [
@ -26,7 +24,7 @@
initrd.kernelModules = ["amdgpu"]; initrd.kernelModules = ["amdgpu"];
}; };
/* Hardware configuration */ # Hardware configuration
hardware = { hardware = {
bluetooth = { bluetooth = {
enable = true; enable = true;
@ -49,7 +47,7 @@
}; };
}; };
/* Networking configuration */ # Networking configuration
networking = { networking = {
hostName = "fuchsia"; hostName = "fuchsia";
networkmanager.enable = true; networkmanager.enable = true;

View file

@ -1,6 +1,8 @@
{ config, lib, ... }:
{ {
config,
lib,
...
}: {
imports = [ imports = [
../common/optional/ephemeral-btrfs.nix ../common/optional/ephemeral-btrfs.nix
]; ];
@ -25,7 +27,8 @@
}; };
swapDevices = [ swapDevices = [
{ device = "/swap/swapfile"; {
device = "/swap/swapfile";
size = 16 * 1024; size = 16 * 1024;
} }
]; ];

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
programs = { programs = {
zsh.enable = true; zsh.enable = true;
# Load and unload environment variables. # Load and unload environment variables.
@ -9,4 +7,3 @@
adb.enable = true; adb.enable = true;
}; };
} }

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
# Our custom power state # Our custom power state
environment.etc = { environment.etc = {
"default/amdgpu-custom-states.card0" = { "default/amdgpu-custom-states.card0" = {
@ -28,4 +26,3 @@
# Install our overclocking script. # Install our overclocking script.
environment.systemPackages = with pkgs; [amdgpu-clocks]; environment.systemPackages = with pkgs; [amdgpu-clocks];
} }

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./amdgpu-clocks.nix ./amdgpu-clocks.nix
./flatpak.nix ./flatpak.nix

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
# Required to install flatpak # Required to install flatpak
xdg.portal = { xdg.portal = {
enable = true; enable = true;

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
services.libinput = { services.libinput = {
enable = true; enable = true;
mouse = {accelProfile = "flat";}; mouse = {accelProfile = "flat";};

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
# Get up and running with large language models locally. # Get up and running with large language models locally.
services.ollama = { services.ollama = {
enable = true; enable = true;

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
# Enable necessary udev rules. # Enable necessary udev rules.
services.udev.packages = with pkgs; [ services.udev.packages = with pkgs; [
openrgb openrgb

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
# Setup our display server # Setup our display server
services.xserver = { services.xserver = {
enable = true; enable = true;

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
imports = [ imports = [
../common/global ../common/global
../common/users/sajenim ../common/users/sajenim
@ -65,4 +63,3 @@
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "24.05"; system.stateVersion = "24.05";
} }

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./jellyfin.nix ./jellyfin.nix
./jellyseerr.nix ./jellyseerr.nix

View file

@ -1,8 +1,6 @@
{ ... }: {...}: let
let
port = "8096"; port = "8096";
in in {
{
virtualisation.oci-containers.containers = { virtualisation.oci-containers.containers = {
# Volunteer-built media solution that puts you in control of your media # Volunteer-built media solution that puts you in control of your media
jellyfin = { jellyfin = {
@ -52,4 +50,3 @@ in
]; ];
}; };
} }

View file

@ -1,8 +1,6 @@
{ ... }: {...}: let
let
port = "5055"; port = "5055";
in in {
{
virtualisation.oci-containers.containers = { virtualisation.oci-containers.containers = {
# Request management # Request management
jellyseerr = { jellyseerr = {
@ -43,4 +41,3 @@ in
]; ];
}; };
} }

View file

@ -1,8 +1,6 @@
{ ... }: {...}: let
let
port = "8686"; port = "8686";
in in {
{
virtualisation.oci-containers.containers = { virtualisation.oci-containers.containers = {
# # Music collection manager for Usenet and BitTorrent users # # Music collection manager for Usenet and BitTorrent users
lidarr = { lidarr = {
@ -46,4 +44,3 @@ in
]; ];
}; };
} }

View file

@ -1,8 +1,6 @@
{ ... }: {...}: let
let
port = "9925"; port = "9925";
in in {
{
virtualisation.oci-containers.containers = { virtualisation.oci-containers.containers = {
mealie = { mealie = {
autoStart = true; autoStart = true;
@ -46,6 +44,4 @@ in
{url = "http://127.0.0.1:${port}";} {url = "http://127.0.0.1:${port}";}
]; ];
}; };
} }

View file

@ -1,8 +1,6 @@
{ config, ... }: {config, ...}: let
let
port = "8181"; port = "8181";
in in {
{
age.secrets.microbin = { age.secrets.microbin = {
# Environment variables for microbin # Environment variables for microbin
rekeyFile = ./environment.age; rekeyFile = ./environment.age;
@ -47,4 +45,3 @@ in
]; ];
}; };
} }

View file

@ -1,8 +1,6 @@
{ ... }: {...}: let
let
port = "9696"; port = "9696";
in in {
{
virtualisation.oci-containers.containers = { virtualisation.oci-containers.containers = {
# Indexer manager/proxy built on the popular arr .net/reactjs base stack to integrate with your various PVR apps. # Indexer manager/proxy built on the popular arr .net/reactjs base stack to integrate with your various PVR apps.
prowlarr = { prowlarr = {
@ -43,4 +41,3 @@ in
]; ];
}; };
} }

View file

@ -1,8 +1,6 @@
{ ... }: {...}: let
let
port = "8487"; port = "8487";
in in {
{
virtualisation.oci-containers.containers = { virtualisation.oci-containers.containers = {
# # Open-source software alternative to µTorrent # # Open-source software alternative to µTorrent
qbittorrent = { qbittorrent = {
@ -46,4 +44,3 @@ in
]; ];
}; };
} }

View file

@ -1,8 +1,6 @@
{ ... }: {...}: let
let
port = "7878"; port = "7878";
in in {
{
virtualisation.oci-containers.containers = { virtualisation.oci-containers.containers = {
# Movie collection manager for Usenet and BitTorrent users # Movie collection manager for Usenet and BitTorrent users
radarr = { radarr = {
@ -45,4 +43,3 @@ in
]; ];
}; };
} }

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
virtualisation.oci-containers.containers = { virtualisation.oci-containers.containers = {
# Automatically synchronize recommended settings from the TRaSH guides to your Sonarr/Radarr instances # Automatically synchronize recommended settings from the TRaSH guides to your Sonarr/Radarr instances
recyclarr = { recyclarr = {

View file

@ -1,8 +1,6 @@
{ ... }: {...}: let
let
port = "8989"; port = "8989";
in in {
{
virtualisation.oci-containers.containers = { virtualisation.oci-containers.containers = {
# PVR for Usenet and BitTorrent users # PVR for Usenet and BitTorrent users
sonarr = { sonarr = {
@ -46,4 +44,3 @@ in
]; ];
}; };
} }

View file

@ -1,8 +1,10 @@
{ config, lib, ... }:
let
hostname = config.networking.hostName;
in
{ {
config,
lib,
...
}: let
hostname = config.networking.hostName;
in {
imports = [ imports = [
../common/optional/ephemeral-btrfs.nix ../common/optional/ephemeral-btrfs.nix
]; ];
@ -56,7 +58,8 @@ in
}; };
swapDevices = [ swapDevices = [
{ device = "/swap/swapfile"; {
device = "/swap/swapfile";
size = 16 * 1024; size = 16 * 1024;
} }
]; ];

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
services.borgbackup.jobs = { services.borgbackup.jobs = {
containers = { containers = {
paths = [ paths = [
@ -33,4 +31,3 @@
}; };
}; };
} }

View file

@ -1,8 +1,11 @@
{ config, inputs, pkgs, ... }:
let
port = "8080";
in
{ {
config,
inputs,
pkgs,
...
}: let
port = "8080";
in {
imports = [ imports = [
inputs.crowdsec.nixosModules.crowdsec inputs.crowdsec.nixosModules.crowdsec
inputs.crowdsec.nixosModules.crowdsec-firewall-bouncer inputs.crowdsec.nixosModules.crowdsec-firewall-bouncer
@ -86,9 +89,12 @@ in
environment.persistence."/persist" = { environment.persistence."/persist" = {
directories = [ directories = [
{ directory = "/var/lib/crowdsec"; user = "crowdsec"; group = "crowdsec"; } {
directory = "/var/lib/crowdsec";
user = "crowdsec";
group = "crowdsec";
}
]; ];
hideMounts = true; hideMounts = true;
}; };
} }

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./traefik ./traefik
./crowdsec ./crowdsec

View file

@ -1,6 +1,4 @@
{ config, ... }: {config, ...}: {
{
services.forgejo = { services.forgejo = {
enable = true; enable = true;
stateDir = "/srv/services/forgejo"; stateDir = "/srv/services/forgejo";
@ -38,4 +36,3 @@
]; ];
}; };
} }

View file

@ -1,6 +1,4 @@
{ config, ... }: {config, ...}: {
{
# Setup grafana our grafana instance. # Setup grafana our grafana instance.
services.grafana = { services.grafana = {
enable = true; enable = true;
@ -24,12 +22,14 @@
# Setup our database for grafana. # Setup our database for grafana.
services.mysql = { services.mysql = {
ensureUsers = [{ ensureUsers = [
{
name = "grafana"; name = "grafana";
ensurePermissions = { ensurePermissions = {
"grafana.*" = "ALL PRIVILEGES"; "grafana.*" = "ALL PRIVILEGES";
}; };
}]; }
];
ensureDatabases = ["grafana"]; ensureDatabases = ["grafana"];
}; };

View file

@ -1,6 +1,4 @@
{ config, ... }: {config, ...}: {
{
services.lighttpd = { services.lighttpd = {
enable = true; enable = true;
port = 5624; port = 5624;
@ -27,4 +25,3 @@
]; ];
}; };
} }

View file

@ -1,5 +1,10 @@
{ inputs, pkgs, lib, config, ... }: {
let inputs,
pkgs,
lib,
config,
...
}: let
modpack = pkgs.fetchPackwizModpack rec { modpack = pkgs.fetchPackwizModpack rec {
version = "7091175a49"; version = "7091175a49";
url = "https://git.sajenim.dev/jasmine/minecraft-modpack/raw/commit/${version}/pack.toml"; url = "https://git.sajenim.dev/jasmine/minecraft-modpack/raw/commit/${version}/pack.toml";
@ -8,8 +13,7 @@ let
mcVersion = modpack.manifest.versions.minecraft; mcVersion = modpack.manifest.versions.minecraft;
fabricVersion = modpack.manifest.versions.fabric; fabricVersion = modpack.manifest.versions.fabric;
serverVersion = lib.replaceStrings ["."] ["_"] "fabric-${mcVersion}"; serverVersion = lib.replaceStrings ["."] ["_"] "fabric-${mcVersion}";
in in {
{
imports = [ imports = [
inputs.nix-minecraft.nixosModules.minecraft-servers inputs.nix-minecraft.nixosModules.minecraft-servers
]; ];
@ -94,4 +98,3 @@ in
]; ];
}; };
} }

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
services.mpd = { services.mpd = {
enable = true; enable = true;
musicDirectory = "/srv/multimedia/library/music"; musicDirectory = "/srv/multimedia/library/music";

View file

@ -1,10 +1,7 @@
{ pkgs, ... }: {pkgs, ...}: {
{
services.mysql = { services.mysql = {
enable = true; enable = true;
package = pkgs.mariadb; package = pkgs.mariadb;
dataDir = "/srv/services/mysql"; dataDir = "/srv/services/mysql";
}; };
} }

View file

@ -1,6 +1,4 @@
{ config, ... }: {config, ...}: {
{
services.prometheus = { services.prometheus = {
enable = true; enable = true;
port = 9001; # Port to listen on. port = 9001; # Port to listen on.
@ -23,11 +21,12 @@
scrapeConfigs = [ scrapeConfigs = [
{ {
job_name = "node"; job_name = "node";
static_configs = [{ static_configs = [
{
targets = ["127.0.0.1:${toString config.services.prometheus.exporters.node.port}"]; targets = ["127.0.0.1:${toString config.services.prometheus.exporters.node.port}"];
}]; }
];
} }
]; ];
}; };
} }

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
services.samba = { services.samba = {
enable = true; enable = true;
securityType = "user"; securityType = "user";

View file

@ -1,6 +1,9 @@
{ inputs, config, pkgs, ... }:
{ {
inputs,
config,
pkgs,
...
}: {
disabledModules = ["services/web-servers/traefik.nix"]; disabledModules = ["services/web-servers/traefik.nix"];
imports = [ imports = [
@ -86,11 +89,13 @@
# List of domains in our network # List of domains in our network
domains = [ domains = [
# Internal services # Internal services
{ main = "kanto.dev"; {
main = "kanto.dev";
sans = ["*.kanto.dev"]; sans = ["*.kanto.dev"];
} }
# Public services # Public services
{ main = "sajenim.dev"; {
main = "sajenim.dev";
sans = ["*.sajenim.dev"]; sans = ["*.sajenim.dev"];
} }
]; ];
@ -144,20 +149,33 @@
services.prometheus.scrapeConfigs = [ services.prometheus.scrapeConfigs = [
{ {
job_name = "traefik"; job_name = "traefik";
static_configs = [{ static_configs = [
{
targets = ["127.0.0.1:8082"]; targets = ["127.0.0.1:8082"];
}]; }
];
} }
]; ];
# Persist our traefik data & logs # Persist our traefik data & logs
environment.persistence."/persist" = { environment.persistence."/persist" = {
directories = [ directories = [
{ directory = "/var/lib/traefik"; user = "traefik"; group = "traefik"; } {
{ directory = "/var/log/traefik"; user = "traefik"; group = "traefik"; } directory = "/var/lib/traefik";
{ directory = "/plugins-storage"; user = "traefik"; group = "traefik"; } user = "traefik";
group = "traefik";
}
{
directory = "/var/log/traefik";
user = "traefik";
group = "traefik";
}
{
directory = "/plugins-storage";
user = "traefik";
group = "traefik";
}
]; ];
hideMounts = true; hideMounts = true;
}; };
} }

View file

@ -1,6 +1,4 @@
{ config, ... }: {config, ...}: {
{
# Crowdsec Local API key for the bouncer. # Crowdsec Local API key for the bouncer.
age.secrets.traefik-bouncer-key = { age.secrets.traefik-bouncer-key = {
rekeyFile = ../crowdsec/traefik-bouncer-key.age; rekeyFile = ../crowdsec/traefik-bouncer-key.age;
@ -57,4 +55,3 @@
}; };
}; };
} }

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
services.traefik.dynamicConfigOptions.http.routers = { services.traefik.dynamicConfigOptions.http.routers = {
traefik-dashboard = { traefik-dashboard = {
rule = "Host(`traefik.kanto.dev`)"; rule = "Host(`traefik.kanto.dev`)";
@ -25,4 +23,3 @@
}; };
}; };
} }

View file

@ -1,10 +1,7 @@
{ ... }: {...}: {
{
services.traefik.dynamicConfigOptions.http.services = { services.traefik.dynamicConfigOptions.http.services = {
ender1.loadBalancer.servers = [ ender1.loadBalancer.servers = [
{url = "http://192.168.1.103:80";} {url = "http://192.168.1.103:80";}
]; ];
}; };
} }

View file

@ -1,7 +1,5 @@
# This file defines overlays # This file defines overlays
{ inputs, ... }: {inputs, ...}: {
{
# This one brings our custom packages from the 'pkgs' directory # This one brings our custom packages from the 'pkgs' directory
additions = final: _prev: import ../pkgs final.pkgs; additions = final: _prev: import ../pkgs final.pkgs;

View file

@ -1,9 +1,10 @@
{ stdenv {
, lib stdenv,
, fetchFromGitHub lib,
, bash fetchFromGitHub,
, subversion bash,
, makeWrapper subversion,
makeWrapper,
}: }:
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "amdgpu-clocks"; pname = "amdgpu-clocks";
@ -24,4 +25,3 @@
--prefix PATH : ${lib.makeBinPath [bash subversion]} --prefix PATH : ${lib.makeBinPath [bash subversion]}
''; '';
} }

View file

@ -1,6 +1,5 @@
# Custom packages, that can be defined similarly to ones from nixpkgs # Custom packages, that can be defined similarly to ones from nixpkgs
# You can build them using 'nix build .#example' # You can build them using 'nix build .#example'
pkgs: { pkgs: {
xmobar = pkgs.callPackage ./xmobar-config {}; xmobar = pkgs.callPackage ./xmobar-config {};
xmonad = pkgs.callPackage ./xmonad-config {}; xmonad = pkgs.callPackage ./xmonad-config {};

View file

@ -1,5 +1,4 @@
{pkgs}: {pkgs}:
pkgs.haskellPackages.developPackage { pkgs.haskellPackages.developPackage {
root = ./.; root = ./.;
} }

View file

@ -1,12 +1,10 @@
{pkgs}: {pkgs}:
pkgs.haskellPackages.developPackage { pkgs.haskellPackages.developPackage {
root = ./.; root = ./.;
source-overrides = { source-overrides = {
xmonad = (builtins.fetchTarball { xmonad = builtins.fetchTarball {
url = "https://github.com/xmonad/xmonad/archive/refs/tags/v0.18.0.tar.gz"; url = "https://github.com/xmonad/xmonad/archive/refs/tags/v0.18.0.tar.gz";
sha256 = "0jlc60n5jarcxgjxm1vcsgc3s2lwmn3c3n56hialhzx54wfskkbc"; sha256 = "0jlc60n5jarcxgjxm1vcsgc3s2lwmn3c3n56hialhzx54wfskkbc";
}); };
}; };
} }