diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c7da0b4 --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +.PHONY: default build + +default: build + +build: + home-manager build --flake . --show-trace diff --git a/default.nix b/default.nix deleted file mode 100644 index bb4363f..0000000 --- a/default.nix +++ /dev/null @@ -1,40 +0,0 @@ -{pkgs, ...}: { - imports = [ - ./bat/default.nix - ./git/default.nix - ./ssh/default.nix - ./zsh/default.nix - ./starship/default.nix - ./bottom/default.nix - ./emacs/default.nix - ./scripts/default.nix - ]; - programs = { - bash.enable = true; - carapace.enable = true; - eza = { - enable = true; - enableAliases = true; - git = true; - icons = true; - extraOptions = ["--octal-permissions"]; - }; - readline = { - enable = true; - includeSystemConfig = true; - extraConfig = '' - set completion-ignore-case On - ''; - }; - direnv = { - enable = true; - nix-direnv.enable = true; - }; - fzf = { - enable = true; - defaultCommand = "${pkgs.fd}/bin/fd --type f"; - changeDirWidgetCommand = "${pkgs.fd}/bin/fd --type d"; - fileWidgetCommand = "${pkgs.fd}/bin/fd --type f"; - }; - }; -} diff --git a/desktop.nix b/desktop.nix deleted file mode 100644 index ebfa828..0000000 --- a/desktop.nix +++ /dev/null @@ -1,86 +0,0 @@ -{ - config, - lib, - pkgs, - catppuccinVariant ? "Mocha", - ... -}: { - imports = [ - ./default.nix - ./email/default.nix - ./password-store/default.nix - ./wlogout/default.nix - ./waybar/default.nix - ./rofi/default.nix - ./swaylock/default.nix - ./swaync/default.nix - ./avizo/default.nix - ./alacritty/default.nix - ./emacs/default.nix - ./nyxt/default.nix - ./obs/default.nix - ./cava/default.nix - ./prog/default.nix - ]; - programs.rofi.terminal = "${config.programs.alacritty.package}/bin/alacritty"; - services = { - gpg-agent.pinentryFlavor = "gtk2"; - avizo.enable = true; - syncthing.enable = true; - udiskie = { - enable = true; - notify = true; - automount = true; - tray = "never"; - }; - }; - gtk = with lib.strings; let - accent = "Lavender"; - size = "Standard"; - in { - enable = true; - iconTheme = { - package = pkgs.catppuccin-papirus-folders.override { - accent = toLower accent; - flavor = toLower catppuccinVariant; - }; - name = "Papirus-Dark"; - }; - cursorTheme = let - variant = "${lib.strings.toLower catppuccinVariant}Dark"; - in { - package = pkgs.catppuccin-cursors.${variant}; - name = "Catppuccin-${catppuccinVariant}-Dark-Cursors"; - size = 32; - }; - theme = { - package = with lib.strings; - pkgs.catppuccin-gtk.override { - accents = [(toLower accent)]; - size = toLower size; - variant = toLower catppuccinVariant; - }; - name = "Catppuccin-${catppuccinVariant}-${size}-${accent}-Dark"; - }; - }; - xresources.properties = with config.scheme.withHashtag; { - "*background" = base00; - "*foreground" = base05; - "*color0" = base00; - "*color1" = red; - "*color2" = green; - "*color3" = yellow; - "*color4" = blue; - "*color5" = magenta; - "*color6" = cyan; - "*color7" = base04; - "*color8" = base01; - "*color9" = red; - "*color10" = green; - "*color11" = yellow; - "*color12" = blue; - "*color13" = magenta; - "*color14" = cyan; - "*color15" = base05; - }; -} diff --git a/flake.nix b/flake.nix index 067b891..d114f87 100644 --- a/flake.nix +++ b/flake.nix @@ -28,13 +28,19 @@ tt-schemes, ... }: let - pkgs = import nixpkgs {system = "x86_64-linux";}; - extraSpecialArgs = { - inherit tt-schemes; + defaultExtraSpecialArgs = { + system ? "x86_64-linux", + hostname ? "Atlas", + ... + }: rec { + inherit hostname tt-schemes; accentColour = "base07"; # catppuccin lavender catppuccinVariant = "Mocha"; - fonts = with pkgs; - with iosevka-custom.outputs; rec { + iosevkaCustom = { + packages = iosevka-custom.outputs.packages.${system}; + names = iosevka-custom.outputs.names; + }; + fonts = with iosevkaCustom; rec { sizes = { applications = 12; desktop = 10; @@ -43,28 +49,87 @@ }; serif = sansSerif; sansSerif = { - name = names."iosevka-custom-aile"; - package = packages.${system}."iosevka-custom-aile"; + name = names.iosevka-custom-aile; + package = packages.iosevka-custom-aile; }; monospace = { - name = names."iosevka-custom-nerdfont"; - package = packages.${system}."iosevka-custom-nerdfont"; - }; - emoji = { - name = "Noto Color Emoji"; - package = noto-fonts-emoji; + name = names.iosevka-custom-nerdfont; + package = packages.iosevka-custom-nerdfont; }; }; }; + defaultModules = { + username ? "pixelifytica", + hostname ? "Atlas", + ... + }: [ + base16.homeManagerModule + ./home/${hostname}.nix + ({...}: { + home = {inherit username;}; + scheme = "${tt-schemes}/base16/catppuccin-mocha.yaml"; + }) + ]; in { inherit (home-manager) defaultPackage; homeConfigurations = { - "pixelifytica" = home-manager.lib.homeManagerConfiguration { - inherit pkgs extraSpecialArgs; - modules = [ - base16.homeManagerModule - ./home.nix - ]; + # Server + "pixelifytica@Legion" = home-manager.lib.homeManagerConfiguration { + pkgs = import nixpkgs {system = "x86_64-linux";}; + modules = defaultModules { + username = "pixelifytica"; + hostname = "Legion"; + }; + extraSpecialArgs = defaultExtraSpecialArgs { + system = "x86_64-linux"; + hostname = "Legion"; + }; + }; + # Personal + "pixelifytica@Northstar" = home-manager.lib.homeManagerConfiguration { + pkgs = import nixpkgs {system = "x86_64-linux";}; + modules = defaultModules { + username = "pixelifytica"; + hostname = "Northstar"; + }; + extraSpecialArgs = defaultExtraSpecialArgs { + system = "x86_64-linux"; + hostname = "Northstar"; + }; + }; + "pixelifytica@Vanguard" = home-manager.lib.homeManagerConfiguration { + pkgs = import nixpkgs {system = "x86_64-linux";}; + modules = defaultModules { + username = "pixelifytica"; + hostname = "Vanguard"; + }; + extraSpecialArgs = defaultExtraSpecialArgs { + system = "x86_64-linux"; + hostname = "Vanguard"; + }; + }; + # Work + "elitherl@Ronin" = home-manager.lib.homeManagerConfiguration { + pkgs = import nixpkgs {system = "x86_64-linux";}; + modules = defaultModules { + username = "elitherl"; + hostname = "Ronin"; + }; + extraSpecialArgs = defaultExtraSpecialArgs { + system = "x86_64-linux"; + hostname = "Ronin"; + }; + }; + "elitherl@Scorch" = home-manager.lib.homeManagerConfiguration { + pkgs = import nixpkgs {system = "x86_64-linux";}; + modules = defaultModules { + username = "elitherl"; + hostname = "Scorch"; + }; + extraSpecialArgs = defaultExtraSpecialArgs { + system = "x86_64-linux"; + hostname = "Scorch"; + }; }; }; }; diff --git a/home.nix b/home.nix deleted file mode 100644 index 91a7f46..0000000 --- a/home.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ - lib, - config, - pkgs, - tt-schemes, - catppuccinVariant, - ... -}: { - imports = [ - ./home/default.nix - /etc/nixos/hosts/Northstar/home.nix - ]; - programs.home-manager.enable = true; - scheme = "${tt-schemes}/base16/catppuccin-${lib.strings.toLower catppuccinVariant}.yaml"; - home = rec { - username = "pixelifytica"; - homeDirectory = "/home/${username}"; - stateVersion = "23.05"; - }; -} diff --git a/home/Northstar.nix b/home/Northstar.nix new file mode 100644 index 0000000..0fbdcdb --- /dev/null +++ b/home/Northstar.nix @@ -0,0 +1,8 @@ +{...}: { + imports = [./default.nix]; + wayland.windowManager.sway.config.output = { + "eDP-1" = { + scale = "1.25"; + }; + }; +} diff --git a/home/Ronin.nix b/home/Ronin.nix new file mode 100644 index 0000000..cb288d6 --- /dev/null +++ b/home/Ronin.nix @@ -0,0 +1,47 @@ +{ + config, + lib, + pkgs, + ... +}: { + imports = [./default.nix]; + home.packages = [(pkgs.writeShellScriptBin "ukaea-vpn-connect" "sudo ${pkgs.openfortivpn}/bin/openfortivpn -c ${./ukaea-vpn.conf}")]; + programs.git.userEmail = config.accounts.email.accounts.outlook.address; + accounts.email.accounts = { + proton.primary = lib.mkForce false; + outlook.primary = lib.mkForce true; + }; + wayland.windowManager.sway.config.output = { + "eDP-1".scale = "1.25"; + "Dell Inc. DELL P3223QE CCG8YN3".scale = "1.5"; + }; + xresources.properties."Xft.dpi" = toString (builtins.mul 96 1.5); + services.kanshi = { + enable = true; + systemdTarget = "sway-session.target"; + profiles = { + undocked = { + outputs = [ + { + criteria = "eDP-1"; + status = "enable"; + scale = 1.25; + } + ]; + }; + docked = { + outputs = [ + { + criteria = "Dell Inc. DELL P3223QE CCG8YN3"; + status = "enable"; + scale = 1.5; + } + { + criteria = "eDP-1"; + status = "disable"; + } + ]; + }; + }; + }; +} diff --git a/home/Scorch.nix b/home/Scorch.nix new file mode 100644 index 0000000..d37bb63 --- /dev/null +++ b/home/Scorch.nix @@ -0,0 +1,19 @@ +{ + config, + lib, + ... +}: { + imports = [./default.nix]; + programs.git.userEmail = config.accounts.email.accounts.outlook.address; + accounts.email.accounts = { + proton.primary = lib.mkForce false; + outlook.primary = lib.mkForce true; + }; + wayland.windowManager.sway.config.output = { + "Dell Inc. DELL P3223QE CCG8YN3" = { + pos = "0 0"; + scale = "1.5"; + }; + }; + xresources.properties."Xft.dpi" = toString (builtins.mul 96 1.5); +} diff --git a/home/Vanguard.nix b/home/Vanguard.nix new file mode 100644 index 0000000..dc51d16 --- /dev/null +++ b/home/Vanguard.nix @@ -0,0 +1,23 @@ +{pkgs, ...}: { + imports = [./default.nix]; + wayland.windowManager.sway.config = { + startup = [ + {command = "${pkgs.xorg.xrandr}/bin/xrandr --output DP-2 --primary";} + ]; + output = { + "Acer Technologies ED270R TJMEE0043W01" = { + mode = "1920x1080@165Hz"; + pos = "1080 420"; + adaptive_sync = "off"; + }; + "Ancor Communications Inc VS278 FALMQS032358" = { + pos = "0 0"; + transform = "270"; + }; + }; + }; + programs.waybar.settings = { + main.output = ["DP-2"]; + alt.output = ["HDMI-A-1"]; + }; +} diff --git a/home/default.nix b/home/default.nix new file mode 100644 index 0000000..a17ca26 --- /dev/null +++ b/home/default.nix @@ -0,0 +1,102 @@ +{ + config, + lib, + pkgs, + ... +}: { + imports = [ + # Programs + ../programs/sway/default.nix + ../programs/shell/default.nix + ../programs/emacs/default.nix + ../programs/prog/default.nix + ../programs/cava/default.nix + ../programs/obs/default.nix + # Services + ../services/email/work.nix # TODO combine again at some point + ../services/password-store/default.nix + # Additional Scripts + ../scripts/default.nix + ]; + programs.home-manager.enable = true; + services = { + gpg-agent.pinentryFlavor = "gtk2"; + avizo.enable = true; + syncthing.enable = true; + udiskie = { + enable = true; + notify = true; + automount = true; + tray = "never"; + }; + }; + gtk = with lib.strings; let + accent = "Lavender"; + variant = "Mocha"; + in { + enable = true; + iconTheme = { + package = pkgs.catppuccin-papirus-folders.override { + accent = toLower accent; + flavor = toLower variant; + }; + name = "Papirus-Dark"; + }; + cursorTheme = { + package = pkgs.catppuccin-cursors."${toLower variant}Dark"; + name = "Catppuccin-${variant}-Dark-Cursors"; + size = 32; + }; + theme = let + size = "Standard"; + in { + package = pkgs.catppuccin-gtk.override { + accents = [(toLower accent)]; + size = toLower size; + variant = toLower variant; + }; + name = "Catppuccin-${variant}-${size}-${accent}-Dark"; + }; + }; + xdg = { + userDirs = { + enable = true; + createDirectories = true; + extraConfig = { + XDG_PROJECTS_DIR = "${config.home.homeDirectory}/Projects"; + }; + }; + }; + xresources.properties = with config.scheme.withHashtag; { + "*background" = base00; + "*foreground" = base05; + "*color0" = base00; + "*color1" = red; + "*color2" = green; + "*color3" = yellow; + "*color4" = blue; + "*color5" = magenta; + "*color6" = cyan; + "*color7" = base04; + "*color8" = base01; + "*color9" = red; + "*color10" = green; + "*color11" = yellow; + "*color12" = blue; + "*color13" = magenta; + "*color14" = cyan; + "*color15" = base05; + }; + home = { + homeDirectory = "/home/${config.home.username}"; + packages = with pkgs; [ + gnumake + git-sync + pinentry + fd + ripgrep + ffmpeg + ]; + stateVersion = "23.05"; + }; +} diff --git a/home/ukaea-vpn.conf b/home/ukaea-vpn.conf new file mode 100644 index 0000000..64386fe --- /dev/null +++ b/home/ukaea-vpn.conf @@ -0,0 +1,3 @@ +host = vpn.ukaea.uk +port = 943 +username = elitherl diff --git a/programs/bat/default.nix b/programs/bat/default.nix deleted file mode 100644 index 45a6330..0000000 --- a/programs/bat/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - lib, - catppuccinVariant ? "Mocha", - ... -}: { - xdg.configFile = let - variants = ["Latte" "Frappe" "Macchiato" "Mocha"]; - mkVariant = variant: let - fname = "catppuccin${variant}.tmTheme"; - in { - name = "bat/themes/${fname}"; - value = {source = ./. + "/${fname}";}; - }; - in - builtins.listToAttrs - (lib.lists.forEach variants mkVariant); - programs.bat = { - enable = true; - config.theme = "catppuccin${catppuccinVariant}"; - }; -} diff --git a/programs/emacs/default.nix b/programs/emacs/default.nix index eac920a..dc8af60 100644 --- a/programs/emacs/default.nix +++ b/programs/emacs/default.nix @@ -4,8 +4,6 @@ fonts, ... }: { - imports = [../git/default.nix]; - programs.git.extraConfig.core.editor = "$EDITOR"; programs.emacs = { # Clone emacs config from https://git.xenia.me.uk/pixelifytica/emacs.git # git clone https://git.xenia.me.uk/pixelifytica/emacs.git ~/.config/emacs diff --git a/programs/bottom/default.nix b/programs/shell/bottom.nix similarity index 100% rename from programs/bottom/default.nix rename to programs/shell/bottom.nix diff --git a/programs/bat/catppuccinFrappe.tmTheme b/programs/shell/catppuccinFrappe.tmTheme similarity index 100% rename from programs/bat/catppuccinFrappe.tmTheme rename to programs/shell/catppuccinFrappe.tmTheme diff --git a/programs/bat/catppuccinLatte.tmTheme b/programs/shell/catppuccinLatte.tmTheme similarity index 100% rename from programs/bat/catppuccinLatte.tmTheme rename to programs/shell/catppuccinLatte.tmTheme diff --git a/programs/bat/catppuccinMacchiato.tmTheme b/programs/shell/catppuccinMacchiato.tmTheme similarity index 100% rename from programs/bat/catppuccinMacchiato.tmTheme rename to programs/shell/catppuccinMacchiato.tmTheme diff --git a/programs/bat/catppuccinMocha.tmTheme b/programs/shell/catppuccinMocha.tmTheme similarity index 100% rename from programs/bat/catppuccinMocha.tmTheme rename to programs/shell/catppuccinMocha.tmTheme diff --git a/programs/shell/default.nix b/programs/shell/default.nix new file mode 100644 index 0000000..3eb7b51 --- /dev/null +++ b/programs/shell/default.nix @@ -0,0 +1,197 @@ +{ + lib, + pkgs, + ... +}: { + imports = [./bottom.nix]; + xdg.configFile = let + variants = ["Latte" "Frappe" "Macchiato" "Mocha"]; + mkVariant = variant: let + fname = "catppuccin${variant}.tmTheme"; + in { + name = "bat/themes/${fname}"; + value = {source = ./. + "/${fname}";}; + }; + in + builtins.listToAttrs + (lib.lists.forEach variants mkVariant); + programs = { + bash.enable = true; + bat = { + enable = true; + config.theme = "catppuccinMocha"; + }; + carapace.enable = true; + eza = { + enable = true; + enableAliases = true; + git = true; + icons = true; + extraOptions = ["--octal-permissions"]; + }; + readline = { + enable = true; + includeSystemConfig = true; + extraConfig = '' + set completion-ignore-case On + ''; + }; + direnv = { + enable = true; + nix-direnv.enable = true; + }; + fzf = { + enable = true; + defaultCommand = "${pkgs.fd}/bin/fd --type f"; + changeDirWidgetCommand = "${pkgs.fd}/bin/fd --type d"; + fileWidgetCommand = "${pkgs.fd}/bin/fd --type f"; + }; + ssh = { + enable = true; + forwardAgent = true; + compression = true; + serverAliveInterval = 15; + serverAliveCountMax = 3; + controlMaster = "auto"; + controlPersist = "10s"; + extraConfig = '' + AddKeysToAgent=yes + SetEnv TERM=xterm-256color + ''; + matchBlocks = { + "git*".user = "git"; + "legion" = { + user = "pixelifytica"; + hostname = "192.168.0.31"; + }; + "vanguard" = { + user = "pixelifytica"; + hostname = "192.168.0.90"; + }; + "ionos" = { + user = "root"; + hostname = "77.68.67.133"; + }; + "freia" = { + user = "elitherl"; + hostname = "freia020.hpc.l"; + forwardX11Trusted = true; + }; + "heimdall" = { + user = "elitherl"; + hostname = "heimdall003.jet.uk"; + forwardX11Trusted = true; + }; + }; + }; + starship = { + enable = true; + enableTransience = true; + settings = { + add_newline = false; + character = { + success_symbol = "[󰁔 ](bold green)"; + error_symbol = "[󰁔 ](bold red)"; + }; + command_timeout = 2000; + container = {symbol = " ";}; + directory = { + truncation_length = 2; + fish_style_pwd_dir_length = 1; + truncate_to_repo = false; + }; + direnv = {disabled = false;}; + git_branch = { + symbol = " "; + only_attached = true; + ignore_branches = ["master" "main"]; + }; + git_commit = { + format = "[ $hash | $tag]($style) "; + tag_symbol = " "; + tag_disabled = false; + }; + git_metrics = {disabled = false;}; + git_status = { + stashed = " "; + ahead = " "; + behind = " "; + up_to_date = ""; + diverged = " "; + conflicted = " "; + deleted = " "; + renamed = " "; + modified = " "; + staged = " "; + untracked = " "; + typechanged = " "; + }; + hostname = { + ssh_only = true; + ssh_symbol = "󰢹 "; + }; + jobs = {symbol = "󰈏 ";}; + line_break = {disabled = false;}; + localip = {disabled = false;}; + memory_usage = {disabled = false;}; + os = { + disabled = false; + format = "on [$symbol]($style) "; + }; + python = {python_binary = "python3";}; + shell = { + disabled = false; + format = "using [$indicator ]($style)"; + }; + status = { + disabled = false; + map_symbol = true; + pipestatus = true; + symbol = " "; + success_symbol = ""; + not_executable_symbol = " "; + not_found_symbol = " "; + sigint_symbol = " "; + signal_symbol = " "; + }; + sudo = {disabled = false;}; + }; + }; + zsh = { + enable = true; + enableCompletion = true; + enableAutosuggestions = true; + syntaxHighlighting.enable = true; + enableVteIntegration = true; + autocd = true; + historySubstringSearch.enable = true; + history = { + extended = true; + ignoreDups = true; + ignoreSpace = true; + }; + shellAliases = { + nixos-repl = "nixos-rebuild repl"; + nixos-test = "sudo nixos-rebuild test"; + nixos-boot = "sudo nixos-rebuild boot"; + nixos-switch = "sudo nixos-rebuild switch"; + nixos-reboot = "sudo nixos-rebuild boot && sudo reboot now"; + nixos-shutdown = "sudo nixos-rebuild boot && sudo shutdown now"; + gsa = "git-sync-all"; + }; + oh-my-zsh = { + enable = true; + plugins = ["colored-man-pages" "lol" "rand-quote"]; + theme = ""; + }; + completionInit = '' + autoload -Uz +X compinit && compinit + + ## case insensitive path-completion + zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' + zstyle ':completion:*' menu select + ''; + initExtra = "source ${./transient.zsh}\n"; + }; + }; +} diff --git a/programs/git/default.nix b/programs/shell/git.nix similarity index 100% rename from programs/git/default.nix rename to programs/shell/git.nix diff --git a/programs/zsh/transient.zsh b/programs/shell/transient.zsh similarity index 100% rename from programs/zsh/transient.zsh rename to programs/shell/transient.zsh diff --git a/programs/ssh/default.nix b/programs/ssh/default.nix deleted file mode 100644 index 7358329..0000000 --- a/programs/ssh/default.nix +++ /dev/null @@ -1,40 +0,0 @@ -{...}: { - programs.ssh = { - enable = true; - forwardAgent = true; - compression = true; - serverAliveInterval = 15; - serverAliveCountMax = 3; - controlMaster = "auto"; - controlPersist = "10s"; - extraConfig = '' - AddKeysToAgent=yes - SetEnv TERM=xterm-256color - ''; - matchBlocks = { - "git*".user = "git"; - "legion" = { - user = "pixelifytica"; - hostname = "192.168.0.31"; - }; - "vanguard" = { - user = "pixelifytica"; - hostname = "192.168.0.90"; - }; - "ionos" = { - user = "root"; - hostname = "77.68.67.133"; - }; - "freia" = { - user = "elitherl"; - hostname = "freia020.hpc.l"; - forwardX11Trusted = true; - }; - "heimdall" = { - user = "elitherl"; - hostname = "heimdall003.jet.uk"; - forwardX11Trusted = true; - }; - }; - }; -} diff --git a/programs/starship/default.nix b/programs/starship/default.nix deleted file mode 100644 index ae5c2c7..0000000 --- a/programs/starship/default.nix +++ /dev/null @@ -1,75 +0,0 @@ -{...}: { - programs.starship = { - enable = true; - enableTransience = true; - settings = { - add_newline = false; - character = { - success_symbol = "[󰁔 ](bold green)"; - error_symbol = "[󰁔 ](bold red)"; - }; - command_timeout = 2000; - container = {symbol = " ";}; - directory = { - truncation_length = 2; - fish_style_pwd_dir_length = 1; - truncate_to_repo = false; - }; - direnv = {disabled = false;}; - git_branch = { - symbol = " "; - only_attached = true; - ignore_branches = ["master" "main"]; - }; - git_commit = { - format = "[ $hash | $tag]($style) "; - tag_symbol = " "; - tag_disabled = false; - }; - git_metrics = {disabled = false;}; - git_status = { - stashed = " "; - ahead = " "; - behind = " "; - up_to_date = ""; - diverged = " "; - conflicted = " "; - deleted = " "; - renamed = " "; - modified = " "; - staged = " "; - untracked = " "; - typechanged = " "; - }; - hostname = { - ssh_only = true; - ssh_symbol = "󰢹 "; - }; - jobs = {symbol = "󰈏 ";}; - line_break = {disabled = false;}; - localip = {disabled = false;}; - memory_usage = {disabled = false;}; - os = { - disabled = false; - format = "on [$symbol]($style) "; - }; - python = {python_binary = "python3";}; - shell = { - disabled = false; - format = "using [$indicator ]($style)"; - }; - status = { - disabled = false; - map_symbol = true; - pipestatus = true; - symbol = " "; - success_symbol = ""; - not_executable_symbol = " "; - not_found_symbol = " "; - sigint_symbol = " "; - signal_symbol = " "; - }; - sudo = {disabled = false;}; - }; - }; -} diff --git a/programs/alacritty/catppuccin-mocha.toml b/programs/sway/alacritty/catppuccin-mocha.toml similarity index 100% rename from programs/alacritty/catppuccin-mocha.toml rename to programs/sway/alacritty/catppuccin-mocha.toml diff --git a/programs/alacritty/default.nix b/programs/sway/alacritty/default.nix similarity index 100% rename from programs/alacritty/default.nix rename to programs/sway/alacritty/default.nix diff --git a/services/avizo/default.nix b/programs/sway/avizo/default.nix similarity index 100% rename from services/avizo/default.nix rename to programs/sway/avizo/default.nix diff --git a/programs/sway/default.nix b/programs/sway/default.nix index 0b229d8..538791c 100644 --- a/programs/sway/default.nix +++ b/programs/sway/default.nix @@ -6,7 +6,15 @@ accentColour ? "base07", ... }: { - imports = [../desktop.nix]; + imports = [ + ./alacritty/default.nix + ./avizo/default.nix + ./rofi/default.nix + ./swaylock/default.nix + ./swaync/default.nix + ./waybar/default.nix + ./wlogout/default.nix + ]; home.packages = with pkgs; [ (writeShellScriptBin "protonmail-setup-bridge" '' pkill -9 -f protonmail-bridge diff --git a/programs/rofi/default.nix b/programs/sway/rofi/default.nix similarity index 96% rename from programs/rofi/default.nix rename to programs/sway/rofi/default.nix index 97876d2..84b1baa 100644 --- a/programs/rofi/default.nix +++ b/programs/sway/rofi/default.nix @@ -8,6 +8,11 @@ programs.rofi = { enable = true; package = pkgs.rofi-wayland; + terminal = with config.programs; "${ + if alacritty.enable + then alacritty.package + else pkgs.alacritty + }/bin/alacritty"; font = fonts.monospace.name; location = "center"; plugins = with pkgs; [rofi-emoji]; diff --git a/programs/swaylock/default.nix b/programs/sway/swaylock/default.nix similarity index 100% rename from programs/swaylock/default.nix rename to programs/sway/swaylock/default.nix diff --git a/programs/swaync/default.nix b/programs/sway/swaync/default.nix similarity index 100% rename from programs/swaync/default.nix rename to programs/sway/swaync/default.nix diff --git a/programs/waybar/default.nix b/programs/sway/waybar/default.nix similarity index 99% rename from programs/waybar/default.nix rename to programs/sway/waybar/default.nix index 7dcdfb4..4bc0a4e 100644 --- a/programs/waybar/default.nix +++ b/programs/sway/waybar/default.nix @@ -2,7 +2,7 @@ config, lib, pkgs, - hostName, + hostname, fonts, accentColour ? "base07", ... @@ -245,7 +245,7 @@ }; }; # TEMP FIX - alt = lib.mkIf (hostName == "Vanguard") { + alt = lib.mkIf (hostname == "Vanguard") { inherit (main) layer position "sway/workspaces"; name = "alt"; "modules-left" = []; diff --git a/programs/wlogout/default.nix b/programs/sway/wlogout/default.nix similarity index 100% rename from programs/wlogout/default.nix rename to programs/sway/wlogout/default.nix diff --git a/programs/wlogout/icons/hibernate.png b/programs/sway/wlogout/icons/hibernate.png similarity index 100% rename from programs/wlogout/icons/hibernate.png rename to programs/sway/wlogout/icons/hibernate.png diff --git a/programs/wlogout/icons/lock.png b/programs/sway/wlogout/icons/lock.png similarity index 100% rename from programs/wlogout/icons/lock.png rename to programs/sway/wlogout/icons/lock.png diff --git a/programs/wlogout/icons/logout.png b/programs/sway/wlogout/icons/logout.png similarity index 100% rename from programs/wlogout/icons/logout.png rename to programs/sway/wlogout/icons/logout.png diff --git a/programs/wlogout/icons/reboot.png b/programs/sway/wlogout/icons/reboot.png similarity index 100% rename from programs/wlogout/icons/reboot.png rename to programs/sway/wlogout/icons/reboot.png diff --git a/programs/wlogout/icons/shutdown.png b/programs/sway/wlogout/icons/shutdown.png similarity index 100% rename from programs/wlogout/icons/shutdown.png rename to programs/sway/wlogout/icons/shutdown.png diff --git a/programs/wlogout/icons/suspend.png b/programs/sway/wlogout/icons/suspend.png similarity index 100% rename from programs/wlogout/icons/suspend.png rename to programs/sway/wlogout/icons/suspend.png diff --git a/programs/zsh/default.nix b/programs/zsh/default.nix deleted file mode 100644 index cec66c8..0000000 --- a/programs/zsh/default.nix +++ /dev/null @@ -1,38 +0,0 @@ -{...}: { - programs.zsh = { - enable = true; - enableCompletion = true; - enableAutosuggestions = true; - syntaxHighlighting.enable = true; - enableVteIntegration = true; - autocd = true; - historySubstringSearch.enable = true; - history = { - extended = true; - ignoreDups = true; - ignoreSpace = true; - }; - shellAliases = { - nixos-repl = "nixos-rebuild repl"; - nixos-test = "sudo nixos-rebuild test"; - nixos-boot = "sudo nixos-rebuild boot"; - nixos-switch = "sudo nixos-rebuild switch"; - nixos-reboot = "sudo nixos-rebuild boot && sudo reboot now"; - nixos-shutdown = "sudo nixos-rebuild boot && sudo shutdown now"; - gsa = "git-sync-all"; - }; - oh-my-zsh = { - enable = true; - plugins = ["colored-man-pages" "lol" "rand-quote"]; - theme = ""; - }; - completionInit = '' - autoload -Uz +X compinit && compinit - - ## case insensitive path-completion - zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' - zstyle ':completion:*' menu select - ''; - initExtra = "source ${./transient.zsh}\n"; - }; -} diff --git a/services/email/default.nix b/services/email/default.nix index 5267545..b5fa51a 100644 --- a/services/email/default.nix +++ b/services/email/default.nix @@ -1,6 +1,6 @@ { pkgs, - hostName, + hostname, ... }: { accounts.email = { @@ -26,7 +26,7 @@ address = "e.litherlandsmith@proton.me"; aliases = ["evie@xenia.me.uk" "evie@litherlandsmith.slmail.me"]; userName = address; - passwordCommand = "${pkgs.pass}/bin/pass show mbsync/${hostName}/proton | head -n1"; + passwordCommand = "${pkgs.pass}/bin/pass show mbsync/${hostname}/proton | head -n1"; mu.enable = true; msmtp = { enable = true; @@ -53,7 +53,7 @@ smtp.host = "smtp.mail.me.com"; address = "e.litherlandsmith@icloud.com"; userName = address; - passwordCommand = "${pkgs.pass}/bin/pass show mbsync/${hostName}/icloud | head -n1"; + passwordCommand = "${pkgs.pass}/bin/pass show mbsync/${hostname}/icloud | head -n1"; mu.enable = true; msmtp.enable = true; mbsync = { diff --git a/services/email/work.nix b/services/email/work.nix index adf9b0a..0ce07ff 100644 --- a/services/email/work.nix +++ b/services/email/work.nix @@ -1,7 +1,7 @@ { config, pkgs, - hostName, + hostname, ... }: { imports = [./default.nix]; @@ -23,7 +23,7 @@ address = "evie.litherland-smith@ukaea.uk"; aliases = ["elitherl@jet.uk"]; userName = address; - passwordCommand = "${pkgs.pass}/bin/pass show mbsync/${hostName}/outlook | head -n1"; + passwordCommand = "${pkgs.pass}/bin/pass show mbsync/${hostname}/outlook | head -n1"; mu.enable = true; msmtp = { enable = true;