| author | |
| committer | |
| log | 91c676f3f54a4a3e68ea02c7d0dd48e21538345d |
| tree | 821ae0c7a6b4546703d042231436ff27fcaf2c87 |
| parent | 5170a02cf07659dbbe613fa70309c237318c9581 |
| signature | Commit is signed but in an unrecognized format. |
42 files changed, 1354 insertions(+), 926 deletions(-)
.gitignore+2| ... | @@ -1,3 +1,5 @@ | ... | @@ -1,3 +1,5 @@ |
| 1 | flake.lock | 1 | flake.lock |
| 2 | .DS_STORE | 2 | .DS_STORE |
| 3 | **/.DS_STORE | 3 | **/.DS_STORE |
| 4 | result | ||
| 5 | result-* |
flake.nix+35-26| ... | @@ -2,7 +2,6 @@ | ... | @@ -2,7 +2,6 @@ |
| 2 | description = "New Modular flake!"; | 2 | description = "New Modular flake!"; |
| 3 | inputs = { | 3 | inputs = { |
| 4 | nixpkgs.url = "nixpkgs/nixos-unstable"; | 4 | nixpkgs.url = "nixpkgs/nixos-unstable"; |
| 5 | # nixpkgs.url = "github:NixOS/nixpkgs/master"; | ||
| 6 | nixpkgs-stable.url = "nixpkgs/nixos-23.11"; | 5 | nixpkgs-stable.url = "nixpkgs/nixos-23.11"; |
| 7 | 6 | ||
| 8 | home-manager.url = "github:nix-community/home-manager/master"; | 7 | home-manager.url = "github:nix-community/home-manager/master"; |
| ... | @@ -69,41 +68,51 @@ | ... | @@ -69,41 +68,51 @@ |
| 69 | inputs.nh.overlays.default | 68 | inputs.nh.overlays.default |
| 70 | ]; | 69 | ]; |
| 71 | 70 | ||
| 72 | # ----- USER SETTINGS ----- # | ||
| 73 | userSettings = rec { | ||
| 74 | #enable if you want to use a tiling wm on macos | ||
| 75 | darwinTiling = true; | ||
| 76 | |||
| 77 | username = "nmarks"; # username | ||
| 78 | name = "Natalie"; # name/identifier | ||
| 79 | email = "nmarks413@gmail.com"; # email (used for certain configurations) | ||
| 80 | dotfilesDir = "~/.dotfiles"; # absolute path of the local repo | ||
| 81 | theme = "catppuccin-mocha"; #name of theme that stylix will use | ||
| 82 | browser = "firefox"; # Default browser; must select one from ./user/app/browser/ | ||
| 83 | term = "ghostty"; # Default terminal command; | ||
| 84 | font = "iosevka"; # Selected font | ||
| 85 | editor = "neovim"; # Default editor; | ||
| 86 | spawnEditor = "exec" + term + " -e " + editor; | ||
| 87 | timeZone = "America/Los_Angeles"; | ||
| 88 | sexuality = "bisexual"; | ||
| 89 | |||
| 90 | darwinHost = "laptop"; | ||
| 91 | nixosHost = "desktop"; | ||
| 92 | }; | ||
| 93 | |||
| 94 | mkSystem = import ./lib/mkSystem.nix { | 71 | mkSystem = import ./lib/mkSystem.nix { |
| 95 | inherit overlays nixpkgs inputs userSettings; | 72 | inherit overlays nixpkgs inputs; |
| 96 | }; | 73 | }; |
| 97 | in { | 74 | in rec { |
| 75 | # "nix run .#darwin-rebuild" | ||
| 76 | packages.aarch64-darwin.darwin-rebuild = darwin.packages.aarch64-darwin.darwin-rebuild; | ||
| 77 | # "nix fmt ." | ||
| 78 | formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra; | ||
| 79 | formatter.aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.alejandra; | ||
| 80 | |||
| 81 | # natalie's desktop computer | ||
| 98 | nixosConfigurations.nixos = mkSystem "nixos" { | 82 | nixosConfigurations.nixos = mkSystem "nixos" { |
| 83 | user = "natalie"; | ||
| 84 | host = "desktop"; | ||
| 99 | system = "x86_64-linux"; | 85 | system = "x86_64-linux"; |
| 100 | extraModules = [ | 86 | extraModules = [ |
| 101 | nixos-cosmic.nixosModules.default | 87 | nixos-cosmic.nixosModules.default |
| 102 | ]; | 88 | ]; |
| 103 | }; | 89 | }; |
| 90 | # natalie's laptop | ||
| 104 | darwinConfigurations."Natalies-MacBook-Air" = mkSystem "Natalies-MacBook-Air" { | 91 | darwinConfigurations."Natalies-MacBook-Air" = mkSystem "Natalies-MacBook-Air" { |
| 92 | user = "natalie"; | ||
| 93 | host = "laptop"; | ||
| 105 | system = "aarch64-darwin"; | 94 | system = "aarch64-darwin"; |
| 106 | darwin = true; | ||
| 107 | }; | 95 | }; |
| 96 | |||
| 97 | # chloe's mac studio "sandwich" | ||
| 98 | darwinConfigurations.sandwich = mkSystem "sandwich" { | ||
| 99 | user = "chloe"; | ||
| 100 | host = "sandwich"; | ||
| 101 | system = "aarch64-darwin"; | ||
| 102 | }; | ||
| 103 | # chloe's macbook air "paperback" | ||
| 104 | darwinConfigurations.paperback = mkSystem "paperback" { | ||
| 105 | user = "chloe"; | ||
| 106 | host = "paperback"; | ||
| 107 | system = "aarch64-darwin"; | ||
| 108 | }; | ||
| 109 | |||
| 110 | # generate checks for "nix flake check --all-systems --no-build" | ||
| 111 | checks.aarch64-darwin = builtins.listToAttrs (builtins.map (name: let | ||
| 112 | d = darwinConfigurations.${name}.system; | ||
| 113 | in { | ||
| 114 | name = "darwinConfiguration-" + d.name; | ||
| 115 | value = d; | ||
| 116 | }) (builtins.attrNames darwinConfigurations)); | ||
| 108 | }; | 117 | }; |
| 109 | } | 118 | } |
glance.yml deleted-108| ... | @@ -1,108 +0,0 @@ | ||
| 1 | pages: | ||
| 2 | - name: Home | ||
| 3 | # Optionally, if you only have a single page you can hide the desktop navigation for a cleaner look | ||
| 4 | # hide-desktop-navigation: true | ||
| 5 | columns: | ||
| 6 | - size: small | ||
| 7 | widgets: | ||
| 8 | - type: calendar | ||
| 9 | first-day-of-week: monday | ||
| 10 | |||
| 11 | - type: rss | ||
| 12 | limit: 10 | ||
| 13 | collapse-after: 3 | ||
| 14 | cache: 12h | ||
| 15 | feeds: | ||
| 16 | - url: https://selfh.st/rss/ | ||
| 17 | title: selfh.st | ||
| 18 | limit: 4 | ||
| 19 | - url: https://ciechanow.ski/atom.xml | ||
| 20 | - url: https://www.joshwcomeau.com/rss.xml | ||
| 21 | title: Josh Comeau | ||
| 22 | - url: https://samwho.dev/rss.xml | ||
| 23 | - url: https://ishadeed.com/feed.xml | ||
| 24 | title: Ahmad Shadeed | ||
| 25 | |||
| 26 | - type: twitch-channels | ||
| 27 | channels: | ||
| 28 | - theprimeagen | ||
| 29 | - j_blow | ||
| 30 | - piratesoftware | ||
| 31 | - cohhcarnage | ||
| 32 | - christitustech | ||
| 33 | - EJ_SA | ||
| 34 | |||
| 35 | - size: full | ||
| 36 | widgets: | ||
| 37 | - type: group | ||
| 38 | widgets: | ||
| 39 | - type: hacker-news | ||
| 40 | - type: lobsters | ||
| 41 | |||
| 42 | - type: videos | ||
| 43 | channels: | ||
| 44 | - UCXuqSBlHAE6Xw-yeJA0Tunw # Linus Tech Tips | ||
| 45 | - UCR-DXc1voovS8nhAvccRZhg # Jeff Geerling | ||
| 46 | - UCsBjURrPoezykLs9EqgamOA # Fireship | ||
| 47 | - UCBJycsmduvYEL83R_U4JriQ # Marques Brownlee | ||
| 48 | - UCHnyfMqiRRG1u-2MsSQLbXA # Veritasium | ||
| 49 | |||
| 50 | - type: group | ||
| 51 | widgets: | ||
| 52 | - type: reddit | ||
| 53 | subreddit: technology | ||
| 54 | show-thumbnails: true | ||
| 55 | - type: reddit | ||
| 56 | subreddit: selfhosted | ||
| 57 | show-thumbnails: true | ||
| 58 | |||
| 59 | - size: small | ||
| 60 | widgets: | ||
| 61 | - type: weather | ||
| 62 | location: London, United Kingdom | ||
| 63 | units: metric # alternatively "imperial" | ||
| 64 | hour-format: 12h # alternatively "24h" | ||
| 65 | # Optionally hide the location from being displayed in the widget | ||
| 66 | # hide-location: true | ||
| 67 | |||
| 68 | - type: markets | ||
| 69 | # The link to go to when clicking on the symbol in the UI, | ||
| 70 | # {SYMBOL} will be substituded with the symbol for each market | ||
| 71 | symbol-link-template: https://www.tradingview.com/symbols/{SYMBOL}/news | ||
| 72 | markets: | ||
| 73 | - symbol: SPY | ||
| 74 | name: S&P 500 | ||
| 75 | - symbol: BTC-USD | ||
| 76 | name: Bitcoin | ||
| 77 | - symbol: NVDA | ||
| 78 | name: NVIDIA | ||
| 79 | - symbol: AAPL | ||
| 80 | name: Apple | ||
| 81 | - symbol: MSFT | ||
| 82 | name: Microsoft | ||
| 83 | |||
| 84 | - type: releases | ||
| 85 | cache: 1d | ||
| 86 | # Without authentication the Github API allows for up to 60 requests per hour. You can create a | ||
| 87 | # read-only token from your Github account settings and use it here to increase the limit. | ||
| 88 | # token: ... | ||
| 89 | repositories: | ||
| 90 | - glanceapp/glance | ||
| 91 | - go-gitea/gitea | ||
| 92 | - immich-app/immich | ||
| 93 | - syncthing/syncthing | ||
| 94 | |||
| 95 | # Add more pages here: | ||
| 96 | # - name: Your page name | ||
| 97 | # columns: | ||
| 98 | # - size: small | ||
| 99 | # widgets: | ||
| 100 | # # Add widgets here | ||
| 101 | |||
| 102 | # - size: full | ||
| 103 | # widgets: | ||
| 104 | # # Add widgets here | ||
| 105 | |||
| 106 | # - size: small | ||
| 107 | # widgets: | ||
| 108 | # # Add widgets here | ||
hosts/.DS_Store deleted| Binary files a/hosts/.DS_Store and /dev/null differ | |||
hosts/desktop/configuration.nix deleted-181| ... | @@ -1,181 +0,0 @@ | ||
| 1 | { | ||
| 2 | pkgs, | ||
| 3 | userSettings, | ||
| 4 | systemSettings, | ||
| 5 | ... | ||
| 6 | }: { | ||
| 7 | imports = [ | ||
| 8 | # Include the results of the hardware scan. | ||
| 9 | ./hardware-configuration.nix | ||
| 10 | ]; | ||
| 11 | programs = { | ||
| 12 | gamemode.enable = true; | ||
| 13 | |||
| 14 | _1password.enable = true; | ||
| 15 | _1password-gui = { | ||
| 16 | enable = true; | ||
| 17 | # Certain features, including CLI integration and system authentication support, | ||
| 18 | # require enabling PolKit integration on some desktop environments (e.g. Plasma). | ||
| 19 | polkitPolicyOwners = [userSettings.username]; | ||
| 20 | }; | ||
| 21 | |||
| 22 | noisetorch.enable = true; | ||
| 23 | |||
| 24 | fish.enable = true; | ||
| 25 | virt-manager.enable = true; | ||
| 26 | |||
| 27 | nh = { | ||
| 28 | enable = true; | ||
| 29 | # clean.enable = true; | ||
| 30 | # clean.extraArgs = "--keep-since 4d --keep 3"; | ||
| 31 | flake = "/home/nmarks/.dotfiles#nixosConfigurations.nixos"; | ||
| 32 | }; | ||
| 33 | |||
| 34 | neovim = { | ||
| 35 | enable = true; | ||
| 36 | defaultEditor = true; | ||
| 37 | }; | ||
| 38 | |||
| 39 | steam = { | ||
| 40 | enable = true; | ||
| 41 | package = with pkgs; steam.override {extraPkgs = pkgs: [attr];}; | ||
| 42 | }; | ||
| 43 | |||
| 44 | git = { | ||
| 45 | enable = true; | ||
| 46 | lfs.enable = true; | ||
| 47 | }; | ||
| 48 | |||
| 49 | # Some programs need SUID wrappers, can be configured further or are | ||
| 50 | # started in user sessions. | ||
| 51 | mtr.enable = true; | ||
| 52 | gnupg.agent = { | ||
| 53 | enable = true; | ||
| 54 | enableSSHSupport = true; | ||
| 55 | pinentryPackage = pkgs.pinentry-curses; | ||
| 56 | }; | ||
| 57 | |||
| 58 | kdeconnect.enable = true; | ||
| 59 | }; | ||
| 60 | |||
| 61 | hardware.bluetooth.enable = true; | ||
| 62 | |||
| 63 | xdg.portal = { | ||
| 64 | enable = true; | ||
| 65 | extraPortals = with pkgs; [xdg-desktop-portal-gtk]; | ||
| 66 | }; | ||
| 67 | virtualisation = { | ||
| 68 | containers.enable = true; | ||
| 69 | podman = { | ||
| 70 | enable = true; | ||
| 71 | # dockerCompat = true; | ||
| 72 | }; | ||
| 73 | docker.enable = true; | ||
| 74 | |||
| 75 | libvirtd.enable = true; | ||
| 76 | }; | ||
| 77 | |||
| 78 | nix.settings.trusted-users = ["root" userSettings.username]; | ||
| 79 | systemd = { | ||
| 80 | targets = { | ||
| 81 | sleep.enable = false; | ||
| 82 | suspend.enable = false; | ||
| 83 | hibernate.enable = false; | ||
| 84 | hybrid-sleep.enable = false; | ||
| 85 | }; | ||
| 86 | |||
| 87 | packages = [pkgs.observatory]; | ||
| 88 | |||
| 89 | services.monitord.wantedBy = ["multi-user.target"]; | ||
| 90 | }; | ||
| 91 | |||
| 92 | i18n = { | ||
| 93 | # Select internationalisation properties. | ||
| 94 | defaultLocale = "en_US.UTF-8"; | ||
| 95 | |||
| 96 | supportedLocales = ["all"]; | ||
| 97 | |||
| 98 | extraLocaleSettings = { | ||
| 99 | LC_ADDRESS = "en_US.UTF-8"; | ||
| 100 | LC_IDENTIFICATION = "en_US.UTF-8"; | ||
| 101 | LC_MEASUREMENT = "en_US.UTF-8"; | ||
| 102 | LC_MONETARY = "en_US.UTF-8"; | ||
| 103 | LC_NAME = "en_US.UTF-8"; | ||
| 104 | LC_NUMERIC = "en_US.UTF-8"; | ||
| 105 | LC_PAPER = "en_US.UTF-8"; | ||
| 106 | LC_TELEPHONE = "en_US.UTF-8"; | ||
| 107 | LC_TIME = "en_US.UTF-8"; | ||
| 108 | }; | ||
| 109 | |||
| 110 | inputMethod = { | ||
| 111 | type = "fcitx5"; | ||
| 112 | enable = true; | ||
| 113 | fcitx5.waylandFrontend = true; | ||
| 114 | fcitx5.addons = with pkgs; [ | ||
| 115 | # fcitx5-gtk | ||
| 116 | # kdePackages.fcitx5-qt | ||
| 117 | rime-data | ||
| 118 | fcitx5-rime | ||
| 119 | fcitx5-rose-pine | ||
| 120 | ]; | ||
| 121 | }; | ||
| 122 | }; | ||
| 123 | |||
| 124 | # Enable sound with pipewire. | ||
| 125 | security.rtkit.enable = true; | ||
| 126 | |||
| 127 | # Enable touchpad support (enabled default in most desktopManager). | ||
| 128 | # services.xserver.libinput.enable = true; | ||
| 129 | |||
| 130 | # Define a user account. Don't forget to set a password with ‘passwd’. | ||
| 131 | # users.defaultUserShell = pkgs.fish; | ||
| 132 | users.users.${userSettings.username} = { | ||
| 133 | shell = pkgs.fish; | ||
| 134 | isNormalUser = true; | ||
| 135 | description = "Natalie Marks"; | ||
| 136 | extraGroups = ["networkmanager" "wheel" "docker"]; | ||
| 137 | # openssh.authorizedKeys.keyFiles = ["~/.ssh/id_ed25519.pub"]; | ||
| 138 | packages = with pkgs; [ | ||
| 139 | firefox | ||
| 140 | vim | ||
| 141 | steam | ||
| 142 | |||
| 143 | # thunderbird | ||
| 144 | ]; | ||
| 145 | }; | ||
| 146 | environment = { | ||
| 147 | sessionVariables.COSMIC_DATA_CONTROL_ENABLED = 1; | ||
| 148 | variables.EDITOR = "nvim"; | ||
| 149 | |||
| 150 | systemPackages = with pkgs; [ | ||
| 151 | vim | ||
| 152 | ]; | ||
| 153 | }; | ||
| 154 | |||
| 155 | networking = { | ||
| 156 | hostName = systemSettings.host; # Define your hostname. | ||
| 157 | # wireless.enable = true; # Enables wireless support via wpa_supplicant. | ||
| 158 | networkmanager.enable = true; | ||
| 159 | firewall = { | ||
| 160 | allowedTCPPorts = [22 80 443]; | ||
| 161 | enable = true; | ||
| 162 | }; | ||
| 163 | interfaces.enp11s0.wakeOnLan = { | ||
| 164 | enable = true; | ||
| 165 | policy = ["magic"]; | ||
| 166 | }; | ||
| 167 | }; | ||
| 168 | |||
| 169 | # Open ports in the firewall. | ||
| 170 | # networking.firewall.allowedUDPPorts = [ ... ]; | ||
| 171 | # Or disable the firewall altogether. | ||
| 172 | # networking.firewall.enable = false; | ||
| 173 | |||
| 174 | # This value determines the NixOS release from which the default | ||
| 175 | # settings for stateful data, like file locations and database versions | ||
| 176 | # on your system were taken. It‘s perfectly fine and recommended to leave | ||
| 177 | # this value at the release version of the first install of this system. | ||
| 178 | # Before changing this value read the documentation for this option | ||
| 179 | # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). | ||
| 180 | system.stateVersion = "23.05"; # Did you read the comment? | ||
| 181 | } | ||
hosts/desktop/hardware-configuration.nix deleted-52| ... | @@ -1,52 +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 | { | ||
| 5 | config, | ||
| 6 | lib, | ||
| 7 | pkgs, | ||
| 8 | modulesPath, | ||
| 9 | ... | ||
| 10 | }: { | ||
| 11 | imports = [ | ||
| 12 | (modulesPath + "/installer/scan/not-detected.nix") | ||
| 13 | ]; | ||
| 14 | |||
| 15 | boot.initrd.availableKernelModules = ["nvme" "ahci" "xhci_pci" "usbhid" "sd_mod"]; | ||
| 16 | boot.initrd.kernelModules = []; | ||
| 17 | boot.kernelModules = ["kvm-amd"]; | ||
| 18 | boot.extraModulePackages = []; | ||
| 19 | |||
| 20 | fileSystems."/" = { | ||
| 21 | device = "/dev/disk/by-uuid/5838d50d-e6e8-4ad2-a25e-524f4c46da35"; | ||
| 22 | fsType = "ext4"; | ||
| 23 | }; | ||
| 24 | |||
| 25 | fileSystems."/boot/efi" = { | ||
| 26 | device = "/dev/disk/by-uuid/2319-EE79"; | ||
| 27 | fsType = "vfat"; | ||
| 28 | options = ["fmask=0022" "dmask=0022"]; | ||
| 29 | }; | ||
| 30 | |||
| 31 | fileSystems."/home/nmarks/Games/steam" = { | ||
| 32 | device = "/dev/disk/by-uuid/e7ac46ce-edcb-4763-8717-a7c67de5c7f3"; | ||
| 33 | fsType = "ext4"; | ||
| 34 | }; | ||
| 35 | |||
| 36 | swapDevices = [ | ||
| 37 | {device = "/dev/disk/by-uuid/a4128bb9-239c-4aa9-9777-5067feb77b28";} | ||
| 38 | ]; | ||
| 39 | |||
| 40 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking | ||
| 41 | # (the default) this is the recommended approach. When using systemd-networkd it's | ||
| 42 | # still possible to use this option, but it's recommended to use it in conjunction | ||
| 43 | # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. | ||
| 44 | networking.useDHCP = lib.mkDefault true; | ||
| 45 | # networking.interfaces.docker0.useDHCP = lib.mkDefault true; | ||
| 46 | # networking.interfaces.enp11s0.useDHCP = lib.mkDefault true; | ||
| 47 | # networking.interfaces.tailscale0.useDHCP = lib.mkDefault true; | ||
| 48 | # networking.interfaces.wlp10s0.useDHCP = lib.mkDefault true; | ||
| 49 | |||
| 50 | nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; | ||
| 51 | hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; | ||
| 52 | } | ||
hosts/desktop/home.nix deleted-72| ... | @@ -1,72 +0,0 @@ | ||
| 1 | { | ||
| 2 | inputs, | ||
| 3 | config, | ||
| 4 | pkgs, | ||
| 5 | lib, | ||
| 6 | userSettings, | ||
| 7 | systemSettings, | ||
| 8 | ... | ||
| 9 | }: let | ||
| 10 | shared-programs = import ../../modules/shared/homeManagerPrograms.nix {inherit inputs config pkgs lib userSettings systemSettings;}; | ||
| 11 | in { | ||
| 12 | imports = [ | ||
| 13 | inputs.nixvim.homeManagerModules.nixvim | ||
| 14 | #set up nixvim | ||
| 15 | # ../../modules/nixvim | ||
| 16 | ]; | ||
| 17 | home = { | ||
| 18 | stateVersion = "23.05"; # Please read the comment before changing. | ||
| 19 | |||
| 20 | packages = with pkgs; let | ||
| 21 | shared-packages = import ../../modules/shared/packages.nix {inherit pkgs systemSettings;}; | ||
| 22 | in | ||
| 23 | shared-packages | ||
| 24 | ++ [ | ||
| 25 | #building macos apps hard :( | ||
| 26 | ghostty | ||
| 27 | stremio | ||
| 28 | julia | ||
| 29 | qbittorrent | ||
| 30 | |||
| 31 | #gaming | ||
| 32 | bottles | ||
| 33 | lutris | ||
| 34 | mangohud | ||
| 35 | dxvk_2 | ||
| 36 | steam-run | ||
| 37 | vulkan-tools | ||
| 38 | path-of-building | ||
| 39 | wineWowPackages.stable | ||
| 40 | winetricks | ||
| 41 | (prismlauncher.override {gamemodeSupport = true;}) | ||
| 42 | |||
| 43 | #window manager stuff | ||
| 44 | wofi | ||
| 45 | xorg.xauth | ||
| 46 | #linux tools | ||
| 47 | legcord | ||
| 48 | pavucontrol | ||
| 49 | ethtool | ||
| 50 | grub2 | ||
| 51 | efibootmgr | ||
| 52 | distrobox | ||
| 53 | xdg-desktop-portal-gtk | ||
| 54 | xclip | ||
| 55 | kdePackages.dolphin | ||
| 56 | #broken on macos | ||
| 57 | calibre | ||
| 58 | mpv | ||
| 59 | wireguard-tools | ||
| 60 | signal-desktop | ||
| 61 | ] | ||
| 62 | ++ [ | ||
| 63 | inputs.zls.packages.x86_64-linux.zls | ||
| 64 | rust-bin.stable.latest.default | ||
| 65 | ]; | ||
| 66 | # programs.mangohud.enable = true; | ||
| 67 | }; | ||
| 68 | |||
| 69 | programs = shared-programs; | ||
| 70 | |||
| 71 | # xdg.mimeApps.defaultApplications."inode/directory" = "dolphin.desktop"; | ||
| 72 | } | ||
hosts/laptop/.DS_Store deleted| Binary files a/hosts/laptop/.DS_Store and /dev/null differ | |||
hosts/laptop/configuration.nix deleted-28| ... | @@ -1,28 +0,0 @@ | ||
| 1 | { | ||
| 2 | pkgs, | ||
| 3 | userSettings, | ||
| 4 | ... | ||
| 5 | }: { | ||
| 6 | environment.systemPackages = with pkgs; [ | ||
| 7 | neovim | ||
| 8 | pinentry_mac | ||
| 9 | signal-desktop-bin | ||
| 10 | ]; | ||
| 11 | |||
| 12 | # Create /etc/zshrc that loads the nix-darwin environment. | ||
| 13 | programs = { | ||
| 14 | gnupg.agent.enable = true; | ||
| 15 | zsh.enable = true; # default shell on catalina | ||
| 16 | }; | ||
| 17 | |||
| 18 | # When opening an interactive shell that isnt fish move into fish | ||
| 19 | programs.zsh = { | ||
| 20 | interactiveShellInit = '' | ||
| 21 | if [[ $(${pkgs.procps}/bin/ps -p $PPID -o comm) != "fish" && -z ''${ZSH_EXUCTION_STRING} ]] | ||
| 22 | then | ||
| 23 | [[ -o login ]] && LOGIN_OPTION='--login' || LOGIN_OPTION="" | ||
| 24 | exec ${pkgs.fish}/bin/fish $LOGIN_OPTION | ||
| 25 | fi | ||
| 26 | ''; | ||
| 27 | }; | ||
| 28 | } | ||
hosts/laptop/home.nix deleted-40| ... | @@ -1,40 +0,0 @@ | ||
| 1 | { | ||
| 2 | inputs, | ||
| 3 | config, | ||
| 4 | pkgs, | ||
| 5 | lib, | ||
| 6 | userSettings, | ||
| 7 | systemSettings, | ||
| 8 | ... | ||
| 9 | }: { | ||
| 10 | imports = | ||
| 11 | [ | ||
| 12 | inputs.nixvim.homeManagerModules.nixvim | ||
| 13 | #set up nixvim | ||
| 14 | # ../../modules/nixvim | ||
| 15 | ] | ||
| 16 | ++ lib.optionals userSettings.darwinTiling [../../modules/macos/tiling/sketchybar-home.nix]; | ||
| 17 | |||
| 18 | programs = import ../../modules/shared/homeManagerPrograms.nix {inherit inputs config pkgs lib userSettings systemSettings;}; | ||
| 19 | |||
| 20 | home = { | ||
| 21 | inherit (userSettings) username; | ||
| 22 | # homeDirectory = systemSettings.homeConfig; | ||
| 23 | # shell = pkgs.fish; | ||
| 24 | stateVersion = "23.05"; # Please read the comment before changing. | ||
| 25 | |||
| 26 | packages = pkgs.callPackage ../../modules/shared/packages.nix {inherit systemSettings;}; | ||
| 27 | |||
| 28 | # file = { | ||
| 29 | # ".config/sketchybar" = { | ||
| 30 | # source = ../../modules/macos/tiling/sketchybar; | ||
| 31 | # recursive = true; | ||
| 32 | # onChange = "${pkgs.sketchybar}/bin/sketchybar --reload"; | ||
| 33 | # }; | ||
| 34 | # }; | ||
| 35 | |||
| 36 | sessionPath = [ | ||
| 37 | "$HOME/.emacs.d/bin" | ||
| 38 | ]; | ||
| 39 | }; | ||
| 40 | } | ||
lib/mkSystem.nix+137-104| ... | @@ -4,116 +4,149 @@ | ... | @@ -4,116 +4,149 @@ |
| 4 | nixpkgs, | 4 | nixpkgs, |
| 5 | overlays, | 5 | overlays, |
| 6 | inputs, | 6 | inputs, |
| 7 | userSettings, | ||
| 8 | }: name: { | 7 | }: name: { |
| 9 | system, | 8 | user, # ./users/{name} |
| 10 | darwin ? false, | 9 | host ? null, # ./users/{name}/{host} (optional) |
| 10 | system, # arch-os | ||
| 11 | extraModules ? [], | 11 | extraModules ? [], |
| 12 | }: let | 12 | }: let |
| 13 | nixindex = | 13 | inherit (builtins) pathExists; |
| 14 | if darwin | 14 | darwin = nixpkgs.lib.strings.hasSuffix "-darwin" system; |
| 15 | then inputs.nix-index-database.darwinModules.nix-index | 15 | getInputModule = a: b: |
| 16 | else inputs.nix-index-database.nixosModules.nix-index; | 16 | inputs.${ |
| 17 | 17 | a | |
| 18 | stylix = | 18 | }.${ |
| 19 | if darwin | 19 | if darwin |
| 20 | then inputs.stylix.darwinModules.stylix | 20 | then "darwinModules" |
| 21 | else inputs.stylix.nixosModules.stylix; | 21 | else "nixosModules" |
| 22 | 22 | }.${ | |
| 23 | systemModuleDir = | 23 | b |
| 24 | }; | ||
| 25 | |||
| 26 | # NixOS vs nix-darwin functions | ||
| 27 | systemFunc = | ||
| 24 | if darwin | 28 | if darwin |
| 25 | then "macos" | 29 | then inputs.darwin.lib.darwinSystem |
| 26 | else "nixos"; | 30 | else nixpkgs.lib.nixosSystem; |
| 27 | 31 | ||
| 32 | userDir = ../users + "/${user}"; | ||
| 33 | userConfig = import (userDir + "/user.nix"); | ||
| 34 | hostDir = userDir + "/${host}"; | ||
| 35 | |||
| 36 | hostConfigPath = hostDir + "/configuration.nix"; | ||
| 37 | userConfigPath = userDir + "/configuration.nix"; | ||
| 38 | hostHomePath = hostDir + "/home.nix"; | ||
| 39 | userHomePath = userDir + "/home.nix"; | ||
| 40 | |||
| 41 | # Arguments passed to all module files | ||
| 42 | args = { | ||
| 43 | inherit inputs; | ||
| 44 | currentSystem = system; | ||
| 45 | # Details about the host machine | ||
| 46 | host = { | ||
| 47 | inherit darwin name; | ||
| 48 | }; | ||
| 49 | user = ({ | ||
| 50 | # This acts as formal documentation for what is allowed in user.nix | ||
| 51 | username, # unix username | ||
| 52 | name, # your display name | ||
| 53 | email, # for identity in programs such as git | ||
| 54 | dotfilesDir, # location to `../.` | ||
| 55 | timeZone ? "America/Los_Angeles", | ||
| 56 | # Stylix/Theming | ||
| 57 | theme ? null, # theme name for stylix | ||
| 58 | sexuality ? null, # pride flag for hyfetch | ||
| 59 | font ? null, # font to use | ||
| 60 | term, # preferred $TERM | ||
| 61 | editor, # preferred $EDITOR | ||
| 62 | browser ? null, # preferred $BROWSER | ||
| 63 | } @ user: | ||
| 64 | user) | ||
| 65 | userConfig; | ||
| 66 | }; | ||
| 28 | systemSettings = rec { | 67 | systemSettings = rec { |
| 29 | inherit darwin; | 68 | inherit darwin; |
| 30 | host = | 69 | homeDir = "/${ |
| 31 | if darwin | 70 | if darwin |
| 32 | then userSettings.darwinHost | 71 | then "Users" |
| 33 | else userSettings.nixosHost; | 72 | else "home" |
| 34 | 73 | }/${userConfig.username}"; | |
| 35 | # The config files for this system. | ||
| 36 | |||
| 37 | hostConfig = ../hosts/${host}/configuration.nix; | ||
| 38 | homeConfig = ../hosts/${host}/home.nix; | ||
| 39 | |||
| 40 | homeDir = | ||
| 41 | if darwin | ||
| 42 | then "/Users/" + userSettings.username + "/" | ||
| 43 | else "/home/" + userSettings.username + "/"; | ||
| 44 | |||
| 45 | # NixOS vs nix-darwin functions | ||
| 46 | systemFunc = | ||
| 47 | if darwin | ||
| 48 | then inputs.darwin.lib.darwinSystem | ||
| 49 | else nixpkgs.lib.nixosSystem; | ||
| 50 | |||
| 51 | hmModules = | ||
| 52 | if darwin | ||
| 53 | then inputs.home-manager.darwinModules | ||
| 54 | else inputs.home-manager.nixosModules; | ||
| 55 | }; | 74 | }; |
| 56 | in | 75 | in |
| 57 | with systemSettings; | 76 | systemFunc { |
| 58 | systemFunc rec { | 77 | inherit system; |
| 59 | inherit system; | 78 | |
| 60 | 79 | modules = | |
| 61 | #gross and ugly hack do NOT like | 80 | builtins.filter (f: f != null) |
| 62 | specialArgs = { | 81 | [ |
| 63 | inherit (userSettings) darwinTiling; | 82 | # Apply our overlays. Overlays are keyed by system type so we have |
| 64 | }; | 83 | # to go through and apply our system type. We do this first so |
| 65 | 84 | # the overlays are available globally. | |
| 66 | modules = | 85 | {nixpkgs.overlays = overlays;} |
| 67 | [ | 86 | |
| 68 | # Apply our overlays. Overlays are keyed by system type so we have | 87 | # Modules shared between nix-darwin and NixOS |
| 69 | # to go through and apply our system type. We do this first so | 88 | ../modules/shared |
| 70 | # the overlays are available globally. | 89 | # Modules for the specific OS |
| 71 | {nixpkgs.overlays = overlays;} | 90 | ( |
| 72 | 91 | if darwin | |
| 73 | # Enable caching for nix-index so we dont have to rebuild it | 92 | then ../modules/macos |
| 74 | 93 | else ../modules/nixos | |
| 75 | #shared modules | 94 | ) |
| 76 | ../modules/shared | 95 | |
| 77 | 96 | # The user-wide configuration.nix | |
| 78 | #system specific modules | 97 | ( |
| 79 | ../modules/${systemModuleDir} | 98 | if pathExists userConfigPath |
| 80 | 99 | then userConfigPath | |
| 81 | # Link to config.nix | 100 | else null |
| 82 | hostConfig | 101 | ) |
| 83 | 102 | # The host-wide configuration.nix | |
| 84 | #Set up nix-index and enable comma for easy one-shot command use | 103 | ( |
| 85 | #https://github.com/nix-community/comma | 104 | if host != null && pathExists hostConfigPath |
| 86 | nixindex | 105 | then hostConfigPath |
| 87 | {programs.nix-index-database.comma.enable = true;} | 106 | else null |
| 88 | 107 | ) | |
| 89 | #style programs | 108 | |
| 90 | stylix | 109 | # Set up nix-index and enable comma for easy one-shot command use |
| 91 | 110 | # https://github.com/nix-community/comma | |
| 92 | hmModules.home-manager | 111 | (getInputModule "nix-index-database" "nix-index") |
| 93 | { | 112 | {programs.nix-index-database.comma.enable = true;} |
| 94 | home-manager = { | 113 | |
| 95 | useGlobalPkgs = true; | 114 | # Themes for all programs |
| 96 | useUserPackages = true; | 115 | (getInputModule "stylix" "stylix") |
| 97 | backupFileExtension = "hm-backup"; | 116 | |
| 98 | extraSpecialArgs = {inherit inputs userSettings systemSettings;}; | 117 | # Home manager |
| 99 | users.${userSettings.username} = homeConfig; | 118 | (getInputModule "home-manager" "home-manager") |
| 100 | }; | 119 | { |
| 101 | 120 | home-manager = { | |
| 102 | users.users.${userSettings.username}.home = homeDir; | 121 | useGlobalPkgs = true; |
| 103 | } | 122 | useUserPackages = true; |
| 104 | 123 | backupFileExtension = "hm-backup"; | |
| 105 | # We expose some extra arguments so that our modules can parameterize | 124 | # Arguments passed to all module files |
| 106 | # better based on these values. | 125 | extraSpecialArgs = |
| 107 | { | 126 | args |
| 108 | config._module.args = { | 127 | // { |
| 109 | currentSystem = system; | 128 | mainHomeImports = builtins.filter (f: f != null) [ |
| 110 | # currentSystemName = name; | 129 | ( |
| 111 | # currentSystemUser = userSettings.username; | 130 | if pathExists userHomePath |
| 112 | 131 | then userHomePath | |
| 113 | inherit inputs userSettings systemSettings; | 132 | else null |
| 114 | }; | 133 | ) |
| 115 | } | 134 | ( |
| 116 | ] | 135 | if host != null && pathExists hostHomePath |
| 117 | #Add extra modules depending on system | 136 | then hostHomePath |
| 118 | ++ extraModules; | 137 | else null |
| 119 | } | 138 | ) |
| 139 | ]; | ||
| 140 | }; | ||
| 141 | # can't find how to make this an array without the param | ||
| 142 | users.${userConfig.username} = ../modules/home-manager.nix; | ||
| 143 | }; | ||
| 144 | users.users.${userConfig.username}.home = systemSettings.homeDir; | ||
| 145 | } | ||
| 146 | |||
| 147 | # Arguments passed to all module files | ||
| 148 | {config._module.args = args;} | ||
| 149 | ] | ||
| 150 | # Add extra modules specified from config | ||
| 151 | ++ extraModules; | ||
| 152 | } |
modules/home-manager.nix created+82| ... | @@ -0,0 +1,82 @@ | ||
| 1 | # This contains default configurations for set of programs | ||
| 2 | # and configuration, but does not enable many things on it's own. | ||
| 3 | { | ||
| 4 | pkgs, | ||
| 5 | lib, | ||
| 6 | config, | ||
| 7 | user, | ||
| 8 | host, | ||
| 9 | mainHomeImports, | ||
| 10 | ... | ||
| 11 | }: let | ||
| 12 | cfg = config.programs; | ||
| 13 | in { | ||
| 14 | imports = mainHomeImports; | ||
| 15 | programs = { | ||
| 16 | home-manager.enable = true; | ||
| 17 | nix-index.enable = true; | ||
| 18 | |||
| 19 | direnv = { | ||
| 20 | enableZshIntegration = true; | ||
| 21 | nix-direnv.enable = config.programs.direnv.enable; | ||
| 22 | }; | ||
| 23 | |||
| 24 | git = { | ||
| 25 | enable = true; | ||
| 26 | userName = lib.mkDefault user.name; | ||
| 27 | userEmail = lib.mkDefault user.email; | ||
| 28 | ignores = [ | ||
| 29 | (lib.mkIf host.darwin ".DS_Store") # When using Finder | ||
| 30 | (lib.mkIf host.darwin "._*") # When using non-APFS drives | ||
| 31 | # ViM and Neovim | ||
| 32 | ".*.swp" | ||
| 33 | ".nvimlog" | ||
| 34 | ]; | ||
| 35 | }; | ||
| 36 | |||
| 37 | atuin = { | ||
| 38 | enableBashIntegration = true; | ||
| 39 | enableFishIntegration = true; | ||
| 40 | daemon.enable = cfg.atuin.enable; | ||
| 41 | }; | ||
| 42 | bat = { | ||
| 43 | extraPackages = with pkgs.bat-extras; [batdiff batman batgrep batwatch batpipe prettybat]; | ||
| 44 | }; | ||
| 45 | hyfetch = { | ||
| 46 | settings = { | ||
| 47 | backend = "fastfetch"; | ||
| 48 | preset = user.sexuality; | ||
| 49 | mode = "rgb"; | ||
| 50 | light_dark = "dark"; | ||
| 51 | lightness = { | ||
| 52 | }; | ||
| 53 | color_align = { | ||
| 54 | mode = "horizontal"; | ||
| 55 | }; | ||
| 56 | }; | ||
| 57 | }; | ||
| 58 | fastfetch.enable = cfg.hyfetch.enable; | ||
| 59 | |||
| 60 | fish = { | ||
| 61 | plugins = [ | ||
| 62 | { | ||
| 63 | name = "tide"; | ||
| 64 | inherit (pkgs.fishPlugins.tide) src; | ||
| 65 | } | ||
| 66 | { | ||
| 67 | name = "!!"; | ||
| 68 | inherit (pkgs.fishPlugins.bang-bang) src; | ||
| 69 | } | ||
| 70 | ]; | ||
| 71 | shellAliases = | ||
| 72 | {} | ||
| 73 | // lib.optionalAttrs (!host.darwin) { | ||
| 74 | reboot-windows = "sudo efibootmgr --bootnext 0000; sudo reboot -h now"; | ||
| 75 | }; | ||
| 76 | shellInit = '' | ||
| 77 | batman --export-env | source | ||
| 78 | ''; | ||
| 79 | ##test -r '/Users/${user.username}/.opam/opam-init/init.fish' && source '/Users/${user.username}/.opam/opam-init/init.fish' > /dev/null 2> /dev/null; or true | ||
| 80 | }; | ||
| 81 | }; | ||
| 82 | } | ||
modules/macos/default.nix+14-7| ... | @@ -1,13 +1,20 @@ | ... | @@ -1,13 +1,20 @@ |
| 1 | { | 1 | { |
| 2 | pkgs, | 2 | pkgs, |
| 3 | lib, | 3 | lib, |
| 4 | darwinTiling, | ||
| 5 | ... | 4 | ... |
| 6 | }: { | 5 | }: { |
| 7 | imports = | 6 | imports = [ |
| 8 | [ | 7 | # sort-lines: start |
| 9 | ./homebrew.nix | 8 | ./mac-app-store.nix |
| 10 | ./system.nix | 9 | ./system.nix |
| 11 | ] | 10 | ./icons.nix |
| 12 | ++ lib.optionals darwinTiling [./tiling]; | 11 | ./tiling |
| 12 | # sort-lines: end | ||
| 13 | ]; | ||
| 14 | # make 'shared.linux' not an error to define. | ||
| 15 | options.shared.linux = lib.mkOption { | ||
| 16 | type = lib.types.anything; | ||
| 17 | default = {}; | ||
| 18 | description = "no-op on darwin"; | ||
| 19 | }; | ||
| 13 | } | 20 | } |
modules/macos/mac-app-store.nix created+44| ... | @@ -0,0 +1,44 @@ | ||
| 1 | { | ||
| 2 | config, | ||
| 3 | lib, | ||
| 4 | pkgs, | ||
| 5 | ... | ||
| 6 | }: let | ||
| 7 | types = lib.types; | ||
| 8 | |||
| 9 | # Mapping of Mac App Store applications. | ||
| 10 | # Add new entries to this list via the App Store's share button | ||
| 11 | # https://apps.apple.com/us/app/logic-pro/id634148309?mt=12 | ||
| 12 | # --------- ID HERE | ||
| 13 | allMasApps = { | ||
| 14 | # sort-lines:start | ||
| 15 | adguard = 1440147259; | ||
| 16 | final-cut-pro = 424389933; | ||
| 17 | logic-pro = 634148309; | ||
| 18 | magnet = 441258766; | ||
| 19 | motion = 434290957; | ||
| 20 | wireguard = 1451685025; | ||
| 21 | # sort-lines:end | ||
| 22 | }; | ||
| 23 | |||
| 24 | # the resolved configuration from the user | ||
| 25 | masApps = config.shared.darwin.macAppStoreApps; | ||
| 26 | in { | ||
| 27 | options = { | ||
| 28 | # Installs Mac Applications via name using homebrew. | ||
| 29 | shared.darwin.macAppStoreApps = lib.mkOption { | ||
| 30 | type = types.listOf types.str; | ||
| 31 | default = []; | ||
| 32 | }; | ||
| 33 | }; | ||
| 34 | config = lib.mkIf (builtins.length masApps > 0) { | ||
| 35 | homebrew.enable = true; | ||
| 36 | homebrew.masApps = builtins.listToAttrs ( | ||
| 37 | builtins.map (name: { | ||
| 38 | inherit name; | ||
| 39 | value = allMasApps.${name}; | ||
| 40 | }) | ||
| 41 | masApps | ||
| 42 | ); | ||
| 43 | }; | ||
| 44 | } | ||
modules/macos/system.nix+14-12| ... | @@ -1,21 +1,25 @@ | ... | @@ -1,21 +1,25 @@ |
| 1 | { | 1 | { |
| 2 | config, | ||
| 2 | pkgs, | 3 | pkgs, |
| 3 | userSettings, | 4 | lib, |
| 4 | ... | 5 | ... |
| 5 | }: { | 6 | }: let |
| 6 | #Use touchid or watch to activate sudo | 7 | tiling = config.shared.darwin.tiling.enable; |
| 8 | in { | ||
| 9 | # Use touchid or watch to activate sudo | ||
| 7 | security.pam.services.sudo_local = { | 10 | security.pam.services.sudo_local = { |
| 8 | enable = true; | 11 | enable = true; |
| 9 | reattach = true; | 12 | reattach = true; |
| 10 | touchIdAuth = true; | 13 | touchIdAuth = true; |
| 11 | }; | 14 | }; |
| 12 | # set some OSX preferences that I always end up hunting down and changing. | 15 | |
| 16 | # Set some OSX preferences that I always end up hunting down and changing. | ||
| 13 | system = { | 17 | system = { |
| 14 | # Used for backwards compatibility, please read the changelog before changing. | 18 | # Used for backwards compatibility, please read the changelog before changing. |
| 15 | # $ darwin-rebuild changelog | 19 | # $ darwin-rebuild changelog |
| 16 | stateVersion = 6; | 20 | stateVersion = 6; |
| 17 | 21 | ||
| 18 | defaults = { | 22 | defaults = lib.mkDefault { |
| 19 | # Turn quarantine off | 23 | # Turn quarantine off |
| 20 | LaunchServices = { | 24 | LaunchServices = { |
| 21 | LSQuarantine = false; | 25 | LSQuarantine = false; |
| ... | @@ -53,14 +57,14 @@ | ... | @@ -53,14 +57,14 @@ |
| 53 | NSDocumentSaveNewDocumentsToCloud = false; | 57 | NSDocumentSaveNewDocumentsToCloud = false; |
| 54 | AppleICUForce24HourTime = true; | 58 | AppleICUForce24HourTime = true; |
| 55 | 59 | ||
| 56 | #Autohide menu bar | 60 | # Autohide menu bar for tiling window manager |
| 57 | _HIHideMenuBar = userSettings.darwinTiling; | 61 | _HIHideMenuBar = tiling; |
| 58 | }; | 62 | }; |
| 59 | # minimal dock | 63 | # minimal dock |
| 60 | dock = { | 64 | dock = { |
| 61 | autohide = true; | 65 | autohide = true; |
| 62 | #instant hide and show | 66 | autohide-time-modifier = 0.0; # make animation instant |
| 63 | autohide-time-modifier = 0.0; | 67 | autohide-delay = 0.0; # remove delay when touching bottom of screen |
| 64 | show-process-indicators = true; | 68 | show-process-indicators = true; |
| 65 | 69 | ||
| 66 | expose-group-apps = true; | 70 | expose-group-apps = true; |
| ... | @@ -80,13 +84,12 @@ | ... | @@ -80,13 +84,12 @@ |
| 80 | AppleShowAllExtensions = true; | 84 | AppleShowAllExtensions = true; |
| 81 | ShowPathbar = true; | 85 | ShowPathbar = true; |
| 82 | FXEnableExtensionChangeWarning = false; | 86 | FXEnableExtensionChangeWarning = false; |
| 87 | # TODO: default to list view and not saving .DS_Store | ||
| 83 | }; | 88 | }; |
| 84 | |||
| 85 | CustomSystemPreferences = { | 89 | CustomSystemPreferences = { |
| 86 | "com.apple.universalaccess" = { | 90 | "com.apple.universalaccess" = { |
| 87 | closeViewTrackpadGestureZoomEnabled = 1; | 91 | closeViewTrackpadGestureZoomEnabled = 1; |
| 88 | }; | 92 | }; |
| 89 | |||
| 90 | "com.apple.symbolichotkeys" = { | 93 | "com.apple.symbolichotkeys" = { |
| 91 | AppleSymbolicHotKeys = { | 94 | AppleSymbolicHotKeys = { |
| 92 | "64" = { | 95 | "64" = { |
| ... | @@ -96,7 +99,6 @@ | ... | @@ -96,7 +99,6 @@ |
| 96 | }; | 99 | }; |
| 97 | }; | 100 | }; |
| 98 | }; | 101 | }; |
| 99 | |||
| 100 | # Bind caps to escape for better normal mode stuff | 102 | # Bind caps to escape for better normal mode stuff |
| 101 | keyboard = { | 103 | keyboard = { |
| 102 | enableKeyMapping = true; | 104 | enableKeyMapping = true; |
modules/macos/tiling/aerospace.nix+2-2| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | {pkgs, ...}: { | 1 | {config,pkgs, ...}: { |
| 2 | services.aerospace = { | 2 | services.aerospace = { |
| 3 | enable = true; | 3 | enable = config.shared.darwin.tiling.enable; |
| 4 | settings = { | 4 | settings = { |
| 5 | # Normalizations. See: https://nikitabobko.github.io/AeroSpace/guide#normalization | 5 | # Normalizations. See: https://nikitabobko.github.io/AeroSpace/guide#normalization |
| 6 | enable-normalization-flatten-containers = true; | 6 | enable-normalization-flatten-containers = true; |
modules/macos/tiling/default.nix+12-2| ... | @@ -1,6 +1,16 @@ | ... | @@ -1,6 +1,16 @@ |
| 1 | {pkgs, ...}: { | 1 | { lib, ... }: let |
| 2 | inherit (lib) types; | ||
| 3 | in { | ||
| 2 | imports = [ | 4 | imports = [ |
| 3 | ./aerospace.nix | ||
| 4 | ./sketchybar.nix | 5 | ./sketchybar.nix |
| 6 | ./aerospace.nix | ||
| 5 | ]; | 7 | ]; |
| 8 | options = { | ||
| 9 | shared.darwin.tiling.enable = lib.mkOption { | ||
| 10 | type = types.bool; | ||
| 11 | default = false; | ||
| 12 | example = true; | ||
| 13 | description = "Enable tiling window management."; | ||
| 14 | }; | ||
| 15 | }; | ||
| 6 | } | 16 | } |
modules/macos/tiling/sketchybar.nix+147-3| ... | @@ -1,6 +1,150 @@ | ... | @@ -1,6 +1,150 @@ |
| 1 | {pkgs, ...}: { | 1 | {config,pkgs, ...}: { |
| 2 | services.sketchybar = { | 2 | services.sketchybar = { |
| 3 | enable = true; | 3 | enable = config.shared.darwin.tiling.enable; |
| 4 | package = pkgs.sketchybar; | 4 | config = '' |
| 5 | # This is a demo config to showcase some of the most important commands. | ||
| 6 | # It is meant to be changed and configured, as it is intentionally kept sparse. | ||
| 7 | # For a (much) more advanced configuration example see my dotfiles: | ||
| 8 | # https://github.com/FelixKratz/dotfiles | ||
| 9 | |||
| 10 | PLUGIN_DIR="$CONFIG_DIR/plugins" | ||
| 11 | |||
| 12 | ##### Bar Appearance ##### | ||
| 13 | # Configuring the general appearance of the bar. | ||
| 14 | # These are only some of the options available. For all options see: | ||
| 15 | # https://felixkratz.github.io/SketchyBar/config/bar | ||
| 16 | # If you are looking for other colors, see the color picker: | ||
| 17 | # https://felixkratz.github.io/SketchyBar/config/tricks#color-picker | ||
| 18 | |||
| 19 | sketchybar --bar position=top height=40 blur_radius=30 color=0x04313244 | ||
| 20 | |||
| 21 | # Colours | ||
| 22 | SURFACE=0xff313244 | ||
| 23 | |||
| 24 | ##### Changing Defaults ##### | ||
| 25 | # We now change some default values, which are applied to all further items. | ||
| 26 | # For a full list of all available item properties see: | ||
| 27 | # https://felixkratz.github.io/SketchyBar/config/items | ||
| 28 | |||
| 29 | default=( | ||
| 30 | padding_left=5 | ||
| 31 | padding_right=5 | ||
| 32 | icon.font="Hack Nerd Font:Bold:17.0" | ||
| 33 | label.font="Hack Nerd Font:Bold:14.0" | ||
| 34 | icon.color=0xffcdd6f4 | ||
| 35 | label.color=0xffcdd6f4 | ||
| 36 | icon.padding_left=8 | ||
| 37 | icon.padding_right=4 | ||
| 38 | label.padding_left=4 | ||
| 39 | label.padding_right=8 | ||
| 40 | background.padding_left=2 | ||
| 41 | background.padding_right=2 | ||
| 42 | background.color=$SURFACE \ | ||
| 43 | background.corner_radius=10 \ | ||
| 44 | background.height=30 \ | ||
| 45 | background.border_width=1 \ | ||
| 46 | ) | ||
| 47 | sketchybar --default "$\{default[@]}" | ||
| 48 | |||
| 49 | sketchybar --add event aerospace_workspace_change | ||
| 50 | |||
| 51 | for sid in $(aerospace list-workspaces --all); do | ||
| 52 | sketchybar --add item space.$sid left \ | ||
| 53 | --subscribe space.$sid aerospace_workspace_change \ | ||
| 54 | --set space.$sid \ | ||
| 55 | background.border_width=1 \ | ||
| 56 | background.border_color=0xffb4befe \ | ||
| 57 | background.corner_radius=5 \ | ||
| 58 | background.height=20 \ | ||
| 59 | icon.padding_left=0 \ | ||
| 60 | icon.padding_right=0 \ | ||
| 61 | label.padding_right=6 \ | ||
| 62 | label="$sid" \ | ||
| 63 | click_script="aerospace workspace $sid" \ | ||
| 64 | script="$CONFIG_DIR/plugins/aerospace.sh $sid" | ||
| 65 | done | ||
| 66 | |||
| 67 | ##### Adding Left Items ##### | ||
| 68 | # We add some regular items to the left side of the bar, where | ||
| 69 | # only the properties deviating from the current defaults need to be set | ||
| 70 | |||
| 71 | sketchybar --add item chevron left \ | ||
| 72 | --set chevron icon= label.drawing=off background.drawing=off \ | ||
| 73 | icon.color=0xfff5e0dc \ | ||
| 74 | --add item front_app left \ | ||
| 75 | --set front_app icon.drawing=off script="$PLUGIN_DIR/front_app.sh" \ | ||
| 76 | label.color=0xff94e2d5 \ | ||
| 77 | label.padding_left=8 \ | ||
| 78 | background.border_color=0xff94e2d5 \ | ||
| 79 | --subscribe front_app front_app_switched | ||
| 80 | |||
| 81 | ##### Adding Right Items ##### | ||
| 82 | # In the same way as the left items we can add items to the right side. | ||
| 83 | # Additional position (e.g. center) are available, see: | ||
| 84 | # https://felixkratz.github.io/SketchyBar/config/items#adding-items-to-sketchybar | ||
| 85 | |||
| 86 | # Some items refresh on a fixed cycle, e.g. the clock runs its script once | ||
| 87 | # every 10s. Other items respond to events they subscribe to, e.g. the | ||
| 88 | # volume.sh script is only executed once an actual change in system audio | ||
| 89 | # volume is registered. More info about the event system can be found here: | ||
| 90 | # https://felixkratz.github.io/SketchyBar/config/events | ||
| 91 | |||
| 92 | sketchybar --add item clock right \ | ||
| 93 | --set clock update_freq=10 icon= script="$PLUGIN_DIR/clock.sh" \ | ||
| 94 | icon.color=0xfffab387 \ | ||
| 95 | label.color=0xffcdd6f4 \ | ||
| 96 | background.color=$SURFACE \ | ||
| 97 | background.corner_radius=10 \ | ||
| 98 | background.height=30 \ | ||
| 99 | --add item volume right \ | ||
| 100 | --set volume script="$PLUGIN_DIR/volume.sh" \ | ||
| 101 | label.color=0xffcdd6f4 \ | ||
| 102 | background.color=$SURFACE \ | ||
| 103 | background.corner_radius=10 \ | ||
| 104 | background.height=30 \ | ||
| 105 | --subscribe volume volume_change \ | ||
| 106 | --add item battery right \ | ||
| 107 | --set battery update_freq=120 script="$PLUGIN_DIR/battery.sh" \ | ||
| 108 | label.color=0xffcdd6f4 \ | ||
| 109 | background.color=$SURFACE \ | ||
| 110 | background.corner_radius=10 \ | ||
| 111 | background.height=30 \ | ||
| 112 | --subscribe battery system_woke power_source_change | ||
| 113 | |||
| 114 | sketchybar -m --add item mullvad right \ | ||
| 115 | --set mullvad icon= \ | ||
| 116 | icon.color=0xfff38ba8 \ | ||
| 117 | background.color=$SURFACE \ | ||
| 118 | background.corner_radius=10 \ | ||
| 119 | background.height=30 \ | ||
| 120 | background.border_width=1 \ | ||
| 121 | background.border_color=0xfff38ba8 \ | ||
| 122 | label.padding_left=0 \ | ||
| 123 | label.padding_right=0 \ | ||
| 124 | icon.padding_left=6 \ | ||
| 125 | update_freq=5 \ | ||
| 126 | script="$PLUGIN_DIR/mullvad.sh" | ||
| 127 | |||
| 128 | # Add event | ||
| 129 | sketchybar -m --add event song_update com.apple.iTunes.playerInfo | ||
| 130 | |||
| 131 | # Add Music Item | ||
| 132 | sketchybar -m --add item music right \ | ||
| 133 | --set music script="$PLUGIN_DIR/music.sh" \ | ||
| 134 | click_script="$PLUGIN_DIR/music_click.sh" \ | ||
| 135 | label.padding_right=10 \ | ||
| 136 | label.color=0xffcdd6f4 \ | ||
| 137 | background.color=$SURFACE \ | ||
| 138 | background.corner_radius=10 \ | ||
| 139 | background.height=30 \ | ||
| 140 | background.border_width=1 \ | ||
| 141 | background.border_color=0xfff38ba8 \ | ||
| 142 | drawing=off \ | ||
| 143 | --subscribe music song_update | ||
| 144 | |||
| 145 | ##### Force all scripts to run the first time (never do this in a script) ##### | ||
| 146 | sketchybar --update | ||
| 147 | |||
| 148 | ''; | ||
| 5 | }; | 149 | }; |
| 6 | } | 150 | } |
modules/nixos/default.nix+7-1| ... | @@ -1,8 +1,14 @@ | ... | @@ -1,8 +1,14 @@ |
| 1 | {pkgs, ...}: { | 1 | { lib, pkgs, ... }: { |
| 2 | imports = [ | 2 | imports = [ |
| 3 | ./boot.nix | 3 | ./boot.nix |
| 4 | ./ld.nix | 4 | ./ld.nix |
| 5 | ./nvidia.nix | 5 | ./nvidia.nix |
| 6 | ./services.nix | 6 | ./services.nix |
| 7 | ]; | 7 | ]; |
| 8 | # make 'shared.darwin' not an error to define. | ||
| 9 | options.shared.darwin = lib.mkOption { | ||
| 10 | type = lib.types.anything; | ||
| 11 | default = {}; | ||
| 12 | description = "no-op on linux"; | ||
| 13 | }; | ||
| 8 | } | 14 | } |
modules/shared/default.nix+4-1| ... | @@ -1,6 +1,9 @@ | ... | @@ -1,6 +1,9 @@ |
| 1 | # shared is used by nixos-rebuild and darwin-rebuild | ||
| 1 | {pkgs, ...}: { | 2 | {pkgs, ...}: { |
| 2 | imports = [ | 3 | imports = [ |
| 3 | ./extras.nix | 4 | # sort-lines:start |
| 5 | ./user-system-settings.nix | ||
| 4 | ./nix.nix | 6 | ./nix.nix |
| 7 | # sort-lines:end | ||
| 5 | ]; | 8 | ]; |
| 6 | } | 9 | } |
modules/shared/extras.nix deleted-53| ... | @@ -1,53 +0,0 @@ | ||
| 1 | { | ||
| 2 | inputs, | ||
| 3 | pkgs, | ||
| 4 | userSettings, | ||
| 5 | ... | ||
| 6 | }: { | ||
| 7 | services.tailscale.enable = true; | ||
| 8 | |||
| 9 | networking = { | ||
| 10 | }; | ||
| 11 | fonts.packages = with pkgs; [ | ||
| 12 | nerd-fonts.fira-code | ||
| 13 | nerd-fonts.iosevka | ||
| 14 | iosevka | ||
| 15 | nerd-fonts.symbols-only | ||
| 16 | nerd-fonts.iosevka | ||
| 17 | inputs.apple-fonts.packages.${pkgs.system}.sf-pro | ||
| 18 | ]; | ||
| 19 | |||
| 20 | # Set your time zone. | ||
| 21 | time.timeZone = userSettings.timeZone; | ||
| 22 | |||
| 23 | home-manager.users.${userSettings.username}.home.sessionVariables = { | ||
| 24 | EDITOR = userSettings.editor; | ||
| 25 | VISUAL = userSettings.editor; | ||
| 26 | TERMINAL = userSettings.term; | ||
| 27 | BROWSER = userSettings.browser; | ||
| 28 | }; | ||
| 29 | |||
| 30 | stylix = { | ||
| 31 | enable = true; | ||
| 32 | base16Scheme = "${pkgs.base16-schemes}/share/themes/${userSettings.theme}.yaml"; | ||
| 33 | |||
| 34 | fonts = { | ||
| 35 | serif = { | ||
| 36 | package = pkgs.nerd-fonts.${userSettings.font}; | ||
| 37 | name = "${userSettings.font} Nerd Font"; | ||
| 38 | }; | ||
| 39 | sansSerif = { | ||
| 40 | package = pkgs.nerd-fonts.${userSettings.font}; | ||
| 41 | name = "${userSettings.font} Nerd Font"; | ||
| 42 | }; | ||
| 43 | monospace = { | ||
| 44 | package = pkgs.nerd-fonts.${userSettings.font}; | ||
| 45 | name = "${userSettings.font} Nerd Font"; | ||
| 46 | }; | ||
| 47 | emoji = { | ||
| 48 | package = pkgs.twemoji-color-font; | ||
| 49 | name = "Twemoji Color"; | ||
| 50 | }; | ||
| 51 | }; | ||
| 52 | }; | ||
| 53 | } | ||
modules/shared/homeManagerPrograms.nix deleted-67| ... | @@ -1,67 +0,0 @@ | ||
| 1 | { | ||
| 2 | pkgs, | ||
| 3 | lib, | ||
| 4 | userSettings, | ||
| 5 | systemSettings, | ||
| 6 | ... | ||
| 7 | }: { | ||
| 8 | nix-index.enable = true; | ||
| 9 | atuin = { | ||
| 10 | enable = true; | ||
| 11 | enableBashIntegration = true; | ||
| 12 | enableFishIntegration = true; | ||
| 13 | daemon.enable = true; | ||
| 14 | }; | ||
| 15 | |||
| 16 | direnv = { | ||
| 17 | enable = true; | ||
| 18 | enableZshIntegration = true; | ||
| 19 | nix-direnv.enable = true; | ||
| 20 | }; | ||
| 21 | |||
| 22 | bat = { | ||
| 23 | enable = true; | ||
| 24 | extraPackages = with pkgs.bat-extras; [batdiff batman batgrep batwatch batpipe prettybat]; | ||
| 25 | }; | ||
| 26 | |||
| 27 | hyfetch = { | ||
| 28 | enable = true; | ||
| 29 | settings = { | ||
| 30 | backend = "fastfetch"; | ||
| 31 | preset = userSettings.sexuality; | ||
| 32 | mode = "rgb"; | ||
| 33 | light_dark = "dark"; | ||
| 34 | lightness = { | ||
| 35 | }; | ||
| 36 | color_align = { | ||
| 37 | mode = "horizontal"; | ||
| 38 | }; | ||
| 39 | }; | ||
| 40 | }; | ||
| 41 | |||
| 42 | fish = { | ||
| 43 | enable = true; | ||
| 44 | |||
| 45 | plugins = [ | ||
| 46 | { | ||
| 47 | name = "tide"; | ||
| 48 | inherit (pkgs.fishPlugins.tide) src; | ||
| 49 | } | ||
| 50 | { | ||
| 51 | name = "!!"; | ||
| 52 | inherit (pkgs.fishPlugins.bang-bang) src; | ||
| 53 | } | ||
| 54 | ]; | ||
| 55 | shellAliases = | ||
| 56 | { | ||
| 57 | } | ||
| 58 | // lib.optionalAttrs (!systemSettings.darwin) { | ||
| 59 | reboot-windows = "sudo efibootmgr --bootnext 0000; sudo reboot -h now"; | ||
| 60 | }; | ||
| 61 | shellInit = '' | ||
| 62 | batman --export-env | source | ||
| 63 | ''; | ||
| 64 | ##test -r '/Users/${userSettings.username}/.opam/opam-init/init.fish' && source '/Users/${userSettings.username}/.opam/opam-init/init.fish' > /dev/null 2> /dev/null; or true | ||
| 65 | }; | ||
| 66 | home-manager.enable = true; | ||
| 67 | } | ||
modules/shared/packages.nix deleted-120| ... | @@ -1,120 +0,0 @@ | ||
| 1 | { | ||
| 2 | pkgs, | ||
| 3 | systemSettings, | ||
| 4 | ... | ||
| 5 | }: | ||
| 6 | with pkgs; [ | ||
| 7 | #general development | ||
| 8 | just | ||
| 9 | pkg-config | ||
| 10 | gnumake | ||
| 11 | caddy | ||
| 12 | pm2 | ||
| 13 | clang-tools | ||
| 14 | wget | ||
| 15 | git | ||
| 16 | unzip | ||
| 17 | clang | ||
| 18 | cmake | ||
| 19 | gnupg | ||
| 20 | |||
| 21 | #ides | ||
| 22 | zed-editor | ||
| 23 | emacs | ||
| 24 | |||
| 25 | #virtualization | ||
| 26 | qemu | ||
| 27 | podman | ||
| 28 | docker | ||
| 29 | |||
| 30 | #productivity | ||
| 31 | glance | ||
| 32 | anki-bin | ||
| 33 | tailscale | ||
| 34 | openconnect | ||
| 35 | |||
| 36 | #nix tools | ||
| 37 | cachix | ||
| 38 | direnv | ||
| 39 | nh | ||
| 40 | |||
| 41 | #terminal stuff | ||
| 42 | (btop.override {cudaSupport = true;}) | ||
| 43 | tmux | ||
| 44 | zellij | ||
| 45 | lazygit | ||
| 46 | fzf | ||
| 47 | neofetch | ||
| 48 | hyfetch | ||
| 49 | fastfetch | ||
| 50 | eza | ||
| 51 | ollama | ||
| 52 | uv | ||
| 53 | fd | ||
| 54 | ripgrep | ||
| 55 | file | ||
| 56 | fish | ||
| 57 | |||
| 58 | #image tools | ||
| 59 | imagemagick | ||
| 60 | |||
| 61 | #chatting apps | ||
| 62 | (discord.override { | ||
| 63 | withMoonlight = true; | ||
| 64 | }) | ||
| 65 | vesktop | ||
| 66 | |||
| 67 | #media | ||
| 68 | spotify | ||
| 69 | zathura | ||
| 70 | |||
| 71 | #language servers | ||
| 72 | typst-live | ||
| 73 | lua-language-server | ||
| 74 | nil | ||
| 75 | nixd | ||
| 76 | texlab | ||
| 77 | texlivePackages.chktex | ||
| 78 | |||
| 79 | #formatters/linters | ||
| 80 | stylua | ||
| 81 | alejandra | ||
| 82 | statix | ||
| 83 | |||
| 84 | #neovim deps | ||
| 85 | lua51Packages.lua | ||
| 86 | lua51Packages.luarocks-nix | ||
| 87 | codespell | ||
| 88 | typst | ||
| 89 | tree-sitter | ||
| 90 | |||
| 91 | #python | ||
| 92 | pyright | ||
| 93 | basedpyright | ||
| 94 | ruff | ||
| 95 | python312Packages.python | ||
| 96 | python312Packages.pynvim | ||
| 97 | python312Packages.pip | ||
| 98 | |||
| 99 | #programming languages | ||
| 100 | R | ||
| 101 | deno | ||
| 102 | ruby | ||
| 103 | nodePackages.npm | ||
| 104 | go | ||
| 105 | coq | ||
| 106 | elan | ||
| 107 | |||
| 108 | #browsers | ||
| 109 | tor | ||
| 110 | firefox | ||
| 111 | |||
| 112 | #math | ||
| 113 | texlive.combined.scheme-full | ||
| 114 | zathura | ||
| 115 | |||
| 116 | #fun things | ||
| 117 | cowsay | ||
| 118 | cmatrix | ||
| 119 | sl | ||
| 120 | ] | ||
modules/shared/user-system-settings.nix created+43| ... | @@ -0,0 +1,43 @@ | ||
| 1 | # applies user settings for the system | ||
| 2 | { | ||
| 3 | pkgs, | ||
| 4 | user, | ||
| 5 | lib, | ||
| 6 | ... | ||
| 7 | }: { | ||
| 8 | # Set your time zone. | ||
| 9 | time.timeZone = user.timeZone; | ||
| 10 | |||
| 11 | home-manager.users.${user.username}.home.sessionVariables = | ||
| 12 | { | ||
| 13 | EDITOR = user.editor; | ||
| 14 | TERMINAL = user.term; | ||
| 15 | } | ||
| 16 | // lib.optionalAttrs (user ? "browser") { | ||
| 17 | BROWSER = user.browser; | ||
| 18 | }; | ||
| 19 | |||
| 20 | stylix = { | ||
| 21 | enable = user ? "theme"; | ||
| 22 | base16Scheme = "${pkgs.base16-schemes}/share/themes/${user.theme}.yaml"; | ||
| 23 | |||
| 24 | fonts = lib.optionalAttrs (user ? "font") { | ||
| 25 | serif = { | ||
| 26 | package = pkgs.nerd-fonts.${user.font}; | ||
| 27 | name = "${user.font} Nerd Font"; | ||
| 28 | }; | ||
| 29 | sansSerif = { | ||
| 30 | package = pkgs.nerd-fonts.${user.font}; | ||
| 31 | name = "${user.font} Nerd Font"; | ||
| 32 | }; | ||
| 33 | monospace = { | ||
| 34 | package = pkgs.nerd-fonts.${user.font}; | ||
| 35 | name = "${user.font} Nerd Font"; | ||
| 36 | }; | ||
| 37 | emoji = { | ||
| 38 | package = pkgs.twemoji-color-font; | ||
| 39 | name = "Twemoji Color"; | ||
| 40 | }; | ||
| 41 | }; | ||
| 42 | }; | ||
| 43 | } | ||
oldflake.nix deleted-47| ... | @@ -1,47 +0,0 @@ | ||
| 1 | { | ||
| 2 | description = "My first flake!"; | ||
| 3 | |||
| 4 | inputs = { | ||
| 5 | nixpkgs.url = "nixpkgs/nixos-23.11"; | ||
| 6 | home-manager = { | ||
| 7 | url = "github:nix-community/home-manager/release-23.11"; | ||
| 8 | inputs.nixpkgs.follows = "nixpkgs"; | ||
| 9 | }; | ||
| 10 | # nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=<0.2.0>"; | ||
| 11 | |||
| 12 | # hyprland.url = "github:hyprwm/Hyprland"; | ||
| 13 | # hyprland-plugins = { | ||
| 14 | # url = "github:hyprwm/hyprland-plugins"; | ||
| 15 | # inputs.hyprland.follows = "hyprland"; | ||
| 16 | # }; | ||
| 17 | # use the following for unstable: | ||
| 18 | # nixpkgs.url = "nixpkgs/nixos-unstable"; | ||
| 19 | |||
| 20 | # or any branch you want: | ||
| 21 | # nixpkgs.url = "nixpkgs/{BRANCH-NAME}" | ||
| 22 | }; | ||
| 23 | |||
| 24 | outputs = { | ||
| 25 | self, | ||
| 26 | home-manager, | ||
| 27 | nixpkgs, | ||
| 28 | ... | ||
| 29 | }: let | ||
| 30 | system = "x86_64-linux"; | ||
| 31 | lib = nixpkgs.lib; | ||
| 32 | pkgs = nixpkgs.legacyPackages.${system}; | ||
| 33 | in { | ||
| 34 | nixosConfigurations = { | ||
| 35 | nmarks = lib.nixosSystem { | ||
| 36 | inherit system; | ||
| 37 | modules = [./configuration.nix]; | ||
| 38 | }; | ||
| 39 | }; | ||
| 40 | homeConfigurations = { | ||
| 41 | nmarks = home-manager.lib.homeManagerConfiguration { | ||
| 42 | inherit pkgs; | ||
| 43 | modules = [./home.nix]; | ||
| 44 | }; | ||
| 45 | }; | ||
| 46 | }; | ||
| 47 | } | ||
readme.md created+65| ... | @@ -0,0 +1,65 @@ | ||
| 1 | # nix config | ||
| 2 | |||
| 3 | this setup allows natalie and chloe to share common configuration between their machines, but also share useful modules between each other. | ||
| 4 | |||
| 5 | ``` | ||
| 6 | lib/ # reusable functions | ||
| 7 | modules/ # reusable modules | ||
| 8 | +-- macos/ # nix-darwin configurations | ||
| 9 | +-- nixos/ # linux configurations | ||
| 10 | +-- nixvim/ # neovim configurations | ||
| 11 | +-- shared/ # shared between nixos-rebuild & darwin-rebuild | ||
| 12 | +-- home-manager.nix # home program presets | ||
| 13 | users/ | ||
| 14 | +-- chloe/ | ||
| 15 | | +-- user.nix # info about her | ||
| 16 | | +-- configuration.nix # for all hosts | ||
| 17 | | +-- home.nix # for all hosts | ||
| 18 | | +-- sandwich/ | ||
| 19 | | | +-- configuration.nix # per host | ||
| 20 | | | +-- home.nix | ||
| 21 | | +-- paperback/ | ||
| 22 | | ... | ||
| 23 | +-- natalie/ | ||
| 24 | +-- user.nix # info about her | ||
| 25 | ... | ||
| 26 | ``` | ||
| 27 | |||
| 28 | A new machine can be added by adding a new definition in `flake.nix`. Note that the user and host `configuration.nix` and `home.nix` files are | ||
| 29 | |||
| 30 | ## macOS installation instructions | ||
| 31 | |||
| 32 | Install Nix using the upstream Nix (Pick "no" then "yes): | ||
| 33 | |||
| 34 | ``` | ||
| 35 | curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \ | ||
| 36 | sh -s -- install | ||
| 37 | ``` | ||
| 38 | |||
| 39 | While this installs, now is a good time to perform manual setup steps: | ||
| 40 | |||
| 41 | - Setup your SSH keys in `~/.ssh` | ||
| 42 | - Configure the device hostname in System Settings in | ||
| 43 | - About -> Name | ||
| 44 | - General -> Sharing -> Local Hostname | ||
| 45 | - Make sure you're logged into iCloud / Mac App Store | ||
| 46 | - `xcode-select --install` to make sure Git and other utilities are available. | ||
| 47 | - Optional: Disable app verification with `sudo spctl --master-disable`, then, go to System Settings -> Privacy to allow unsigned apps. | ||
| 48 | |||
| 49 | Once Nix is installed, open a new shell and clone the repository: | ||
| 50 | |||
| 51 | ``` | ||
| 52 | # Clone via HTTPs | ||
| 53 | git clone https://git.paperclover.net/clo/config.git | ||
| 54 | # With SSH Authentication | ||
| 55 | git clone git@git.paperclover.net:clo/config | ||
| 56 | ``` | ||
| 57 | |||
| 58 | The location of the cloned repository must match what is in your `user.nix` file. | ||
| 59 | |||
| 60 | Setup `nix-darwin` using the `switch` helper: | ||
| 61 | |||
| 62 | ``` | ||
| 63 | ./switch | ||
| 64 | ``` | ||
| 65 | |||
switch created+12| ... | @@ -0,0 +1,12 @@ | ||
| 1 | #!/bin/sh | ||
| 2 | nh_subcommand="os" | ||
| 3 | fallback_command="nixos-rebuild" | ||
| 4 | if [ "$(uname -o)" ]; then | ||
| 5 | nh_subcommand="darwin" | ||
| 6 | fallback_command="nix run .#darwin-rebuild" | ||
| 7 | fi; | ||
| 8 | if command -v nh > /dev/null; then | ||
| 9 | nh $nh_subcommand switch . | ||
| 10 | else | ||
| 11 | $fallback_command -- switch --flake . | ||
| 12 | fi | ||
users/chloe/configuration.nix created+28| ... | @@ -0,0 +1,28 @@ | ||
| 1 | # Configuration applied to all of chloe's machines | ||
| 2 | { pkgs, ... }: { | ||
| 3 | # packages for all machines | ||
| 4 | environment.systemPackages = with pkgs; [ | ||
| 5 | neovim | ||
| 6 | ]; | ||
| 7 | # configuration for shared modules. | ||
| 8 | # all custom options in 'shared' for clarity. | ||
| 9 | shared.darwin = { | ||
| 10 | macAppStoreApps = [ | ||
| 11 | "adguard" | ||
| 12 | "magnet" | ||
| 13 | ]; | ||
| 14 | }; | ||
| 15 | # system preferences | ||
| 16 | system.defaults = { | ||
| 17 | NSGlobalDomain = { | ||
| 18 | KeyRepeat = 1; | ||
| 19 | InitialKeyRepeat = 10; | ||
| 20 | }; | ||
| 21 | CustomUserPreferences = { | ||
| 22 | NSGlobalDomain = { | ||
| 23 | # TODO: how to change system accent color | ||
| 24 | AppleHighlightColor = "1.000000 0.874510 0.701961 Orange"; | ||
| 25 | }; | ||
| 26 | }; | ||
| 27 | }; | ||
| 28 | } | ||
users/chloe/home.nix created+24| ... | @@ -0,0 +1,24 @@ | ||
| 1 | { | ||
| 2 | inputs, | ||
| 3 | pkgs, | ||
| 4 | lib, | ||
| 5 | ... | ||
| 6 | }: { | ||
| 7 | home = { | ||
| 8 | stateVersion = "23.05"; # Please read the comment before changing. | ||
| 9 | packages = [ | ||
| 10 | pkgs.neovim | ||
| 11 | pkgs.nh | ||
| 12 | pkgs.ffmpeg | ||
| 13 | ]; | ||
| 14 | }; | ||
| 15 | programs = { | ||
| 16 | # sort-lines:start | ||
| 17 | hyfetch.enable = true; | ||
| 18 | zsh.enable = true; | ||
| 19 | # sort-lines:end | ||
| 20 | |||
| 21 | # use a git-specific email | ||
| 22 | git.userEmail = "git@paperclover.net"; | ||
| 23 | }; | ||
| 24 | } | ||
users/chloe/paperback/configuration.nix created+5| ... | @@ -0,0 +1,5 @@ | ||
| 1 | {pkgs, ...}: { | ||
| 2 | environment.systemPackages = with pkgs; [ | ||
| 3 | reaper | ||
| 4 | ]; | ||
| 5 | } | ||
users/chloe/sandwich/configuration.nix created+14| ... | @@ -0,0 +1,14 @@ | ||
| 1 | {pkgs, ...}: { | ||
| 2 | environment.systemPackages = with pkgs; [ | ||
| 3 | ffmpeg | ||
| 4 | ripgrep | ||
| 5 | reaper | ||
| 6 | ]; | ||
| 7 | shared.darwin = { | ||
| 8 | macAppStoreApps = [ | ||
| 9 | "final-cut-pro" | ||
| 10 | "logic-pro" | ||
| 11 | "motion" | ||
| 12 | ]; | ||
| 13 | }; | ||
| 14 | } | ||
users/chloe/user.nix created+18| ... | @@ -0,0 +1,18 @@ | ||
| 1 | # This definition is used by modules to customize as needed. | ||
| 2 | { | ||
| 3 | username = "clo"; # username | ||
| 4 | name = "chloe caruso"; | ||
| 5 | email = "account@paperclover.net"; | ||
| 6 | timeZone = "America/Los_Angeles"; | ||
| 7 | |||
| 8 | dotfilesDir = "~/config"; # absolute path of the local repo | ||
| 9 | |||
| 10 | # Stylix/Theming | ||
| 11 | theme = "catppuccin-mocha"; | ||
| 12 | #font | ||
| 13 | sexuality = "lesbian"; # hyfetch | ||
| 14 | |||
| 15 | # Default terminal command. NOTE: ghostty is not installed for you | ||
| 16 | term = "ghostty"; # preferred $TERMINAL | ||
| 17 | editor = "nvim"; # preferred $EDITOR | ||
| 18 | } | ||
users/natalie/configuration.nix created+17| ... | @@ -0,0 +1,17 @@ | ||
| 1 | # Applied to all systems | ||
| 2 | {pkgs, ...}: { | ||
| 3 | services.tailscale.enable = true; | ||
| 4 | fonts.packages = with pkgs; [ | ||
| 5 | nerd-fonts.fira-code | ||
| 6 | nerd-fonts.iosevka | ||
| 7 | iosevka | ||
| 8 | nerd-fonts.symbols-only | ||
| 9 | nerd-fonts.iosevka | ||
| 10 | ]; | ||
| 11 | |||
| 12 | # configuration for shared modules. | ||
| 13 | # all custom options in 'shared' for clarity. | ||
| 14 | shared.darwin = { | ||
| 15 | tiling.enable = true; # use tiling window manager | ||
| 16 | }; | ||
| 17 | } | ||
users/natalie/desktop/configuration.nix created+181| ... | @@ -0,0 +1,181 @@ | ||
| 1 | { | ||
| 2 | pkgs, | ||
| 3 | user, | ||
| 4 | host, | ||
| 5 | ... | ||
| 6 | }: { | ||
| 7 | imports = [ | ||
| 8 | # Include the results of the hardware scan. | ||
| 9 | ./hardware-configuration.nix | ||
| 10 | ]; | ||
| 11 | programs = { | ||
| 12 | gamemode.enable = true; | ||
| 13 | |||
| 14 | _1password.enable = true; | ||
| 15 | _1password-gui = { | ||
| 16 | enable = true; | ||
| 17 | # Certain features, including CLI integration and system authentication support, | ||
| 18 | # require enabling PolKit integration on some desktop environments (e.g. Plasma). | ||
| 19 | polkitPolicyOwners = [user.username]; | ||
| 20 | }; | ||
| 21 | |||
| 22 | noisetorch.enable = true; | ||
| 23 | |||
| 24 | fish.enable = true; | ||
| 25 | virt-manager.enable = true; | ||
| 26 | |||
| 27 | nh = { | ||
| 28 | enable = true; | ||
| 29 | # clean.enable = true; | ||
| 30 | # clean.extraArgs = "--keep-since 4d --keep 3"; | ||
| 31 | flake = "/home/nmarks/.dotfiles#nixosConfigurations.nixos"; | ||
| 32 | }; | ||
| 33 | |||
| 34 | neovim = { | ||
| 35 | enable = true; | ||
| 36 | defaultEditor = true; | ||
| 37 | }; | ||
| 38 | |||
| 39 | steam = { | ||
| 40 | enable = true; | ||
| 41 | package = with pkgs; steam.override {extraPkgs = pkgs: [attr];}; | ||
| 42 | }; | ||
| 43 | |||
| 44 | git = { | ||
| 45 | enable = true; | ||
| 46 | lfs.enable = true; | ||
| 47 | }; | ||
| 48 | |||
| 49 | # Some programs need SUID wrappers, can be configured further or are | ||
| 50 | # started in user sessions. | ||
| 51 | mtr.enable = true; | ||
| 52 | gnupg.agent = { | ||
| 53 | enable = true; | ||
| 54 | enableSSHSupport = true; | ||
| 55 | pinentryPackage = pkgs.pinentry-curses; | ||
| 56 | }; | ||
| 57 | |||
| 58 | kdeconnect.enable = true; | ||
| 59 | }; | ||
| 60 | |||
| 61 | hardware.bluetooth.enable = true; | ||
| 62 | |||
| 63 | xdg.portal = { | ||
| 64 | enable = true; | ||
| 65 | extraPortals = with pkgs; [xdg-desktop-portal-gtk]; | ||
| 66 | }; | ||
| 67 | virtualisation = { | ||
| 68 | containers.enable = true; | ||
| 69 | podman = { | ||
| 70 | enable = true; | ||
| 71 | # dockerCompat = true; | ||
| 72 | }; | ||
| 73 | docker.enable = true; | ||
| 74 | |||
| 75 | libvirtd.enable = true; | ||
| 76 | }; | ||
| 77 | |||
| 78 | nix.settings.trusted-users = ["root" user.username]; | ||
| 79 | systemd = { | ||
| 80 | targets = { | ||
| 81 | sleep.enable = false; | ||
| 82 | suspend.enable = false; | ||
| 83 | hibernate.enable = false; | ||
| 84 | hybrid-sleep.enable = false; | ||
| 85 | }; | ||
| 86 | |||
| 87 | packages = [pkgs.observatory]; | ||
| 88 | |||
| 89 | services.monitord.wantedBy = ["multi-user.target"]; | ||
| 90 | }; | ||
| 91 | |||
| 92 | i18n = { | ||
| 93 | # Select internationalisation properties. | ||
| 94 | defaultLocale = "en_US.UTF-8"; | ||
| 95 | |||
| 96 | supportedLocales = ["all"]; | ||
| 97 | |||
| 98 | extraLocaleSettings = { | ||
| 99 | LC_ADDRESS = "en_US.UTF-8"; | ||
| 100 | LC_IDENTIFICATION = "en_US.UTF-8"; | ||
| 101 | LC_MEASUREMENT = "en_US.UTF-8"; | ||
| 102 | LC_MONETARY = "en_US.UTF-8"; | ||
| 103 | LC_NAME = "en_US.UTF-8"; | ||
| 104 | LC_NUMERIC = "en_US.UTF-8"; | ||
| 105 | LC_PAPER = "en_US.UTF-8"; | ||
| 106 | LC_TELEPHONE = "en_US.UTF-8"; | ||
| 107 | LC_TIME = "en_US.UTF-8"; | ||
| 108 | }; | ||
| 109 | |||
| 110 | inputMethod = { | ||
| 111 | type = "fcitx5"; | ||
| 112 | enable = true; | ||
| 113 | fcitx5.waylandFrontend = true; | ||
| 114 | fcitx5.addons = with pkgs; [ | ||
| 115 | # fcitx5-gtk | ||
| 116 | # kdePackages.fcitx5-qt | ||
| 117 | rime-data | ||
| 118 | fcitx5-rime | ||
| 119 | fcitx5-rose-pine | ||
| 120 | ]; | ||
| 121 | }; | ||
| 122 | }; | ||
| 123 | |||
| 124 | # Enable sound with pipewire. | ||
| 125 | security.rtkit.enable = true; | ||
| 126 | |||
| 127 | # Enable touchpad support (enabled default in most desktopManager). | ||
| 128 | # services.xserver.libinput.enable = true; | ||
| 129 | |||
| 130 | # Define a user account. Don't forget to set a password with ‘passwd’. | ||
| 131 | # users.defaultUserShell = pkgs.fish; | ||
| 132 | users.users.${user.username} = { | ||
| 133 | shell = pkgs.fish; | ||
| 134 | isNormalUser = true; | ||
| 135 | description = user.name; | ||
| 136 | extraGroups = ["networkmanager" "wheel" "docker"]; | ||
| 137 | # openssh.authorizedKeys.keyFiles = ["~/.ssh/id_ed25519.pub"]; | ||
| 138 | packages = with pkgs; [ | ||
| 139 | firefox | ||
| 140 | vim | ||
| 141 | steam | ||
| 142 | |||
| 143 | # thunderbird | ||
| 144 | ]; | ||
| 145 | }; | ||
| 146 | environment = { | ||
| 147 | sessionVariables.COSMIC_DATA_CONTROL_ENABLED = 1; | ||
| 148 | variables.EDITOR = "nvim"; | ||
| 149 | |||
| 150 | systemPackages = with pkgs; [ | ||
| 151 | vim | ||
| 152 | ]; | ||
| 153 | }; | ||
| 154 | |||
| 155 | networking = { | ||
| 156 | hostName = host.name; # Define your hostname. | ||
| 157 | # wireless.enable = true; # Enables wireless support via wpa_supplicant. | ||
| 158 | networkmanager.enable = true; | ||
| 159 | firewall = { | ||
| 160 | allowedTCPPorts = [22 80 443]; | ||
| 161 | enable = true; | ||
| 162 | }; | ||
| 163 | interfaces.enp11s0.wakeOnLan = { | ||
| 164 | enable = true; | ||
| 165 | policy = ["magic"]; | ||
| 166 | }; | ||
| 167 | }; | ||
| 168 | |||
| 169 | # Open ports in the firewall. | ||
| 170 | # networking.firewall.allowedUDPPorts = [ ... ]; | ||
| 171 | # Or disable the firewall altogether. | ||
| 172 | # networking.firewall.enable = false; | ||
| 173 | |||
| 174 | # This value determines the NixOS release from which the default | ||
| 175 | # settings for stateful data, like file locations and database versions | ||
| 176 | # on your system were taken. It‘s perfectly fine and recommended to leave | ||
| 177 | # this value at the release version of the first install of this system. | ||
| 178 | # Before changing this value read the documentation for this option | ||
| 179 | # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). | ||
| 180 | system.stateVersion = "23.05"; # Did you read the comment? | ||
| 181 | } | ||
users/natalie/desktop/hardware-configuration.nix created+52| ... | @@ -0,0 +1,52 @@ | ||
| 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 | { | ||
| 5 | config, | ||
| 6 | lib, | ||
| 7 | pkgs, | ||
| 8 | modulesPath, | ||
| 9 | ... | ||
| 10 | }: { | ||
| 11 | imports = [ | ||
| 12 | (modulesPath + "/installer/scan/not-detected.nix") | ||
| 13 | ]; | ||
| 14 | |||
| 15 | boot.initrd.availableKernelModules = ["nvme" "ahci" "xhci_pci" "usbhid" "sd_mod"]; | ||
| 16 | boot.initrd.kernelModules = []; | ||
| 17 | boot.kernelModules = ["kvm-amd"]; | ||
| 18 | boot.extraModulePackages = []; | ||
| 19 | |||
| 20 | fileSystems."/" = { | ||
| 21 | device = "/dev/disk/by-uuid/5838d50d-e6e8-4ad2-a25e-524f4c46da35"; | ||
| 22 | fsType = "ext4"; | ||
| 23 | }; | ||
| 24 | |||
| 25 | fileSystems."/boot/efi" = { | ||
| 26 | device = "/dev/disk/by-uuid/2319-EE79"; | ||
| 27 | fsType = "vfat"; | ||
| 28 | options = ["fmask=0022" "dmask=0022"]; | ||
| 29 | }; | ||
| 30 | |||
| 31 | fileSystems."/home/nmarks/Games/steam" = { | ||
| 32 | device = "/dev/disk/by-uuid/e7ac46ce-edcb-4763-8717-a7c67de5c7f3"; | ||
| 33 | fsType = "ext4"; | ||
| 34 | }; | ||
| 35 | |||
| 36 | swapDevices = [ | ||
| 37 | {device = "/dev/disk/by-uuid/a4128bb9-239c-4aa9-9777-5067feb77b28";} | ||
| 38 | ]; | ||
| 39 | |||
| 40 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking | ||
| 41 | # (the default) this is the recommended approach. When using systemd-networkd it's | ||
| 42 | # still possible to use this option, but it's recommended to use it in conjunction | ||
| 43 | # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. | ||
| 44 | networking.useDHCP = lib.mkDefault true; | ||
| 45 | # networking.interfaces.docker0.useDHCP = lib.mkDefault true; | ||
| 46 | # networking.interfaces.enp11s0.useDHCP = lib.mkDefault true; | ||
| 47 | # networking.interfaces.tailscale0.useDHCP = lib.mkDefault true; | ||
| 48 | # networking.interfaces.wlp10s0.useDHCP = lib.mkDefault true; | ||
| 49 | |||
| 50 | nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; | ||
| 51 | hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; | ||
| 52 | } | ||
users/natalie/desktop/home.nix created+62| ... | @@ -0,0 +1,62 @@ | ||
| 1 | { | ||
| 2 | inputs, | ||
| 3 | config, | ||
| 4 | pkgs, | ||
| 5 | lib, | ||
| 6 | userSettings, | ||
| 7 | systemSettings, | ||
| 8 | ... | ||
| 9 | }: { | ||
| 10 | imports = [ | ||
| 11 | inputs.nixvim.homeManagerModules.nixvim | ||
| 12 | #set up nixvim | ||
| 13 | # ../../modules/nixvim | ||
| 14 | ]; | ||
| 15 | home = { | ||
| 16 | stateVersion = "23.05"; # Please read the comment before changing. | ||
| 17 | |||
| 18 | packages = with pkgs; [ | ||
| 19 | #building macos apps hard :( | ||
| 20 | ghostty | ||
| 21 | stremio | ||
| 22 | julia | ||
| 23 | qbittorrent | ||
| 24 | |||
| 25 | #gaming | ||
| 26 | bottles | ||
| 27 | lutris | ||
| 28 | mangohud | ||
| 29 | dxvk_2 | ||
| 30 | steam-run | ||
| 31 | vulkan-tools | ||
| 32 | path-of-building | ||
| 33 | wineWowPackages.stable | ||
| 34 | winetricks | ||
| 35 | (prismlauncher.override {gamemodeSupport = true;}) | ||
| 36 | |||
| 37 | #window manager stuff | ||
| 38 | wofi | ||
| 39 | xorg.xauth | ||
| 40 | #linux tools | ||
| 41 | legcord | ||
| 42 | pavucontrol | ||
| 43 | ethtool | ||
| 44 | grub2 | ||
| 45 | efibootmgr | ||
| 46 | distrobox | ||
| 47 | xdg-desktop-portal-gtk | ||
| 48 | xclip | ||
| 49 | kdePackages.dolphin | ||
| 50 | #broken on macos | ||
| 51 | calibre | ||
| 52 | mpv | ||
| 53 | wireguard-tools | ||
| 54 | signal-desktop | ||
| 55 | inputs.zls.packages.x86_64-linux.zls | ||
| 56 | rust-bin.stable.latest.default | ||
| 57 | ]; | ||
| 58 | # programs.mangohud.enable = true; | ||
| 59 | }; | ||
| 60 | |||
| 61 | # xdg.mimeApps.defaultApplications."inode/directory" = "dolphin.desktop"; | ||
| 62 | } | ||
users/natalie/glance.yml created+108| ... | @@ -0,0 +1,108 @@ | ||
| 1 | pages: | ||
| 2 | - name: Home | ||
| 3 | # Optionally, if you only have a single page you can hide the desktop navigation for a cleaner look | ||
| 4 | # hide-desktop-navigation: true | ||
| 5 | columns: | ||
| 6 | - size: small | ||
| 7 | widgets: | ||
| 8 | - type: calendar | ||
| 9 | first-day-of-week: monday | ||
| 10 | |||
| 11 | - type: rss | ||
| 12 | limit: 10 | ||
| 13 | collapse-after: 3 | ||
| 14 | cache: 12h | ||
| 15 | feeds: | ||
| 16 | - url: https://selfh.st/rss/ | ||
| 17 | title: selfh.st | ||
| 18 | limit: 4 | ||
| 19 | - url: https://ciechanow.ski/atom.xml | ||
| 20 | - url: https://www.joshwcomeau.com/rss.xml | ||
| 21 | title: Josh Comeau | ||
| 22 | - url: https://samwho.dev/rss.xml | ||
| 23 | - url: https://ishadeed.com/feed.xml | ||
| 24 | title: Ahmad Shadeed | ||
| 25 | |||
| 26 | - type: twitch-channels | ||
| 27 | channels: | ||
| 28 | - theprimeagen | ||
| 29 | - j_blow | ||
| 30 | - piratesoftware | ||
| 31 | - cohhcarnage | ||
| 32 | - christitustech | ||
| 33 | - EJ_SA | ||
| 34 | |||
| 35 | - size: full | ||
| 36 | widgets: | ||
| 37 | - type: group | ||
| 38 | widgets: | ||
| 39 | - type: hacker-news | ||
| 40 | - type: lobsters | ||
| 41 | |||
| 42 | - type: videos | ||
| 43 | channels: | ||
| 44 | - UCXuqSBlHAE6Xw-yeJA0Tunw # Linus Tech Tips | ||
| 45 | - UCR-DXc1voovS8nhAvccRZhg # Jeff Geerling | ||
| 46 | - UCsBjURrPoezykLs9EqgamOA # Fireship | ||
| 47 | - UCBJycsmduvYEL83R_U4JriQ # Marques Brownlee | ||
| 48 | - UCHnyfMqiRRG1u-2MsSQLbXA # Veritasium | ||
| 49 | |||
| 50 | - type: group | ||
| 51 | widgets: | ||
| 52 | - type: reddit | ||
| 53 | subreddit: technology | ||
| 54 | show-thumbnails: true | ||
| 55 | - type: reddit | ||
| 56 | subreddit: selfhosted | ||
| 57 | show-thumbnails: true | ||
| 58 | |||
| 59 | - size: small | ||
| 60 | widgets: | ||
| 61 | - type: weather | ||
| 62 | location: London, United Kingdom | ||
| 63 | units: metric # alternatively "imperial" | ||
| 64 | hour-format: 12h # alternatively "24h" | ||
| 65 | # Optionally hide the location from being displayed in the widget | ||
| 66 | # hide-location: true | ||
| 67 | |||
| 68 | - type: markets | ||
| 69 | # The link to go to when clicking on the symbol in the UI, | ||
| 70 | # {SYMBOL} will be substituded with the symbol for each market | ||
| 71 | symbol-link-template: https://www.tradingview.com/symbols/{SYMBOL}/news | ||
| 72 | markets: | ||
| 73 | - symbol: SPY | ||
| 74 | name: S&P 500 | ||
| 75 | - symbol: BTC-USD | ||
| 76 | name: Bitcoin | ||
| 77 | - symbol: NVDA | ||
| 78 | name: NVIDIA | ||
| 79 | - symbol: AAPL | ||
| 80 | name: Apple | ||
| 81 | - symbol: MSFT | ||
| 82 | name: Microsoft | ||
| 83 | |||
| 84 | - type: releases | ||
| 85 | cache: 1d | ||
| 86 | # Without authentication the Github API allows for up to 60 requests per hour. You can create a | ||
| 87 | # read-only token from your Github account settings and use it here to increase the limit. | ||
| 88 | # token: ... | ||
| 89 | repositories: | ||
| 90 | - glanceapp/glance | ||
| 91 | - go-gitea/gitea | ||
| 92 | - immich-app/immich | ||
| 93 | - syncthing/syncthing | ||
| 94 | |||
| 95 | # Add more pages here: | ||
| 96 | # - name: Your page name | ||
| 97 | # columns: | ||
| 98 | # - size: small | ||
| 99 | # widgets: | ||
| 100 | # # Add widgets here | ||
| 101 | |||
| 102 | # - size: full | ||
| 103 | # widgets: | ||
| 104 | # # Add widgets here | ||
| 105 | |||
| 106 | # - size: small | ||
| 107 | # widgets: | ||
| 108 | # # Add widgets here | ||
users/natalie/home.nix created+16| ... | @@ -0,0 +1,16 @@ | ||
| 1 | { | ||
| 2 | pkgs, | ||
| 3 | lib, | ||
| 4 | ... | ||
| 5 | } @ args: { | ||
| 6 | programs = { | ||
| 7 | # sort-lines:start | ||
| 8 | atuin.enable = true; | ||
| 9 | bat.enable = true; | ||
| 10 | hyfetch.enable = true; | ||
| 11 | direnv.enable = true; | ||
| 12 | # sort-lines:end | ||
| 13 | }; | ||
| 14 | |||
| 15 | home.packages = import ./packages.nix args; | ||
| 16 | } | ||
users/natalie/laptop/configuration.nix created+56| ... | @@ -0,0 +1,56 @@ | ||
| 1 | {pkgs, ...}: { | ||
| 2 | environment.systemPackages = with pkgs; [ | ||
| 3 | neovim | ||
| 4 | pinentry_mac | ||
| 5 | signal-desktop-bin | ||
| 6 | ]; | ||
| 7 | |||
| 8 | # Custom configuration modules in "modules" are shared between users, | ||
| 9 | # and can be configured in this "shared" namespace | ||
| 10 | shared.darwin = { | ||
| 11 | macAppStoreApps = ["wireguard"]; | ||
| 12 | }; | ||
| 13 | |||
| 14 | # Create /etc/zshrc that loads the nix-darwin environment. | ||
| 15 | programs = { | ||
| 16 | gnupg.agent.enable = true; | ||
| 17 | zsh.enable = true; # default shell on catalina | ||
| 18 | }; | ||
| 19 | |||
| 20 | # When opening an interactive shell that isnt fish move into fish | ||
| 21 | programs.zsh = { | ||
| 22 | interactiveShellInit = '' | ||
| 23 | if [[ $(${pkgs.procps}/bin/ps -p $PPID -o comm) != "fish" && -z ''${ZSH_EXUCTION_STRING} ]] | ||
| 24 | then | ||
| 25 | [[ -o login ]] && LOGIN_OPTION='--login' || LOGIN_OPTION="" | ||
| 26 | exec ${pkgs.fish}/bin/fish $LOGIN_OPTION | ||
| 27 | fi | ||
| 28 | ''; | ||
| 29 | }; | ||
| 30 | |||
| 31 | # Use homebrew to install casks | ||
| 32 | homebrew = { | ||
| 33 | enable = true; | ||
| 34 | |||
| 35 | onActivation = { | ||
| 36 | autoUpdate = true; | ||
| 37 | cleanup = "none"; | ||
| 38 | upgrade = true; | ||
| 39 | }; | ||
| 40 | |||
| 41 | brews = [ | ||
| 42 | "imagemagick" | ||
| 43 | "opam" | ||
| 44 | ]; | ||
| 45 | |||
| 46 | casks = [ | ||
| 47 | "battle-net" | ||
| 48 | "stremio" | ||
| 49 | "alt-tab" | ||
| 50 | "legcord" | ||
| 51 | "zulip" | ||
| 52 | "zen-browser" | ||
| 53 | "supertuxkart" | ||
| 54 | ]; | ||
| 55 | }; | ||
| 56 | } | ||
users/natalie/laptop/home.nix created+23| ... | @@ -0,0 +1,23 @@ | ||
| 1 | { | ||
| 2 | inputs, | ||
| 3 | config, | ||
| 4 | pkgs, | ||
| 5 | lib, | ||
| 6 | user, | ||
| 7 | host, | ||
| 8 | ... | ||
| 9 | } @ args: { | ||
| 10 | imports = [ | ||
| 11 | inputs.nixvim.homeManagerModules.nixvim | ||
| 12 | #set up nixvim | ||
| 13 | # ../../modules/nixvim | ||
| 14 | ]; | ||
| 15 | home = { | ||
| 16 | stateVersion = "23.05"; # Please read the comment before changing. | ||
| 17 | # shell = pkgs.fish; | ||
| 18 | |||
| 19 | sessionPath = [ | ||
| 20 | "$HOME/.emacs.d/bin" | ||
| 21 | ]; | ||
| 22 | }; | ||
| 23 | } | ||
users/natalie/packages.nix created+117| ... | @@ -0,0 +1,117 @@ | ||
| 1 | # Packages installed with home-manager | ||
| 2 | {pkgs, ...}: | ||
| 3 | with pkgs; [ | ||
| 4 | #general development | ||
| 5 | just | ||
| 6 | pkg-config | ||
| 7 | gnumake | ||
| 8 | caddy | ||
| 9 | pm2 | ||
| 10 | clang-tools | ||
| 11 | wget | ||
| 12 | git | ||
| 13 | unzip | ||
| 14 | clang | ||
| 15 | cmake | ||
| 16 | gnupg | ||
| 17 | |||
| 18 | #ides | ||
| 19 | zed-editor | ||
| 20 | emacs | ||
| 21 | |||
| 22 | #virtualization | ||
| 23 | qemu | ||
| 24 | podman | ||
| 25 | docker | ||
| 26 | |||
| 27 | #productivity | ||
| 28 | glance | ||
| 29 | anki-bin | ||
| 30 | tailscale | ||
| 31 | openconnect | ||
| 32 | |||
| 33 | #nix tools | ||
| 34 | cachix | ||
| 35 | direnv | ||
| 36 | nh | ||
| 37 | |||
| 38 | #terminal stuff | ||
| 39 | (btop.override {cudaSupport = true;}) | ||
| 40 | tmux | ||
| 41 | zellij | ||
| 42 | lazygit | ||
| 43 | fzf | ||
| 44 | neofetch | ||
| 45 | hyfetch | ||
| 46 | fastfetch | ||
| 47 | eza | ||
| 48 | ollama | ||
| 49 | uv | ||
| 50 | fd | ||
| 51 | ripgrep | ||
| 52 | file | ||
| 53 | fish | ||
| 54 | |||
| 55 | #image tools | ||
| 56 | imagemagick | ||
| 57 | |||
| 58 | #chatting apps | ||
| 59 | (discord.override { | ||
| 60 | withMoonlight = true; | ||
| 61 | }) | ||
| 62 | vesktop | ||
| 63 | |||
| 64 | #media | ||
| 65 | spotify | ||
| 66 | zathura | ||
| 67 | |||
| 68 | #language servers | ||
| 69 | typst-live | ||
| 70 | lua-language-server | ||
| 71 | nil | ||
| 72 | nixd | ||
| 73 | texlab | ||
| 74 | texlivePackages.chktex | ||
| 75 | |||
| 76 | #formatters/linters | ||
| 77 | stylua | ||
| 78 | alejandra | ||
| 79 | statix | ||
| 80 | |||
| 81 | #neovim deps | ||
| 82 | lua51Packages.lua | ||
| 83 | lua51Packages.luarocks-nix | ||
| 84 | codespell | ||
| 85 | typst | ||
| 86 | tree-sitter | ||
| 87 | |||
| 88 | #python | ||
| 89 | pyright | ||
| 90 | basedpyright | ||
| 91 | ruff | ||
| 92 | python312Packages.python | ||
| 93 | python312Packages.pynvim | ||
| 94 | python312Packages.pip | ||
| 95 | |||
| 96 | #programming languages | ||
| 97 | R | ||
| 98 | deno | ||
| 99 | ruby | ||
| 100 | nodePackages.npm | ||
| 101 | go | ||
| 102 | coq | ||
| 103 | elan | ||
| 104 | |||
| 105 | #browsers | ||
| 106 | tor | ||
| 107 | firefox | ||
| 108 | |||
| 109 | #math | ||
| 110 | texlive.combined.scheme-full | ||
| 111 | zathura | ||
| 112 | |||
| 113 | #fun things | ||
| 114 | cowsay | ||
| 115 | cmatrix | ||
| 116 | sl | ||
| 117 | ] | ||
users/natalie/user.nix created+13| ... | @@ -0,0 +1,13 @@ | ||
| 1 | rec { | ||
| 2 | username = "nmarks"; # username | ||
| 3 | name = "Natalie"; # name/identifier | ||
| 4 | email = "nmarks413@gmail.com"; # email (used for certain configurations) | ||
| 5 | dotfilesDir = "~/.dotfiles"; # absolute path of the local repo | ||
| 6 | theme = "catppuccin-mocha"; #name of theme that stylix will use | ||
| 7 | browser = "firefox"; # Default browser; must select one from ./user/app/browser/ | ||
| 8 | term = "ghostty"; # Default terminal command; | ||
| 9 | font = "iosevka"; # Selected font | ||
| 10 | editor = "neovim"; # Default editor; | ||
| 11 | timeZone = "America/Los_Angeles"; | ||
| 12 | sexuality = "bisexual"; | ||
| 13 | } | ||