This commit is contained in:
mjallen18
2025-03-23 12:53:44 -05:00
parent 70a34ec565
commit 094bca46d7
10 changed files with 306 additions and 301 deletions

View File

@@ -3,16 +3,91 @@
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{
config,
outputs,
lib,
pkgs,
...
}:
let
user = "matt";
passwordFile = config.sops.secrets."desktop/matt_password".path;
pkgsVersion = pkgs.unstable;
environmentVariables = {
STEAM_FORCE_DESKTOPUI_SCALING = "1.0";
GDK_SCALE = "1";
EDITOR = "code --wait";
VISUAL = "code --wait";
};
systemPackages = with pkgsVersion; [
aha
aspell
aspellDicts.en
aspellDicts.en-computers
aspellDicts.en-science
borgbackup
brscan5
clinfo
direnv
efibootmgr
gparted
grsync
kmod
kdePackages.ksvg
lact
memtest86-efi
memtest86plus
nano
onlyoffice-bin
os-prober
nil
papirus-icon-theme
pciutils
qemu_full
rclone
rclone-browser
restic
restic-browser
restic-integrity
rsync
sane-frontends
sbctl
smartmontools
usbutils
udisks2
vim
vulkan-tools
wget
winetricks
];
lactConfig = ''
daemon:
log_level: info
admin_groups:
- wheel
- sudo
disable_clocks_cleanup: false
apply_settings_timer: 5
gpus:
1002:73BF-1002:0E3A-0000:03:00.0:
fan_control_enabled: true
fan_control_settings:
mode: curve
static_speed: 1.0
temperature_key: edge
interval_ms: 500
curve:
30: 0.0
40: 0.2
50: 0.35
60: 0.5
70: 0.75
80: 1.0
spindown_delay_ms: 0
change_threshold: 0
pmfw_options: {}
power_cap: 293.0
performance_level: auto
voltage_offset: 0
power_states: {}
'';
in
{
imports = [
@@ -20,50 +95,54 @@ in
./filesystems.nix
./hardware-configuration.nix
./networking.nix
./nix.nix
./services.nix
./sops.nix
./users.nix
../default.nix
../../share/amd
];
chaotic.mesa-git.enable = true;
# Enable nix flakes and nix-command tools
nix = {
settings = {
substituters = [
# "https://cache.mjallen.dev"
"https://nix-community.cachix.org"
"https://cache.nixos.org/"
];
trusted-public-keys = [
# "cache.mjallen.dev-1:IzFmKCd8/gggI6lcCXsW65qQwiCLGFFN9t9s2iw7Lvc="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
warn-dirty = lib.mkForce false;
experimental-features = lib.mkForce [
"nix-command"
"flakes"
];
trusted-users = [ user ];
# Environment configuration
environment = {
systemPackages = systemPackages;
etc."lact/config.yaml".text = lactConfig;
variables = environmentVariables;
};
# Hardware configuration
hardware = {
# Enable the QMK firmware flashing tool.
keyboard = {
qmk.enable = true;
};
# Enable Sane and Brother printer support.
sane = {
enable = true;
brscan5.enable = true;
dsseries.enable = false;
extraBackends = [ pkgsVersion.brscan5 ];
};
};
share.hardware.amd = {
enable = lib.mkDefault true;
lact.enable = lib.mkDefault true;
# Nixpkgs configuration
nixpkgs = {
# add unstable and stable overlays
overlays = [
outputs.overlays.nixpkgs-unstable
outputs.overlays.nixpkgs-stable
];
config.permittedInsecurePackages = [
# ...
];
};
share.gaming.enable = true;
# Time config
time = {
hardwareClockInLocalTime = lib.mkDefault false;
};
virtualisation.libvirtd.enable = lib.mkDefault true;
virtualisation.waydroid.enable = lib.mkDefault true;
# Programs configuration
programs = {
gamemode.enable = true;
coolercontrol.enable = true;
@@ -74,129 +153,23 @@ in
};
};
# Configure environment
environment = {
# List packages installed in system profile. To search, run:
# $ nix search wget
systemPackages = with pkgsVersion; [
aha
aspell
aspellDicts.en
aspellDicts.en-computers
aspellDicts.en-science
borgbackup
brscan5
clinfo
direnv
efibootmgr
gparted
grsync
kmod
kdePackages.ksvg
lact
memtest86-efi
memtest86plus
nano
onlyoffice-bin
os-prober
nil
papirus-icon-theme
pciutils
qemu_full
rclone
rclone-browser
restic
restic-browser
restic-integrity
rsync
sane-frontends
sbctl
smartmontools
usbutils
udisks2
vim
vulkan-tools
wget
winetricks
];
etc."lact/config.yaml".text = ''
daemon:
log_level: info
admin_groups:
- wheel
- sudo
disable_clocks_cleanup: false
apply_settings_timer: 5
gpus:
1002:73BF-1002:0E3A-0000:03:00.0:
fan_control_enabled: true
fan_control_settings:
mode: curve
static_speed: 1.0
temperature_key: edge
interval_ms: 500
curve:
30: 0.0
40: 0.2
50: 0.35
60: 0.5
70: 0.75
80: 1.0
spindown_delay_ms: 0
change_threshold: 0
pmfw_options: {}
power_cap: 293.0
performance_level: auto
voltage_offset: 0
power_states: {}
'';
variables = {
STEAM_FORCE_DESKTOPUI_SCALING = "1.0";
GDK_SCALE = "1";
EDITOR = "code --wait";
VISUAL = "code --wait";
# Common Configuration
share = {
gaming.enable = true;
hardware.amd = {
enable = lib.mkDefault true;
lact.enable = lib.mkDefault true;
};
};
# Configure nixpkgs
nixpkgs = {
overlays = [
outputs.overlays.nixpkgs-unstable
outputs.overlays.nixpkgs-stable
];
config.permittedInsecurePackages = [
# ...
];
# Time configuration
time = {
hardwareClockInLocalTime = lib.mkDefault false;
};
# Define a user account. Don't forget to set a password with passwd.
users.users."${user}" = {
isNormalUser = lib.mkDefault true;
extraGroups = [
"wheel"
"keys"
"networkmanager"
"ratbagd"
"input"
"scanner"
"lp"
]; # Enable sudo for the user.
hashedPasswordFile = passwordFile;
shell = pkgsVersion.zsh;
};
hardware = {
keyboard = {
qmk.enable = true;
};
sane = {
enable = true;
brscan5.enable = true;
dsseries.enable = false;
extraBackends = [ pkgsVersion.brscan5 ];
};
# Virtualisation configuration
virtualisation = {
libvirtd.enable = lib.mkDefault true;
waydroid.enable = lib.mkDefault true;
};
}