This repository has been archived on 2024-04-14. You can view files and clone it, but cannot push or open issues or pull requests.
nixos-dotfiles/system/configuration.nix

181 lines
3.8 KiB
Nix
Raw Normal View History

{
2023-10-08 10:51:15 +01:00
pkgs,
lib,
config,
inputs,
...
}: {
2022-10-03 23:21:40 +01:00
imports = [
./hardware-configuration.nix
2023-09-24 01:42:00 +01:00
./hardware
2023-08-26 10:32:53 +01:00
./programs
2023-09-24 01:42:00 +01:00
./services
2022-10-03 23:21:40 +01:00
];
2022-08-07 16:11:24 +01:00
2022-08-21 01:18:19 +01:00
boot = {
2023-09-24 01:42:00 +01:00
tmp.useTmpfs = true;
kernel.sysctl."vm.max_map_count" = 16777216; #Star Citizen crash fix
2023-10-08 10:51:15 +01:00
kernelPackages = pkgs.linuxPackages_latest;
kernelModules = ["i2c-dev" "i2c-piix4"];
kernelParams = [
"amdgpu.ppfeaturemask=0xffffffff"
"net.ifnames=0"
"amd_pstate.shared_mem=1"
"amd_pstate=active"
2023-10-15 00:16:19 +01:00
# "video=DP-1:2560x1440@144"
# "video=DP-2:2560x1440@144"
2023-10-08 10:51:15 +01:00
];
2022-08-07 16:11:24 +01:00
2022-08-21 01:18:19 +01:00
loader = {
efi = {
canTouchEfiVariables = true;
};
2023-10-15 00:16:19 +01:00
systemd-boot = {
2023-12-01 12:55:49 +00:00
enable = true;
configurationLimit = 10;
consoleMode = "max";
2022-08-21 01:18:19 +01:00
};
};
};
2022-08-07 16:11:24 +01:00
2022-12-16 08:10:28 +00:00
powerManagement.cpuFreqGovernor = "schedutil";
2022-10-03 23:21:40 +01:00
2022-09-04 00:54:47 +01:00
networking = {
hostName = "terra"; # Define your hostname.
2023-10-15 00:16:19 +01:00
dhcpcd.enable = true;
firewall.enable = false;
2022-12-16 08:10:28 +00:00
extraHosts = ''
2023-05-21 21:21:25 +01:00
192.168.0.18 steam.deck
2023-09-24 01:42:00 +01:00
127.0.0.1 modules-cdn.eac-prod.on.epicgames.com
2023-06-01 21:20:44 +01:00
'';
2022-09-04 00:54:47 +01:00
};
2022-08-07 16:11:24 +01:00
2023-07-01 19:47:43 +01:00
# Set your time zone.
2022-08-07 16:11:24 +01:00
time.timeZone = "Europe/Vienna";
2023-07-01 19:47:43 +01:00
# Select internationalisation properties.
2022-08-14 21:20:39 +01:00
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_NUMERIC = "de_AT.UTF-8";
LC_TIME = "de_AT.UTF-8";
LC_MONETARY = "de_AT.UTF-8";
LC_MEASUREMENT = "de_AT.UTF-8";
LC_IDENTIFICATION = "de_AT.UTF-8";
};
};
2022-08-07 16:11:24 +01:00
console = {
font = "Lat2-Terminus16";
2022-08-08 10:01:42 +01:00
keyMap = "us-acentos";
2022-08-07 16:11:24 +01:00
};
2023-07-01 19:47:43 +01:00
# Enable sound.
2022-08-07 16:11:24 +01:00
sound.enable = true;
2022-11-14 11:58:04 +00:00
2022-09-04 00:54:47 +01:00
security = {
2023-04-05 10:36:45 +01:00
audit.enable = false;
auditd.enable = false;
polkit.enable = true;
rtkit.enable = true;
2022-09-04 00:54:47 +01:00
sudo.enable = false;
2023-04-05 10:36:45 +01:00
2022-09-04 00:54:47 +01:00
doas = {
enable = true;
2023-10-08 10:51:15 +01:00
extraRules = [
{
users = ["manuel"];
keepEnv = true;
persist = true;
}
];
2022-09-04 00:54:47 +01:00
};
};
2022-08-14 21:20:39 +01:00
2022-08-07 16:11:24 +01:00
users.users.manuel = {
isNormalUser = true;
2023-10-08 10:51:15 +01:00
extraGroups = ["audio" "games" "input" "lp" "networkmanager" "scanner" "users" "vboxusers" "video" "wheel"];
2022-08-07 16:11:24 +01:00
shell = pkgs.fish;
};
2022-09-04 00:54:47 +01:00
environment = {
systemPackages = with pkgs; [
2023-07-01 19:47:43 +01:00
bc
2023-08-13 20:24:57 +01:00
cached-nix-shell
2023-07-01 19:47:43 +01:00
compsize
distrobox
fd
file
git
htop
2023-09-24 01:42:00 +01:00
inotify-tools
2023-07-01 19:47:43 +01:00
kdiskmark
links2
libsForQt5.dolphin
libsForQt5.kio-extras
lm_sensors
nvtop-amd
openrgb
p7zip
pciutils
2023-09-24 01:42:00 +01:00
sassc
2023-07-01 19:47:43 +01:00
ripgrep
unrar
unzip
usbutils
2023-07-12 03:15:27 +01:00
ydotool
2022-09-04 00:54:47 +01:00
];
};
2022-08-07 16:11:24 +01:00
2022-12-27 09:40:36 +00:00
systemd.extraConfig = ''
DefaultTimeoutStopSec=10s
2023-07-01 19:47:43 +01:00
'';
systemd.user.extraConfig = ''
2023-05-29 16:43:26 +01:00
# needed for xdg-open to find the default browser. Why the fuck do I even need to do that?
2022-12-27 09:40:36 +00:00
DefaultEnvironment="PATH=/etc/profiles/per-user/manuel/bin:/run/current/system/sw/bin"
2023-05-29 16:43:26 +01:00
#Systemd is a meme. This is the proof
2022-12-27 09:40:36 +00:00
DefaultTimeoutStopSec=10s
2023-07-01 19:47:43 +01:00
'';
2022-12-16 08:10:28 +00:00
2022-11-14 11:58:04 +00:00
nix = {
2022-12-16 08:10:28 +00:00
extraOptions = ''
experimental-features = nix-command flakes
warn-dirty = false
2023-06-01 21:20:44 +01:00
'';
2023-08-13 20:24:57 +01:00
2023-10-08 10:51:15 +01:00
registry = lib.mapAttrs (_: value: {flake = value;}) inputs;
nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
2023-08-13 20:24:57 +01:00
2022-11-14 11:58:04 +00:00
gc = {
persistent = true;
automatic = true;
dates = "weekly";
2023-04-05 10:36:45 +01:00
options = "--delete-older-than 7d";
2022-11-14 11:58:04 +00:00
};
2023-08-13 20:24:57 +01:00
settings = {
auto-optimise-store = true;
2023-07-01 19:47:43 +01:00
2023-06-01 21:20:44 +01:00
substituters = [
"https://nyx.chaotic.cx"
2023-06-01 21:20:44 +01:00
"https://hyprland.cachix.org"
2023-08-24 06:03:47 +01:00
"https://nix-community.cachix.org"
];
2023-07-01 19:47:43 +01:00
2023-06-01 21:20:44 +01:00
trusted-public-keys = [
"nyx.chaotic.cx-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8="
2023-06-01 21:20:44 +01:00
"chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
2023-08-24 06:03:47 +01:00
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
2022-08-07 16:11:24 +01:00
};
2022-08-07 17:52:09 +01:00
2023-08-13 20:24:57 +01:00
system.stateVersion = "23.05";
2022-08-07 16:11:24 +01:00
}