chore: rm all files for rebase

This commit is contained in:
Mohammad Rafiq 2025-05-18 13:13:44 +08:00
parent fc8fcbe680
commit f60dfaa95e
79 changed files with 0 additions and 3770 deletions

View file

@ -1,64 +0,0 @@
{
inputs,
config,
specialArgs,
lib,
...
}:
let
moduleName = "hmModules";
cfg = config."${moduleName}";
username = config.nixosModules.mainUser;
in
{
imports = [
inputs.home-manager.nixosModules.home-manager
./hardware.nix
./programs
];
options = {
"${moduleName}" = {
enable = lib.mkEnableOption "Enable ${moduleName}.";
mainApps = {
terminal = lib.mkOption {
type = lib.types.str;
default = "kitty";
example = "kitty";
description = "What terminal is the default.";
};
browser = lib.mkOption {
type = lib.types.str;
default = "firefox";
example = "firefox";
description = "What browser is the default.";
};
editor = lib.mkOption {
type = lib.types.str;
default = "nvf";
example = "nvf";
description = "What editor is the default.";
};
launcher = lib.mkOption {
type = lib.types.str;
default = "fuzzel";
example = "fuzzel";
description = "What launcher is the default.";
};
};
};
};
config = lib.mkIf cfg.enable {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = specialArgs;
users."${username}".home = {
username = username;
homeDirectory = "/home/${username}";
stateVersion = "25.05";
};
};
};
}

View file

@ -1,25 +0,0 @@
{
config,
lib,
...
}:
let
username = config.nixosModules.mainUser;
in
{
config = lib.mkMerge [
(lib.mkIf config."hardware-config".usbAutoMount {
home-manager.users.${username}.services.udiskie = {
enable = true;
settings = {
# workaround for
# https://github.com/nix-community/home-manager/issues/632
program_options = {
# replace with your favorite file manager
file_manager = "yazi";
};
};
};
})
];
}

View file

@ -1,23 +0,0 @@
{
config,
lib,
pkgs,
...
}:
let
username = config.nixosModules.mainUser;
in
{
imports = [
./hyprland.nix
./editor.nix
];
config = lib.mkMerge [
{
home-manager.users."${username}".home.packages = with pkgs; [
pulsemixer
];
}
];
}

View file

@ -1,28 +0,0 @@
{
config,
lib,
inputs,
...
}:
let
username = config.nixosModules.mainUser;
in
{
config = lib.mkIf (config.hmModules.mainApps.editor == "nvf") (
lib.mkMerge [
{
nix.settings.substituters = [ "https://nvf.cachix.org" ];
nix.settings.trusted-public-keys = [
"nvf.cachix.org-1:GMQWiUhZ6ux9D5CvFFMwnc2nFrUHTeGaXRlVBXo+naI="
];
home-manager.users.${username} = {
imports = [
inputs.nvf.homeManagerModules.default
./nvf/core.nix
];
};
}
]
);
}

View file

@ -1,158 +0,0 @@
{
config,
lib,
pkgs,
...
}:
{
config.home-manager.users."${config.nixosModules.mainUser}" = lib.mkMerge [
(lib.mkIf (config.de.type == "hyprland") {
xdg.configFile."uwsm/env".text = # sh
''
export XCURSOR_SIZE=32
# Nvidia Settings
export LIBVA_DRIVER_NAME=nvidia
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export NVD_BACKEND=direct # needed for running vaapi-driver on later drivers"
export NIXOS_OZONE_WL=1
'';
wayland.windowManager.hyprland = {
enable = true;
package = null;
portalPackage = null;
systemd.enable = false;
settings = {
"$mainMonitor" = "desc:OOO AN-270W04K";
"$vertMonitor" = "desc:Philips Consumer Electronics Company PHL 246V5 AU11330000086";
"$mainMod" = "SUPER";
"$hyper" = "CONTROL_SHIFT_ALT_SUPER";
"$meh" = "CONTROL_SHIFT_ALT";
"$terminal" = "uwsm app -- kitty -1";
"$browser" = "uwsm app -- firefox";
"$launcher" = "uwsm app -- fuzzel";
"$lockscreen" = "uwsm app -- hyprlock";
"$clipboard" = "$terminal --class clipse -e clipse";
"$multiplexer" = "$terminal -e zellij";
exec-once = [
"uwsm app -- hyprlock"
"uwsm app -- clipse -listen"
"uwsm app -- hyprcloser"
"uwsm app -- waybar"
];
# Programs to run at startup
exec = [
"uwsm app -- hyprshade auto"
];
# Monitors
monitor = [
"$mainMonitor, 3840x2160@60, auto, 2"
"$vertMonitor, 1920x1080@60, auto-left, auto, transform, 3"
", preferred, auto, 1"
];
xwayland.force_zero_scaling = true;
env = [
"GDK_SCALE,2"
"XCURSOR_SIZE,32"
];
# Switching to the current workspace will switch to the previous
binds.workspace_back_and_forth = true;
cursor.default_monitor = "$mainMonitor";
# Windows
general = {
# Make there be no gaps in between windows or edges
border_size = 0;
no_border_on_floating = true;
gaps_in = 0;
gaps_out = 0;
resize_on_border = true;
};
decoration = {
active_opacity = 1;
inactive_opacity = 0.9;
};
windowrulev2 = [
"float, class:firefox, title:Picture-in-Picture"
"float, class:(clipse)"
"move cursor 0 0, class:(clipse)"
"size 622 652, class:(clipse)"
"noanim, class:(clipse)"
];
animation = [
"workspaces, 0, , "
];
# Keybinds
bind = [
"$mainMod, W, killactive"
"$mainMod, M, exec, uwsm stop"
"$mainMod, Up, fullscreen"
# Launch utilities
"$mainMod, return, exec, $multiplexer"
"$mainMod, O, exec, $browser"
"$mainMod, Escape, exec, $lockscreen"
"$mainMod, Space, exec, $launcher"
"$mainMod, V, exec, $clipboard"
"$mainMod_SHIFT, A, exec, hyprpicker -a"
# Window Settings
"$mainMod, H, cyclenext, visible"
"$mainMod, L, cyclenext, visible prev"
"$mainMod_ALT, H, movewindow, l"
"$mainMod_ALT, J, movewindow, d"
"$mainMod_ALT, K, movewindow, u"
"$mainMod_ALT, L, movewindow, r"
"ALT_SHIFT, H, resizeactive, -10% 0"
"ALT_SHIFT, J, resizeactive, 0 -10%"
"ALT_SHIFT, K, resizeactive, 0 10%"
"ALT_SHIFT, L, resizeactive, 10% 0"
# Workspace Settings
"$mainMod_CTRL, H, workspace, r-1"
"$mainMod_CTRL, L, workspace, r+1"
"$hyper, H, movetoworkspace, r-1"
"$hyper, L, movetoworkspace, r+1"
];
# Repeat when held
bindle = [
"SUPER, 6, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
"SUPER, 7, exec, ${pkgs.playerctl}/bin/playerctl previous"
"SUPER, 8, exec, ${pkgs.playerctl}/bin/playerctl play-pause"
"SUPER, 9, exec, ${pkgs.playerctl}/bin/playerctl next"
"SUPER, 0, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-"
"$meh, mouse_up, resizeactive, 10% 10%"
"$meh, mouse_down, resizeactive, -10% -10%"
];
bindm = [
"$meh, mouse:272, movewindow"
"$meh, mouse:273, resizewindow"
];
input = {
numlock_by_default = true;
follow_mouse = 2; # Click on a window to change focus
};
debug = {
damage_tracking = 0;
};
};
};
})
];
}

View file

@ -1,79 +0,0 @@
{ pkgs, ... }:
{
home.sessionVariables.EDITOR = "nvim";
programs.nvf = {
enable = true;
enableManpages = true;
settings.vim = {
viAlias = true;
vimAlias = true;
options = {
# Indentation
autoindent = true;
smartindent = true;
expandtab = true;
smarttab = true;
wrap = true;
shiftwidth = 2;
tabstop = 2;
foldlevel = 1000; # Open all folds by default
# Search
hlsearch = true;
ignorecase = true;
incsearch = true;
smartcase = true; # case-sensitive if search contains uppercase
# Visual
number = true;
cursorline = true;
visualbell = true;
termguicolors = true;
# Input
backspace = "indent,eol,start";
};
keymaps = [
{
desc = "Open the file path under the cursor, making the file if it doesn't exist.";
key = "gf";
mode = "n";
action = ":cd %:p:h<CR>:e <cfile><CR>";
silent = true;
}
{
desc = "Delete the previous word.";
key = "<C-BS>";
mode = "i";
action = "<C-W>";
silent = true;
}
{
desc = "Open the filetree.";
key = "t";
mode = "n";
action = ":Yazi<CR>";
silent = true;
}
];
luaConfigRC.turn_off_inline_diagnostics =
# lua
''
vim.diagnostic.config({
virtual_text = false -- turn off inline diagnostics
})
'';
extraPlugins = with pkgs.vimPlugins; {
yuck-vim = {
package = yuck-vim;
};
nvim-treesitter-parsers = {
package = nvim-treesitter-parsers.yuck;
};
nvim-parinfer = {
package = nvim-parinfer;
};
};
};
};
}

View file

@ -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;
};
};
}

View file

@ -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 = { };
};
})
]
);
}

View file

@ -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 { };
}

View file

@ -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";
};
})
];
}

View file

@ -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";
};
})
];
}

View file

@ -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;
};
})
];
}

View file

@ -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"
];
};
})
];
}

View file

@ -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;
};
}

View file

@ -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
];
}
];
};
}
]
);
}