diff options
author | Akshay <[email protected]> | 2023-01-21 14:34:37 +0000 |
---|---|---|
committer | Akshay <[email protected]> | 2023-01-21 14:34:37 +0000 |
commit | 151790a591fc9a6c9b153b1d514610e26d6bc87e (patch) | |
tree | 3c245fbfc6c1b7533bc7d09d439cece755e86b61 /hosts/myrtle | |
parent | 7ff9aca0e71b0277d9ebe73a3cee1799c513d25d (diff) |
6.1.7 working
Diffstat (limited to 'hosts/myrtle')
-rw-r--r-- | hosts/myrtle/configuration.nix | 145 | ||||
-rw-r--r-- | hosts/myrtle/hardware-configuration.nix | 40 |
2 files changed, 185 insertions, 0 deletions
diff --git a/hosts/myrtle/configuration.nix b/hosts/myrtle/configuration.nix new file mode 100644 index 0000000..7539696 --- /dev/null +++ b/hosts/myrtle/configuration.nix | |||
@@ -0,0 +1,145 @@ | |||
1 | { config, pkgs, lib, self, ... }: | ||
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 | boot.kernelPackages = pkgs.linuxPackages_latest; | ||
12 | |||
13 | networking = { | ||
14 | hostName = "myrtle"; | ||
15 | wireless.enable = true; | ||
16 | wireless.networks.Srividhya.psk = "gopalan2020"; | ||
17 | }; | ||
18 | |||
19 | |||
20 | i18n.defaultLocale = "en_US.UTF-8"; | ||
21 | time.timeZone = "Asia/Kolkata"; | ||
22 | |||
23 | nixpkgs.config = { | ||
24 | "2bwm".patches = [ | ||
25 | ../../patches/2bwm/nerd-patch.diff | ||
26 | ]; | ||
27 | |||
28 | st = { | ||
29 | conf = builtins.readFile ../../programs/st/config.h; | ||
30 | extraLibs = with pkgs; [ harfbuzz ]; | ||
31 | patches = [ | ||
32 | ../../patches/st/xres.diff | ||
33 | ../../patches/st/bright.diff | ||
34 | ../../patches/st/ligatures.diff | ||
35 | ]; | ||
36 | }; | ||
37 | |||
38 | # for zoom-us, nvidia | ||
39 | allowUnfree = true; | ||
40 | }; | ||
41 | |||
42 | nixpkgs.overlays = with self.overlays; [ | ||
43 | # statix | ||
44 | prompt | ||
45 | ]; | ||
46 | |||
47 | environment.systemPackages = with pkgs; [ | ||
48 | _2bwm | ||
49 | man-pages | ||
50 | man-pages-posix | ||
51 | (lib.hiPrio pkgs.bashInteractive_5) | ||
52 | ]; | ||
53 | |||
54 | |||
55 | documentation = { | ||
56 | dev.enable = true; | ||
57 | man.generateCaches = true; | ||
58 | }; | ||
59 | |||
60 | users.motd = with config; '' | ||
61 | Host ${networking.hostName} | ||
62 | OS NixOS ${system.nixos.release} (${system.nixos.codeName}) | ||
63 | Version ${system.nixos.version} | ||
64 | Kernel ${boot.kernelPackages.kernel.version} | ||
65 | ''; | ||
66 | |||
67 | programs = { | ||
68 | light.enable = true; | ||
69 | adb.enable = true; | ||
70 | }; | ||
71 | |||
72 | sound.enable = true; | ||
73 | hardware = { | ||
74 | pulseaudio = { | ||
75 | enable = true; | ||
76 | package = pkgs.pulseaudioFull; | ||
77 | extraConfig = "load-module module-bluetooth-policy auto_switch=2"; | ||
78 | }; | ||
79 | # opengl.enable = true; | ||
80 | bluetooth = { | ||
81 | enable = true; | ||
82 | powerOnBoot = true; | ||
83 | }; | ||
84 | # nvidia = { | ||
85 | # prime = { | ||
86 | # offload.enable = true; | ||
87 | # nvidiaBusId = "PCI:1:0:0"; | ||
88 | # intelBusId = "PCI:0:2:0"; | ||
89 | # }; | ||
90 | # }; | ||
91 | }; | ||
92 | |||
93 | |||
94 | services.xserver = { | ||
95 | enable = true; | ||
96 | layout = "us"; | ||
97 | videoDrivers = [ "nvidia" ]; | ||
98 | displayManager.startx.enable = true; | ||
99 | libinput.enable = true; | ||
100 | }; | ||
101 | |||
102 | services.asusd = { | ||
103 | enable = true; | ||
104 | enableUserService = true; | ||
105 | }; | ||
106 | services.supergfxd.enable = true; | ||
107 | |||
108 | users.users.np = { | ||
109 | isNormalUser = true; | ||
110 | home = "/home/np"; | ||
111 | extraGroups = [ "wheel" "users" "tty" "audio" "video" "input" "adbusers" "docker" ]; | ||
112 | }; | ||
113 | |||
114 | nix = { | ||
115 | package = pkgs.nixUnstable; | ||
116 | extraOptions = '' | ||
117 | experimental-features = nix-command flakes | ||
118 | warn-dirty = false | ||
119 | keep-outputs = false | ||
120 | keep-derivations = false | ||
121 | ''; | ||
122 | settings = { | ||
123 | trusted-users = [ | ||
124 | "root" | ||
125 | "np" | ||
126 | ]; | ||
127 | }; | ||
128 | }; | ||
129 | |||
130 | |||
131 | # Copy the NixOS configuration file and link it from the resulting system | ||
132 | # (/run/current-system/configuration.nix). This is useful in case you | ||
133 | # accidentally delete configuration.nix. | ||
134 | # system.copySystemConfiguration = true; | ||
135 | |||
136 | # This value determines the NixOS release from which the default | ||
137 | # settings for stateful data, like file locations and database versions | ||
138 | # on your system were taken. It‘s perfectly fine and recommended to leave | ||
139 | # this value at the release version of the first install of this system. | ||
140 | # Before changing this value read the documentation for this option | ||
141 | # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). | ||
142 | system.stateVersion = "23.05"; # Did you read the comment? | ||
143 | |||
144 | } | ||
145 | |||
diff --git a/hosts/myrtle/hardware-configuration.nix b/hosts/myrtle/hardware-configuration.nix new file mode 100644 index 0000000..86638d2 --- /dev/null +++ b/hosts/myrtle/hardware-configuration.nix | |||
@@ -0,0 +1,40 @@ | |||
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 = [ "xhci_pci" "thunderbolt" "vmd" "nvme" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" ]; | ||
12 | boot.initrd.kernelModules = [ ]; | ||
13 | boot.kernelModules = [ "kvm-intel" ]; | ||
14 | boot.extraModulePackages = [ ]; | ||
15 | |||
16 | fileSystems."/" = | ||
17 | { device = "/dev/disk/by-uuid/59c9ddc2-b914-414b-9e7e-74b405cbf3f6"; | ||
18 | fsType = "ext4"; | ||
19 | }; | ||
20 | |||
21 | fileSystems."/boot" = | ||
22 | { device = "/dev/disk/by-uuid/7004-C5AE"; | ||
23 | fsType = "vfat"; | ||
24 | }; | ||
25 | |||
26 | swapDevices = [ ]; | ||
27 | |||
28 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking | ||
29 | # (the default) this is the recommended approach. When using systemd-networkd it's | ||
30 | # still possible to use this option, but it's recommended to use it in conjunction | ||
31 | # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. | ||
32 | networking.useDHCP = lib.mkDefault true; | ||
33 | # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; | ||
34 | |||
35 | nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; | ||
36 | powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; | ||
37 | hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; | ||
38 | # high-resolution display | ||
39 | hardware.video.hidpi.enable = lib.mkDefault true; | ||
40 | } | ||