authorgravatar for nmarks413@gmail.comNatalie Marks <nmarks413@gmail.com> 2024-09-27 19:01:35-07:00
committergravatar for nmarks413@gmail.comNatalie Marks <nmarks413@gmail.com> 2024-09-27 19:01:35-07:00
log104b213ebd955d3feda046bcd8d3dea36c24f1ee
treef30a06ab195925086939dd93ae8c6873eb923ef9
parentcb933d885d8c9ca111fda3059e1f61f944d828a8

changes


6 files changed, 329 insertions(+), 93 deletions(-)

flake.lock+22
......@@ -165,6 +165,27 @@
165165 "type": "github"
166166 }
167167 },
168 "darwin": {
169 "inputs": {
170 "nixpkgs": [
171 "nixpkgs"
172 ]
173 },
174 "locked": {
175 "lastModified": 1727003835,
176 "narHash": "sha256-Cfllbt/ADfO8oxbT984MhPHR6FJBaglsr1SxtDGbpec=",
177 "owner": "lnl7",
178 "repo": "nix-darwin",
179 "rev": "bd7d1e3912d40f799c5c0f7e5820ec950f1e0b3d",
180 "type": "github"
181 },
182 "original": {
183 "owner": "lnl7",
184 "ref": "master",
185 "repo": "nix-darwin",
186 "type": "github"
187 }
188 },
168189 "flake-compat": {
169190 "flake": false,
170191 "locked": {
......@@ -918,6 +939,7 @@
918939 "root": {
919940 "inputs": {
920941 "blocklist-hosts": "blocklist-hosts",
942 "darwin": "darwin",
921943 "flake-utils": "flake-utils",
922944 "foundryvtt": "foundryvtt",
923945 "ghostty": "ghostty",
flake.nix+36-35
......@@ -58,36 +58,23 @@
5858 overlays = [
5959 inputs.zig.overlays.default
6060 ];
61 pkgs = import nixpkgs {
62 config = {
63 allowUnfree = true;
64 allowUnfreePredicate = _: true;
65 };
66 overlays = overlays;
67 };
68
69 pkgs-stable = import nixpkgs-stable {
70 config = {
71 allowUnfree = true;
72 allowUnfreePredicate = _: true;
73 };
74 overlays = [];
75 };
7661
77 lib = nixpkgs.lib;
62 inherit (nixpkgs) lib;
7863 in {
7964 nixosConfigurations = {
8065 nixos = lib.nixosSystem {
8166 modules = [
67 {nixpkgs.overlays = overlays;}
8268 nixos-cosmic.nixosModules.default
83 ./configuration.nix
69 ./hosts/desktop/configuration.nix
8470 home-manager.nixosModules.home-manager
8571 {
86 home-manager.useGlobalPkgs = true;
87 home-manager.useUserPackages = true;
88 home-manager.users.nmarks = import ./hosts/desktop/home.nix;
72 home-manager = {
73 useGlobalPkgs = true;
74 useUserPackages = true;
75 users.nmarks = import ./hosts/desktop/home.nix;
76 };
8977 home-manager.extraSpecialArgs = {
90 inherit pkgs-stable;
9178 inherit stylix;
9279 inherit hyprland-plugins;
9380 inherit zls;
......@@ -97,25 +84,39 @@
9784 ];
9885 specialArgs = {
9986 inherit inputs;
100 inherit pkgs-stable;
10187 inherit stylix;
10288 inherit blocklist-hosts;
10389 };
10490 };
10591 };
106 darwinSystem = darwin.lib.darwinSystem {
107 system = "aarch64-darwin";
108 modules = [
109 ./hosts/laptop/configuration.nix
110 home-manager.darwinModules.home-manager
111 {
112 home-manager.useGlobalPkgs = true;
113 home-manager.useUserPackages = true;
114 home-manager.users.nmarks = import ./hosts/laptop/home.nix;
115 users.users.nmarks.home = "/Users/nmarks";
116 }
117 ];
118 specialArgs = {inherit nixpkgs;};
92 darwinConfigurations = {
93 "Natalies-MacBook-Air" = darwin.lib.darwinSystem {
94 system = "aarch64-darwin";
95 modules = [
96 {nixpkgs.overlays = overlays;}
97 ./hosts/laptop/configuration.nix
98 home-manager.darwinModules.home-manager
99 {
100 home-manager = {
101 useGlobalPkgs = true;
102 useUserPackages = true;
103 users.nmarks = import ./hosts/laptop/home.nix;
104 };
105 home-manager.extraSpecialArgs = {
106 inherit stylix;
107 inherit zls;
108 inherit ghostty;
109 };
110 users.users.nmarks.home = "/Users/nmarks";
111 }
112 ];
113 specialArgs = {
114 inherit inputs;
115 inherit stylix;
116 inherit blocklist-hosts;
117 inherit ghostty;
118 };
119 };
119120 };
120121 # nixos = inputs.self.nixosConfigurations.nmarks;
121122 #
hardware-configuration.nix deleted-40
......@@ -1,40 +0,0 @@
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 = [ "nvme" "xhci_pci" "ahci" "usbhid" "sd_mod" ];
12 boot.initrd.kernelModules = [ ];
13 boot.kernelModules = [ "kvm-amd" "wl" ];
14 boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
15
16 fileSystems."/" =
17 { device = "/dev/disk/by-uuid/5838d50d-e6e8-4ad2-a25e-524f4c46da35";
18 fsType = "ext4";
19 };
20
21 fileSystems."/boot" =
22 { device = "/dev/disk/by-uuid/2319-EE79";
23 fsType = "vfat";
24 };
25
26 swapDevices =
27 [ { device = "/dev/disk/by-uuid/a4128bb9-239c-4aa9-9777-5067feb77b28"; }
28 ];
29
30 # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
31 # (the default) this is the recommended approach. When using systemd-networkd it's
32 # still possible to use this option, but it's recommended to use it in conjunction
33 # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
34 networking.useDHCP = lib.mkDefault true;
35 # networking.interfaces.enp34s0.useDHCP = lib.mkDefault true;
36 # networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
37
38 nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
39 hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
40}
hosts/desktop/hardware-configuration.nix created+40
......@@ -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 = [ "nvme" "xhci_pci" "ahci" "usbhid" "sd_mod" ];
12 boot.initrd.kernelModules = [ ];
13 boot.kernelModules = [ "kvm-amd" "wl" ];
14 boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
15
16 fileSystems."/" =
17 { device = "/dev/disk/by-uuid/5838d50d-e6e8-4ad2-a25e-524f4c46da35";
18 fsType = "ext4";
19 };
20
21 fileSystems."/boot" =
22 { device = "/dev/disk/by-uuid/2319-EE79";
23 fsType = "vfat";
24 };
25
26 swapDevices =
27 [ { device = "/dev/disk/by-uuid/a4128bb9-239c-4aa9-9777-5067feb77b28"; }
28 ];
29
30 # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
31 # (the default) this is the recommended approach. When using systemd-networkd it's
32 # still possible to use this option, but it's recommended to use it in conjunction
33 # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
34 networking.useDHCP = lib.mkDefault true;
35 # networking.interfaces.enp34s0.useDHCP = lib.mkDefault true;
36 # networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
37
38 nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
39 hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
40}
hosts/laptop/configuration.nix+23-18
......@@ -1,27 +1,38 @@
1{ config, pkgs, … }:
2
31{
4 environment.systemPackages =
5 [
6 pkgs.home-manager
7 ];
2 config,
3 pkgs,
4 ...
5}: {
6 programs.nh = {
7 enable = true;
8 clean.enable = true;
9 clean.extraArgs = "--keep-since 4d --keep 3";
10 flake = "/Users/nmarks/.dotfiles";
11 };
12
13 environment.systemPackages = [
14 pkgs.home-manager
15 pkgs.neovim
16 ];
817
918 # Use a custom configuration.nix location.
10 environment.darwinConfig = "$HOME/src/github.com/evantravers/dotfiles/nix-darwin-configuration";
19 #environment.darwinConfig = "$HOME/.dotfiles/hosts/laptop";
1120
1221 # Auto upgrade nix package and the daemon service.
1322 services.nix-daemon.enable = true;
1423 nix = {
1524 package = pkgs.nix;
1625 settings = {
17 "extra-experimental-features" = [ "nix-command" "flakes" ];
26 "extra-experimental-features" = ["nix-command" "flakes"];
1827 };
1928 };
2029
30 nixpkgs.config.allowUnfree = true;
31
2132 # Create /etc/zshrc that loads the nix-darwin environment.
2233 programs = {
2334 gnupg.agent.enable = true;
24 zsh.enable = true; # default shell on catalina
35 zsh.enable = true; # default shell on catalina
2536 };
2637
2738 # Used for backwards compatibility, please read the changelog before changing.
......@@ -29,8 +40,7 @@
2940 system.stateVersion = 4;
3041
3142 # Install fonts
32 fonts.fontDir.enable = true;
33 fonts.fonts = [
43 fonts.packages = [
3444 pkgs.iosevka
3545 ];
3646
......@@ -53,10 +63,9 @@
5363 system.defaults = {
5464 # minimal dock
5565 dock = {
56 autohide = true;
57 orientation = "left";
66 autohide = false;
5867 show-process-indicators = false;
59 show-recents = false;
68 show-recents = true;
6069 static-only = true;
6170 };
6271 # a finder that tells me what I want to know and lets me work
......@@ -66,9 +75,5 @@
6675 FXEnableExtensionChangeWarning = false;
6776 };
6877 # Tab between form controls and F-row that behaves as F1-F12
69 NSGlobalDomain = {
70 AppleKeyboardUIMode = 3;
71 "com.apple.keyboard.fnState" = true;
72 };
7378 };
7479}
hosts/laptop/home.nix created+208
......@@ -0,0 +1,208 @@
1{
2 inputs,
3 config,
4 pkgs,
5 ghostty,
6 ...
7}: {
8 # Home Manager needs a bit of information about you and the paths it should
9 # manage.
10 # This value determines the Home Manager release that your configuration is
11 # compatible with. This helps avoid breakage when a new Home Manager release
12 # introduces backwards incompatible changes.
13 #
14 # You should not change this value, even if you update Home Manager. If you do
15 # want to update the value, then make sure to first check the Home Manager
16 # release notes.
17 home.stateVersion = "23.05"; # Please read the comment before changing.
18
19 nixpkgs.config = {
20 allowUnfree = true;
21 };
22
23 # imports = [
24 # ./zed-editor.nix
25 # ];
26
27 # imports = [discord/default.nix];
28 # sys.discord.enable = true;
29
30 # The home.packages option allows you to install Nix packages into your
31 # environment.
32
33 home.packages = with pkgs; [
34 pyright
35 ruff
36 python312Packages.jedi-language-server
37 tor
38 #spotify
39 #stremio
40 fzf
41 zigpkgs.master
42 stylua
43 cachix
44 btop
45 neofetch
46 direnv
47 typst
48 typst-live
49 tmux
50 zellij
51 qemu
52 vimgolf
53 lazygit
54 rustup
55 file
56 vesktop
57 discord
58 # itch : THIS IS BROKEN FOR SOME REASON, need to pin it??
59 qbittorrent
60 deno
61 imagemagick
62 pkg-config
63 #mpv
64 comma
65 gnumake
66 #signal-desktop
67 #zed-editor
68 #getting foundry to work!
69 #nodejs_21
70 #productivty
71 #todoist-electron
72 #Gaming
73 prismlauncher
74 # for cmpm17
75 binwalk
76 exiftool
77 #for fun
78 cowsay
79 cmatrix
80 hyfetch
81 bat
82 eza
83 ollama
84 sl
85 #LSP + formatters/linters
86 lua-language-server
87 nil
88 alejandra
89 statix
90 texlab
91 typst-fmt
92 typst-lsp
93 clang-tools
94 # rust-analyzer
95 #clippy
96 # rustfmt
97 #runpod
98 docker
99 nh
100 fastfetch
101 ];
102 programs.direnv = {
103 enable = true;
104 #enableFishIntegration = true;
105 nix-direnv.enable = true;
106 };
107
108 programs.neovim = {
109 viAlias = true;
110 vimAlias = true;
111 extraPackages = with pkgs; [
112 ];
113 };
114 #Link neovim config into nix
115 #xdg.configFile.nvim.source = ./nvim;
116 #xdg.mimeApps.defaultApplications."inode/directory" = "dolphin.desktop";
117 # xdg.mimeApps.defaultApplications = {"inode/directory" = "org.kde.dolphin.desktop";};
118
119 programs.fish = {
120 enable = true;
121
122 plugins = [
123 {
124 name = "tide";
125 src = pkgs.fishPlugins.tide.src;
126 }
127 ];
128 shellAliases = {
129 hm-update = "git add home.nix ; git commit -m 'updated home-manager config'; git push origin main; home-manager switch --flake ~/.dotfiles/#nmarks";
130 sys-update = "git add configuration.nix ; git commit -m 'updated system config'; git push origin main; sudo nixos-rebuild switch --flake ~/.dotfiles/#nmarks";
131 full-update = "sys-update; hm-update";
132 reboot-windows = "sudo efibootmgr --bootnext 0000; sudo reboot -h now";
133 };
134 shellInit = "source $HOME/.nix-profile/share/asdf-vm/asdf.fish ";
135 };
136
137 programs.hyfetch = {
138 enable = true;
139 settings = {
140 backend = "fastfetch";
141 preset = "bisexual";
142 mode = "rgb";
143 light_dark = "dark";
144 lightness = {
145 };
146 color_align = {
147 mode = "horizontal";
148 # custom_colors = [];
149 # fore_back = null;
150 };
151 distro = null;
152 pride_month_shown = [
153 ];
154 pride_month_disable = false;
155 };
156 };
157
158 /*
159 programs.zsh = {
160 oh-my-zsh = {
161 enable = true;
162 plugins = [ "git" "extract"];
163 };
164 enableAutosuggestions = true;
165 enableCompletion = true;
166 syntaxHighlighting.enable = true;
167
168 plugins = [
169 {name = "powerlevel10k";src = pkgs.zsh-powerlevel10k;file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";}
170 ];
171 };
172 */
173
174 # Home Manager is pretty good at managing dotfiles. The primary way to manage
175 # plain files is through 'home.file'.
176 home.file = {
177 # # Building this configuration will create a copy of 'dotfiles/screenrc' in
178 # # the Nix store. Activating the configuration will then make '~/.screenrc' a
179 # # symlink to the Nix store copy.
180 # ".screenrc".source = dotfiles/screenrc;
181
182 # # You can also set the file content immediately.
183 # ".gradle/gradle.properties".text = ''
184 # org.gradle.console=verbose
185 # org.gradle.daemon.idletimeout=3600000
186 # '';
187 };
188
189 # You can also manage environment variables but you will have to manually
190 # source
191 #
192 # ~/.nix-profile/etc/profile.d/hm-session-vars.sh
193 #
194 # or
195 #
196 # /etc/profiles/per-user/nmarks/etc/profile.d/hm-session-vars.sh
197 #
198 # if you don't want to manage your shell through Home Manager.
199 home.sessionVariables = {
200 EDITOR = "nvim";
201 VISUAL = "nvim";
202 TERMINAL = "ghostty";
203 BROWSER = "firefox";
204 };
205
206 # Let Home Manager install and manage itself.
207 programs.home-manager.enable = true;
208}