(laptop) Gen 16: broke up laptop default.nix into modules, added git config
This commit is contained in:
12
flake.lock
generated
12
flake.lock
generated
@@ -825,11 +825,11 @@
|
|||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1728877747,
|
"lastModified": 1728878648,
|
||||||
"narHash": "sha256-OGSawABgsGqgJoSdWmR0hAuz8gRlAwPcwz4M3u27QaM=",
|
"narHash": "sha256-JYNGkY30+zGclR1zebnyHOtRhWKfKHLw6T4IoqhmJFs=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "6f359b976f93fc46a3674b2a92ffb79dad8e8840",
|
"rev": "23d88faa35dc9de0e35fc3dc2a863c4cf451a8f8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -952,11 +952,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1728792969,
|
"lastModified": 1728879439,
|
||||||
"narHash": "sha256-TwQNBUFNmvr7rSOH5onI2Rj6FoJ6wWzdnMH6P4mwyps=",
|
"narHash": "sha256-spvD0mgjj0xMv4qinSl5lxGLe8V8JAeIWNs0HF0i3kE=",
|
||||||
"owner": "gerg-l",
|
"owner": "gerg-l",
|
||||||
"repo": "spicetify-nix",
|
"repo": "spicetify-nix",
|
||||||
"rev": "1f3c6931100c64f6747d47f8a7b8d7a75fc5844e",
|
"rev": "c3463a8497fef3150aa8635d32b61b16e17a1e6b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
13
hosts/laptop/boot.nix
Normal file
13
hosts/laptop/boot.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
boot = {
|
||||||
|
kernelModules = ["acpi_call"];
|
||||||
|
extraModulePackages = with config.boot.kernelPackages;
|
||||||
|
[
|
||||||
|
acpi_call
|
||||||
|
cpupower
|
||||||
|
]
|
||||||
|
++ [pkgs.cpupower-gui];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -4,88 +4,9 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./../../modules/sys
|
./../../modules/sys
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
|
./boot.nix
|
||||||
|
./services.nix
|
||||||
|
./environment.nix
|
||||||
|
./settings.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment = {
|
|
||||||
variables = {
|
|
||||||
XCURSOR_SIZE = "24";
|
|
||||||
PATH = "${pkgs.clang-tools}/bin:$PATH";
|
|
||||||
};
|
|
||||||
shells = with pkgs; [
|
|
||||||
zsh
|
|
||||||
bash
|
|
||||||
];
|
|
||||||
systemPackages = with pkgs; [
|
|
||||||
acpi
|
|
||||||
brightnessctl
|
|
||||||
cpupower-gui
|
|
||||||
powertop
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
time.timeZone = "America/New_York";
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
|
|
||||||
services = {
|
|
||||||
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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
powerManagement.cpuFreqGovernor = "performance";
|
|
||||||
|
|
||||||
boot = {
|
|
||||||
kernelModules = ["acpi_call"];
|
|
||||||
extraModulePackages = with config.boot.kernelPackages;
|
|
||||||
[
|
|
||||||
acpi_call
|
|
||||||
cpupower
|
|
||||||
]
|
|
||||||
++ [pkgs.cpupower-gui];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
20
hosts/laptop/environment.nix
Normal file
20
hosts/laptop/environment.nix
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment = {
|
||||||
|
variables = {
|
||||||
|
XCURSOR_SIZE = "24";
|
||||||
|
PATH = "${pkgs.clang-tools}/bin:$PATH";
|
||||||
|
};
|
||||||
|
shells = with pkgs; [
|
||||||
|
zsh
|
||||||
|
bash
|
||||||
|
];
|
||||||
|
systemPackages = with pkgs; [
|
||||||
|
acpi
|
||||||
|
brightnessctl
|
||||||
|
cpupower-gui
|
||||||
|
powertop
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
39
hosts/laptop/services.nix
Normal file
39
hosts/laptop/services.nix
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services = {
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
25
hosts/laptop/settings.nix
Normal file
25
hosts/laptop/settings.nix
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
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";
|
||||||
|
}
|
||||||
@@ -13,6 +13,7 @@
|
|||||||
++ [ (import ./programs/cava.nix) ]
|
++ [ (import ./programs/cava.nix) ]
|
||||||
++ [ (import ./programs/bat.nix) ]
|
++ [ (import ./programs/bat.nix) ]
|
||||||
++ [ (import ./programs/fzf.nix) ]
|
++ [ (import ./programs/fzf.nix) ]
|
||||||
|
++ [ (import ./programs/git.nix) ]
|
||||||
++ [ (import ./programs/password-store.nix) ]
|
++ [ (import ./programs/password-store.nix) ]
|
||||||
++ [ (import ./programs/autojump.nix) ]
|
++ [ (import ./programs/autojump.nix) ]
|
||||||
++ [ (import ./environment/gtk.nix) ]
|
++ [ (import ./environment/gtk.nix) ]
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
++ [ (import ./programs/eza.nix) ]
|
++ [ (import ./programs/eza.nix) ]
|
||||||
++ [ (import ./programs/cava.nix) ]
|
++ [ (import ./programs/cava.nix) ]
|
||||||
++ [ (import ./programs/bat.nix) ]
|
++ [ (import ./programs/bat.nix) ]
|
||||||
|
++ [ (import ./programs/git.nix) ]
|
||||||
++ [ (import ./environment/gtk.nix) ]
|
++ [ (import ./environment/gtk.nix) ]
|
||||||
++ [ (import ./environment/spicetify.nix) ]
|
++ [ (import ./environment/spicetify.nix) ]
|
||||||
++ [ (import ./environment/starship.nix) ]
|
++ [ (import ./environment/starship.nix) ]
|
||||||
|
|||||||
9
modules/home/programs/git.nix
Normal file
9
modules/home/programs/git.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
userEmail = "pagedmov@gmail.com";
|
||||||
|
userName = "pagedmov";
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user