diff --git a/apps/aarch64-darwin/build-switch b/apps/aarch64-darwin/build-switch index d44122b..1090ee1 100755 --- a/apps/aarch64-darwin/build-switch +++ b/apps/aarch64-darwin/build-switch @@ -5,19 +5,37 @@ YELLOW='\033[1;33m' RED='\033[1;31m' NC='\033[0m' -SYSTEM_TYPE="aarch64-darwin" -FLAKE_SYSTEM="darwinConfigurations.${SYSTEM_TYPE}.system" +# Determine machine name from first argument or hostname +if [ $# -gt 0 ]; then + MACHINE_NAME="$1" + shift # Remove machine name from arguments +else + MACHINE_NAME=$(hostname | cut -d'.' -f1) +fi + +# Validate machine name +if [ ! -d "hosts/darwin/$MACHINE_NAME" ]; then + echo "${RED}Error: Machine configuration '$MACHINE_NAME' not found in hosts/darwin/${NC}" + echo "${YELLOW}Available machines:${NC}" + ls -1 hosts/darwin/ | grep -v "default.nix\|shared.nix" || echo " No machine configurations found" + echo "" + echo "${YELLOW}Usage: $0 [machine-name] [additional-nix-args]${NC}" + echo " If no machine name is provided, uses current hostname: $(hostname | cut -d'.' -f1)" + exit 1 +fi + +FLAKE_SYSTEM="darwinConfigurations.${MACHINE_NAME}.system" export NIXPKGS_ALLOW_UNFREE=1 -echo "${YELLOW}Starting build...${NC}" -nix --extra-experimental-features 'nix-command flakes' build .#$FLAKE_SYSTEM $@ +echo "${YELLOW}Building configuration for machine: ${MACHINE_NAME}${NC}" +nix --extra-experimental-features 'nix-command flakes' build .#$FLAKE_SYSTEM "$@" echo "${YELLOW}Switching to new generation...${NC}" # See https://github.com/nix-darwin/nix-darwin/issues/1457 on why we need sudo -sudo ./result/sw/bin/darwin-rebuild switch --flake .#${SYSTEM_TYPE} $@ +sudo ./result/sw/bin/darwin-rebuild switch --flake .#${MACHINE_NAME} echo "${YELLOW}Cleaning up...${NC}" unlink ./result -echo "${GREEN}Switch to new generation complete!${NC}" +echo "${GREEN}Switch to new generation complete for ${MACHINE_NAME}!${NC}" diff --git a/flake.lock b/flake.lock index f48af16..8ce2ebb 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1750173260, - "narHash": "sha256-9P1FziAwl5+3edkfFcr5HeGtQUtrSdk/MksX39GieoA=", + "lastModified": 1754337839, + "narHash": "sha256-fEc2/4YsJwtnLU7HCFMRckb0u9UNnDZmwGhXT5U5NTw=", "owner": "ryantm", "repo": "agenix", - "rev": "531beac616433bac6f9e2a19feb8e99a22a66baf", + "rev": "856df6f6922845abd4fd958ce21febc07ca2fa45", "type": "github" }, "original": { @@ -24,16 +24,16 @@ "brew-src": { "flake": false, "locked": { - "lastModified": 1751910772, - "narHash": "sha256-jQNdIkq2iRDNWskd5f8kX6q9BO/CBSXhMH41WNRft8E=", + "lastModified": 1753461463, + "narHash": "sha256-kGc7pRH0diLzKmOHsEFA8sZ9NJpgT+tqxAMsuqNd5Po=", "owner": "Homebrew", "repo": "brew", - "rev": "700d67a85e0129ab8a893ff69246943479e33df1", + "rev": "4d14be89e99a45181c18e96a5f19a5b43343cc0f", "type": "github" }, "original": { "owner": "Homebrew", - "ref": "4.5.9", + "ref": "4.5.13", "repo": "brew", "type": "github" } @@ -127,11 +127,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1754225444, - "narHash": "sha256-mv01SQtqlhBMavc1dgNjgqJw4WfZxy+w3xBgwJU3YmU=", + "lastModified": 1754263839, + "narHash": "sha256-ck7lILfCNuunsLvExPI4Pw9OOCJksxXwozum24W8b+8=", "owner": "nix-community", "repo": "home-manager", - "rev": "0de18bd5c6681280d7ae017fa34ffd91bdcf0557", + "rev": "1d7abbd5454db97e0af51416f4960b3fb64a4773", "type": "github" }, "original": { @@ -159,11 +159,11 @@ "homebrew-cask": { "flake": false, "locked": { - "lastModified": 1754242592, - "narHash": "sha256-rOuSx8dNvdg2eAPSBlO5LGibHWCnIAHLYdHP0iGg8nM=", + "lastModified": 1754337299, + "narHash": "sha256-EUJ+kn8JtuNSc1mlAQLVXmk3W2bdGLjSGEq/IxvduBU=", "owner": "homebrew", "repo": "homebrew-cask", - "rev": "5fb44a514eb03b8a1139fdc312753832b4882451", + "rev": "885bf23bf37c350adca6c3d007cb84f76ab2bb84", "type": "github" }, "original": { @@ -175,11 +175,11 @@ "homebrew-core": { "flake": false, "locked": { - "lastModified": 1754242529, - "narHash": "sha256-Cqs4WhZWN2rbc+k4OIRrE5IIy7CWS/u2KInmrKPJbSY=", + "lastModified": 1754338947, + "narHash": "sha256-C+Pt0qqnpNJsyXlLGg5n/WFvOWQ7e+bdxTJ9k4b86uA=", "owner": "homebrew", "repo": "homebrew-core", - "rev": "4298332c010f4d07caa2e9381705814fe2228873", + "rev": "d05c7db4ea810874d9ffa7d786a9eeb8d663825a", "type": "github" }, "original": { @@ -193,11 +193,11 @@ "brew-src": "brew-src" }, "locked": { - "lastModified": 1754001565, - "narHash": "sha256-IhMN6xAIN9SSYlQGHA7ECEj+ejpH45C+FY5IrYqvfj0=", + "lastModified": 1754250993, + "narHash": "sha256-MEin+qoQKtFC1b0f4tnQ+Z82BQWSCgh6Ef7rpmH9gig=", "owner": "zhaofengli-wip", "repo": "nix-homebrew", - "rev": "db11cc216d2ecd451e4952c60766d6cfaa0938b7", + "rev": "314d057294e79bc2596972126b84c6f9f144499a", "type": "github" }, "original": { @@ -208,16 +208,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1745391562, - "narHash": "sha256-sPwcCYuiEopaafePqlG826tBhctuJsLx/mhKKM5Fmjo=", + "lastModified": 1754028485, + "narHash": "sha256-IiiXB3BDTi6UqzAZcf2S797hWEPCRZOwyNThJIYhUfk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8a2f738d9d1f1d986b5a4cd2fd2061a7127237d7", + "rev": "59e69648d345d6e8fef86158c555730fa12af9de", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "nixos-25.05", "repo": "nixpkgs", "type": "github" } @@ -240,11 +240,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1753939845, - "narHash": "sha256-K2ViRJfdVGE8tpJejs8Qpvvejks1+A4GQej/lBk5y7I=", + "lastModified": 1754214453, + "narHash": "sha256-Q/I2xJn/j1wpkGhWkQnm20nShYnG7TI99foDBpXm1SY=", "owner": "nixos", "repo": "nixpkgs", - "rev": "94def634a20494ee057c76998843c015909d6311", + "rev": "5b09dc45f24cf32316283e62aec81ffee3c3e376", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index e3054a8..be57b1b 100644 --- a/flake.nix +++ b/flake.nix @@ -47,10 +47,20 @@ secrets, }@inputs: let - user = "cschmatzler"; - linuxSystems = [ "x86_64-linux" ]; - darwinSystems = [ "aarch64-darwin" ]; - forAllSystems = f: nixpkgs.lib.genAttrs (linuxSystems ++ darwinSystems) f; + systemLib = import ./lib/systems.nix inputs; + inherit (systemLib) + systemConfigs + mkDarwinSystem + mkNixosSystem + mkApps + ; + inherit (systemConfigs) darwinHosts nixosHosts; + + allSystems = [ + "x86_64-linux" + "aarch64-darwin" + ]; + forAllSystems = f: nixpkgs.lib.genAttrs allSystems f; devShell = system: let @@ -67,89 +77,17 @@ age-plugin-yubikey ]; shellHook = with pkgs; '' - export EDITOR=vim + export EDITOR=nvim ''; }; }; - mkApp = scriptName: system: { - type = "app"; - program = "${ - (nixpkgs.legacyPackages.${system}.writeScriptBin scriptName '' - #!/usr/bin/env bash - PATH=${nixpkgs.legacyPackages.${system}.git}/bin:$PATH - echo "Running ${scriptName} for ${system}" - exec ${self}/apps/${system}/${scriptName} - '') - }/bin/${scriptName}"; - }; - mkLinuxApps = system: { - "apply" = mkApp "apply" system; - "build" = mkApp "build" system; - "build-switch" = mkApp "build-switch" system; - "copy-keys" = mkApp "copy-keys" system; - "create-keys" = mkApp "create-keys" system; - "check-keys" = mkApp "check-keys" system; - "rollback" = mkApp "rollback" system; - }; - mkDarwinApps = system: { - "apply" = mkApp "apply" system; - "build" = mkApp "build" system; - "build-switch" = mkApp "build-switch" system; - "copy-keys" = mkApp "copy-keys" system; - "create-keys" = mkApp "create-keys" system; - "check-keys" = mkApp "check-keys" system; - "rollback" = mkApp "rollback" system; - }; in { devShells = forAllSystems devShell; - apps = - nixpkgs.lib.genAttrs linuxSystems mkLinuxApps // nixpkgs.lib.genAttrs darwinSystems mkDarwinApps; - - darwinConfigurations = nixpkgs.lib.genAttrs darwinSystems ( - system: - darwin.lib.darwinSystem { - inherit system; - specialArgs = inputs; - modules = [ - home-manager.darwinModules.home-manager - nix-homebrew.darwinModules.nix-homebrew - { - nix-homebrew = { - inherit user; - enable = true; - taps = { - "homebrew/homebrew-core" = homebrew-core; - "homebrew/homebrew-cask" = homebrew-cask; - "homebrew/homebrew-bundle" = homebrew-bundle; - }; - mutableTaps = false; - autoMigrate = true; - }; - } - ./hosts/darwin - ]; - } - ); - - nixosConfigurations = nixpkgs.lib.genAttrs linuxSystems ( - system: - nixpkgs.lib.nixosSystem { - inherit system; - specialArgs = inputs; - modules = [ - disko.nixosModules.disko - home-manager.nixosModules.home-manager - { - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - users.${user} = import ./modules/nixos/home-manager.nix; - }; - } - ./hosts/nixos - ]; - } + apps = forAllSystems mkApps; + darwinConfigurations = nixpkgs.lib.genAttrs darwinHosts mkDarwinSystem; + nixosConfigurations = nixpkgs.lib.genAttrs nixosHosts ( + hostname: mkNixosSystem hostname "x86_64-linux" ); }; } diff --git a/hosts/darwin/chidi/default.nix b/hosts/darwin/chidi/default.nix new file mode 100644 index 0000000..b68b31b --- /dev/null +++ b/hosts/darwin/chidi/default.nix @@ -0,0 +1,23 @@ +{ + pkgs, + user, + ... +}: + +{ + imports = [ + ../shared.nix + ]; + + networking.hostName = "chidi"; + networking.computerName = "Chidi"; + + home-manager.users.${user} = { + programs.git.userEmail = "christoph@tuist.dev"; + }; + + environment.systemPackages = with pkgs; [ + slack + tuple + ]; +} diff --git a/hosts/darwin/default.nix b/hosts/darwin/default.nix deleted file mode 100644 index 1d85ebf..0000000 --- a/hosts/darwin/default.nix +++ /dev/null @@ -1,93 +0,0 @@ -{ - agenix, - config, - pkgs, - ... -}: - -let - user = "cschmatzler"; -in -{ - - imports = [ - ../../modules/darwin/secrets.nix - ../../modules/darwin/home-manager.nix - ../../modules/shared - agenix.darwinModules.default - ]; - - nix = { - package = pkgs.nix; - settings = { - trusted-users = [ - "@admin" - "${user}" - ]; - substituters = [ - "https://nix-community.cachix.org" - "https://cache.nixos.org" - ]; - trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ]; - }; - gc = { - automatic = true; - interval = { - Weekday = 0; - Hour = 2; - Minute = 0; - }; - options = "--delete-older-than 30d"; - }; - extraOptions = '' - experimental-features = nix-command flakes - ''; - }; - - environment.systemPackages = - with pkgs; - [ - agenix.packages."${pkgs.system}".default - ] - ++ (import ../../modules/shared/packages.nix { inherit pkgs; }); - - system = { - checks.verifyNixPath = false; - primaryUser = user; - stateVersion = 5; - - defaults = { - 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; - }; - }; - }; -} diff --git a/hosts/darwin/jason/default.nix b/hosts/darwin/jason/default.nix new file mode 100644 index 0000000..4429ff7 --- /dev/null +++ b/hosts/darwin/jason/default.nix @@ -0,0 +1,23 @@ +{ + config, + pkgs, + user, + ... +}: + +{ + imports = [ + ../shared.nix + ]; + + networking.hostName = "jason"; + networking.computerName = "Jason"; + + home-manager.users.${user} = { + programs.git.userEmail = "christoph@schmatzler.com"; + }; + + environment.systemPackages = with pkgs; [ + slack + ]; +} diff --git a/hosts/darwin/shared.nix b/hosts/darwin/shared.nix new file mode 100644 index 0000000..cacf888 --- /dev/null +++ b/hosts/darwin/shared.nix @@ -0,0 +1,14 @@ +{ + agenix, + config, + pkgs, + lib, + ... +}: + +{ + imports = [ + ../../profiles/base + ../../profiles/darwin + ]; +} diff --git a/hosts/nixos/default.nix b/hosts/nixos/default.nix index 8acc153..ab10773 100644 --- a/hosts/nixos/default.nix +++ b/hosts/nixos/default.nix @@ -3,22 +3,21 @@ inputs, pkgs, agenix, + hostname, + user, ... }: let - user = "cschmatzler"; keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOk8iAnIaa1deoc7jw8YACPNVka1ZFJxhnU4G74TmS+p" ]; in { imports = [ - ../../modules/nixos/secrets.nix - ../../modules/nixos/disk-config.nix - ../../modules/shared + ../../profiles/base + ../../profiles/nixos agenix.nixosModules.default ]; - # Use the systemd-boot EFI boot loader. boot = { loader = { systemd-boot = { @@ -35,54 +34,24 @@ in "usb_storage" "sd_mod" ]; - # Uncomment for AMD GPU - # initrd.kernelModules = [ "amdgpu" ]; kernelPackages = pkgs.linuxPackages_latest; kernelModules = [ "uinput" ]; }; - # Set your time zone. - time.timeZone = "America/New_York"; + time.timeZone = "UTC"; - # The global useDHCP flag is deprecated, therefore explicitly set to false here. - # Per-interface useDHCP will be mandatory in the future, so this generated config - # replicates the default behaviour. networking = { - hostName = "%HOST%"; # Define your hostname. + hostName = hostname; useDHCP = false; interfaces."%INTERFACE%".useDHCP = true; }; - nix = { - nixPath = [ "nixos-config=/home/${user}/.local/share/src/nixos-config:/etc/nixos" ]; - settings = { - allowed-users = [ "${user}" ]; - trusted-users = [ - "@admin" - "${user}" - ]; - substituters = [ - "https://nix-community.cachix.org" - "https://cache.nixos.org" - ]; - trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ]; - }; + nix.nixPath = [ "nixos-config=/home/${user}/.local/share/src/nixos-config:/etc/nixos" ]; - package = pkgs.nix; - extraOptions = '' - experimental-features = nix-command flakes - ''; - }; - - # Manages keys and such programs = { gnupg.agent.enable = true; - - # Needed for anything GTK related dconf.enable = true; - - # My shell - zsh.enable = true; + fish.enable = true; }; services = { @@ -90,45 +59,24 @@ in xserver = { enable = true; - # Uncomment these for AMD or Nvidia GPU - # videoDrivers = [ "amdgpu" ]; - # videoDrivers = [ "nvidia" ]; - - # Uncomment this for Nvidia GPU - # This helps fix tearing of windows for Nvidia cards - # services.xserver.screenSection = '' - # Option "metamodes" "nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On}" - # Option "AllowIndirectGLXProtocol" "off" - # Option "TripleBuffer" "on" - # ''; - - # LightDM Display Manager displayManager.lightdm = { enable = true; greeters.slick.enable = true; - background = ../../modules/nixos/config/login-wallpaper.png; + background = ../../profiles/nixos/config/login-wallpaper.png; }; - # Tiling window manager windowManager.bspwm = { enable = true; }; xkb = { - # Turn Caps Lock into Ctrl layout = "us"; options = "ctrl:nocaps"; }; }; - # Better support for general peripherals libinput.enable = true; - - # Let's be able to SSH into this machine openssh.enable = true; - - # Sync state between machines - # Sync state between machines syncthing = { enable = true; openDefaultPorts = true; @@ -283,15 +231,12 @@ in virtualisation.docker.enable = true; virtualisation.docker.logDriver = "json-file"; - # It's me, it's you, it's everyone + # Additional user config beyond what's in profiles/nixos users.users = { ${user} = { - isNormalUser = true; extraGroups = [ - "wheel" # Enable ‘sudo’ for the user. "docker" ]; - shell = pkgs.zsh; openssh.authorizedKeys.keys = keys; }; diff --git a/lib/systems.nix b/lib/systems.nix new file mode 100644 index 0000000..865a9ab --- /dev/null +++ b/lib/systems.nix @@ -0,0 +1,93 @@ +{ + nixpkgs, + darwin, + home-manager, + nix-homebrew, + homebrew-bundle, + homebrew-core, + homebrew-cask, + disko, + self, + ... +}@inputs: + +let + user = "cschmatzler"; + + mkApp = scriptName: system: { + type = "app"; + program = "${ + (nixpkgs.legacyPackages.${system}.writeScriptBin scriptName '' + #!/usr/bin/env bash + PATH=${nixpkgs.legacyPackages.${system}.git}/bin:$PATH + echo "Running ${scriptName} for ${system}" + exec ${self}/apps/${system}/${scriptName} "$@" + '') + }/bin/${scriptName}"; + }; +in +{ + mkDarwinSystem = + hostname: + darwin.lib.darwinSystem { + system = "aarch64-darwin"; + specialArgs = inputs // { + inherit user; + }; + modules = [ + home-manager.darwinModules.home-manager + nix-homebrew.darwinModules.nix-homebrew + { + nix-homebrew = { + inherit user; + enable = true; + taps = { + "homebrew/homebrew-core" = homebrew-core; + "homebrew/homebrew-cask" = homebrew-cask; + "homebrew/homebrew-bundle" = homebrew-bundle; + }; + mutableTaps = false; + autoMigrate = true; + }; + } + ../hosts/darwin/${hostname} + ]; + }; + + mkNixosSystem = + hostname: system: + nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = inputs // { + inherit hostname user; + }; + modules = [ + disko.nixosModules.disko + home-manager.nixosModules.home-manager + ../hosts/nixos + ]; + }; + + mkApps = + system: + let + appNames = [ + "apply" + "build" + "build-switch" + "copy-keys" + "create-keys" + "check-keys" + "rollback" + ]; + in + nixpkgs.lib.genAttrs appNames (name: mkApp name system); + + systemConfigs = { + darwinHosts = [ + "chidi" + "jason" + ]; + nixosHosts = [ "tahani" ]; + }; +} diff --git a/modules/darwin/README.md b/modules/darwin/README.md deleted file mode 100644 index 90ab44e..0000000 --- a/modules/darwin/README.md +++ /dev/null @@ -1,11 +0,0 @@ - -## Layout -``` -. -├── dock # MacOS dock configuration -├── casks.nix # List of homebrew casks -├── default.nix # Defines module, system-level config -├── files.nix # Non-Nix, static configuration files (now immutable!) -├── home-manager.nix # Defines user programs -├── packages.nix # List of packages to install for MacOS -``` diff --git a/modules/darwin/casks.nix b/modules/darwin/casks.nix deleted file mode 100644 index cc773b7..0000000 --- a/modules/darwin/casks.nix +++ /dev/null @@ -1 +0,0 @@ -_: [ ] diff --git a/modules/darwin/files.nix b/modules/darwin/files.nix deleted file mode 100644 index f8ce358..0000000 --- a/modules/darwin/files.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - user, - config, - pkgs, - ... -}: -{ } diff --git a/modules/darwin/packages.nix b/modules/darwin/packages.nix deleted file mode 100644 index 30a1e6a..0000000 --- a/modules/darwin/packages.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ pkgs }: -with pkgs; -let - shared-packages = import ../shared/packages.nix { inherit pkgs; }; -in -shared-packages -++ [ - _1password-gui - dockutil - raycast - neovim -] diff --git a/modules/nixos/README.md b/modules/nixos/README.md deleted file mode 100644 index bfa2a9e..0000000 --- a/modules/nixos/README.md +++ /dev/null @@ -1,11 +0,0 @@ -## Layout -``` -. -├── 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 -├── secrets.nix # Age-encrypted secrets with agenix -``` diff --git a/modules/nixos/config/login-wallpaper.png b/modules/nixos/config/login-wallpaper.png deleted file mode 100644 index 7a91f64..0000000 Binary files a/modules/nixos/config/login-wallpaper.png and /dev/null differ diff --git a/modules/nixos/config/polybar/bars.ini b/modules/nixos/config/polybar/bars.ini deleted file mode 100644 index 2cf127d..0000000 --- a/modules/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: -;