diff options
Diffstat (limited to 'hosts/olive/configuration.nix')
-rw-r--r-- | hosts/olive/configuration.nix | 145 |
1 files changed, 145 insertions, 0 deletions
diff --git a/hosts/olive/configuration.nix b/hosts/olive/configuration.nix new file mode 100644 index 0000000..68b7d99 --- /dev/null +++ b/hosts/olive/configuration.nix | |||
@@ -0,0 +1,145 @@ | |||
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, lib, self, ... }: | ||
6 | |||
7 | { | ||
8 | imports = | ||
9 | [ | ||
10 | ./hardware-configuration.nix | ||
11 | ../../services/battery.nix | ||
12 | ../../services/suspend.nix | ||
13 | ]; | ||
14 | |||
15 | boot.loader.systemd-boot.enable = true; | ||
16 | boot.loader.efi.canTouchEfiVariables = true; | ||
17 | boot.kernel.sysctl."net.ipv4.ip_forward" = 1; | ||
18 | |||
19 | networking = { | ||
20 | hostName = "olive"; | ||
21 | wireless = { | ||
22 | enable = true; | ||
23 | interfaces = [ | ||
24 | "wlp2s0" | ||
25 | ]; | ||
26 | networks = { | ||
27 | Sanic = { | ||
28 | pskRaw = "03fbbe8c6b400af40c64ea475be59812ca1d13f40beaf0bf188c50a1e959c8fd"; | ||
29 | }; | ||
30 | Gopalan = { | ||
31 | pskRaw = "52f7f6548fa6f7f24965aae2bd7aa1a34d22a650cdc319d9d6a8567f91be85c8"; | ||
32 | }; | ||
33 | Srividhya = { | ||
34 | pskRaw = "f4302c17d20d0ac8791960495bb3ca4e790677d87d16a7d8c414350dd67c9713"; | ||
35 | }; | ||
36 | }; | ||
37 | extraConfig = '' | ||
38 | ctrl_interface=/run/wpa_supplicant | ||
39 | ctrl_interface_group=wheel | ||
40 | ''; | ||
41 | }; | ||
42 | useDHCP = false; | ||
43 | interfaces.wlp2s0.useDHCP = true; | ||
44 | }; | ||
45 | |||
46 | #networking.nameservers = [ "1.1.1.1" "1.0.0.1" ]; | ||
47 | |||
48 | i18n.defaultLocale = "en_US.UTF-8"; | ||
49 | time.timeZone = "Asia/Kolkata"; | ||
50 | |||
51 | nixpkgs.config = { | ||
52 | "2bwm".patches = [ | ||
53 | ../../patches/2bwm/nerd-patch.diff | ||
54 | ]; | ||
55 | |||
56 | st = { | ||
57 | conf = builtins.readFile ../../programs/st/config.h; | ||
58 | extraLibs = with pkgs; [ harfbuzz ]; | ||
59 | patches = [ | ||
60 | ../../patches/st/xres.diff | ||
61 | ../../patches/st/bright.diff | ||
62 | ../../patches/st/ligatures.diff | ||
63 | ]; | ||
64 | }; | ||
65 | }; | ||
66 | |||
67 | nixpkgs.overlays = with self.overlays; [ | ||
68 | nvim-nightly | ||
69 | ]; | ||
70 | |||
71 | environment.systemPackages = with pkgs; [ | ||
72 | _2bwm | ||
73 | manpages | ||
74 | ]; | ||
75 | |||
76 | users.motd = with config; '' | ||
77 | Host ${networking.hostName} | ||
78 | OS NixOS ${system.nixos.release} (${system.nixos.codeName}) | ||
79 | Version ${system.nixos.version} | ||
80 | Kernel ${boot.kernelPackages.kernel.version} | ||
81 | ''; | ||
82 | |||
83 | programs = { | ||
84 | light.enable = true; | ||
85 | adb.enable = true; | ||
86 | }; | ||
87 | |||
88 | |||
89 | sound.enable = true; | ||
90 | hardware.pulseaudio = { | ||
91 | enable = true; | ||
92 | package = pkgs.pulseaudioFull; | ||
93 | extraConfig = "load-module module-switch-on-connect"; | ||
94 | }; | ||
95 | |||
96 | hardware.bluetooth.enable = true; | ||
97 | hardware.bluetooth.powerOnBoot = true; | ||
98 | |||
99 | # Enable the X11 windowing system. | ||
100 | services.xserver = { | ||
101 | enable = true; | ||
102 | layout = "us"; | ||
103 | xkbOptions = "caps:swapescape"; | ||
104 | displayManager.startx.enable = true; | ||
105 | libinput.enable = true; | ||
106 | }; | ||
107 | |||
108 | services.batteryNotifier = { | ||
109 | enable = true; | ||
110 | notifyCapacity = 40; | ||
111 | suspendCapacity = 5; | ||
112 | }; | ||
113 | |||
114 | users.users.np = { | ||
115 | isNormalUser = true; | ||
116 | home = "/home/np"; | ||
117 | extraGroups = [ "wheel" "users" "tty" "audio" "video" "input" "adbusers" "docker" ]; | ||
118 | }; | ||
119 | |||
120 | documentation.man.generateCaches = true; | ||
121 | |||
122 | nix = { | ||
123 | package = pkgs.nixUnstable; | ||
124 | extraOptions = '' | ||
125 | experimental-features = nix-command flakes ca-references ca-derivations | ||
126 | warn-dirty = false | ||
127 | keep-outputs = true | ||
128 | keep-derivations = true | ||
129 | ''; | ||
130 | }; | ||
131 | |||
132 | nix.trustedUsers = | ||
133 | [ | ||
134 | "root" | ||
135 | "np" | ||
136 | ]; | ||
137 | |||
138 | # This value determines the NixOS release from which the default | ||
139 | # settings for stateful data, like file locations and database versions | ||
140 | # on your system were taken. It‘s perfectly fine and recommended to leave | ||
141 | # this value at the release version of the first install of this system. | ||
142 | # Before changing this value read the documentation for this option | ||
143 | # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). | ||
144 | system.stateVersion = "20.03"; # Did you read the comment? | ||
145 | } | ||