1
0
forked from KYS/maxfiles

Max best skibidi config base

This commit is contained in:
KYS 2025-09-23 16:37:32 +02:00
commit 455af8b45e
16 changed files with 393 additions and 0 deletions

View File

@ -0,0 +1 @@
{...}:{}

View File

@ -0,0 +1 @@
{...}:{}

View File

@ -0,0 +1 @@
[]

View File

@ -0,0 +1 @@
x86_64-linux

View File

@ -0,0 +1,96 @@
{
config,
pkgs,
lib,
...
}:
{
networking.networkmanager.enable = true;
## Time & Locale
time.timeZone = "Europe/Prague";
i18n = {
defaultLocale = "en_US.UTF-8";
supportedLocales = [
"en_US.UTF-8/UTF-8"
"cs_CZ.UTF-8/UTF-8"
];
};
## Font rendering
console = {
font = "Lat2-Terminus16";
keyMap = "us";
};
fonts = {
fontconfig.enable = true;
packages = with pkgs; [
nerd-fonts.jetbrains-mono
noto-fonts
];
};
## Shells
programs = {
bash.enable = true;
zsh.enable = true;
};
## Hyprland
programs.hyprland.enable = true;
services.xserver.enable = false; # Pure Wayland, no X11
## SDDM
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
};
## Graphics
hardware.graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [ vulkan-tools ];
};
## Audio
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
jack.enable = true;
};
## System Packages
environment.systemPackages = with pkgs; [
vesktop
unzip
firefox # Browser
kitty # Terminal
waybar # Top bar
wofi # App launcher
alacritty # Wayland terminal
grim # Screenshots
slurp # Selection for screenshots
wl-clipboard # Clipboard integration
hyprpaper # Wallpaper manager
hyprlock # Lock screen
hyprsunset # Optional: Night light
pavucontrol # PulseAudio control
# NOT IN STABLE NIX YET => nix-sweep # Nix analyze and cleanup tool
];
## Auto nix GC
nix.gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 7d";
};
## Security / Firewall
networking.firewall.enable = true;
networking.firewall.allowedTCPPorts = [];
}

View File

@ -0,0 +1,41 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/c9fa332d-e02e-4e7b-8e0e-6ef36899f4f2";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/725E-1771";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices = [ ];
# 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.docker0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wwp0s20f0u2c2.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@ -0,0 +1 @@
["maxmen11"]

View File

@ -0,0 +1 @@
{...}:{}

View File

@ -0,0 +1,16 @@
{
...
}:
{
monitor = [
"eDP-1,1920x1080@60,0x0,1"
"HDMI-A-1,2560x1440@144,1920x0,1"
];
misc = {
"vrr" = "0";
#"disable_hyprland_logo" = "true";
"disable_splash_rendering" = "true";
"force_default_wallpaper" = "0";
};
}

View File

@ -0,0 +1,10 @@
{
pkgs,
...
}:
{
isNormalUser = true;
packages = with pkgs; [
busybox
];
}

View File

@ -0,0 +1,12 @@
{ config, pkgs, lib, ... }:
{
home.packages = with pkgs; [
waybar
vim
neovim
ncdu
];
wayland.windowManager.hyprland.enable = true;
}

View File

@ -0,0 +1,28 @@
{
pkgs,
...
}:
let
sx = k: w: "$S, ${k}, exec, ${w}";
ws = k: w:
["$S+Alt, ${toString k}, movetoworkspacesilent, ${toString w}"
"$S+Shift, ${toString k}, movetoworkspace, ${toString w}"
"$S, ${toString k}, workspace, ${toString w}"];
ws_mul = start: end:
if start > end then []
else ws (if start == 10 then 0 else start) start
++ ws_mul (start + 1) end;
in
{
"$S" = "SUPER";
"$T" = "${pkgs.alacritty}/bin/alacritty";
"$B" = "${pkgs.librewolf}/bin/librewolf";
"$L" = "${pkgs.rofi}/bin/rofi -show drun";
bind = [
"$S, Q, killactive"
(sx "T" "$T")
(sx "A" "$L")
(sx "F" "$B")
]
++ (ws_mul 1 10);
}

View File

@ -0,0 +1,17 @@
{
pkgs,
...
}:
{
extraGroups = ["wheel" "networkmanager" "audio" "video"];
hashedPassword = "$6$rnX2VsB4m/aUEIci$jkVmLKyAIIZKs8CP1jMBA58fSjCk7WefF/avpqIxeMIccGBGqJ.q/84z1BCgkxSMBilAATnQrSvpNGKvswNIk/";
packages = with pkgs; [
tree
vim
git
neofetch
neovim
htop
ncdu
];
}

72
coreConfiguration.nix Executable file
View File

@ -0,0 +1,72 @@
{
config,
pkgs,
lib,
self,
...
}:
let
desktop = builtins.head (builtins.attrNames (self.nixosConfigurations or {}));
nixLoadwArgsElse = path: args: _else:
if builtins.pathExists path
then import path args
else _else;
nixLoadElse = path: _else:
if builtins.pathExists path
then import path
else _else;
nixLoadwArgs = path: args: nixLoadwArgsElse path args {};
nixLoadDefArgs = path: nixLoadwArgs path {inherit config pkgs lib;};
nixLoad = path: nixLoadElse path {};
confDesksDir = ./conf/desks;
confUsersDir = ./conf/users;
confUserNames = import "${confDesksDir}/${desktop}/users.nix"
++ nixLoadElse "${confDesksDir}/.default/users.nix" [];
confUserDefDir = "${confUsersDir}/.default/";
defUserConfig = nixLoadDefArgs "${confUserDefDir}user.nix";
defHomeConfig = nixLoadDefArgs "${confUserDefDir}home.nix";
defHyprSettings = nixLoadDefArgs "${confUserDefDir}hypr/settings.nix";
sysUser = name: {
inherit name;
value = let
userConfig = nixLoadDefArgs "${confUsersDir}/${name}/user.nix";
in
lib.mkMerge [
{
home = "/home/${name}";
}
defUserConfig
userConfig
];
};
homeUser = name: {
inherit name;
value = let
homeConfig = nixLoadDefArgs ("${confUsersDir}/${name}/home.nix");
hyprSettings = nixLoadDefArgs ("${confUsersDir}/${name}/hypr/settings.nix");
in
lib.mkMerge [
{
home.username = name;
home.homeDirectory = "/home/${name}";
home.stateVersion = "25.05";
programs.home-manager.enable = true;
wayland.windowManager.hyprland.settings = lib.mkMerge [ defHyprSettings hyprSettings ];
}
defHomeConfig
homeConfig
];
};
in
{
nix.settings.experimental-features = ["nix-command" "flakes"];
users.users = builtins.listToAttrs (map sysUser confUserNames);
home-manager.users = builtins.listToAttrs (map homeUser confUserNames);
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = desktop;
system.stateVersion = "25.05";
}

62
flake.lock generated Normal file
View File

@ -0,0 +1,62 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1758464306,
"narHash": "sha256-i56XRXqjwJRdVYmpzVUQ0ktqBBHqNzQHQMQvFRF/acQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "939e91e1cff1f99736c5b02529658218ed819a2a",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1758277210,
"narHash": "sha256-iCGWf/LTy+aY0zFu8q12lK8KuZp7yvdhStehhyX1v8w=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8eaee110344796db060382e15d3af0a9fc396e0e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1758277210,
"narHash": "sha256-iCGWf/LTy+aY0zFu8q12lK8KuZp7yvdhStehhyX1v8w=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8eaee110344796db060382e15d3af0a9fc396e0e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs_2"
}
}
},
"root": "root",
"version": 7
}

33
flake.nix Normal file
View File

@ -0,0 +1,33 @@
{
description = "KYS";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
};
outputs = { self, nixpkgs, home-manager }: {
nixosConfigurations = let
confDesksDir = ./conf/desks;
confDesks = builtins.filter (n: n != ".default") (builtins.attrNames (builtins.readDir confDesksDir));
deskBase = desk: {
name = desk;
value = nixpkgs.lib.nixosSystem {
system = builtins.readFile "${confDesksDir}/${desk}/.system";
modules = [
./coreConfiguration.nix
"${confDesksDir}/.default/configuration.nix"
"${confDesksDir}/.default/hardware-configuration.nix"
"${confDesksDir}/${desk}/configuration.nix"
"${confDesksDir}/${desk}/hardware-configuration.nix"
home-manager.nixosModules.home-manager
];
specialArgs = {
inherit self;
};
};
};
in builtins.listToAttrs (map deskBase confDesks);
};
}