-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfiguration.nix
More file actions
177 lines (142 loc) · 4.09 KB
/
configuration.nix
File metadata and controls
177 lines (142 loc) · 4.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# 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’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hm-config.nix
./hardware-configuration.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "nixos"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "Europe/Berlin";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8";
LC_MEASUREMENT = "de_DE.UTF-8";
LC_MONETARY = "de_DE.UTF-8";
LC_NAME = "de_DE.UTF-8";
LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8";
LC_TELEPHONE = "de_DE.UTF-8";
LC_TIME = "de_DE.UTF-8";
};
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the KDE Plasma Desktop Environment.
services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
services.xserver = {
layout = "de";
xkbVariant = "";
};
console.keyMap = "de";
services.printing.enable = true;
sound.enable = true;
hardware.pulseaudio.enable = false;
hardware.pulseaudio.extraConfig = "unload-module module-suspend-on-idle";
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
services.xserver.libinput.enable = true;
# git ssh on startup
systemd.user.services.git-ssh-agent-init = {
serviceConfig.PassEnvironment = "DISPLAY";
script = ''
eval $(ssh-agent -s)
ssh-add ~/.ssh/keys/github
ssh-add ~/.ssh/keys/gitlab
'';
wantedBy = [ "multi-user.target" ]; # starts after login
};
users.users.hhuebner = {
isNormalUser = true;
description = "hhuebner";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
firefox
kate
thunderbird
jetbrains.clion
jetbrains.idea-ultimate
anki-bin
libreoffice-qt
];
};
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
wget
vscode
git
python3
ruff # python lsp
python311Packages.pip
python311Packages.flake8
python311Packages.python-lsp-server
htop
nodejs_21
cmake
ninja
llvmPackages_17.stdenv
gnumake
lldb_17
lld_17
llvm_17
clang_17
clang-tools_17
(import ./vim-config.nix)
];
hardware.bluetooth.enable = true; # enables support for Bluetooth
hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot
# SETTINGS
nix = {
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
settings.experimental-features = [ "nix-command" "flakes"];
};
# SHELL
users.defaultUserShell = pkgs.zsh;
users.users.hhuebner.shell = pkgs.zsh;
programs = {
zsh = {
shellAliases = {
rm = "rm -i";
nixbuild = "sudo nixos-rebuild switch";
nixconf = "sudo vim /etc/nixos/configuration.nix";
};
enable = true;
autosuggestions.enable = true;
zsh-autoenv.enable = true;
syntaxHighlighting.enable = true;
ohMyZsh = {
enable = true;
theme = "robbyrussell";
plugins = [
"git"
"history"
"deno"
];
};
};
};
system.stateVersion = "23.11";
}