Add Garand-Desktop flake with core boot module
Introduce a new flake for the Garand-Desktop host, including: - top‑level flake.nix with inputs and outputs - host config (default.nix) and modules: - hardware - home - system - packages - variables - core boot module defining kernel and Limine loader styling with appimage support and plymouth enabled
This commit is contained in:
15
flake.nix
Normal file
15
flake.nix
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
description = "GarandOS flake";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||||
|
|
||||||
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
|
|
||||||
|
import-tree.url = "github:vic/import-tree";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = inputs: inputs.flake-parts.lib.mkFlake {
|
||||||
|
inherit inputs;
|
||||||
|
} (inputs.import-tree ./src);
|
||||||
|
}
|
||||||
17
src/hosts/Garand-Desktop/default.nix
Normal file
17
src/hosts/Garand-Desktop/default.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
modules = self.nixosModules;
|
||||||
|
in {
|
||||||
|
flake.nixosConfigurations."Garand-Desktop" = inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
modules = [
|
||||||
|
modules.hardware
|
||||||
|
modules.homeModules
|
||||||
|
modules.systemModules
|
||||||
|
modules.systemPackages
|
||||||
|
modules.variables
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
69
src/hosts/Garand-Desktop/hardware.nix
Normal file
69
src/hosts/Garand-Desktop/hardware.nix
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
_: {
|
||||||
|
flake.nixosModules.hardware = {
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
initrd = {
|
||||||
|
availableKernelModules = [
|
||||||
|
"nvme"
|
||||||
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"usbhid"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
|
kernelModules = ["dm-snapshot"];
|
||||||
|
luks.devices = {
|
||||||
|
cryptroot = {
|
||||||
|
device = "/dev/disk/by-uuid/7c018698-d35c-4ee6-92a8-5e4edf914065";
|
||||||
|
preLVM = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
kernelModules = ["kvm-amd"];
|
||||||
|
extraModulePackages = [];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems = {
|
||||||
|
"/" = {
|
||||||
|
device = "/dev/disk/by-uuid/e3ac1df3-ce8f-44cd-901f-a8cd3f6955b7";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
"/home" = {
|
||||||
|
device = "/dev/disk/by-uuid/0713b82c-bf8c-424f-96e1-5d883e50b451";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
"/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/783D-A507";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [
|
||||||
|
"fmask=0022"
|
||||||
|
"dmask=0022"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = lib.mkForce [
|
||||||
|
{
|
||||||
|
device = "/dev/disk/by-uuid/8e8cc3dc-5754-4757-a2d7-53e6a2c3b5a4";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.enp5s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
};
|
||||||
|
}
|
||||||
67
src/hosts/Garand-Desktop/home-modules.nix
Normal file
67
src/hosts/Garand-Desktop/home-modules.nix
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
_: {
|
||||||
|
flake.nixosModules.homeModules = {
|
||||||
|
/*
|
||||||
|
Development editors and IDEs
|
||||||
|
*/
|
||||||
|
vscodium.enable = false; # VSCodium: a free and open-source "demicrosofted" VSCode
|
||||||
|
zed-editor = {
|
||||||
|
enable = true; # Zed Editor: a modern, high‑performance code editor
|
||||||
|
remote-server.enable = true; # Remote Server: enable remote editing capabilities
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Web browsers
|
||||||
|
*/
|
||||||
|
librewolf.enable = true; # Librewolf: a privacy-focused Firefox fork
|
||||||
|
ungoogled-chromium.enable = true; # Ungoogled Chromium: a privacy-focused Chromium fork
|
||||||
|
|
||||||
|
/*
|
||||||
|
System utilities
|
||||||
|
*/
|
||||||
|
btop.enable = true; # Btop: a resource monitor for the terminal
|
||||||
|
cava.enable = false; # Cava: terminal audio visualizer
|
||||||
|
fastfetch.enable = true; # Fastfetch: a fast system information tool
|
||||||
|
|
||||||
|
/*
|
||||||
|
Communication and synchronization
|
||||||
|
*/
|
||||||
|
kdeconnect.enable = true; # KDE Connect: integrate your phone and desktop
|
||||||
|
nextcloud-client.enable = true; # Nextcloud Client: sync files with a Nextcloud server
|
||||||
|
vesktop.enable = true; # Vesktop: a community‑driven Discord client
|
||||||
|
|
||||||
|
/*
|
||||||
|
Gaming
|
||||||
|
*/
|
||||||
|
lutris.enable = false; # Lutris: an open gaming platform
|
||||||
|
|
||||||
|
/*
|
||||||
|
Media recording and streaming
|
||||||
|
*/
|
||||||
|
obs-studio.enable = false; # OBS Studio: streaming and recording software
|
||||||
|
|
||||||
|
/*
|
||||||
|
Office suite
|
||||||
|
*/
|
||||||
|
onlyoffice.enable = true; # OnlyOffice: an office suite compatible with Microsoft formats
|
||||||
|
|
||||||
|
/*
|
||||||
|
Learning tools
|
||||||
|
*/
|
||||||
|
anki.enable = true; # Anki: spaced‑repetition flashcard program
|
||||||
|
|
||||||
|
/*
|
||||||
|
XDG desktop entries (PWA)
|
||||||
|
*/
|
||||||
|
xdgDesktopEntries = {
|
||||||
|
enable = true; # Enable XDG desktop entries
|
||||||
|
entries = {
|
||||||
|
messenger.enable = true; # Messenger: Facebook Messenger
|
||||||
|
mastodon.enable = true; # Mastodon: a decentralized social network
|
||||||
|
garandcloud.enable = true; # GarandCloud: my Nextcloud instance
|
||||||
|
chatgpt.enable = true; # ChatGPT: a large language model
|
||||||
|
claude.enable = true; # Claude: a large language model
|
||||||
|
glance.enable = true; # Glance: my home server dashboard
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
97
src/hosts/Garand-Desktop/system-modules.nix
Normal file
97
src/hosts/Garand-Desktop/system-modules.nix
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
_: {
|
||||||
|
flake.nixosModules.systemModules = {
|
||||||
|
/*
|
||||||
|
Container & Packaging
|
||||||
|
*/
|
||||||
|
docker.enable = true; # Docker: container runtime and management
|
||||||
|
virtualbox.enable = false; # VirtualBox: PC emulator
|
||||||
|
flatpak = {
|
||||||
|
enable = true; # Flatpak: universal packaging system for Linux
|
||||||
|
packages = {
|
||||||
|
sober.enable = false; # Roblox client
|
||||||
|
warehouse.enable = true; # Flatpak manager
|
||||||
|
flatseal.enable = true; # Flatpak permissions manager
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Networking
|
||||||
|
*/
|
||||||
|
tailscale.enable = true; # Tailscale: secure network for remote access
|
||||||
|
|
||||||
|
/*
|
||||||
|
Calendar & Contacts
|
||||||
|
*/
|
||||||
|
calendar.enable = true; # GNOME Calendar: calendar and contacts application
|
||||||
|
|
||||||
|
/*
|
||||||
|
Gaming
|
||||||
|
*/
|
||||||
|
gamemode.enable = true; # GameMode: optimizes system performance for gaming
|
||||||
|
gamescope.enable = false; # Gamescope: micro‑compositor for games
|
||||||
|
steam.enable = true; # Steam: platform for buying and playing games
|
||||||
|
|
||||||
|
packages = {
|
||||||
|
/*
|
||||||
|
Container & Packaging
|
||||||
|
*/
|
||||||
|
distrobox.enable = false; # Distrobox: containerized development environments
|
||||||
|
lazydocker.enable = false; # Lazydocker: simple TUI for Docker
|
||||||
|
bottles.enable = false; # Bottles: Easy-to-use wineprefix manager
|
||||||
|
|
||||||
|
/*
|
||||||
|
Gaming
|
||||||
|
*/
|
||||||
|
prismlauncher.enable = true; # Prism Launcher: Minecraft modded launcher
|
||||||
|
spaceCadetPinball.enable = true; # SpaceCadet Pinball: classic pinball game
|
||||||
|
ttySolitaire.enable = true; # TTY Solitaire: terminal‑based solitaire game
|
||||||
|
heroic.enable = false; # Native GOG, Epic, and Amazon Games Launcher for Linux, Windows and Mac
|
||||||
|
|
||||||
|
/*
|
||||||
|
Development Tools
|
||||||
|
*/
|
||||||
|
exercism.enable = true; # Exercism: coding practice platform
|
||||||
|
lazygit.enable = false; # Lazygit: simple TUI for Git
|
||||||
|
opencode.enable = false; # OpenCode: tools for coding and development
|
||||||
|
jan.enable = true; # Jan: AI chat UI
|
||||||
|
logisim-evolution.enable = true; # Logisim-Evolution: Digital logic designer and simulator
|
||||||
|
|
||||||
|
/*
|
||||||
|
Communication & Collaboration
|
||||||
|
*/
|
||||||
|
mattermost.enable = true; # Mattermost: open‑source Slack alternative
|
||||||
|
slack.enable = false; # Slack: team communication and collaboration tool
|
||||||
|
tutanota.enable = true; # Tutanota: secure email client
|
||||||
|
signal.enable = true; # Signal: secure messaging app
|
||||||
|
teams.enable = true; # Teams-for-linux: Unofficial Microsoft Teams client for Linux
|
||||||
|
ferdium.enable = false; # Ferdium: All your services in one place built by the community
|
||||||
|
|
||||||
|
/*
|
||||||
|
Productivity / Knowledge Management
|
||||||
|
*/
|
||||||
|
bitwarden.enable = false; # Bitwarden: password manager (desktop)
|
||||||
|
iotas.enable = true; # Iotas: lightweight notes manager
|
||||||
|
logseq.enable = false; # Logseq: knowledge base and outliner
|
||||||
|
|
||||||
|
/*
|
||||||
|
Media & Graphics
|
||||||
|
*/
|
||||||
|
affinity.enable = true; # Affinity: professional graphics suite
|
||||||
|
eyeOfGnome.enable = true; # Eye of GNOME: image viewer
|
||||||
|
freetube.enable = false; # FreeTube: privacy‑friendly YouTube client
|
||||||
|
gimp.enable = false; # GIMP: GNU Image Manipulation Program
|
||||||
|
kdenlive.enable = false; # Kdenlive: video editing software
|
||||||
|
pixieditor.enable = true; # Pixieditor: Universal editor for all your 2D needs
|
||||||
|
plex.enable = true; # Plex: media player and server client
|
||||||
|
|
||||||
|
/*
|
||||||
|
Utilities / Misc
|
||||||
|
*/
|
||||||
|
eddieAirVPN.enable = true; # Eddie AirVPN: VPN client
|
||||||
|
gnomeCalculator.enable = true; # gnomeCalculator: simple calculator
|
||||||
|
gedit.enable = true; # Gedit: GNOME text editor
|
||||||
|
winboat.enable = true; # Winboat: Windows remote desktop via RDP
|
||||||
|
adb.enable = false; # ADB: Android SDK platform tools
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
5
src/hosts/Garand-Desktop/system-packages.nix
Normal file
5
src/hosts/Garand-Desktop/system-packages.nix
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{inputs, ...}: {
|
||||||
|
flake.nixosModules.systemPackages.environment.systemPackages = with inputs.pkgs; [
|
||||||
|
# audacity
|
||||||
|
];
|
||||||
|
}
|
||||||
64
src/hosts/Garand-Desktop/variables.nix
Normal file
64
src/hosts/Garand-Desktop/variables.nix
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
_: {
|
||||||
|
flake.nixosModules.variables = {
|
||||||
|
# CPU Architecture
|
||||||
|
# Available options: "x86_64-linux", "aarch64-linux", etc.
|
||||||
|
system = "x86_64-linux";
|
||||||
|
|
||||||
|
# Host Configuration
|
||||||
|
host = "Garand-Desktop";
|
||||||
|
username = "garand_plg";
|
||||||
|
|
||||||
|
# GPU Profile
|
||||||
|
# Available options: "amd", "nvidia", "nvidia-laptop", "intel", "vm"
|
||||||
|
profile = "nvidia";
|
||||||
|
|
||||||
|
# Git Configuration ( For Pulling Software Repos )
|
||||||
|
gitUsername = "GarandPLG";
|
||||||
|
gitEmail = "garandplg@garandplg.com";
|
||||||
|
|
||||||
|
# Hyprland Settings
|
||||||
|
# Examples:
|
||||||
|
# extraMonitorSettings = "monitor = Virtual-1,1920x1080@60,auto,1";
|
||||||
|
# extraMonitorSettings = "monitor = HDMI-A-1,1920x1080@60,auto,1";
|
||||||
|
# You can configure multiple monitors.
|
||||||
|
# Inside the quotes, create a new line for each monitor.
|
||||||
|
extraMonitorSettings = "monitor = DP-1,1920x1080@144,auto,1";
|
||||||
|
|
||||||
|
keyboardLayout = "pl";
|
||||||
|
consoleKeyMap = "pl";
|
||||||
|
|
||||||
|
location = "Żywiec, PL";
|
||||||
|
|
||||||
|
# For Nvidia Prime support
|
||||||
|
intelID = "PCI:1:0:0";
|
||||||
|
nvidiaID = "PCI:0:2:0";
|
||||||
|
|
||||||
|
# Enable NFS
|
||||||
|
enableNFS = true;
|
||||||
|
|
||||||
|
# Enable Printing Support
|
||||||
|
printEnable = true;
|
||||||
|
|
||||||
|
# Set Stylix Image
|
||||||
|
# This will set your color palette
|
||||||
|
# Default background
|
||||||
|
# Add new images to ~/garandos/wallpapers
|
||||||
|
stylixImage = "attack-on-titan-mikasa-ackerman.jpg";
|
||||||
|
#stylixImage = "DW_Pacts.jpg";
|
||||||
|
#stylixImage = "edward-elric-fullmetal-alchemist.jpg";
|
||||||
|
#stylixImage = "fire-nation.jpg";
|
||||||
|
#stylixImage = "four-elements.jpg";
|
||||||
|
#stylixImage = "fullmetal-alchemist-5120x2880-10399.png";
|
||||||
|
#stylixImage = "Grounded_Wallpaper_4K.jpg";
|
||||||
|
#stylixImage = "jablon.jpg";
|
||||||
|
#stylixImage = "rammstein-log-two.jpg";
|
||||||
|
#stylixImage = "rammstein-logo-one.jpg";
|
||||||
|
#stylixImage = "rammstein-logo-three.jpg";
|
||||||
|
#stylixImage = "rammstein-one.jpg";
|
||||||
|
#stylixImage = "1346530.jpeg";
|
||||||
|
|
||||||
|
# Set network hostId if required (needed for zfs)
|
||||||
|
# Otherwise leave as-is
|
||||||
|
hostId = "5ab03f50";
|
||||||
|
};
|
||||||
|
}
|
||||||
39
src/modules/core/boot.nix
Normal file
39
src/modules/core/boot.nix
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
_: {
|
||||||
|
flake.nixosModules.boot = {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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user