aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.lock135
-rw-r--r--flake.nix38
-rw-r--r--home.nix10
-rw-r--r--hosts/myrtle/configuration.nix145
-rw-r--r--hosts/myrtle/hardware-configuration.nix40
-rw-r--r--programs/init.vim14
-rw-r--r--services/default.nix2
-rw-r--r--services/picom.nix1
8 files changed, 250 insertions, 135 deletions
diff --git a/flake.lock b/flake.lock
index cb196f6..0f94912 100644
--- a/flake.lock
+++ b/flake.lock
@@ -22,87 +22,24 @@
22 "type": "github" 22 "type": "github"
23 } 23 }
24 }, 24 },
25 "fenix_2": {
26 "inputs": {
27 "nixpkgs": [
28 "statix",
29 "nixpkgs"
30 ],
31 "rust-analyzer-src": "rust-analyzer-src_2"
32 },
33 "locked": {
34 "lastModified": 1645251813,
35 "narHash": "sha256-cQ66tGjnZclBCS3nD26mZ5fUH+3/HnysGffBiWXUSHk=",
36 "owner": "nix-community",
37 "repo": "fenix",
38 "rev": "9892337b588c38ec59466a1c89befce464aae7f8",
39 "type": "github"
40 },
41 "original": {
42 "owner": "nix-community",
43 "repo": "fenix",
44 "type": "github"
45 }
46 },
47 "gitignore": {
48 "inputs": {
49 "nixpkgs": [
50 "prompt",
51 "nixpkgs"
52 ]
53 },
54 "locked": {
55 "lastModified": 1635165013,
56 "narHash": "sha256-o/BdVjNwcB6jOmzZjOH703BesSkkS5O7ej3xhyO8hAY=",
57 "owner": "hercules-ci",
58 "repo": "gitignore.nix",
59 "rev": "5b9e0ff9d3b551234b4f3eb3983744fa354b17f1",
60 "type": "github"
61 },
62 "original": {
63 "owner": "hercules-ci",
64 "repo": "gitignore.nix",
65 "type": "github"
66 }
67 },
68 "gitignore_2": {
69 "inputs": {
70 "nixpkgs": [
71 "statix",
72 "nixpkgs"
73 ]
74 },
75 "locked": {
76 "lastModified": 1635165013,
77 "narHash": "sha256-o/BdVjNwcB6jOmzZjOH703BesSkkS5O7ej3xhyO8hAY=",
78 "owner": "hercules-ci",
79 "repo": "gitignore.nix",
80 "rev": "5b9e0ff9d3b551234b4f3eb3983744fa354b17f1",
81 "type": "github"
82 },
83 "original": {
84 "owner": "hercules-ci",
85 "repo": "gitignore.nix",
86 "type": "github"
87 }
88 },
89 "home-manager": { 25 "home-manager": {
90 "inputs": { 26 "inputs": {
91 "nixpkgs": [ 27 "nixpkgs": [
92 "nixpkgs" 28 "nixpkgs"
93 ] 29 ],
30 "utils": "utils"
94 }, 31 },
95 "locked": { 32 "locked": {
96 "lastModified": 1656169755, 33 "lastModified": 1672244468,
97 "narHash": "sha256-Nlnm4jeQWEGjYrE6hxi/7HYHjBSZ/E0RtjCYifnNsWk=", 34 "narHash": "sha256-xaZb8AZqoXRCSqPusCk4ouf+fUNP8UJdafmMTF1Ltlw=",
98 "owner": "nix-community", 35 "owner": "nix-community",
99 "repo": "home-manager", 36 "repo": "home-manager",
100 "rev": "4a3d01fb53f52ac83194081272795aa4612c2381", 37 "rev": "89a8ba0b5b43b3350ff2e3ef37b66736b2ef8706",
101 "type": "github" 38 "type": "github"
102 }, 39 },
103 "original": { 40 "original": {
104 "owner": "nix-community", 41 "owner": "nix-community",
105 "ref": "release-22.05", 42 "ref": "release-22.11",
106 "repo": "home-manager", 43 "repo": "home-manager",
107 "type": "github" 44 "type": "github"
108 } 45 }
@@ -124,16 +61,16 @@
124 }, 61 },
125 "nixpkgs": { 62 "nixpkgs": {
126 "locked": { 63 "locked": {
127 "lastModified": 1662099760, 64 "lastModified": 1674236650,
128 "narHash": "sha256-MdZLCTJPeHi/9fg6R9fiunyDwP3XHJqDd51zWWz9px0=", 65 "narHash": "sha256-B4GKL1YdJnII6DQNNJ4wDW1ySJVx2suB1h/v4Ql8J0Q=",
129 "owner": "NixOS", 66 "owner": "NixOS",
130 "repo": "nixpkgs", 67 "repo": "nixpkgs",
131 "rev": "67e45078141102f45eff1589a831aeaa3182b41e", 68 "rev": "cfb43ad7b941d9c3606fb35d91228da7ebddbfc5",
132 "type": "github" 69 "type": "github"
133 }, 70 },
134 "original": { 71 "original": {
135 "owner": "NixOS", 72 "owner": "NixOS",
136 "ref": "nixos-22.05", 73 "ref": "nixpkgs-unstable",
137 "repo": "nixpkgs", 74 "repo": "nixpkgs",
138 "type": "github" 75 "type": "github"
139 } 76 }
@@ -141,17 +78,16 @@
141 "prompt": { 78 "prompt": {
142 "inputs": { 79 "inputs": {
143 "fenix": "fenix", 80 "fenix": "fenix",
144 "gitignore": "gitignore",
145 "nixpkgs": [ 81 "nixpkgs": [
146 "nixpkgs" 82 "nixpkgs"
147 ] 83 ]
148 }, 84 },
149 "locked": { 85 "locked": {
150 "lastModified": 1643513342, 86 "lastModified": 1662898783,
151 "narHash": "sha256-t819RkW5NiURx4lJlGMfHW3IuAMJtK29jUpAqUixKeg=", 87 "narHash": "sha256-wh/sty5Gs7vwDcuNpxekI/7lzg7LEyQIQVAX0dMJTE8=",
152 "ref": "refs/heads/master", 88 "ref": "refs/heads/master",
153 "rev": "8b1dd1f5609447f5d862e330a75a4b2a0dfc3929", 89 "rev": "306640f502ef24e31590eef910b78ccd85ce8f6e",
154 "revCount": 3, 90 "revCount": 5,
155 "type": "git", 91 "type": "git",
156 "url": "https://git.peppe.rs/cli/prompt" 92 "url": "https://git.peppe.rs/cli/prompt"
157 }, 93 },
@@ -165,8 +101,7 @@
165 "home-manager": "home-manager", 101 "home-manager": "home-manager",
166 "nixos-hardware": "nixos-hardware", 102 "nixos-hardware": "nixos-hardware",
167 "nixpkgs": "nixpkgs", 103 "nixpkgs": "nixpkgs",
168 "prompt": "prompt", 104 "prompt": "prompt"
169 "statix": "statix"
170 } 105 }
171 }, 106 },
172 "rust-analyzer-src": { 107 "rust-analyzer-src": {
@@ -186,44 +121,20 @@
186 "type": "github" 121 "type": "github"
187 } 122 }
188 }, 123 },
189 "rust-analyzer-src_2": { 124 "utils": {
190 "flake": false,
191 "locked": { 125 "locked": {
192 "lastModified": 1645205556, 126 "lastModified": 1667395993,
193 "narHash": "sha256-e4lZW3qRyOEJ+vLKFQP7m2Dxh5P44NrnekZYLxlucww=", 127 "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
194 "owner": "rust-analyzer", 128 "owner": "numtide",
195 "repo": "rust-analyzer", 129 "repo": "flake-utils",
196 "rev": "acf5874b39f3dc5262317a6074d9fc7285081161", 130 "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
197 "type": "github" 131 "type": "github"
198 }, 132 },
199 "original": { 133 "original": {
200 "owner": "rust-analyzer", 134 "owner": "numtide",
201 "ref": "nightly", 135 "repo": "flake-utils",
202 "repo": "rust-analyzer",
203 "type": "github" 136 "type": "github"
204 } 137 }
205 },
206 "statix": {
207 "inputs": {
208 "fenix": "fenix_2",
209 "gitignore": "gitignore_2",
210 "nixpkgs": [
211 "nixpkgs"
212 ]
213 },
214 "locked": {
215 "lastModified": 1657460333,
216 "narHash": "sha256-5o6zMBASEsGKtjKDb3SizJnN9A7qpOcbzWBXsacfMyc=",
217 "ref": "refs/heads/master",
218 "rev": "6422c959d365dee2fda5eda8858fefad31f17b25",
219 "revCount": 129,
220 "type": "git",
221 "url": "https://git.peppe.rs/languages/statix"
222 },
223 "original": {
224 "type": "git",
225 "url": "https://git.peppe.rs/languages/statix"
226 }
227 } 138 }
228 }, 139 },
229 "root": "root", 140 "root": "root",
diff --git a/flake.nix b/flake.nix
index 8293654..0d9692c 100644
--- a/flake.nix
+++ b/flake.nix
@@ -2,19 +2,19 @@
2 description = "nerdypepper's nixos config"; 2 description = "nerdypepper's nixos config";
3 3
4 inputs = { 4 inputs = {
5 nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.05"; 5 nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
6 6
7 nixos-hardware.url = "github:nixos/nixos-hardware"; 7 nixos-hardware.url = "github:nixos/nixos-hardware";
8 8
9 home-manager = { 9 home-manager = {
10 url = "github:nix-community/home-manager/release-22.05"; 10 url = "github:nix-community/home-manager/release-22.11";
11 inputs.nixpkgs.follows = "nixpkgs"; 11 inputs.nixpkgs.follows = "nixpkgs";
12 }; 12 };
13 13
14 statix = { 14 # statix = {
15 url = "git+https://git.peppe.rs/languages/statix"; 15 # url = "git+https://git.peppe.rs/languages/statix";
16 inputs.nixpkgs.follows = "nixpkgs"; 16 # inputs.nixpkgs.follows = "nixpkgs";
17 }; 17 # };
18 18
19 prompt = { 19 prompt = {
20 url = "git+https://git.peppe.rs/cli/prompt"; 20 url = "git+https://git.peppe.rs/cli/prompt";
@@ -28,13 +28,13 @@
28 , nixpkgs 28 , nixpkgs
29 , nixos-hardware 29 , nixos-hardware
30 , home-manager 30 , home-manager
31 , statix 31 # , statix
32 , prompt 32 , prompt
33 , ... 33 , ...
34 } @ inputs: { 34 } @ inputs: {
35 35
36 overlays = { 36 overlays = {
37 statix = statix.overlay; 37 # statix = statix.overlay;
38 prompt = prompt.overlay; 38 prompt = prompt.overlay;
39 }; 39 };
40 40
@@ -60,6 +60,28 @@
60 } 60 }
61 ]; 61 ];
62 }; 62 };
63
64 myrtle = nixpkgs.lib.nixosSystem {
65 system = "x86_64-linux";
66 modules = [
67 ({ config = { nix.registry.nixpkgs.flake = nixpkgs; }; })
68 {
69 imports = [ ./hosts/myrtle/configuration.nix ];
70 _module.args.self = self;
71 }
72 home-manager.nixosModules.home-manager
73 {
74 home-manager.useGlobalPkgs = true;
75 home-manager.useUserPackages = true;
76 home-manager.users.np = {
77 imports = [ ./home.nix ];
78 _module.args.self = self;
79 _module.args.inputs = inputs;
80 _module.args.theme = import ./theme;
81 };
82 }
83 ];
84 };
63 }; 85 };
64 }; 86 };
65 87
diff --git a/home.nix b/home.nix
index 92d6c81..b67a91d 100644
--- a/home.nix
+++ b/home.nix
@@ -11,10 +11,10 @@
11 ./programs 11 ./programs
12 ./services 12 ./services
13 ./x 13 ./x
14 ./mail.nix 14 # ./mail.nix
15 ]; 15 ];
16 16
17 home.stateVersion = "21.05"; 17 home.stateVersion = "22.11";
18 home.username = "np"; 18 home.username = "np";
19 home.homeDirectory = "/home/np"; 19 home.homeDirectory = "/home/np";
20 home.extraOutputsToInstall = [ "man" ]; 20 home.extraOutputsToInstall = [ "man" ];
@@ -28,7 +28,6 @@
28 firefox 28 firefox
29 xclip 29 xclip
30 ripgrep 30 ripgrep
31 ccls
32 miniserve 31 miniserve
33 rnix-lsp 32 rnix-lsp
34 pfetch 33 pfetch
@@ -49,18 +48,17 @@
49 ripgrep-all 48 ripgrep-all
50 urlview 49 urlview
51 slop 50 slop
52 gimp
53 fd 51 fd
54 du-dust 52 du-dust
55 jq 53 jq
56 stylish-haskell
57 libnotify 54 libnotify
58 inotify-tools 55 inotify-tools
59 rtorrent 56 rtorrent
60 sxiv 57 sxiv
61 lftp 58 lftp
62 zoom-us
63 pavucontrol 59 pavucontrol
60 cudatoolkit
61 pciutils
64 62
65 # meta 63 # meta
66 nixpkgs-review 64 nixpkgs-review
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}
diff --git a/programs/init.vim b/programs/init.vim
index 4a822da..8cf3c9c 100644
--- a/programs/init.vim
+++ b/programs/init.vim
@@ -1,12 +1,12 @@
1let &t_ZM = "\e[3m" 1let &t_ZM = "\e[3m"
2 2
3call plug#begin('~/.local/share/nvim/plugged') 3" call plug#begin('~/.local/share/nvim/plugged')
4 4"
5" my stuff 5" " my stuff
6Plug 'git@ferrn:vim/vim-colors-plain' 6" Plug 'git@ferrn:vim/vim-colors-plain'
7Plug 'git@ferrn:vim/better-text-objs' 7" Plug 'git@ferrn:vim/better-text-objs'
8 8"
9call plug#end() 9" call plug#end()
10 10
11 11
12" augroups 12" augroups
diff --git a/services/default.nix b/services/default.nix
index 83955bf..dda2992 100644
--- a/services/default.nix
+++ b/services/default.nix
@@ -8,7 +8,7 @@
8 8
9 imports = [ 9 imports = [
10 ./dunst.nix 10 ./dunst.nix
11 ./picom.nix 11 # ./picom.nix
12 ./redshift.nix 12 ./redshift.nix
13 ./sxhkd.nix 13 ./sxhkd.nix
14 ./mbsync.nix 14 ./mbsync.nix
diff --git a/services/picom.nix b/services/picom.nix
index 67605d1..08ba376 100644
--- a/services/picom.nix
+++ b/services/picom.nix
@@ -10,7 +10,6 @@
10 fade = true; 10 fade = true;
11 fadeDelta = 10; 11 fadeDelta = 10;
12 fadeSteps = [ "0.04" "0.04" ]; 12 fadeSteps = [ "0.04" "0.04" ];
13 inactiveDim = "0.0";
14 shadow = false; 13 shadow = false;
15 shadowOffsets = [ (-60) (-60) ]; 14 shadowOffsets = [ (-60) (-60) ];
16 shadowOpacity = "0.20"; 15 shadowOpacity = "0.20";