os/hosts/norman/configuration.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

101 lines
3 KiB
Nix
Raw Normal View History

2022-08-21 22:53:04 +00:00
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{
2023-02-25 13:45:21 +00:00
config,
pkgs,
2023-11-10 14:41:48 +00:00
lib,
2023-02-25 13:45:21 +00:00
...
2023-11-10 14:41:48 +00:00
}:
let
psCfg = config.pub-solar;
in
{
2023-02-25 13:45:21 +00:00
imports = [
./wireguard.nix
./builder.nix
];
2022-08-21 22:53:04 +00:00
2023-11-11 00:06:36 +00:00
pub-solar.docker.enable = true;
pub-solar.nextcloud.enable = true;
pub-solar.social.enable = true;
pub-solar.office.enable = true;
systemd.enableUnifiedCgroupHierarchy = true;
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"goland"
];
environment.systemPackages = with pkgs; [
jetbrains.goland
minicom
openjdk11
putty
remmina
thunderbird
vscode
vscode-extensions.golang.go
vscode-extensions.ms-python.python
wireshark
go_1_20
meld
factorio-experimental
];
hardware.enableRedistributableFirmware = true;
pub-solar.graphical.enable = true;
pub-solar.sway.enable = true;
2023-11-10 14:41:48 +00:00
boot.binfmt.emulatedSystems = ["aarch64-linux"];
pub-solar.audio.bluetooth.enable = false;
home-manager.users."${psCfg.user.name}".xdg.configFile = lib.mkIf psCfg.sway.enable {
"sway/config.d/10-inputs.conf".source = ./.config/sway/config.d/inputs.conf;
"sway/config.d/10-screens.conf".source = ./.config/sway/config.d/screens.conf;
"sway/config.d/10-custom-keybindings.conf".source = ./.config/sway/config.d/custom-keybindings.conf;
};
2022-08-21 22:53:04 +00:00
# Set your time zone.
time.timeZone = "Europe/Berlin";
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
networking.firewall = {
allowedUDPPorts = [
51820
51821
]; # Clients and peers can use the same port, see listenport
};
services.tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_AC = "performance";
2023-04-01 14:49:01 +00:00
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
2022-08-21 22:53:04 +00:00
# The following prevents the battery from charging fully to
# preserve lifetime. Run `tlp fullcharge` to temporarily force
# full charge.
# https://linrunner.de/tlp/faq/battery.html#how-to-choose-good-battery-charge-thresholds
START_CHARGE_THRESH_BAT0 = 40;
STOP_CHARGE_THRESH_BAT0 = 80;
# 100 being the maximum, limit the speed of my CPU to reduce
# heat and increase battery usage:
CPU_MAX_PERF_ON_AC = 100;
2023-04-01 14:49:01 +00:00
CPU_MAX_PERF_ON_BAT = 50;
2022-08-21 22:53:04 +00:00
};
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "21.11"; # Did you read the comment?
}