-
Notifications
You must be signed in to change notification settings - Fork 0
/
configuration.nix
132 lines (109 loc) · 3.04 KB
/
configuration.nix
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
{ config, pkgs, lib, ... }:
let
sources = import npins/default.nix;
in
{
imports =
[
./hardware-configuration.nix
./networking.nix
./desktop.nix
./home.nix
./packages.nix
"${sources.home-manager}/nixos/default.nix"
./fabric.nix
];
documentation.enable = false;
# Configure the Nix package manager
nixpkgs = {
overlays = [ (import sources.emacs-overlay) ];
pkgs = import sources.nixpkgs {
config = {
allowUnfree = true;
permittedInsecurePackages = [
"openssl-1.1.1w"
"openssl-1.1.1m"
];
};
};
};
nix = {
package = pkgs.nix_2_3;
nixPath = ["nixpkgs=${sources.nixpkgs}:nixos-config=/etc/nixos/configuration.nix"];
settings = {
trusted-users = [ "ezemtsov" ];
max-jobs = "auto";
netrc-file = "/etc/nix/netrc";
};
};
# Replace command-not-found with nix-index
programs.nix-index.enable = true;
programs.nix-index.enableFishIntegration = true;
programs.command-not-found.enable = false;
boot = {
# Use the systemd-boot EFI boot loader.
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
tmp.cleanOnBoot = true;
# Enable KVM for OSX virtualization
extraModprobeConfig = ''
options kvm_intel nested=1
options kvm_intel emulate_invalid_guest_state=0
options kvm ignore_msrs=1
'';
# This is required for dotnet to run correctly
kernel.sysctl."fs.inotify.max_user_instances" = 524288;
supportedFilesystems = [ "exfat" ];
};
# Update Intel microcode
hardware.cpu.intel.updateMicrocode = true;
# Enable power saving
powerManagement.enable = true;
# Emacs
services.emacs = {
enable = false;
install = true;
package = import ./emacs.nix { inherit pkgs; };
};
location.latitude = 59.91;
location.longitude = 10.75;
services.redshift.enable = true;
# Set your time zone.
time.timeZone = "Europe/Oslo";
# Enable backlight control.
programs.light.enable = true;
# Security
security.pam.services.gdm.enableGnomeKeyring = true;
services.gnome.gnome-keyring.enable = true;
services.openssh.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
# Enable docker
virtualisation = {
docker.enable = true;
# virtualbox.host.enable = true;
# this is needed to get a bridge with DHCP enabled
libvirtd.enable = true;
};
# Enable USB automount
services.gvfs.enable = true;
# Audio
services.pipewire = {
enable = true;
alsa.enable = true;
jack.enable = true;
pulse.enable = true;
socketActivation = true;
};
hardware.pulseaudio.enable = lib.mkForce false;
# Bluetooth
hardware.bluetooth.enable = true;
services.blueman.enable = true;
# This value determines the NixOS release with which your system is to be
# compatible, in order to avoid breaking some software such as database
# servers. You should change this only after NixOS release notes say you
# should.
system.stateVersion = "23.05";
}