New configuration initial commit

This commit is contained in:
EsVagy42 2025-04-13 15:27:48 +00:00
commit f44f0550cd
17 changed files with 3211 additions and 0 deletions

View file

@ -0,0 +1,33 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, lib, ... }:
{
imports = [ # Include the results of the hardware scan.
./hardware-configuration.nix
];
systemd.services.limitbat0 = let bat0_charge_limit = 80;
in {
enable = true;
description = "Limit battry charge to 80%";
unitConfig = { After = "multi-user.target"; };
serviceConfig = {
Type = "oneshot";
ExecStart = "/bin/sh -c 'echo ${
toString bat0_charge_limit
} > /sys/class/power_supply/BAT0/charge_control_end_threshold'";
};
wantedBy = [ "multi-user.target" ];
};
swapDevices = [{
device = "/var/lib/swapfile";
size = 16 * 1024;
}];
boot.initrd.systemd.enable = true;
}

View file

@ -0,0 +1,38 @@
# 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" "thunderbolt" "vmd" "nvme" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/8bad3503-15d2-42e6-b209-1e8cfb1293d1";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/7CCF-2070";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
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.wlo1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}