Recent updates

This commit is contained in:
2024-12-04 11:15:56 -08:00
parent a66104d709
commit 1fcfc77e7b
6 changed files with 98 additions and 14 deletions

8
.idea/.nixos-configs.iml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

12
flake.lock generated
View File

@@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1727383923,
"narHash": "sha256-4/vacp3CwdGoPf8U4e/N8OsGYtO09WTcQK5FqYfJbKs=",
"lastModified": 1733317578,
"narHash": "sha256-anN/LcP5IuqEARvhPETg1vnbyG3IQ0wdvSAYEJfIQzA=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "ffe2d07e771580a005e675108212597e5b367d2d",
"rev": "ad48eb25cd0b00ce730da00fa1f8e6e6c27b397d",
"type": "github"
},
"original": {
@@ -22,11 +22,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1727348695,
"narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=",
"lastModified": 1733212471,
"narHash": "sha256-M1+uCoV5igihRfcUKrr1riygbe73/dzNnzPsmaLCmpo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784",
"rev": "55d15ad12a74eb7d4646254e13638ad0c4128776",
"type": "github"
},
"original": {

View File

@@ -3,6 +3,7 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
#nixos-hardware.url = "github:NixOS/nixos-hardware/master";
home-manager = {
url = "github:nix-community/home-manager";
@@ -11,6 +12,7 @@
};
outputs =
# { self, nixpkgs, nixos-hardware, ... }@inputs:
{ self, nixpkgs, ... }@inputs:
{
nixosConfigurations.default = nixpkgs.lib.nixosSystem {
@@ -21,6 +23,7 @@
./hosts/cap-slim7/configuration.nix
./modules/nixos/hyprland-amd.nix
inputs.home-manager.nixosModules.default
# nixos-hardware.nixosModules.lenovo-legion-16arha7
];
};
};

View File

@@ -10,10 +10,13 @@
./hardware-configuration.nix
];
#boot.kernelPackages = pkgs.linuxPackages_latest;
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "cap-slim7"; # Define your hostname. #-#
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
@@ -21,6 +24,16 @@
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
security.polkit.extraConfig = ''
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.login1.reboot" ||
action.id == "org.freedesktop.login1.poweroff") &&
subject.isInGroup("powerusers")) {
return polkit.Result.YES;
}
});
'';
# Enable networking
networking.networkmanager.enable = true;
@@ -32,6 +45,8 @@
# Set your time zone.
time.timeZone = "America/Los_Angeles";
#time.timeZone = "Europe/Oslo";
# services.tzupdate.enable = true;
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
@@ -142,11 +157,11 @@
rofi-bluetooth
wl-clipboard
networkmanager
alsaUtils
alsa-utils
nixfmt-rfc-style
mako
podman
kicad
# kicad
obsidian
speedcrunch
deadbeef
@@ -162,8 +177,65 @@
stm32cubemx
stm32flash
easyeffects
brightnessctl
# power-profiles-daemon
librewolf
# lenovo-legion
powertop
wlogout
ncdu
flameshot
via
# teensyduino
teensy-udev-rules
transmission_4-qt
glmark2
];
# services.automatic-timezoned.enable = true;
programs.bash.shellAliases = {
nixrebuild = "cd /etc/nixos && sudo nixos-rebuild switch --flake .#default";
nixupdate = "cd /etc/nixos && sudo nix flake update && sudo nixos-rebuild switch --flake .#default";
nixedit = "sudo nano /etc/nixos/hosts/cap-slim7/configuration.nix";
conservebatt = "sudo bash -c 'echo 1 > /sys/bus/platform/drivers/ideapad_acpi/VPC2004*/conservation_mode && cat /sys/bus/platform/drivers/ideapad_acpi/VPC2004*/conservation_mode'";
noconservebatt = "sudo bash -c 'echo 0 > /sys/bus/platform/drivers/ideapad_acpi/VPC2004*/conservation_mode && cat /sys/bus/platform/drivers/ideapad_acpi/VPC2004*/conservation_mode'";
};
programs.appimage = {
enable = true;
binfmt = true;
};
# services.power-profiles-daemon.enable = true;
services.tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_MIN_PERF_ON_AC = 0;
CPU_MAX_PERF_ON_AC = 100;
# CPU_MAX_PERF_ON_AC = 35;
# CPU_SCALING_GOVERNOR_ON_BAT = "performance";
# CPU_ENERGY_PERF_POLICY_ON_BAT = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_MIN_PERF_ON_BAT = 0;
CPU_MAX_PERF_ON_BAT = 35;
# CPU_MAX_PERF_ON_BAT = 100;
#Optional helps save long term battery health
START_CHARGE_THRESH_BAT0 = 1; # On non-thinkpad lenovo, this sets conservation mode to 0
STOP_CHARGE_THRESH_BAT0 = 1; # ..., but to 1
};
};
hardware.keyboard.qmk.enable = true;
services.udev.packages = [ pkgs.via ];
services.udev.extraRules = ''
# ST-LINK V2
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3748", MODE="600", TAG+="uaccess", SYMLINK+="stlinkv2_%n"
@@ -199,7 +271,8 @@
dina-font
proggyfonts
font-awesome
nerdfonts
nerd-fonts.symbols-only
nerd-fonts.jetbrains-mono
];
programs.thunar.enable = true;

View File

@@ -9,7 +9,7 @@
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];

View File

@@ -33,10 +33,10 @@
};
};
services.displayManager.autoLogin = {
enable = true;
user = "caperren";
};
# services.displayManager.autoLogin = {
# enable = true;
# user = "caperren";
# };
hardware.graphics = {
enable = true;