chore: rm all files for rebase
This commit is contained in:
parent
fc8fcbe680
commit
f60dfaa95e
79 changed files with 0 additions and 3770 deletions
|
@ -1,59 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
let
|
||||
moduleName = "boot-config";
|
||||
cfg = config."${moduleName}";
|
||||
in
|
||||
{
|
||||
options = {
|
||||
"${moduleName}" = {
|
||||
enable = lib.mkEnableOption "Enable ${moduleName}.";
|
||||
bootloader = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
example = "systemd-boot";
|
||||
description = "What bootloader to use.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
boot = {
|
||||
loader =
|
||||
{
|
||||
timeout = 5;
|
||||
efi.canTouchEfiVariables = true;
|
||||
}
|
||||
// lib.mkIf (cfg.bootloader == "systemd-boot") {
|
||||
systemd-boot.enable = true;
|
||||
systemd-boot.configurationLimit = 5;
|
||||
};
|
||||
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
||||
initrd.availableKernelModules = [
|
||||
"9p"
|
||||
"9pnet_virtio"
|
||||
"ahci"
|
||||
"nvme"
|
||||
"rtsx_pci_sdmmc"
|
||||
"sd_mod"
|
||||
"sr_mod"
|
||||
"usb_storage"
|
||||
"usbhid"
|
||||
"virtio_blk"
|
||||
"virtio_mmio"
|
||||
"virtio_net"
|
||||
"virtio_pci"
|
||||
"virtio_scsi"
|
||||
"xhci_pci"
|
||||
];
|
||||
};
|
||||
services.dbus = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,86 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
moduleName = "de";
|
||||
cfg = config."${moduleName}";
|
||||
in
|
||||
{
|
||||
options = {
|
||||
"${moduleName}" = {
|
||||
enable = lib.mkEnableOption "Enable ${moduleName}.";
|
||||
type = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "hsjaia";
|
||||
example = "hyprland";
|
||||
description = "What desktop environment should be installed on the host.";
|
||||
};
|
||||
enableSunshine = lib.mkEnableOption "Enable streaming with Sunshine.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable (
|
||||
lib.mkMerge [
|
||||
{
|
||||
# Enable audio and other common config
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
extraConfig = { };
|
||||
jack.enable = true;
|
||||
pulse.enable = true;
|
||||
alsa = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
};
|
||||
};
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
}
|
||||
(lib.mkIf config.hmModules.enable {
|
||||
home-manager.users."${config.nixosModules.mainUser}".services.spotifyd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
global = {
|
||||
device_name = "${config.nixosModules.hostname}";
|
||||
device_type = "computer";
|
||||
zeroconf_port = 5353;
|
||||
};
|
||||
};
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ 5353 ];
|
||||
networking.firewall.allowedUDPPorts = [ 5353 ];
|
||||
})
|
||||
(lib.mkIf (cfg.type == "hyprland") {
|
||||
environment.loginShellInit = # sh
|
||||
''
|
||||
if [[ -z "$SSH_CLIENT" && -z "$SSH_CONNECTION" ]]; then
|
||||
if uwsm check may-start; then
|
||||
exec uwsm start hyprland-uwsm.desktop
|
||||
fi
|
||||
fi
|
||||
'';
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
withUWSM = true;
|
||||
};
|
||||
|
||||
})
|
||||
(lib.mkIf cfg.enableSunshine {
|
||||
services.sunshine = {
|
||||
enable = true;
|
||||
capSysAdmin = true;
|
||||
autoStart = true;
|
||||
openFirewall = true;
|
||||
settings = { };
|
||||
applications = { };
|
||||
};
|
||||
})
|
||||
]
|
||||
);
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
moduleName = "nixosModules";
|
||||
cfg = config."${moduleName}";
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./boot.nix
|
||||
./de.nix
|
||||
./hardware.nix
|
||||
./nix-config.nix
|
||||
./gaming.nix
|
||||
./filesystems.nix
|
||||
./networking.nix
|
||||
./services/glance.nix
|
||||
];
|
||||
|
||||
options = {
|
||||
"${moduleName}" = {
|
||||
enable = lib.mkEnableOption "Enable ${moduleName}.";
|
||||
hostname = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
example = "goron";
|
||||
description = "The name this machine will be known by.";
|
||||
};
|
||||
mainUser = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
example = "link";
|
||||
description = "The main user of pantheon.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable { };
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
moduleName = "fs-config";
|
||||
cfg = config."${moduleName}";
|
||||
in
|
||||
{
|
||||
options = {
|
||||
"${moduleName}" = {
|
||||
mountHeliosData = lib.mkEnableOption "Mount helios SMB share to /media/helios/data.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf cfg.mountHeliosData {
|
||||
fileSystems."/media/helios/data" = {
|
||||
device = "//helios/data";
|
||||
fsType = "cifs";
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
moduleName = "gaming";
|
||||
cfg = config."${moduleName}";
|
||||
in
|
||||
{
|
||||
options = {
|
||||
"${moduleName}" = {
|
||||
steam = {
|
||||
enable = lib.mkEnableOption "Enable Steam.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf cfg.steam.enable {
|
||||
programs.steam.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
steam-run
|
||||
wineWowPackages.stable
|
||||
wine64
|
||||
wineWowPackages.waylandFull
|
||||
protonup
|
||||
lutris
|
||||
heroic
|
||||
bottles
|
||||
];
|
||||
environment.sessionVariables = {
|
||||
STEAM_EXTRA_COMPAT_TOOLS_PATHS = "\${HOME}/.steam/root/compatibilitytools.d";
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
|
@ -1,88 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
moduleName = "hardware-config";
|
||||
cfg = config."${moduleName}";
|
||||
in
|
||||
{
|
||||
options = {
|
||||
"${moduleName}" = {
|
||||
cpu = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
example = "amd";
|
||||
description = "What CPU is being used.";
|
||||
};
|
||||
gpu = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
example = "nvidia";
|
||||
description = "What GPU is being used.";
|
||||
};
|
||||
usbAutoMount = lib.mkEnableOption "Enable auto mounting USB drives.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf (cfg.cpu != "") {
|
||||
nixpkgs.hostPlatform = lib.mkIf (cfg.cpu == "amd" || cfg.cpu == "intel") "x86_64-linux";
|
||||
# CPU Settings
|
||||
boot.kernelModules =
|
||||
lib.optionals (cfg.cpu == "intel") [ "kvm-intel" ]
|
||||
++ lib.optionals (cfg.cpu == "amd") [ "kvm-amd" ];
|
||||
hardware.cpu =
|
||||
lib.mkIf (cfg.cpu == "intel") { intel.updateMicrocode = true; }
|
||||
// lib.mkIf (cfg.cpu == "amd") { amd.updateMicrocode = true; };
|
||||
})
|
||||
(lib.mkIf (cfg.gpu == "nvidia") {
|
||||
# Accept the license by default; needed for some packages.
|
||||
nixpkgs.config.nvidia.acceptLicense = true;
|
||||
nix.settings = {
|
||||
substituters = [ "https://cuda-maintainers.cachix.org" ];
|
||||
trusted-public-keys = [
|
||||
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
|
||||
];
|
||||
};
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
environment.variables = {
|
||||
GBM_BACKEND = "nvidia-drm";
|
||||
LIBVA_DRIVER_NAME = "nvidia";
|
||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||
};
|
||||
hardware = {
|
||||
enableRedistributableFirmware = true;
|
||||
nvidia-container-toolkit.enable = true;
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
nvidia-vaapi-driver # hardware acceleration
|
||||
];
|
||||
};
|
||||
nvidia = {
|
||||
modesetting.enable = true;
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
nvidiaPersistenced = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.latest;
|
||||
};
|
||||
};
|
||||
boot.initrd.availableKernelModules = [
|
||||
"nvidia"
|
||||
"nvidia_modeset"
|
||||
"nvidia_uvm"
|
||||
"nvidia_drm"
|
||||
];
|
||||
})
|
||||
(lib.mkIf cfg.usbAutoMount {
|
||||
services.udisks2 = {
|
||||
enable = true;
|
||||
mountOnMedia = true;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
|
@ -1,74 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
moduleName = "nw-config";
|
||||
cfg = config."${moduleName}";
|
||||
in
|
||||
{
|
||||
options = {
|
||||
"${moduleName}" = {
|
||||
wol = {
|
||||
enable = lib.mkEnableOption "Enable wake on lan.";
|
||||
interface = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
example = "enp12s0";
|
||||
description = "What interface to enable wake on lan for.";
|
||||
};
|
||||
};
|
||||
backend = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
example = "networkmanager";
|
||||
description = "What software to use to manage your networks.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
{
|
||||
networking = {
|
||||
hostName = config.nixosModules.hostname;
|
||||
useDHCP = lib.mkDefault true;
|
||||
firewall.enable = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings.ClientAliveInterval = 60;
|
||||
settings.ClientAliveCountMax = 3;
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||
}
|
||||
{
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
authKeyFile = config.sops.secrets.ts_auth_key.path;
|
||||
};
|
||||
}
|
||||
(lib.mkIf (cfg.backend == "networkmanager") {
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
networkmanager.wifi.backend = "iwd";
|
||||
};
|
||||
})
|
||||
(lib.mkIf cfg.wol.enable {
|
||||
networking.interfaces."${cfg.wol.interface}".wakeOnLan = {
|
||||
enable = true;
|
||||
policy = [
|
||||
"phy"
|
||||
"unicast"
|
||||
"multicast"
|
||||
"broadcast"
|
||||
"arp"
|
||||
"magic"
|
||||
"secureon"
|
||||
];
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
moduleName = "nix-config";
|
||||
cfg = config."${moduleName}";
|
||||
in
|
||||
{
|
||||
options = {
|
||||
"${moduleName}" = {
|
||||
enable = lib.mkEnableOption "Enable ${moduleName}.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
system.stateVersion = "24.11";
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
nix.settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
"pipe-operators"
|
||||
];
|
||||
|
||||
trusted-users = [ "@wheel" ];
|
||||
|
||||
# Add binary caches to avoid having to compile them
|
||||
substituters = [
|
||||
"https://cache.nixos.org"
|
||||
"https://nix-community.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
};
|
||||
|
||||
programs.nix-ld.enable = true;
|
||||
};
|
||||
}
|
|
@ -1,108 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
moduleName = "service-glance";
|
||||
cfg = config."${moduleName}";
|
||||
|
||||
glancePort = 1227;
|
||||
homeColumn = {
|
||||
size = "full";
|
||||
widgets = [
|
||||
{
|
||||
title = "Services";
|
||||
type = "monitor";
|
||||
cache = "1m";
|
||||
sites = [
|
||||
# https://simpleicons.org/
|
||||
{
|
||||
title = "Gitea";
|
||||
icon = "si:gitea";
|
||||
url = "https://gitea.bwfiq.com";
|
||||
}
|
||||
{
|
||||
title = "LibreChat";
|
||||
icon = "si:googlechat";
|
||||
url = "https://chat.bwfiq.com";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
title = "Newsletters";
|
||||
type = "rss";
|
||||
style = "detailed-list";
|
||||
limit = 100000;
|
||||
feeds = [
|
||||
{
|
||||
title = "selfh.st";
|
||||
url = "https://selfh.st/rss/";
|
||||
}
|
||||
{
|
||||
title = "This Week in Rust";
|
||||
url = "https://this-week-in-rust.org/rss.xml";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
title = "Blogs";
|
||||
type = "rss";
|
||||
style = "detailed-list";
|
||||
limit = 100000;
|
||||
feeds = [
|
||||
{
|
||||
title = "Makefile.feld";
|
||||
url = "https://blog.feld.me/feeds/all.atom.xml";
|
||||
}
|
||||
{
|
||||
title = "Xe Iaso";
|
||||
url = "https://xeiaso.net/blog.rss";
|
||||
}
|
||||
{
|
||||
title = "Alex Haydock";
|
||||
url = "https://blog.infected.systems/posts/index.xml";
|
||||
}
|
||||
{
|
||||
title = "journix.dev";
|
||||
url = "https://journix.dev/feed.xml";
|
||||
}
|
||||
{
|
||||
title = "Venam's Blog";
|
||||
url = "https://venam.net/blog/feed.xml";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
options = {
|
||||
"${moduleName}" = {
|
||||
enable = lib.mkEnableOption "Enable ${moduleName}.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable (
|
||||
lib.mkMerge [
|
||||
{
|
||||
networking.firewall.allowedTCPPorts = [ glancePort ];
|
||||
services.glance = {
|
||||
enable = true;
|
||||
settings.server = {
|
||||
host = "0.0.0.0";
|
||||
port = glancePort;
|
||||
};
|
||||
settings.pages = [
|
||||
{
|
||||
name = "Home";
|
||||
columns = [
|
||||
homeColumn
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
]
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue