]> git.dujemihanovic.xyz Git - nixos-configuration.git/blob - configuration.nix
Add gitignore
[nixos-configuration.git] / configuration.nix
1 # Edit this configuration file to define what should be installed on
2 # your system. Help is available in the configuration.nix(5) man page
3 # and in the NixOS manual (accessible by running ‘nixos-help’).
4
5 { config, pkgs, ... }:
6
7 {
8 imports =
9 [ # Include the results of the hardware scan.
10 ./hardware-configuration.nix
11 ];
12
13 # Bootloader.
14 boot.loader.systemd-boot.enable = true;
15 boot.loader.efi.canTouchEfiVariables = true;
16
17 boot.extraModprobeConfig =
18 ''
19 options radeon si_support=0 cik_support=0
20 options amdgpu si_support=1 cik_support=1
21 '';
22
23 networking.hostName = "elitedesk"; # Define your hostname.
24 # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
25 networking.interfaces.eno1.wakeOnLan.enable = true;
26
27 # Configure network proxy if necessary
28 # networking.proxy.default = "http://user:password@proxy:port/";
29 # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
30
31 # Enable networking
32 networking.networkmanager.enable = true;
33
34 # Set your time zone.
35 time.timeZone = "Europe/Zagreb";
36
37 # Select internationalisation properties.
38 i18n.defaultLocale = "en_US.UTF-8";
39
40 i18n.extraLocaleSettings = {
41 LC_ADDRESS = "hr_HR.UTF-8";
42 LC_IDENTIFICATION = "hr_HR.UTF-8";
43 LC_MEASUREMENT = "hr_HR.UTF-8";
44 LC_MONETARY = "hr_HR.UTF-8";
45 LC_NAME = "hr_HR.UTF-8";
46 LC_NUMERIC = "hr_HR.UTF-8";
47 LC_PAPER = "hr_HR.UTF-8";
48 LC_TELEPHONE = "hr_HR.UTF-8";
49 LC_TIME = "hr_HR.UTF-8";
50 };
51
52 # Enable the X11 windowing system.
53 services.xserver.enable = true;
54
55 # Enable the GNOME Desktop Environment.
56 services.xserver.displayManager.gdm.enable = true;
57 services.xserver.desktopManager.gnome.enable = true;
58
59 # Configure keymap in X11
60 services.xserver = {
61 layout = "hr";
62 xkbVariant = "";
63 xkbOptions = "caps:swapescape";
64 };
65
66 # Configure console keymap
67 console.keyMap = "croat";
68
69 # Enable CUPS to print documents.
70 services.printing.enable = true;
71
72 # Enable sound with pipewire.
73 sound.enable = true;
74 hardware.pulseaudio.enable = false;
75 security.rtkit.enable = true;
76 services.pipewire = {
77 enable = true;
78 alsa.enable = true;
79 alsa.support32Bit = true;
80 pulse.enable = true;
81 # If you want to use JACK applications, uncomment this
82 #jack.enable = true;
83
84 # use the example session manager (no others are packaged yet so this is enabled by default,
85 # no need to redefine it in your config for now)
86 #media-session.enable = true;
87 };
88
89 # Enable touchpad support (enabled default in most desktopManager).
90 # services.xserver.libinput.enable = true;
91
92 programs.zsh = {
93 enable = true;
94 autosuggestions.enable = true;
95 syntaxHighlighting.enable = true;
96 };
97
98 # Define a user account. Don't forget to set a password with ‘passwd’.
99 users.users.duje = {
100 uid = 1000;
101 isNormalUser = true;
102 description = "Duje";
103 extraGroups = [ "networkmanager" "wheel" "libvirtd" ];
104 packages = with pkgs; [
105 librewolf
106 thunderbird
107 dino
108 nheko
109 pass
110 passExtensions.pass-otp
111 passExtensions.pass-audit
112 passExtensions.pass-genphrase
113 ];
114 openssh.authorizedKeys.keys =
115 [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIMI2evf5v4ghSCJWacQJGMINjYW48WZYLvL6KIob1rd" ];
116 shell = pkgs.zsh;
117 };
118
119 # Allow unfree packages
120 nixpkgs.config.allowUnfree = true;
121
122 # List packages installed in system profile. To search, run:
123 # $ nix search wget
124 environment.systemPackages = with pkgs; [
125 # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
126 # wget
127 neovim
128 lm_sensors
129 brasero
130 ];
131
132 virtualisation.libvirtd.enable = true;
133
134 # Some programs need SUID wrappers, can be configured further or are
135 # started in user sessions.
136 # programs.mtr.enable = true;
137 # programs.gnupg.agent = {
138 # enable = true;
139 # enableSSHSupport = true;
140 # };
141
142 # List services that you want to enable:
143
144 # Enable the OpenSSH daemon.
145 services.openssh.enable = true;
146
147 services.smartd.enable = true;
148 programs.msmtp = {
149 enable = true;
150 defaults = {
151 auth = true;
152 tls = true;
153 tls_starttls = true;
154 aliases = "/etc/aliases";
155 };
156 accounts = {
157 default = {
158 from = "duje.mihanovic@skole.hr";
159 host = "smtp.skole.hr";
160 port = 587;
161 user = "duje.mihanovic";
162 passwordeval = "cat /secrets/email.txt";
163 };
164 };
165 };
166
167 environment.etc."aliases" = {
168 text = ''
169 root: duje.mihanovic@skole.hr
170 duje: duje.mihanovic@skole.hr
171 mailer-daemon: duje.mihanovic@skole.hr
172 '';
173 mode = "0644";
174 };
175
176 # Open ports in the firewall.
177 # networking.firewall.allowedTCPPorts = [ ... ];
178 # networking.firewall.allowedUDPPorts = [ ... ];
179 # Or disable the firewall altogether.
180 # networking.firewall.enable = false;
181
182 # This value determines the NixOS release from which the default
183 # settings for stateful data, like file locations and database versions
184 # on your system were taken. It‘s perfectly fine and recommended to leave
185 # this value at the release version of the first install of this system.
186 # Before changing this value read the documentation for this option
187 # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
188 system.stateVersion = "23.05"; # Did you read the comment?
189
190 }