diff --git a/bin/apply b/bin/apply deleted file mode 100755 index fd105cd..0000000 --- a/bin/apply +++ /dev/null @@ -1,145 +0,0 @@ -#!/usr/bin/env bash - -VERSION=1.0 - -# Color codes -RED='\033[0;31m' -GREEN='\033[0;32m' -YELLOW='\033[1;33m' -NC='\033[0m' # No Color - -# Determine the operating system -export OS=$(uname) - -# Primary network interface -if [[ "$OS" != "Darwin" ]]; then - export PRIMARY_IFACE=$(ip -o -4 route show to default | awk '{print $5}') - echo -e "${GREEN}Found primary network interface $PRIMARY_IFACE${NC}" -fi - -# Custom print function -_print() { - if [[ "$OS" == "Darwin" ]]; then - echo -e "$1" - else - echo "$1" - fi -} - -# Custom prompt function -_prompt() { - local message="$1" - local variable="$2" - - _print "$message" - read -r $variable -} - -# Fetch username from the system -export USERNAME=$(whoami) - -# If the username is 'nixos' or 'root', ask the user for their username -if [[ "$USERNAME" == "nixos" ]] || [[ "$USERNAME" == "root" ]]; then - _prompt "${YELLOW}You're running as $USERNAME. Please enter your desired username: ${NC}" USERNAME -fi - -# Check if git is available -if command -v git >/dev/null 2>&1; then - # Fetch email and name from git config - export GIT_EMAIL=$(git config --get user.email) - export GIT_NAME=$(git config --get user.name) -else - _print "${RED}Git is not available on this system.${NC}" -fi - -# If git email is not found or git is not available, ask the user -if [[ -z "$GIT_EMAIL" ]]; then - _prompt "${YELLOW}Please enter your email: ${NC}" GIT_EMAIL -fi - -# If git name is not found or git is not available, ask the user -if [[ -z "$GIT_NAME" ]]; then - _prompt "${YELLOW}Please enter your name: ${NC}" GIT_NAME -fi - -select_boot_disk() { - local disks - local _boot_disk - - _print "${YELLOW}Available disks:${NC}" - disks=$(lsblk -nd --output NAME,SIZE | grep -v loop) - echo "$disks" - - # Warning message for data deletion - _print "${RED}WARNING: All data on the chosen disk will be erased during the installation!${NC}" - _prompt "${YELLOW}Please choose your boot disk (e.g., nvme0n1, sda): ${NC}" _boot_disk - - # Confirmation for disk selection to prevent accidental data loss - _print "${YELLOW}You have selected $_boot_disk as the boot disk. This will delete everything on this disk. Are you sure? (Y/N): ${NC}" - read -r confirmation - if [[ "$confirmation" =~ ^[Yy]$ ]]; then - export BOOT_DISK=$_boot_disk - else - _print "${RED}Disk selection cancelled by the user. Please run the script again to select the correct disk.${NC}" - exit 1 - fi -} - -# Set hostname and find primary disk if this is NixOS -if [[ "$OS" != "Darwin" ]]; then - _prompt "${YELLOW}Please enter a hostname for the system: ${NC}" HOST_NAME - export HOST_NAME - select_boot_disk -fi - -# Confirmation step -confirm_details() { - _print "${GREEN}Username: $USERNAME" - _print "Email: $GIT_EMAIL" - _print "Name: $GIT_NAME${NC}" - - if([[ "$OS" != "Darwin" ]]); then - _print "${GREEN}Primary interface: $PRIMARY_IFACE" - _print "Boot disk: $BOOT_DISK" - _print "Hostname: $HOST_NAME${NC}" - fi - - _prompt "${YELLOW}Is this correct? (Y/N): ${NC}" choice - - case "$choice" in - [Nn] ) _print "${RED}Exiting script.${NC}" && exit 1;; - [Yy] ) _print "${GREEN}Continuing...${NC}";; - * ) _print "${RED}Invalid option. Exiting script.${NC}" && exit 1;; - esac -} - -# Call the confirmation function -confirm_details - -# Function to replace tokens in each file -replace_tokens() { - local file="$1" - if [[ $(basename $1) != "apply" ]]; then - if [[ "$OS" == "Darwin" ]]; then - # macOS - LC_ALL=C LANG=C sed -i '' -e "s/%USER%/$USERNAME/g" "$file" - LC_ALL=C LANG=C sed -i '' -e "s/%EMAIL%/$GIT_EMAIL/g" "$file" - LC_ALL=C LANG=C sed -i '' -e "s/%NAME%/$GIT_NAME/g" "$file" - else - # Linux or other - sed -i -e "s/%USER%/$USERNAME/g" "$file" - sed -i -e "s/%EMAIL%/$GIT_EMAIL/g" "$file" - sed -i -e "s/%NAME%/$GIT_NAME/g" "$file" - sed -i -e "s/%INTERFACE%/$PRIMARY_IFACE/g" "$file" - sed -i -e "s/%DISK%/$BOOT_DISK/g" "$file" - sed -i -e "s/%HOST%/$HOST_NAME/g" "$file" - fi - fi -} - -# Traverse directories and call replace_tokens on each Nix file -export -f replace_tokens -find . -type f -exec bash -c 'replace_tokens "$0"' {} \; - -echo "$USERNAME" > /tmp/username.txt -_print "${GREEN}User $USERNAME information applied.${NC}" diff --git a/darwin/casks.nix b/darwin/casks.nix index 4b10878..3bf4b57 100644 --- a/darwin/casks.nix +++ b/darwin/casks.nix @@ -2,35 +2,37 @@ [ # Development Tools - "homebrew/cask/docker" - "insomnia" - "ngrok" - "postico" - "visual-studio-code" + "docker" + "fleet" + "kitty" + "minizincide" + "sublime-merge" + "vscodium" # Communication Tools "discord" - "loom" - "notion" - "slack" - "telegram" + "signal" "zoom" + "zulip" # Utility Tools - "appcleaner" - "syncthing" - - # Entertainment Tools - "steam" - "vlc" + "calibre" + "mirrorop" # Productivity Tools - "raycast" - "asana" + "alfred" + "mactex-no-gui" + "notion" + "skim" # Browsers - "google-chrome" + "chromium" + "firefox" - # AI - "diffusionbee" + # Fonts + "font-atkinson-hyperlegible" + "font-ibm-plex" + "font-iosevka" + "font-iosevka-slab" + "font-playfair-display" ] diff --git a/darwin/default.nix b/darwin/default.nix index bf7de51..e143d2b 100644 --- a/darwin/default.nix +++ b/darwin/default.nix @@ -3,7 +3,6 @@ let user = "dekker1"; in { - imports = [ ./home-manager.nix ../shared @@ -13,91 +12,11 @@ let user = "dekker1"; in # Auto upgrade nix package and the daemon service. services.nix-daemon.enable = true; - # Setup user, packages, programs - nix = { - package = pkgs.nixUnstable; - settings.trusted-users = [ "@admin" "${user}" ]; - - gc = { - user = "root"; - automatic = true; - interval = { Weekday = 0; Hour = 2; Minute = 0; }; - options = "--delete-older-than 30d"; - }; - - # Turn this on to make command line easier - extraOptions = '' - experimental-features = nix-command flakes - ''; - }; - # Turn off NIX_PATH warnings now that we're using flakes system.checks.verifyNixPath = false; # Load configuration that is shared across systems environment.systemPackages = with pkgs; [ - emacs-unstable ] ++ (import ../shared/packages.nix { inherit pkgs; }); - # Enable fonts dir - fonts.fontDir.enable = true; - - launchd.user.agents.emacs.path = [ config.environment.systemPath ]; - launchd.user.agents.emacs.serviceConfig = { - KeepAlive = true; - ProgramArguments = [ - "/bin/sh" - "-c" - "/bin/wait4path ${pkgs.emacs}/bin/emacs && exec ${pkgs.emacs}/bin/emacs --fg-daemon" - ]; - StandardErrorPath = "/tmp/emacs.err.log"; - StandardOutPath = "/tmp/emacs.out.log"; - }; - - system = { - stateVersion = 4; - - defaults = { - LaunchServices = { - LSQuarantine = false; - }; - - NSGlobalDomain = { - AppleShowAllExtensions = true; - ApplePressAndHoldEnabled = false; - - # 120, 90, 60, 30, 12, 6, 2 - KeyRepeat = 2; - - # 120, 94, 68, 35, 25, 15 - InitialKeyRepeat = 15; - - "com.apple.mouse.tapBehavior" = 1; - "com.apple.sound.beep.volume" = 0.0; - "com.apple.sound.beep.feedback" = 0; - }; - - dock = { - autohide = false; - show-recents = false; - launchanim = true; - orientation = "bottom"; - tilesize = 48; - }; - - finder = { - _FXShowPosixPathInTitle = false; - }; - - trackpad = { - Clicking = true; - TrackpadThreeFingerDrag = true; - }; - }; - - keyboard = { - enableKeyMapping = true; - remapCapsLockToControl = true; - }; - }; } diff --git a/darwin/dock/default.nix b/darwin/dock/default.nix deleted file mode 100644 index 19af49f..0000000 --- a/darwin/dock/default.nix +++ /dev/null @@ -1,67 +0,0 @@ -{ config, pkgs, lib, ... }: -with lib; -let - cfg = config.local.dock; - inherit (pkgs) stdenv dockutil; -in -{ - options = { - local.dock.enable = mkOption { - description = "Enable dock"; - default = stdenv.isDarwin; - example = false; - }; - - local.dock.entries = mkOption - { - description = "Entries on the Dock"; - type = with types; listOf (submodule { - options = { - path = lib.mkOption { type = str; }; - section = lib.mkOption { - type = str; - default = "apps"; - }; - options = lib.mkOption { - type = str; - default = ""; - }; - }; - }); - readOnly = true; - }; - }; - - config = - mkIf cfg.enable - ( - let - normalize = path: if hasSuffix ".app" path then path + "/" else path; - entryURI = path: "file://" + (builtins.replaceStrings - [" " "!" "\"" "#" "$" "%" "&" "'" "(" ")"] - ["%20" "%21" "%22" "%23" "%24" "%25" "%26" "%27" "%28" "%29"] - (normalize path) - ); - wantURIs = concatMapStrings - (entry: "${entryURI entry.path}\n") - cfg.entries; - createEntries = concatMapStrings - (entry: "${dockutil}/bin/dockutil --no-restart --add '${entry.path}' --section ${entry.section} ${entry.options}\n") - cfg.entries; - in - { - system.activationScripts.postUserActivation.text = '' - echo >&2 "Setting up the Dock..." - haveURIs="$(${dockutil}/bin/dockutil --list | ${pkgs.coreutils}/bin/cut -f2)" - if ! diff -wu <(echo -n "$haveURIs") <(echo -n '${wantURIs}') >&2 ; then - echo >&2 "Resetting Dock." - ${dockutil}/bin/dockutil --no-restart --remove all - ${createEntries} - killall Dock - else - echo >&2 "Dock setup complete." - fi - ''; - } - ); -} diff --git a/darwin/files.nix b/darwin/files.nix index f0bbac1..2396a8f 100644 --- a/darwin/files.nix +++ b/darwin/files.nix @@ -4,31 +4,4 @@ let xdg_configHome = "${config.users.users.${user}.home}/.config"; xdg_dataHome = "${config.users.users.${user}.home}/.local/share"; xdg_stateHome = "${config.users.users.${user}.home}/.local/state"; in -{ - - # Raycast script so that "Run Emacs" is available and uses Emacs daemon - "${xdg_dataHome}/bin/emacsclient" = { - executable = true; - text = '' - #!/bin/zsh - # - # Required parameters: - # @raycast.schemaVersion 1 - # @raycast.title Run Emacs - # @raycast.mode silent - # - # Optional parameters: - # @raycast.packageName Emacs - # @raycast.icon ${xdg_dataHome}/img/icons/Emacs.icns - # @raycast.iconDark ${xdg_dataHome}/img/icons/Emacs.icns - - if [[ $1 = "-t" ]]; then - # Terminal mode - ${pkgs.emacs}/bin/emacsclient -t $@ - else - # GUI mode - ${pkgs.emacs}/bin/emacsclient -c -n $@ - fi - ''; - }; -} +{} diff --git a/darwin/home-manager.nix b/darwin/home-manager.nix index 8dca7c1..ccf3267 100644 --- a/darwin/home-manager.nix +++ b/darwin/home-manager.nix @@ -2,19 +2,10 @@ let user = "dekker1"; - # Define the content of your file as a derivation - myEmacsLauncher = pkgs.writeScript "emacs-launcher.command" '' - #!/bin/sh - emacsclient -c -n & - ''; sharedFiles = import ../shared/files.nix { inherit config pkgs; }; additionalFiles = import ./files.nix { inherit user config pkgs; }; in { - imports = [ - ./dock - ]; - # It me users.users.${user} = { name = "${user}"; @@ -23,7 +14,7 @@ in shell = pkgs.zsh; }; - homebrew.enable = true; + homebrew.enable = false; homebrew.casks = pkgs.callPackage ./casks.nix {}; # These app IDs are from using the mas CLI app @@ -34,8 +25,23 @@ in # $ mas search # homebrew.masApps = { - "1password" = 1333542190; - "wireguard" = 1451685025; + "1Password for Safari" = 1569813296; + "Baking Soda" = 1601151613; + "Kagi Inc." = 1622835804; + "Keynote" = 409183694; + "Microsoft Excel" = 462058435; + "Microsoft Word" = 462054704; + "Numbers" = 409203825; + "Pages" = 409201541; + "Pixelmator Pro" = 1289583905; + "Qantas" = 1468230799; + "Slack" = 803453959; + "Textual IRC Client" = 1262957439; + "The Unarchiver" = 425424353; + "Userscripts-Mac-App" = 1463298887; + "Vinegar" = 1591303229; + "WhatsApp" = 1147396723; + "Wipr" = 1320666476; }; # Enable home-manager @@ -47,44 +53,9 @@ in home.file = lib.mkMerge [ sharedFiles additionalFiles - { "emacs-launcher.command".source = myEmacsLauncher; } ]; home.stateVersion = "21.11"; programs = {} // import ../shared/home-manager.nix { inherit config pkgs lib; }; - - # Marked broken Oct 20, 2022 check later to remove this - # https://github.com/nix-community/home-manager/issues/3344 - manual.manpages.enable = false; }; }; - - # Fully declarative dock using the latest from Nix Store - local.dock.enable = true; - local.dock.entries = [ - { path = "/Applications/Slack.app/"; } - { path = "/System/Applications/Messages.app/"; } - { path = "/System/Applications/Facetime.app/"; } - { path = "${pkgs.alacritty}/Applications/Alacritty.app/"; } - { path = "/System/Applications/Music.app/"; } - { path = "/System/Applications/News.app/"; } - { path = "/System/Applications/Photos.app/"; } - { path = "/System/Applications/Photo Booth.app/"; } - { path = "/System/Applications/TV.app/"; } - { path = "/System/Applications/Home.app/"; } - { - path = toString myEmacsLauncher; - section = "others"; - } - { - path = "${config.users.users.${user}.home}/.local/share/"; - section = "others"; - options = "--sort name --view grid --display folder"; - } - { - path = "${config.users.users.${user}.home}/.local/share/downloads"; - section = "others"; - options = "--sort name --view grid --display stack"; - } - ]; - } diff --git a/darwin/packages.nix b/darwin/packages.nix index 7eaa1d8..1c95401 100644 --- a/darwin/packages.nix +++ b/darwin/packages.nix @@ -3,5 +3,6 @@ with pkgs; let shared-packages = import ../shared/packages.nix { inherit pkgs; }; in shared-packages ++ [ - dockutil + # Encryption and security tools + pinentry_mac ] diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..67fa694 --- /dev/null +++ b/flake.lock @@ -0,0 +1,254 @@ +{ + "nodes": { + "brew-src": { + "flake": false, + "locked": { + "lastModified": 1694443293, + "narHash": "sha256-wBjbF2RRFyD4lN7ie98VnggmNBwAPv/dg2U+w5mUyuM=", + "owner": "Homebrew", + "repo": "brew", + "rev": "4afb8e5602f3ecc9edf67a44257d8eceeaa8a108", + "type": "github" + }, + "original": { + "owner": "Homebrew", + "ref": "4.1.11", + "repo": "brew", + "type": "github" + } + }, + "darwin": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1700795494, + "narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=", + "owner": "LnL7", + "repo": "nix-darwin", + "rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d", + "type": "github" + }, + "original": { + "owner": "LnL7", + "ref": "master", + "repo": "nix-darwin", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1687709756, + "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1702195734, + "narHash": "sha256-MvQa1qT+10dqJyMKtACCpFOcFYIv9i/REek1bHaIhS4=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "9a00befa13126e318fa4b895adeb84d383c9ab3f", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "homebrew-bundle": { + "flake": false, + "locked": { + "lastModified": 1700695605, + "narHash": "sha256-Y9OJ9/BbGcfslER0hVToFobom/0Y5ynpkdEpQdfNF7s=", + "owner": "homebrew", + "repo": "homebrew-bundle", + "rev": "d6fbeee54ba344be59731ff3e93fb105b2567e34", + "type": "github" + }, + "original": { + "owner": "homebrew", + "repo": "homebrew-bundle", + "type": "github" + } + }, + "homebrew-cask": { + "flake": false, + "locked": { + "lastModified": 1702174207, + "narHash": "sha256-P7mCkLiuqnnjfle3mDc0oFhQreubAnCP0DWKt3ksLDs=", + "owner": "homebrew", + "repo": "homebrew-cask", + "rev": "f9965c0cadc974f2b8706ecab78c5ff0972cd5a9", + "type": "github" + }, + "original": { + "owner": "homebrew", + "repo": "homebrew-cask", + "type": "github" + } + }, + "homebrew-core": { + "flake": false, + "locked": { + "lastModified": 1702193388, + "narHash": "sha256-fqUIwK1YXIYGu3ZU1g/gRmfaOy8ZKyUgJhGSvSsYAyU=", + "owner": "homebrew", + "repo": "homebrew-core", + "rev": "75ca7b621f326dcafe2ff834e9cde10d354d7080", + "type": "github" + }, + "original": { + "owner": "homebrew", + "repo": "homebrew-core", + "type": "github" + } + }, + "nix-darwin": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1688307440, + "narHash": "sha256-7PTjbN+/+b799YN7Tk2SS5Vh8A0L3gBo8hmB7Y0VXug=", + "owner": "LnL7", + "repo": "nix-darwin", + "rev": "b06bab83bdf285ea0ae3c8e145a081eb95959047", + "type": "github" + }, + "original": { + "owner": "LnL7", + "repo": "nix-darwin", + "type": "github" + } + }, + "nix-homebrew": { + "inputs": { + "brew-src": "brew-src", + "flake-utils": "flake-utils", + "nix-darwin": "nix-darwin", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1695057498, + "narHash": "sha256-wn3j7u5tOgLLbNxZC542rJiP5iX323m+CoGPMgPOxp4=", + "owner": "zhaofengli-wip", + "repo": "nix-homebrew", + "rev": "6ab33c5e9249e74401144a7c667d96a757c5d341", + "type": "github" + }, + "original": { + "owner": "zhaofengli-wip", + "repo": "nix-homebrew", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1701718080, + "narHash": "sha256-6ovz0pG76dE0P170pmmZex1wWcQoeiomUZGggfH9XPs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2c7f3c0fb7c08a0814627611d9d7d45ab6d75335", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1687274257, + "narHash": "sha256-TutzPriQcZ8FghDhEolnHcYU2oHIG5XWF+/SUBNnAOE=", + "path": "/nix/store/22qgs3skscd9bmrxv9xv4q5d4wwm5ppx-source", + "rev": "2c9ecd1f0400076a4d6b2193ad468ff0a7e7fdc5", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1688049487, + "narHash": "sha256-100g4iaKC9MalDjUW9iN6Jl/OocTDtXdeAj7pEGIRh4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4bc72cae107788bf3f24f30db2e2f685c9298dc9", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1701718080, + "narHash": "sha256-6ovz0pG76dE0P170pmmZex1wWcQoeiomUZGggfH9XPs=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "2c7f3c0fb7c08a0814627611d9d7d45ab6d75335", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "darwin": "darwin", + "home-manager": "home-manager", + "homebrew-bundle": "homebrew-bundle", + "homebrew-cask": "homebrew-cask", + "homebrew-core": "homebrew-core", + "nix-homebrew": "nix-homebrew", + "nixpkgs": "nixpkgs_4" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix index d139acf..bce9c14 100644 --- a/flake.nix +++ b/flake.nix @@ -3,32 +3,7 @@ description = "Starter Configuration for NixOS and MacOS"; inputs = { - nixpkgs.url = "github:dustinlyons/nixpkgs/master"; - - # My nixpkgs fork includes a feather-font package (https://github.com/dustinlyons/feather-font) - # and a timeout setting for Emacs daemon. If you don't want to use my it, follow these steps to use the official repo instead: - # - # Change the flake input - # - Official repository - # nixpkgs.url = "github:NixOS/nixpkgs/master"; - # - # Remove this setting and retry builds if they sometimes timeout: - # - NixOS configuration - # https://github.com/dustinlyons/nixos-config/blob/8114714c10d61cd5da34df842dd5bac0301f688a/nixos/default.nix#L280 - # - # Replace feather-font with another font: - # - Rofi: - # https://github.com/dustinlyons/nixos-config/blob/1290219734b53b26d9c20d13989846788462ff26/nixos/config/rofi/launcher.rasi#L42 - # - # - Polybar: - # https://github.com/dustinlyons/nixos-config/blob/1290219734b53b26d9c20d13989846788462ff26/nixos/home-manager.nix#L21 - # https://github.com/dustinlyons/nixos-config/blob/1290219734b53b26d9c20d13989846788462ff26/nixos/config/rofi/styles.rasi#L49 - # https://github.com/dustinlyons/nixos-config/blob/1290219734b53b26d9c20d13989846788462ff26/nixos/config/rofi/powermenu.rasi#L49 - # https://github.com/dustinlyons/nixos-config/blob/1290219734b53b26d9c20d13989846788462ff26/nixos/config/rofi/networkmenu.rasi#L49 - # - # - Fonts: - # https://github.com/dustinlyons/nixos-config/blob/1290219734b53b26d9c20d13989846788462ff26/nixos/default.nix#L286 - + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; home-manager.url = "github:nix-community/home-manager"; darwin = { url = "github:LnL7/nix-darwin/master"; @@ -48,13 +23,9 @@ homebrew-cask = { url = "github:homebrew/homebrew-cask"; flake = false; - }; - disko = { - url = "github:nix-community/disko"; - inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = { self, darwin, nix-homebrew, homebrew-bundle, homebrew-core, homebrew-cask, home-manager, nixpkgs, disko } @inputs: + outputs = { self, darwin, nix-homebrew, homebrew-bundle, homebrew-core, homebrew-cask, home-manager, nixpkgs } @inputs: let user = "dekker1"; linuxSystems = [ "x86_64-linux" "aarch64-linux" ]; @@ -67,9 +38,8 @@ in { default = with pkgs; mkShell { - nativeBuildInputs = with pkgs; [ bashInteractive git age age-plugin-yubikey ]; + nativeBuildInputs = with pkgs; [ bashInteractive git ]; shellHook = with pkgs; '' - export EDITOR=vim ''; }; }; @@ -85,7 +55,7 @@ home-manager.darwinModules.home-manager { nix-homebrew = { - enable = true; + enable = false; user = "${user}"; taps = { "homebrew/homebrew-core" = homebrew-core; @@ -104,7 +74,6 @@ system = system; specialArgs = inputs; modules = [ - disko.nixosModules.disko home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; diff --git a/nixos/README.md b/nixos/README.md index 22dc572..7e81b50 100644 --- a/nixos/README.md +++ b/nixos/README.md @@ -3,7 +3,6 @@ . ├── config # Config files not written in Nix ├── default.nix # Defines module, system-level config, -├── disk-config.nix # Disks, partitions, and filesystems ├── files.nix # Non-Nix, static configuration files (now immutable!) ├── home-manager.nix # Defines user programs ├── packages.nix # List of packages to install for NixOS diff --git a/nixos/config/login-wallpaper.png b/nixos/config/login-wallpaper.png deleted file mode 100644 index 7a91f64..0000000 Binary files a/nixos/config/login-wallpaper.png and /dev/null differ diff --git a/nixos/config/polybar/bars.ini b/nixos/config/polybar/bars.ini deleted file mode 100644 index 2cd1a7a..0000000 --- a/nixos/config/polybar/bars.ini +++ /dev/null @@ -1,498 +0,0 @@ -;; ┌────────────────────────────────────────────────────┐ -;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█▀▄░█▀█░█▀▄░█▀▀│ -;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█▀▄░█▀█░█▀▄░▀▀█│ -;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀▀░░▀░▀░▀░▀░▀▀▀│ -;; │░Created░By░Aditya░Shakya░@adi1090x░░░░░░░░░░░░░░░░░│ -;; └────────────────────────────────────────────────────┘ - -;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ - -[bar] -fill =  -empty =  -indicator = ⏽ -; Nerd font :   ,  ⏽,  樂 籠 錄 , 雷 絛 - -;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ - -[module/volume] -type = internal/alsa - -; Soundcard to be used -; Usually in the format hw:# where # is the card number -; You can find the different card numbers in `/proc/asound/cards` -master-soundcard = default -speaker-soundcard = default -headphone-soundcard = default - -; Name of the master, speaker and headphone mixers -; Use the following command to list available mixer controls: -; $ amixer scontrols | sed -nr "s/.*'([[:alnum:]]+)'.*/\1/p" -; If master, speaker or headphone-soundcard isn't the default, -; use `amixer -c # scontrols` instead where # is the number -; of the master, speaker or headphone soundcard respectively -; -; Default: Master -master-mixer = Master - -; Optionally define speaker and headphone mixers -; Default: none -;;speaker-mixer = Speaker -; Default: none -;;headphone-mixer = Headphone - -; NOTE: This is required if headphone_mixer is defined -; Use the following command to list available device controls -; $ amixer controls | sed -r "/CARD/\!d; s/.*=([0-9]+).*name='([^']+)'.*/printf '%3.0f: %s\n' '\1' '\2'/e" | sort -; You may also need to use `amixer -c # controls` as above for the mixer names -; Default: none -;;headphone-id = 9 - -; Use volume mapping (similar to amixer -M and alsamixer), where the increase in volume is linear to the ear -; Default: false -;;mapped = true - -; Interval for volume increase/decrease (in percent points) -; Default: 5 -interval = 5 - -; Available tags: -; (default) -; -; -format-volume = - -; Available tags: -; (default) -; -; -format-muted = -format-muted-prefix =  - -; Available tokens: -; %percentage% (default) -label-volume = %percentage%% - -; Available tokens: -; %percentage% (default -label-muted = " Muted" -label-muted-foreground = ${color.foreground-alt} - -; Only applies if is used -ramp-volume-0 =  -ramp-volume-1 =  -ramp-volume-2 =  - -; Only applies if is used -bar-volume-width = 10 -bar-volume-gradient = false - -bar-volume-indicator = ${bar.indicator} -bar-volume-indicator-foreground = ${color.foreground} - -bar-volume-fill = ${bar.fill} -bar-volume-foreground-0 = ${color.foreground} -bar-volume-foreground-1 = ${color.foreground} -bar-volume-foreground-2 = ${color.foreground} - -bar-volume-empty = ${bar.empty} -bar-volume-empty-foreground = ${color.foreground} - -; If defined, it will replace when -; headphones are plugged in to `headphone_control_numid` -; If undefined, will be used for both -; Only applies if is used -ramp-headphones-0 =  - -;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ - -[module/brightness] -;type = internal/xbacklight -type = internal/backlight - -; Use the following command to list available cards: -; $ ls -1 /sys/class/backlight/ -;card = intel_backlight -card = amdgpu_bl0 - -; Available tags: -;