diff options
author | Akshay <[email protected]> | 2021-09-26 16:56:36 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2021-09-26 16:56:36 +0100 |
commit | 5cdb4e421a809de51c3ebe8404e50d732721238b (patch) | |
tree | 73b71617c41b3e13edbf26035e821bb884d30441 /hosts/olive |
init
Diffstat (limited to 'hosts/olive')
-rw-r--r-- | hosts/olive/configuration.nix | 145 | ||||
-rw-r--r-- | hosts/olive/hardware-configuration.nix | 36 |
2 files changed, 181 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 | } | ||
diff --git a/hosts/olive/hardware-configuration.nix b/hosts/olive/hardware-configuration.nix new file mode 100644 index 0000000..fc9ccb8 --- /dev/null +++ b/hosts/olive/hardware-configuration.nix | |||
@@ -0,0 +1,36 @@ | |||
1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ | ||
2 | # and may be overwritten by future invocations. Please make changes | ||
3 | # to /etc/nixos/configuration.nix instead. | ||
4 | { config, lib, pkgs, modulesPath, ... }: | ||
5 | |||
6 | { | ||
7 | imports = [ | ||
8 | "${modulesPath}/installer/scan/not-detected.nix" | ||
9 | ]; | ||
10 | |||
11 | boot.initrd.availableKernelModules = [ | ||
12 | "xhci_pci" | ||
13 | "ahci" | ||
14 | "nvme" | ||
15 | "usb_storage" | ||
16 | "sd_mod" | ||
17 | ]; | ||
18 | boot.initrd.kernelModules = [ ]; | ||
19 | boot.kernelModules = [ "kvm-intel" ]; | ||
20 | boot.extraModulePackages = [ ]; | ||
21 | |||
22 | fileSystems."/" = { | ||
23 | device = "/dev/disk/by-uuid/27a7c854-e674-411f-9d79-37084922c91d"; | ||
24 | fsType = "ext4"; | ||
25 | }; | ||
26 | |||
27 | fileSystems."/boot" = { | ||
28 | device = "/dev/disk/by-uuid/882C-54D5"; | ||
29 | fsType = "vfat"; | ||
30 | }; | ||
31 | |||
32 | swapDevices = [ ]; | ||
33 | |||
34 | nix.maxJobs = lib.mkDefault 8; | ||
35 | powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; | ||
36 | } | ||