added laptop files

This commit is contained in:
max_ag 2025-09-21 20:14:41 +02:00
parent 14b48c3119
commit f2c1ba3ba8
3 changed files with 251 additions and 9 deletions

View file

@ -0,0 +1,168 @@
{
pkgs,
inputs,
...
}: {
imports = [
./verbatim.nix
];
nix.settings.experimental-features = ["nix-command" "flakes"];
nixpkgs = {
config.allowUnfree = true;
};
environment.systemPackages = with pkgs; [
nushell
wl-clipboard
gvfs
libsForQt5.qt5.qtquickcontrols2
libsForQt5.qt5.qtgraphicaleffects
];
hardware.graphics = {
enable = true;
enable32Bit = true;
};
xdg = {
mime.enable = true;
menus.enable = true;
portal = {
enable = true;
};
};
programs = {
firefox.enable = true;
bash.blesh.enable = true;
xfconf.enable = true;
thunar = {
enable = true;
plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
};
hyprland = {
enable = true;
withUWSM = true;
package = inputs.hyprland.packages."x86_64-linux".hyprland;
portalPackage = inputs.hyprland.packages."x86_64-linux".xdg-desktop-portal-hyprland;
};
steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
};
nix-ld = {
enable = true;
#libraries = with pkgs; [
# Add libraries here
#];
};
};
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
kernelPackages = pkgs.linuxPackages_latest;
#kernelPackages = pkgs.linuxPackages_zen;
};
networking = {
hostName = "max-laptop";
proxy.noProxy = "127.0.0.1,localhost,internal.domain";
networkmanager.enable = true;
firewall = {
enable = true;
allowedTCPPorts = [8000];
};
};
environment.sessionVariables = {
XDG_CURRENT_DESKTOP = "Hyprland";
TERMINAL = "foot";
};
time.timeZone = "Europe/Prague";
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "cs_CZ.UTF-8";
LC_IDENTIFICATION = "cs_CZ.UTF-8";
LC_MEASUREMENT = "cs_CZ.UTF-8";
LC_MONETARY = "cs_CZ.UTF-8";
LC_NAME = "cs_CZ.UTF-8";
LC_NUMERIC = "cs_CZ.UTF-8";
LC_PAPER = "cs_CZ.UTF-8";
LC_TELEPHONE = "cs_CZ.UTF-8";
LC_TIME = "cs_CZ.UTF-8";
};
};
services = {
xserver = {
enable = true;
videoDrivers = ["amdgpu"];
xkb = {
layout = "cz";
variant = "";
options = "caps:escape";
};
};
tumbler.enable = true;
printing.enable = true;
avahi.enable = true;
displayManager.sddm = {
enable = true;
theme = "${import ./sddm-theme.nix {inherit pkgs;}}";
autoNumlock = true;
};
devmon.enable = true;
gvfs.enable = true;
pipewire = {
enable = true;
alsa = {
enable = true;
support32Bit = true;
};
pulse.enable = true;
jack.enable = true;
};
};
console.keyMap = "cz-lat2";
security.rtkit.enable = true;
users.users.maxag = {
isNormalUser = true;
description = "Max Ag";
extraGroups = ["networkmanager" "wheel" "video" "input"];
shell = pkgs.nushell;
};
system = {
stateVersion = "25.11";
activationScripts.cleanBackups = ''
echo "Removing .backup_nix files..."
find /home/maxag -type f -name "*.backup_nix" -delete
'';
};
}

View file

@ -0,0 +1,40 @@
# 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 = [ "nvme" "xhci_pci" "thunderbolt" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/83016878-be7b-40b3-8c06-310c4ef6611c";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/61F7-02D1";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/f592c562-f6a4-4a20-b367-2d10be2c079e"; }
];
# 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.wlp2s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -26,7 +26,41 @@
};
outputs = {nixpkgs, ...} @ inputs: {
nixosConfigurations.max-main = nixpkgs.lib.nixosSystem {
nixosConfigurations = {
max-laptop = {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
};
modules = [
./configuration/laptop/configuration.nix
./configuration/laptop/hardware-configuration.nix
inputs.home-manager.nixosModules.default
{
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
extraSpecialArgs = {inherit inputs;};
backupFileExtension = "backup_nix";
users.maxag = ./home/main/home.nix;
};
}
inputs.stylix.nixosModules.stylix
{
home-manager.sharedModules = [
inputs.stylix.homeModules.stylix
];
}
];
};
max-main = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
@ -56,6 +90,6 @@
];
}
];
};
};};
};
}