]> git.dujemihanovic.xyz Git - nixos-configuration.git/blob - configuration.nix
b04823ebb68204269cb925ac27185489703ea7c7
[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 # Configure console keymap
53 console.keyMap = "croat";
54
55 # Enable CUPS to print documents.
56 services.printing.enable = true;
57
58 # Enable sound with pipewire.
59 sound.enable = false;
60
61 programs.zsh = {
62 enable = true;
63 autosuggestions.enable = true;
64 syntaxHighlighting.enable = true;
65 };
66
67 # Define a user account. Don't forget to set a password with ‘passwd’.
68 users.users.duje = {
69 uid = 1000;
70 isNormalUser = true;
71 description = "Duje";
72 extraGroups = [ "networkmanager" "wheel" "libvirtd" ];
73 openssh.authorizedKeys.keys =
74 [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIMI2evf5v4ghSCJWacQJGMINjYW48WZYLvL6KIob1rd"
75 "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKeuxm8MnRjkVnrE+lZjlI+MuqzvD78OmvSgd43UMJ6b" ];
76 shell = pkgs.zsh;
77 };
78 users.users.root.openssh.authorizedKeys.keys =
79 [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIMI2evf5v4ghSCJWacQJGMINjYW48WZYLvL6KIob1rd"
80 "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKeuxm8MnRjkVnrE+lZjlI+MuqzvD78OmvSgd43UMJ6b" ];
81
82 # Allow unfree packages
83 nixpkgs.config.allowUnfree = true;
84
85 # List packages installed in system profile. To search, run:
86 # $ nix search wget
87 environment.systemPackages = with pkgs; [
88 # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
89 # wget
90 neovim
91 lm_sensors
92 ];
93
94 virtualisation.libvirtd.enable = true;
95
96 # Some programs need SUID wrappers, can be configured further or are
97 # started in user sessions.
98 # programs.mtr.enable = true;
99 # programs.gnupg.agent = {
100 # enable = true;
101 # enableSSHSupport = true;
102 # };
103
104 # List services that you want to enable:
105
106 # Enable the OpenSSH daemon.
107 services.openssh.enable = true;
108
109 services.smartd.enable = true;
110 programs.msmtp = {
111 enable = true;
112 defaults = {
113 auth = true;
114 tls = true;
115 tls_starttls = true;
116 aliases = "/etc/aliases";
117 };
118 accounts = {
119 default = {
120 from = "duje.mihanovic@skole.hr";
121 host = "smtp.skole.hr";
122 port = 587;
123 user = "duje.mihanovic";
124 passwordeval = "cat /secrets/email.txt";
125 };
126 };
127 };
128
129 environment.etc."aliases" = {
130 text = ''
131 root: duje.mihanovic@skole.hr
132 duje: duje.mihanovic@skole.hr
133 mailer-daemon: duje.mihanovic@skole.hr
134 '';
135 mode = "0644";
136 };
137
138 # Open ports in the firewall.
139 # networking.firewall.allowedTCPPorts = [ ... ];
140 # networking.firewall.allowedUDPPorts = [ ... ];
141 # Or disable the firewall altogether.
142 # networking.firewall.enable = false;
143
144 # This value determines the NixOS release from which the default
145 # settings for stateful data, like file locations and database versions
146 # on your system were taken. It‘s perfectly fine and recommended to leave
147 # this value at the release version of the first install of this system.
148 # Before changing this value read the documentation for this option
149 # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
150 system.stateVersion = "23.05"; # Did you read the comment?
151
152 }