]> git.dujemihanovic.xyz Git - nixos-configuration.git/blob - configuration.nix
Switch network config to DHCP
[nixos-configuration.git] / configuration.nix
1 { config, pkgs, ... }:
2
3 {
4 imports =
5 [
6 ./hardware-configuration.nix
7 ];
8
9 boot.loader.systemd-boot.enable = true;
10 boot.loader.efi.canTouchEfiVariables = true;
11
12 boot.extraModprobeConfig =
13 ''
14 options radeon si_support=0 cik_support=0
15 options amdgpu si_support=1 cik_support=1
16 '';
17
18 networking.hostName = "elitedesk"; # Define your hostname.
19 networking.interfaces.eno1.wakeOnLan.enable = true;
20 systemd.network = {
21 enable = true;
22 networks."10-lan" = {
23 matchConfig.Name = "eno1";
24 DHCP = "yes";
25 linkConfig.RequiredForOnline = "routable";
26 };
27 };
28
29 time.timeZone = "Europe/Zagreb";
30
31 i18n.defaultLocale = "en_US.UTF-8";
32
33 i18n.extraLocaleSettings = {
34 LC_ADDRESS = "hr_HR.UTF-8";
35 LC_IDENTIFICATION = "hr_HR.UTF-8";
36 LC_MEASUREMENT = "hr_HR.UTF-8";
37 LC_MONETARY = "hr_HR.UTF-8";
38 LC_NAME = "hr_HR.UTF-8";
39 LC_NUMERIC = "hr_HR.UTF-8";
40 LC_PAPER = "hr_HR.UTF-8";
41 LC_TELEPHONE = "hr_HR.UTF-8";
42 LC_TIME = "hr_HR.UTF-8";
43 };
44
45 console = {
46 keyMap = "dvorak";
47 packages = with pkgs; [ terminus_font ];
48 font = "ter-124b";
49 };
50
51 sound.enable = false;
52
53 programs.zsh = {
54 enable = true;
55 autosuggestions.enable = true;
56 syntaxHighlighting.enable = true;
57 };
58
59 users.users.duje = {
60 uid = 1000;
61 isNormalUser = true;
62 description = "Duje";
63 extraGroups = [ "networkmanager" "wheel" "libvirtd" ];
64 openssh.authorizedKeys.keys =
65 [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIMI2evf5v4ghSCJWacQJGMINjYW48WZYLvL6KIob1rd"
66 "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKeuxm8MnRjkVnrE+lZjlI+MuqzvD78OmvSgd43UMJ6b" ];
67 shell = pkgs.zsh;
68 };
69 users.users.root.openssh.authorizedKeys.keys =
70 [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIMI2evf5v4ghSCJWacQJGMINjYW48WZYLvL6KIob1rd"
71 "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKeuxm8MnRjkVnrE+lZjlI+MuqzvD78OmvSgd43UMJ6b" ];
72
73 nixpkgs.config.allowUnfree = true;
74
75 environment.systemPackages = with pkgs; [
76 neovim
77 lm_sensors
78 htop
79 nvimpager
80 tree
81 neofetch
82 ];
83
84 hardware.sensor.hddtemp = {
85 enable = true;
86 drives = [ "/dev/disk/by-path/*" ];
87 };
88
89 virtualisation.libvirtd.enable = true;
90
91 services.openssh.enable = true;
92
93 services.smartd.enable = true;
94 programs.msmtp = {
95 enable = true;
96 defaults = {
97 auth = true;
98 tls = true;
99 tls_starttls = true;
100 aliases = "/etc/aliases";
101 };
102 accounts = {
103 default = {
104 from = "duje.mihanovic@skole.hr";
105 host = "smtp.skole.hr";
106 port = 587;
107 user = "duje.mihanovic";
108 passwordeval = "/run/current-system/sw/bin/cat /secrets/email.txt";
109 };
110 };
111 };
112
113 environment.etc."aliases" = {
114 text = ''
115 root: duje.mihanovic@skole.hr
116 duje: duje.mihanovic@skole.hr
117 mailer-daemon: duje.mihanovic@skole.hr
118 '';
119 mode = "0644";
120 };
121
122 # Open ports in the firewall.
123 # networking.firewall.allowedTCPPorts = [ ... ];
124 # networking.firewall.allowedUDPPorts = [ ... ];
125 # Or disable the firewall altogether.
126 # networking.firewall.enable = false;
127
128 system.stateVersion = "23.05";
129
130 }