-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfiguration.nix
More file actions
177 lines (147 loc) · 4.89 KB
/
configuration.nix
File metadata and controls
177 lines (147 loc) · 4.89 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
# This is your system's configuration file.
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
{ inputs, lib, config, pkgs, ... }: {
# You can import other NixOS modules here
imports = [
# If you want to use modules from other flakes (such as nixos-hardware):
# inputs.hardware.nixosModules.common-cpu-amd
# inputs.hardware.nixosModules.common-ssd
# You can also split up your configuration and import pieces of it here:
# ./users.nix
# Import your generated (nixos-generate-config) hardware configuration
./hardware-configuration.nix
];
nixpkgs = {
# You can add overlays here
overlays = [
# inputs.cornelis.overlays.cornelis
# If you want to use overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
# Or define it inline, for example:
# (final: prev: {
# hi = final.hello.overrideAttrs (oldAttrs: {
# patches = [ ./change-hello-to-hi.patch ];
# });
# })
];
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
allowUnfree = true;
};
};
nix = {
# This will add each flake input as a registry
# To make nix3 commands consistent with your flake
registry = lib.mapAttrs (_: value: { flake = value; }) inputs;
# This will additionally add your inputs to the system's legacy channels
# Making legacy nix commands consistent as well, awesome!
nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
settings = {
# Enable flakes and new 'nix' command
experimental-features = "nix-command flakes";
# Deduplicate and optimize nix store
auto-optimise-store = true;
};
};
# Packages
environment.systemPackages = with pkgs; [];
services.libinput.touchpad.disableWhileTyping = true;
services.xserver = {
enable = true;
videoDrivers = [ "modesetting" ];
desktopManager.lxqt.enable = true;
xkb.layout = "se";
};
services.displayManager = {
sddm = {
enable = true;
theme = "maldives";
};
defaultSession = "lxqt";
autoLogin = {
enable = true;
user = "fm";
};
};
services.unclutter-xfixes = {
enable = true;
timeout = 3;
extraOptions = ["noevent"];
};
services.clipmenu.enable = true;
# Bluetooth
hardware.bluetooth.enable = true;
services.blueman.enable = true;
# Audio
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
environment.sessionVariables = rec {
EDITOR = "nvim";
TERMINAL = "alacritty";
};
environment.etc."current-system-packages".text =
let
packages = builtins.map (p: "${p.name}") config.environment.systemPackages;
sortedUnique = builtins.sort builtins.lessThan (pkgs.lib.unique packages);
formatted = builtins.concatStringsSep "\n" sortedUnique;
in
formatted;
time.timeZone = "Europe/Stockholm";
networking = {
hostName = "herring";
networkmanager.enable = true;
firewall.enable = false;
};
programs.nm-applet.enable = true;
i18n.defaultLocale = "en_US.utf8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "sv_SE.utf8";
LC_IDENTIFICATION = "sv_SE.utf8";
LC_MEASUREMENT = "sv_SE.utf8";
LC_MONETARY = "sv_SE.utf8";
LC_NAME = "sv_SE.utf8";
LC_NUMERIC = "sv_SE.utf8";
LC_PAPER = "sv_SE.utf8";
LC_TELEPHONE = "sv_SE.utf8";
LC_TIME = "sv_SE.utf8";
};
console.keyMap = "sv-latin1";
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
efi.efiSysMountPoint = "/boot/efi";
};
# TODO: Configure your system-wide user settings (groups, etc), add more users as needed.
users.users = {
fm = {
# TODO: You can set an initial password for your user.
# If you do, you can skip setting a root password by passing '--no-root-passwd' to nixos-install.
# Be sure to change it (using passwd) after rebooting!
initialPassword = "password";
isNormalUser = true;
openssh.authorizedKeys.keys = [
# TODO: Add your SSH public key(s) here, if you plan on using SSH to connect
];
# TODO: Be sure to add any other groups you need (such as networkmanager, audio, docker, etc)
extraGroups = [ "wheel" "networkmanager" "Eduroam" ];
};
};
# This setups a SSH server. Very important if you're setting up a headless system.
# Feel free to remove if you don't need it.
# services.openssh = {
# enable = true;
# Forbid root login through SSH.
# permitRootLogin = "no";
# Use keys only. Remove if you want to SSH using password (not recommended)
# passwordAuthentication = false;
# };
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "22.05";
}