This commit is contained in:
2026-03-24 21:07:14 +01:00
parent 5edd43b802
commit 92dba21fd8
183 changed files with 0 additions and 8750 deletions

View File

@@ -1,42 +0,0 @@
{
pkgs,
config,
lib,
...
}: {
boot = {
kernelPackages = pkgs.linuxPackages_zen;
kernelModules = ["v4l2loopback"];
extraModulePackages = [config.boot.kernelPackages.v4l2loopback];
kernel.sysctl = {
"vm.max_map_count" = 2147483642;
};
loader = {
efi.canTouchEfiVariables = true;
limine = {
enable = true;
style = {
wallpapers = [
./../../wallpapers/attack-on-titan-mikasa-ackerman.jpg
];
wallpaperStyle = lib.mkForce "centered";
backdrop = "${config.stylix.base16Scheme.base00}";
interface = {
branding = "GarandOS Bootloader";
resolution = "1920x1080";
};
};
};
};
# Appimage Support
binfmt.registrations.appimage = {
wrapInterpreterInShell = false;
interpreter = "${pkgs.appimage-run}/bin/appimage-run";
recognitionType = "magic";
offset = 0;
mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff'';
magicOrExtension = ''\x7fELF....AI\x02'';
};
plymouth.enable = true;
};
}

View File

@@ -1,16 +0,0 @@
{
pkgs,
lib,
config,
...
}: {
options.calendar.enable = lib.mkEnableOption "Enable GNOME Calendar";
config = {
services.gnome.evolution-data-server.enable = lib.mkIf config.calendar.enable true;
environment.systemPackages = lib.mkIf config.calendar.enable (with pkgs; [
gnome-calendar
gnome-contacts
]);
};
}

View File

@@ -1,32 +0,0 @@
{inputs, ...}: {
imports = [
./packages
./boot.nix
./calendar.nix
./docker.nix
./flatpak.nix
./fonts.nix
./garandos-tui.nix
./hardware.nix
./network.nix
./nfs.nix
./nh.nix
./printing.nix
./quickshell.nix
./greetd.nix
./security.nix
./services.nix
./steam.nix
./stylix.nix
./syncthing.nix
./system.nix
./tailscale.nix
./thunar.nix
./user.nix
./virtualbox.nix
./xdg.nix
./xserver.nix
./zram.nix
inputs.stylix.nixosModules.stylix
];
}

View File

@@ -1,14 +0,0 @@
{
pkgs,
lib,
config,
...
}: {
options.docker.enable = lib.mkEnableOption "Docker";
config.virtualisation.docker = lib.mkIf config.docker.enable {
enable = true;
package = pkgs.docker;
daemon.settings.dns = ["9.9.9.11" "149.112.112.11"];
};
}

View File

@@ -1,28 +0,0 @@
{
lib,
config,
...
}: let
mkFlatpakPackage = name: pkgId: {
options.flatpak.packages.${name}.enable = lib.mkEnableOption "Flatpak: ${name}";
config.services.flatpak.packages =
lib.mkIf config.flatpak.packages.${name}.enable [pkgId];
};
flatpakPackages = {
sober = "org.vinegarhq.Sober";
warehouse = "io.github.flattool.Warehouse";
flatseal = "com.github.tchx84.Flatseal";
};
in {
options.flatpak.enable = lib.mkEnableOption "Flatpak";
config.services.flatpak = lib.mkIf config.flatpak.enable {
enable = true;
update.onActivation = true;
packages = [];
};
imports = builtins.attrValues (builtins.mapAttrs mkFlatpakPackage flatpakPackages);
}

View File

@@ -1,29 +0,0 @@
{pkgs, ...}: {
fonts = {
packages = with pkgs; [
dejavu_fonts
fira-code
fira-code-symbols
font-awesome
hackgen-nf-font
ibm-plex
inter
jetbrains-mono
material-icons
maple-mono.NF
minecraftia
nerd-fonts.im-writing
nerd-fonts.blex-mono
noto-fonts
noto-fonts-color-emoji
noto-fonts-cjk-sans
noto-fonts-cjk-serif
noto-fonts-monochrome-emoji
powerline-fonts
roboto
roboto-mono
#symbola
terminus_font
];
};
}

View File

@@ -1,11 +0,0 @@
{
host,
username,
...
}: {
programs.garandos-tui = {
enable = true;
systemModulesFilePath = "/home/${username}/garandos/hosts/${host}/system-modules.nix";
homeModulesFilePath = "/home/${username}/garandos/hosts/${host}/home-modules.nix";
};
}

View File

@@ -1,16 +0,0 @@
{
pkgs,
username,
...
}: {
services.greetd = {
enable = true;
#vt = 3;
settings = {
default_session = {
user = username;
command = "${pkgs.tuigreet}/bin/tuigreet --time --cmd Hyprland"; # start Hyprland with a TUI login manager
};
};
};
}

View File

@@ -1,21 +0,0 @@
{pkgs, ...}: {
hardware = {
sane = {
enable = true;
extraBackends = [pkgs.sane-airscan];
disabledDefaultBackends = ["escl"];
};
logitech.wireless = {
enable = false;
enableGraphical = false;
};
graphics.enable = true;
enableRedistributableFirmware = true;
keyboard.qmk.enable = true;
bluetooth = {
enable = true;
powerOnBoot = false;
};
};
local.hardware-clock.enable = false;
}

View File

@@ -1,49 +0,0 @@
{
host,
options,
...
}: let
inherit (import ../../hosts/${host}/variables.nix) hostId;
in {
# Defensive assertion for hostname validity (clearer message at eval time)
assertions = [
{
assertion = builtins.match "^[[:alnum:]]([[:alnum:]_-]{0,61}[[:alnum:]])?$" host != null;
message = "Invalid hostname '${host}'. Must be 1-63 chars, start/end alphanumeric; allowed middle chars: letters, digits, '-' or '_'.";
}
];
networking = {
hostName = "${host}";
hostId = hostId;
networkmanager.enable = true;
timeServers = options.networking.timeServers.default ++ ["pool.ntp.org"];
firewall = {
enable = true;
allowedTCPPorts = [
22
80
443
59010
59011
8080
];
allowedTCPPortRanges = [
{
from = 1714;
to = 1764;
}
];
allowedUDPPorts = [
59010
59011
];
allowedUDPPortRanges = [
{
from = 1714;
to = 1764;
}
];
};
};
}

View File

@@ -1,8 +0,0 @@
{host, ...}: let
inherit (import ../../hosts/${host}/variables.nix) enableNFS;
in {
services = {
rpcbind.enable = enableNFS;
nfs.server.enable = enableNFS;
};
}

View File

@@ -1,15 +0,0 @@
{
username,
pkgs,
...
}: {
programs.nh = {
enable = true;
package = pkgs.nh;
clean = {
enable = true;
extraArgs = "--keep-since 7d --keep 5";
};
flake = "/home/${username}/garandos";
};
}

View File

@@ -1,9 +0,0 @@
_: {
nixpkgs.config.allowUnfree = true;
imports = [
./fluxer
./essentials.nix
./packages.nix
./programs.nix
];
}

View File

@@ -1,72 +0,0 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
mpv
pavucontrol
playerctl
cmatrix
cowsay
sl
fortune
# File management
trash-cli
file-roller
unrar
unzip
p7zip
# System monitoring & info
inxi
lm_sensors
lshw
pciutils
usbutils
mesa-demos
nix-output-monitor
nvd
onefetch
# Disk utilities
duf
dysk
ncdu
# Network & system utilities
ripgrep
wget
socat
ookla-speedtest
brightnessctl
killall
dex
# Desktop environment
networkmanagerapplet
tuigreet
nwg-displays
waypaper
uwsm
hyprpicker
cliphist
# Development utilities
pkg-config
appimage-run
libnotify
v4l-utils
tasktimer
# Language dicts for Iotas
hunspell
hunspellDicts.pl_PL
hunspellDicts.en_US
# Noctalia Shell Dependencies
matugen
app2unit
gpu-screen-recorder
# hyprland
swww
grim
slurp
wl-clipboard
swappy
ydotool
hyprpolkitagent
hyprland-qtutils # needed for banners and ANR messages
# pyprland
pyprland
];
}

View File

@@ -1,6 +0,0 @@
{pkgs, ...}: let
fluxer =
pkgs.callPackage ./fluxer-package.nix {};
in {
environment.systemPackages = [fluxer];
}

View File

@@ -1,35 +0,0 @@
{
lib,
appimageTools,
fetchurl,
}: let
pname = "fluxer";
version = "canary";
src = fetchurl {
url = "https://api.fluxer.app/dl/desktop/stable/linux/x64/latest/appimage";
sha256 = "sha256-GdoBK+Z/d2quEIY8INM4IQy5tzzIBBM+3CgJXQn0qAw=";
};
appimageContents = appimageTools.extract {inherit pname version src;};
in
appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
# mv $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop
install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/512x512/apps/${pname}.png \
$out/share/icons/hicolor/512x512/apps/${pname}.png
substituteInPlace $out/share/applications/${pname}.desktop \
--replace-fail 'Exec=AppRun' 'Exec=${pname}'
'';
meta = with lib; {
description = "Fluxer desktop app";
homepage = "https://github.com/fluxerapp/fluxer";
license = licenses.agpl3Only;
platforms = ["x86_64-linux"];
sourceProvenance = with lib.sourceTypes; [binaryNativeCode];
maintainers = with lib.maintainers; [garand_plg];
};
}

View File

@@ -1,57 +0,0 @@
{
pkgs,
lib,
config,
inputs,
system,
...
}: let
mkPackage = name: pkgsOrList: {
options.packages.${name}.enable = lib.mkEnableOption name;
config.environment.systemPackages =
lib.mkIf config.packages.${name}.enable
(lib.toList pkgsOrList);
};
packages = with pkgs; {
bitwarden = bitwarden-desktop;
eddieAirVPN = eddie;
gnomeCalculator = gnome-calculator;
gedit = gedit;
iotas = iotas;
logseq = logseq;
mattermost = mattermost-desktop;
slack = slack;
tutanota = tutanota-desktop;
exercism = exercism;
opencode = opencode;
jan = jan;
lazygit = lazygit;
prismlauncher = inputs.prismlauncher-cracked.packages.${system}.default;
spaceCadetPinball = space-cadet-pinball;
ttySolitaire = tty-solitaire;
gimp = gimp;
affinity = inputs.affinity-nix.packages.${system}.v3;
eyeOfGnome = eog;
kdenlive = kdePackages.kdenlive;
plex = [
(plex-desktop.override {extraEnv = {QT_QPA_PLATFORM = "xcb";};})
# plex-desktop
plexamp
];
freetube = freetube;
lazydocker = lazydocker;
distrobox = [distrobox pkgs.boxbuddy];
winboat = [winboat freerdp];
signal = signal-desktop;
pixieditor = pixieditor;
bottles = bottles;
heroic = heroic;
adb = android-tools;
teams = teams-for-linux;
ferdium = ferdium;
logisim-evolution = logisim-evolution;
};
in {
imports = builtins.attrValues (builtins.mapAttrs mkPackage packages);
}

View File

@@ -1,23 +0,0 @@
_: {
programs = {
nano.enable = true;
hyprland = {
enable = true;
withUWSM = false;
};
dconf.enable = true;
seahorse.enable = true;
fuse.userAllowOther = true;
mtr.enable = true;
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
nix-ld = {
enable = true;
# libraries = with pkgs; [
# biome
# ];
};
};
}

View File

@@ -1,18 +0,0 @@
{host, ...}: let
inherit (import ../../hosts/${host}/variables.nix) printEnable;
in {
services = {
printing = {
enable = printEnable;
drivers = [
# pkgs.hplipWithPlugin
];
};
avahi = {
enable = printEnable;
nssmdns4 = true;
openFirewall = true;
};
ipp-usb.enable = printEnable;
};
}

View File

@@ -1,30 +0,0 @@
{pkgs, ...}: {
environment = {
systemPackages = with pkgs; [
quickshell
# Qt6 related kitsfor slove Qt5Compat problem
qt6.qt5compat
qt6.qtbase
qt6.qtquick3d
qt6.qtwayland
qt6.qtdeclarative
qt6.qtsvg
# alternate options
# libsForQt5.qt5compat
kdePackages.qt5compat
libsForQt5.qt5.qtgraphicaleffects
];
# necessary environment variables
variables = {
QML_IMPORT_PATH = "${pkgs.qt6.qt5compat}/lib/qt-6/qml:${pkgs.qt6.qtbase}/lib/qt-6/qml";
QML2_IMPORT_PATH = "${pkgs.qt6.qt5compat}/lib/qt-6/qml:${pkgs.qt6.qtbase}/lib/qt-6/qml";
};
# make sure the Qt application is working properly
sessionVariables = {
QT_QPA_PLATFORM = "wayland;xcb";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
};
};
}

View File

@@ -1,28 +0,0 @@
_: {
security = {
rtkit.enable = true;
polkit = {
enable = true;
extraConfig = ''
polkit.addRule(function(action, subject) {
if ( subject.isInGroup("users") && (
action.id == "org.freedesktop.login1.reboot" ||
action.id == "org.freedesktop.login1.reboot-multiple-sessions" ||
action.id == "org.freedesktop.login1.power-off" ||
action.id == "org.freedesktop.login1.power-off-multiple-sessions"
))
{ return polkit.Result.YES; }
})
'';
};
pam.services.swaylock = {
text = ''auth include login '';
};
sudo = {
enable = true;
extraConfig = ''
Defaults pwfeedback
'';
};
};
}

View File

@@ -1,67 +0,0 @@
{
profile,
pkgs,
...
}: {
# Services to start
services = {
libinput.enable = true; # Input Handling
fstrim.enable = true; # SSD Optimizer
gvfs.enable = true; # For Mounting USB & More
openssh = {
enable = true; # Enable SSH
settings = {
PermitRootLogin = "no"; # Prevent root from SSH login
PasswordAuthentication = true; # Users can SSH using kb and password
KbdInteractiveAuthentication = true;
};
ports = [22];
};
tumbler.enable = true; # Image/video preview
gnome.gnome-keyring.enable = true;
smartd = {
enable =
if profile == "vm"
then false
else true;
autodetect = true;
};
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
extraConfig.pipewire."92-low-latency" = {
"context.properties" = {
"default.clock.rate" = 48000;
"default.clock.quantum" = 256;
"default.clock.min-quantum" = 256;
"default.clock.max-quantum" = 256;
};
};
extraConfig.pipewire-pulse."92-low-latency" = {
context.modules = [
{
name = "libpipewire-module-protocol-pulse";
args = {
pulse.min.req = "256/48000";
pulse.default.req = "256/48000";
pulse.max.req = "256/48000";
pulse.min.quantum = "256/48000";
pulse.max.quantum = "256/48000";
};
}
];
};
};
upower = {
enable = true;
package = pkgs.upower;
};
power-profiles-daemon = {
enable = true;
package = pkgs.power-profiles-daemon;
};
};
}

View File

@@ -1,43 +0,0 @@
{
pkgs,
lib,
config,
...
}: {
options = {
steam.enable = lib.mkEnableOption "Steam";
gamescope.enable = lib.mkEnableOption "Gamescope";
gamemode.enable = lib.mkEnableOption "Gamemode";
};
config.programs = {
steam = lib.mkIf config.steam.enable {
enable = true;
package = pkgs.steam;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
gamescopeSession = lib.mkIf config.gamescope.enable {
enable = true;
args = [
"--rt"
"--expose-wayland"
];
};
extraCompatPackages = [pkgs.proton-ge-bin];
};
gamescope = lib.mkIf config.gamescope.enable {
enable = true;
capSysNice = true;
args = [
"--rt"
"--expose-wayland"
];
};
gamemode = lib.mkIf config.gamemode.enable {
enable = true;
enableRenice = true;
};
};
}

View File

@@ -1,40 +0,0 @@
{
pkgs,
host,
...
}: let
inherit (import ../../hosts/${host}/variables.nix) stylixImage;
in {
# Styling Options
stylix = {
enable = true;
image = ../../wallpapers/${stylixImage};
polarity = "dark";
opacity.terminal = 1.0;
cursor = {
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Ice";
size = 24;
};
fonts = {
monospace = {
package = pkgs.nerd-fonts.fira-mono;
name = "FiraCode Nerd Font Mono";
};
sansSerif = {
package = pkgs.nerd-fonts.fira-code;
name = "FiraCode Nerd Font Propo";
};
serif = {
package = pkgs.nerd-fonts.fira-code;
name = "FiraCode Nerd Font";
};
sizes = {
applications = 12;
terminal = 15;
desktop = 11;
popups = 12;
};
};
};
}

View File

@@ -1,8 +0,0 @@
{username, ...}: {
services.syncthing = {
enable = false;
user = "${username}";
dataDir = "/home/${username}";
configDir = "/home/${username}/.config/syncthing";
};
}

View File

@@ -1,43 +0,0 @@
{
host,
inputs,
...
}: let
inherit (import ../../hosts/${host}/variables.nix) consoleKeyMap;
in {
nix = {
nixPath = ["nixpkgs=${inputs.nixpkgs}"];
settings = {
download-buffer-size = 200000000;
auto-optimise-store = true;
experimental-features = [
"nix-command"
"flakes"
];
substituters = ["https://hyprland.cachix.org"];
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
};
};
time.timeZone = "Europe/Warsaw";
i18n = {
defaultLocale = "pl_PL.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "pl_PL.UTF-8";
LC_IDENTIFICATION = "pl_PL.UTF-8";
LC_MEASUREMENT = "pl_PL.UTF-8";
LC_MONETARY = "pl_PL.UTF-8";
LC_NAME = "pl_PL.UTF-8";
LC_NUMERIC = "pl_PL.UTF-8";
LC_PAPER = "pl_PL.UTF-8";
LC_TELEPHONE = "pl_PL.UTF-8";
LC_TIME = "pl_PL.UTF-8";
};
};
environment.variables = {
NIXOS_OZONE_WL = "1";
GARANDOS_VERSION = "1.0";
GARANDOS = "true";
};
console.keyMap = "${consoleKeyMap}";
system.stateVersion = "23.11"; # Do not change!
}

View File

@@ -1,14 +0,0 @@
{
pkgs,
config,
lib,
...
}: {
options.tailscale.enable = lib.mkEnableOption "Tailscale";
config.services.tailscale = lib.mkIf config.tailscale.enable {
enable = true;
package = pkgs.tailscale;
openFirewall = true;
};
}

View File

@@ -1,9 +0,0 @@
{pkgs, ...}: {
programs.thunar = {
enable = true;
plugins = with pkgs; [
thunar-archive-plugin
thunar-volman
];
};
}

View File

@@ -1,61 +0,0 @@
{
pkgs,
inputs,
username,
host,
profile,
system,
...
}: let
inherit (import ../../hosts/${host}/variables.nix) gitUsername;
in {
imports = [inputs.home-manager.nixosModules.home-manager];
home-manager = {
useUserPackages = true;
useGlobalPkgs = false;
backupFileExtension = "backup-nixos";
extraSpecialArgs = {
inherit
inputs
username
host
profile
system
;
};
users.${username} = {
imports = [
./../home
../../hosts/${host}/home-modules.nix
inputs.noctalia.homeModules.default
];
home = {
username = "${username}";
homeDirectory = "/home/${username}";
stateVersion = "25.11";
};
};
};
users = {
mutableUsers = true;
users.${username} = {
isNormalUser = true;
description = "${gitUsername}";
extraGroups = [
"adbusers"
"docker" # access to docker as non-root
"libvirtd" # Virt manager/QEMU access
"lp"
"networkmanager"
"scanner"
"wheel" # sudo access
"vboxusers" # Virtual Box
"gamemode"
];
shell = pkgs.bash;
ignoreShellProgramCheck = true;
linger = true;
};
};
nix.settings.allowed-users = ["${username}"];
}

View File

@@ -1,17 +0,0 @@
{
pkgs,
lib,
config,
...
}: {
options.virtualbox.enable = lib.mkEnableOption "Enable VirtualBox";
config.virtualisation.virtualbox.host = lib.mkIf config.virtualbox.enable {
enable = true;
package = pkgs.virtualbox;
enableKvm = true;
enableHardening = true;
enableExtensionPack = false;
addNetworkInterface = false;
};
}

View File

@@ -1,12 +0,0 @@
{pkgs, ...}: {
xdg.portal = {
enable = true;
wlr.enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-hyprland
xdg-desktop-portal-gtk
];
configPackages = [pkgs.hyprland];
xdgOpenUsePortal = true;
};
}

View File

@@ -1,11 +0,0 @@
{host, ...}: let
inherit (import ../../hosts/${host}/variables.nix) keyboardLayout;
in {
services.xserver = {
enable = true;
xkb = {
layout = "${keyboardLayout}";
variant = "";
};
};
}

View File

@@ -1,32 +0,0 @@
{pkgs, ...}: {
zramSwap = {
enable = true;
priority = 5;
memoryMax = 16 * 1024 * 1024 * 1024;
algorithm = "zstd";
swapDevices = 1;
memoryPercent = 50;
};
boot = {
kernelParams = [
"zswap.enabled=1" # enables zswap
"zswap.compressor=zstd" # compression algorithm
"zswap.max_pool_percent=20" # maximum percentage of RAM that zswap is allowed to use
"zswap.shrinker_enabled=1" # whether to shrink the pool proactively on high memory pressure
];
tmp = {
useZram = true;
zramSettings = {
compression-algorithm = "zstd";
zram-size = "ram * 0.5";
fs-type = "ext4";
options = "X-mount.mode=1777,discard";
};
};
};
services.zram-generator = {
enable = true;
package = pkgs.zram-generator;
settings = {};
};
}