fixed merge conflict between module-refactor and master
This commit is contained in:
@@ -1,6 +1,25 @@
|
||||
{pkgs, ...}: {
|
||||
system.stateVersion = "24.05";
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
imports = [
|
||||
./hardware.nix
|
||||
./home.nix
|
||||
];
|
||||
|
||||
# My module options
|
||||
networkModule.enable = true;
|
||||
nixSettings.enable = true;
|
||||
bootLoader.enable = true;
|
||||
issue.enable = true;
|
||||
sddmConfig.enable = true;
|
||||
stylixConfig.enable = true;
|
||||
gamingPkgs.enable = true;
|
||||
steamConfig.enable = true;
|
||||
sysPkgs.enable = true;
|
||||
sysProgs.enable = true;
|
||||
sysServices.enable = true;
|
||||
virtConfig.enable = true;
|
||||
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
host,
|
||||
inputs,
|
||||
username,
|
||||
nur,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./../../modules/sys/configuration.nix
|
||||
./hardware.nix
|
||||
./settings.nix
|
||||
];
|
||||
}
|
||||
94
hosts/desktop/home.nix
Normal file
94
hosts/desktop/home.nix
Normal file
@@ -0,0 +1,94 @@
|
||||
{
|
||||
host,
|
||||
pkgs,
|
||||
self,
|
||||
inputs,
|
||||
username,
|
||||
wallpaper,
|
||||
lib,
|
||||
scheme,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
nur = config.nur;
|
||||
in {
|
||||
imports = [inputs.home-manager.nixosModules.home-manager];
|
||||
home-manager = {
|
||||
useUserPackages = true;
|
||||
useGlobalPkgs = true;
|
||||
backupFileExtension = "backup";
|
||||
extraSpecialArgs = {inherit self inputs host wallpaper scheme username nur;};
|
||||
users = {
|
||||
${username} = {
|
||||
programs.home-manager.enable = true;
|
||||
imports = [
|
||||
inputs.spicetify-nix.homeManagerModules.default
|
||||
inputs.self.outputs.homeManagerModules.default
|
||||
];
|
||||
|
||||
# My custom home-manager modules
|
||||
homeFiles.enable = true;
|
||||
|
||||
# modules/home/environment
|
||||
hyprlandConfig.enable = true;
|
||||
autojumpConfig.enable = true;
|
||||
stylixHomeConfig.enable = true;
|
||||
waybarConfig.enable = true;
|
||||
gtkConfig.enable = true;
|
||||
spicetifyConfig.enable = true;
|
||||
starshipConfig.enable = true;
|
||||
|
||||
# modules/home/programs
|
||||
btopConfig.enable = true;
|
||||
swayncConfig.enable = true;
|
||||
userPkgs.enable = true;
|
||||
cavaConfig.enable = true;
|
||||
ezaConfig.enable = true;
|
||||
firefoxConfig.enable = true;
|
||||
fuzzelConfig.enable = true;
|
||||
fzfConfig.enable = true;
|
||||
gitConfig.enable = true;
|
||||
kittyConfig.enable = true;
|
||||
yaziConfig.enable = true;
|
||||
zshConfig.enable = true;
|
||||
passConfig.enable = true;
|
||||
batConfig.enable = true;
|
||||
|
||||
# modules/home/scripts
|
||||
movScripts.enable = true;
|
||||
movScripts.commandScripts.enable = true;
|
||||
movScripts.hyprlandControls.enable = true;
|
||||
movScripts.nixShortcuts.enable = true;
|
||||
|
||||
dconf.settings = lib.mkIf config.virtConfig.enable {
|
||||
"org/virt-manager/virt-manager/connections" = {
|
||||
autoconnect = ["qemu:///system"];
|
||||
uris = ["qemu:///system"];
|
||||
};
|
||||
};
|
||||
home = {
|
||||
username = "${username}";
|
||||
homeDirectory = "/home/${username}";
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
users = {
|
||||
groups.persist = {};
|
||||
users = {
|
||||
root.initialPassword = "1234";
|
||||
${username} = {
|
||||
isNormalUser = true;
|
||||
initialPassword = "1234";
|
||||
shell = pkgs.zsh;
|
||||
extraGroups = ["wheel" "persist" "libvirtd"];
|
||||
};
|
||||
};
|
||||
};
|
||||
security.sudo.extraConfig = ''
|
||||
${username} ALL=(ALL) NOPASSWD: /etc/profiles/per-user/${username}/bin/rebuild
|
||||
'';
|
||||
nix.settings.allowed-users = ["${username}"];
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
boot = {
|
||||
kernelModules = ["acpi_call"];
|
||||
extraModulePackages = with config.boot.kernelPackages;
|
||||
[
|
||||
acpi_call
|
||||
cpupower
|
||||
]
|
||||
++ [pkgs.cpupower-gui];
|
||||
};
|
||||
}
|
||||
34
hosts/laptop/config.nix
Normal file
34
hosts/laptop/config.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{pkgs, config, ...}: {
|
||||
system.stateVersion = "24.05";
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
imports = [ ./hardware.nix ];
|
||||
|
||||
powerProfiles.enable = true;
|
||||
boot = {
|
||||
kernelModules = ["acpi_call"];
|
||||
extraModulePackages = with config.boot.kernelPackages;
|
||||
[
|
||||
acpi_call
|
||||
cpupower
|
||||
]
|
||||
++ [pkgs.cpupower-gui];
|
||||
};
|
||||
|
||||
environment = {
|
||||
variables = {
|
||||
PATH = "${pkgs.clang-tools}/bin:$PATH";
|
||||
};
|
||||
shells = with pkgs; [
|
||||
zsh
|
||||
bash
|
||||
];
|
||||
systemPackages = with pkgs; [
|
||||
acpi
|
||||
brightnessctl
|
||||
cpupower-gui
|
||||
powertop
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
host,
|
||||
inputs,
|
||||
pkgs,
|
||||
config,
|
||||
self,
|
||||
username,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./../../modules/sys/configuration.nix
|
||||
./hardware.nix
|
||||
./boot.nix
|
||||
./services.nix
|
||||
./environment.nix
|
||||
./settings.nix
|
||||
];
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
environment = {
|
||||
variables = {
|
||||
PATH = "${pkgs.clang-tools}/bin:$PATH";
|
||||
};
|
||||
shells = with pkgs; [
|
||||
zsh
|
||||
bash
|
||||
];
|
||||
systemPackages = with pkgs; [
|
||||
acpi
|
||||
brightnessctl
|
||||
cpupower-gui
|
||||
powertop
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
# 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" "ahci" "usbhid" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-partlabel/disk-main-root";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/nix" = {
|
||||
device = "/dev/disk/by-partlabel/disk-main-nix";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-partlabel/disk-main-ESP";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0077" "dmask=0077"];
|
||||
};
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/disk/by-partlabel/disk-main-home";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
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.enp14s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp15s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
{...}: {
|
||||
services = {
|
||||
keyd = {
|
||||
enable = true;
|
||||
keyboards.default = {
|
||||
ids = ["*"];
|
||||
settings.main = {
|
||||
capslock = "esc";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
power-profiles-daemon.enable = true;
|
||||
|
||||
upower = {
|
||||
enable = true;
|
||||
percentageLow = 20;
|
||||
percentageCritical = 5;
|
||||
percentageAction = 3;
|
||||
criticalPowerAction = "PowerOff";
|
||||
};
|
||||
|
||||
tlp.settings = {
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "power";
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||||
|
||||
CPU_BOOST_ON_AC = 1;
|
||||
CPU_BOOST_ON_BAT = 1;
|
||||
|
||||
CPU_HWP_DYN_BOOST_ON_AC = 1;
|
||||
CPU_HWP_DYN_BOOST_ON_BAT = 1;
|
||||
|
||||
PLATFORM_PROFILE_ON_AC = "performance";
|
||||
PLATFORM_PROFILE_ON_BAT = "performance";
|
||||
|
||||
INTEL_GPU_MIN_FREQ_ON_AC = 500;
|
||||
INTEL_GPU_MIN_FREQ_ON_BAT = 500;
|
||||
# INTEL_GPU_MAX_FREQ_ON_AC=0;
|
||||
# INTEL_GPU_MAX_FREQ_ON_BAT=0;
|
||||
# INTEL_GPU_BOOST_FREQ_ON_AC=0;
|
||||
# INTEL_GPU_BOOST_FREQ_ON_BAT=0;
|
||||
|
||||
PCIE_ASPM_ON_AC = "default";
|
||||
PCIE_ASPM_ON_BAT = "powersupersave";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
{...}: {
|
||||
system.stateVersion = "24.05";
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
substituters = ["https://nix-gaming.cachix.org"];
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
};
|
||||
|
||||
time.timeZone = "America/New_York";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
powerManagement.cpuFreqGovernor = "performance";
|
||||
}
|
||||
Reference in New Issue
Block a user