6 files changed, 329 insertions(+), 93 deletions(-)
flake.lock+22| ... | ... | @@ -165,6 +165,27 @@ |
| 165 | 165 | "type": "github" |
| 166 | 166 | } |
| 167 | 167 | }, |
| 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 | }, | |
| 168 | 189 | "flake-compat": { |
| 169 | 190 | "flake": false, |
| 170 | 191 | "locked": { |
| ... | ... | @@ -918,6 +939,7 @@ |
| 918 | 939 | "root": { |
| 919 | 940 | "inputs": { |
| 920 | 941 | "blocklist-hosts": "blocklist-hosts", |
| 942 | "darwin": "darwin", | |
| 921 | 943 | "flake-utils": "flake-utils", |
| 922 | 944 | "foundryvtt": "foundryvtt", |
| 923 | 945 | "ghostty": "ghostty", |
flake.nix+36-35| ... | ... | @@ -58,36 +58,23 @@ |
| 58 | 58 | overlays = [ |
| 59 | 59 | inputs.zig.overlays.default |
| 60 | 60 | ]; |
| 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 | }; | |
| 76 | 61 | |
| 77 | lib = nixpkgs.lib; | |
| 62 | inherit (nixpkgs) lib; | |
| 78 | 63 | in { |
| 79 | 64 | nixosConfigurations = { |
| 80 | 65 | nixos = lib.nixosSystem { |
| 81 | 66 | modules = [ |
| 67 | {nixpkgs.overlays = overlays;} | |
| 82 | 68 | nixos-cosmic.nixosModules.default |
| 83 | ./configuration.nix | |
| 69 | ./hosts/desktop/configuration.nix | |
| 84 | 70 | home-manager.nixosModules.home-manager |
| 85 | 71 | { |
| 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 | }; | |
| 89 | 77 | home-manager.extraSpecialArgs = { |
| 90 | inherit pkgs-stable; | |
| 91 | 78 | inherit stylix; |
| 92 | 79 | inherit hyprland-plugins; |
| 93 | 80 | inherit zls; |
| ... | ... | @@ -97,25 +84,39 @@ |
| 97 | 84 | ]; |
| 98 | 85 | specialArgs = { |
| 99 | 86 | inherit inputs; |
| 100 | inherit pkgs-stable; | |
| 101 | 87 | inherit stylix; |
| 102 | 88 | inherit blocklist-hosts; |
| 103 | 89 | }; |
| 104 | 90 | }; |
| 105 | 91 | }; |
| 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 | }; | |
| 119 | 120 | }; |
| 120 | 121 | # nixos = inputs.self.nixosConfigurations.nmarks; |
| 121 | 122 | # |
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 | ||
| 3 | 1 | { |
| 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 | ]; | |
| 8 | 17 | |
| 9 | 18 | # 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"; | |
| 11 | 20 | |
| 12 | 21 | # Auto upgrade nix package and the daemon service. |
| 13 | 22 | services.nix-daemon.enable = true; |
| 14 | 23 | nix = { |
| 15 | 24 | package = pkgs.nix; |
| 16 | 25 | settings = { |
| 17 | "extra-experimental-features" = [ "nix-command" "flakes" ]; | |
| 26 | "extra-experimental-features" = ["nix-command" "flakes"]; | |
| 18 | 27 | }; |
| 19 | 28 | }; |
| 20 | 29 | |
| 30 | nixpkgs.config.allowUnfree = true; | |
| 31 | ||
| 21 | 32 | # Create /etc/zshrc that loads the nix-darwin environment. |
| 22 | 33 | programs = { |
| 23 | 34 | gnupg.agent.enable = true; |
| 24 | zsh.enable = true; # default shell on catalina | |
| 35 | zsh.enable = true; # default shell on catalina | |
| 25 | 36 | }; |
| 26 | 37 | |
| 27 | 38 | # Used for backwards compatibility, please read the changelog before changing. |
| ... | ... | @@ -29,8 +40,7 @@ |
| 29 | 40 | system.stateVersion = 4; |
| 30 | 41 | |
| 31 | 42 | # Install fonts |
| 32 | fonts.fontDir.enable = true; | |
| 33 | fonts.fonts = [ | |
| 43 | fonts.packages = [ | |
| 34 | 44 | pkgs.iosevka |
| 35 | 45 | ]; |
| 36 | 46 | |
| ... | ... | @@ -53,10 +63,9 @@ |
| 53 | 63 | system.defaults = { |
| 54 | 64 | # minimal dock |
| 55 | 65 | dock = { |
| 56 | autohide = true; | |
| 57 | orientation = "left"; | |
| 66 | autohide = false; | |
| 58 | 67 | show-process-indicators = false; |
| 59 | show-recents = false; | |
| 68 | show-recents = true; | |
| 60 | 69 | static-only = true; |
| 61 | 70 | }; |
| 62 | 71 | # a finder that tells me what I want to know and lets me work |
| ... | ... | @@ -66,9 +75,5 @@ |
| 66 | 75 | FXEnableExtensionChangeWarning = false; |
| 67 | 76 | }; |
| 68 | 77 | # Tab between form controls and F-row that behaves as F1-F12 |
| 69 | NSGlobalDomain = { | |
| 70 | AppleKeyboardUIMode = 3; | |
| 71 | "com.apple.keyboard.fnState" = true; | |
| 72 | }; | |
| 73 | 78 | }; |
| 74 | 79 | } |
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 | } |