├── .gitignore ├── machines ├── common │ └── dot-files │ │ ├── gnupg │ │ ├── scdaemon.nix │ │ ├── dirmngr.nix │ │ ├── gpg-agent.nix │ │ ├── gpg.nix │ │ └── sks-keyservers.nix │ │ ├── aspell.nix │ │ ├── nixpkgs │ │ └── config.nix │ │ ├── npmrc.nix │ │ ├── curlrc.nix │ │ ├── git │ │ └── ignore.nix │ │ ├── htoprc.nix │ │ ├── ctags.nix │ │ └── darktooth │ │ └── darktooth.nix ├── alphaomega │ ├── modules │ │ └── default.nix │ ├── dot-files │ │ ├── gtk-3.0 │ │ │ └── settings.nix │ │ ├── Xresources.nix │ │ ├── fonts.nix │ │ ├── rofi │ │ │ └── config.nix │ │ ├── i3 │ │ │ ├── status.nix │ │ │ └── config.nix │ │ ├── grobi.nix │ │ ├── tmux.nix │ │ ├── tmux │ │ │ └── plugins │ │ │ │ └── kube.tmux │ │ └── alacritty │ │ │ └── alacritty.nix │ ├── etc │ │ └── containers │ │ │ ├── registries.nix │ │ │ └── policy.nix │ ├── programs │ │ ├── gnupg.nix │ │ ├── default.nix │ │ └── zsh.nix │ ├── services │ │ ├── offlineimap.nix │ │ ├── dovecot.nix │ │ ├── printing.nix │ │ ├── default.nix │ │ ├── restic.nix │ │ ├── coredns.nix │ │ ├── xserver.nix │ │ ├── udev.nix │ │ └── throttled.nix │ ├── system.nix │ ├── configuration.nix │ ├── hardware-configuration.nix │ └── environment.nix └── theopompos │ ├── preferences │ ├── keyboard.nix │ └── defaults.nix │ ├── programs │ ├── gnupg.nix │ ├── nix.nix │ └── zsh.nix │ ├── dot-files │ ├── tmux.nix │ └── alacritty │ │ └── alacritty.nix │ ├── system.nix │ ├── configuration.nix │ └── environment.nix ├── overlays ├── env-elm-tools.nix ├── env-js-tools.nix ├── env-python.nix ├── env-rust-tools.nix ├── env-emscripten-tools.nix ├── env-php-tools.nix ├── env-gcloud-tools.nix ├── env-git-tools.nix ├── env-go-tools.nix ├── env-jvm-tools.nix ├── env-emacs-tools.nix ├── env-nix-tools.nix ├── env-cpp-tools.nix ├── env-virtualization-tools.nix ├── env-nixos-apps.nix ├── env-darwin-apps.nix ├── base-system.nix └── emacs │ └── packages.nix ├── .gitmodules ├── LICENSE ├── README.md └── bin └── bootstrap /.gitignore: -------------------------------------------------------------------------------- 1 | /configuration.nix 2 | /machine 3 | /machine.nix 4 | -------------------------------------------------------------------------------- /machines/common/dot-files/gnupg/scdaemon.nix: -------------------------------------------------------------------------------- 1 | {}:'' 2 | disable-ccid 3 | card-timeout 1 4 | '' 5 | -------------------------------------------------------------------------------- /machines/common/dot-files/aspell.nix: -------------------------------------------------------------------------------- 1 | {}: '' 2 | data-dir /run/current-system/sw/lib/aspell 3 | '' 4 | -------------------------------------------------------------------------------- /machines/alphaomega/modules/default.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | { 3 | imports = [ 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /machines/alphaomega/dot-files/gtk-3.0/settings.nix: -------------------------------------------------------------------------------- 1 | {}: '' 2 | [Settings] 3 | gtk-key-theme-name = Emacs 4 | '' 5 | -------------------------------------------------------------------------------- /machines/common/dot-files/nixpkgs/config.nix: -------------------------------------------------------------------------------- 1 | {}:'' 2 | { 3 | allowBroken = true; 4 | allowUnfree = true; 5 | } 6 | '' 7 | -------------------------------------------------------------------------------- /machines/theopompos/preferences/keyboard.nix: -------------------------------------------------------------------------------- 1 | {}: 2 | { 3 | enableKeyMapping = true; 4 | remapCapsLockToControl = true; 5 | } 6 | -------------------------------------------------------------------------------- /machines/theopompos/programs/gnupg.nix: -------------------------------------------------------------------------------- 1 | {}: 2 | { 3 | agent.enable = true; 4 | agent.enableSSHSupport = true; 5 | } 6 | -------------------------------------------------------------------------------- /machines/common/dot-files/npmrc.nix: -------------------------------------------------------------------------------- 1 | {}:'' 2 | color=true 3 | depth=0 4 | unicode=true 5 | prefix=~/.node 6 | progress=false 7 | '' 8 | -------------------------------------------------------------------------------- /machines/alphaomega/etc/containers/registries.nix: -------------------------------------------------------------------------------- 1 | {}:'' 2 | [registries.search] 3 | registries = ['docker.io', 'quay.io', "gcr.io", "eu.gcr.io"] 4 | '' 5 | -------------------------------------------------------------------------------- /machines/alphaomega/programs/gnupg.nix: -------------------------------------------------------------------------------- 1 | {config, pkgs, ...}: 2 | { 3 | programs.gnupg.agent = { 4 | enable = true; 5 | enableSSHSupport = true; 6 | }; 7 | } -------------------------------------------------------------------------------- /machines/alphaomega/services/offlineimap.nix: -------------------------------------------------------------------------------- 1 | {config, pkgs, ...}: 2 | { 3 | services.offlineimap = { 4 | enable = false; 5 | install = true; 6 | }; 7 | } 8 | -------------------------------------------------------------------------------- /machines/common/dot-files/gnupg/dirmngr.nix: -------------------------------------------------------------------------------- 1 | {}:'' 2 | keyserver hkp://jirk5u4osbsr34t5.onion 3 | keyserver hkp://keys.gnupg.net 4 | hkp-cacert ~/.gnupg/sks-keyservers.netCA.pem 5 | '' 6 | -------------------------------------------------------------------------------- /overlays/env-elm-tools.nix: -------------------------------------------------------------------------------- 1 | self: super: 2 | { 3 | elmToolsEnv = super.buildEnv { 4 | name = "elmTools"; 5 | paths = [ 6 | self.elmPackages.elm 7 | ]; 8 | }; 9 | } 10 | -------------------------------------------------------------------------------- /overlays/env-js-tools.nix: -------------------------------------------------------------------------------- 1 | self: super: 2 | { 3 | jsToolsEnv = super.buildEnv { 4 | name = "jsTools"; 5 | paths = [ 6 | self.nodejs-10_x 7 | self.yarn 8 | ]; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /overlays/env-python.nix: -------------------------------------------------------------------------------- 1 | self: super: 2 | { 3 | pythonToolsEnv = super.buildEnv { 4 | name = "pythonTools"; 5 | paths = [ 6 | self.python2 7 | self.python3 8 | ]; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /overlays/env-rust-tools.nix: -------------------------------------------------------------------------------- 1 | self: super: 2 | { 3 | rustToolsEnv = super.buildEnv { 4 | name = "rustTools"; 5 | paths = [ 6 | self.rustup 7 | self.rustracer 8 | ]; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /machines/alphaomega/services/dovecot.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ...}: 2 | { 3 | services.dovecot2 = { 4 | enable = true; 5 | enableImap = true; 6 | mailLocation = "maildir:~/.maildirs:LAYOUT=fs"; 7 | }; 8 | } 9 | -------------------------------------------------------------------------------- /overlays/env-emscripten-tools.nix: -------------------------------------------------------------------------------- 1 | self: super: 2 | { 3 | emscriptenToolsEnv = super.buildEnv { 4 | name = "emscriptenTools"; 5 | paths = [ 6 | self.emscripten 7 | self.yasm 8 | ]; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /machines/common/dot-files/curlrc.nix: -------------------------------------------------------------------------------- 1 | {}: '' 2 | user-agent = "Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Firefox/31.0" 3 | referer = ";auto" 4 | connect-timeout = 10 5 | progress-bar 6 | show-error 7 | remote-time 8 | ipv4 9 | '' 10 | -------------------------------------------------------------------------------- /machines/alphaomega/dot-files/Xresources.nix: -------------------------------------------------------------------------------- 1 | {}: '' 2 | #if X_RESOLUTION == 3840 3 | Xft.dpi: 144 4 | #endif 5 | 6 | #if X_RESOLUTION == 2560 7 | Xft.dpi: 144 8 | #endif 9 | 10 | #if X_RESOLUTION == 1920 11 | Xft.dpi: 96 12 | #endif 13 | '' 14 | -------------------------------------------------------------------------------- /overlays/env-php-tools.nix: -------------------------------------------------------------------------------- 1 | self: super: 2 | { 3 | phpToolsEnv = super.buildEnv { 4 | name = "phpTools"; 5 | paths = [ 6 | self.php 7 | self.phpPackages.apcu 8 | self.phpPackages.composer 9 | ]; 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /overlays/env-gcloud-tools.nix: -------------------------------------------------------------------------------- 1 | self: super: 2 | { 3 | gcloudToolsEnv = super.buildEnv { 4 | name = "gcloudTools"; 5 | paths = [ 6 | self.jq 7 | self.kubectx 8 | self.packer 9 | self.stern 10 | ]; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /machines/alphaomega/services/printing.nix: -------------------------------------------------------------------------------- 1 | {config, pkgs, ...}: 2 | { 3 | services.printing = { 4 | enable = true; 5 | drivers = with pkgs; [ 6 | cups-kyocera 7 | cups-kyodialog3 8 | cups-kyocera-bizhub 9 | ]; 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /overlays/env-git-tools.nix: -------------------------------------------------------------------------------- 1 | self: super: 2 | { 3 | gitToolsEnv = super.buildEnv { 4 | name = "gitTools"; 5 | paths = [ 6 | self.gitMinimal 7 | self.gitAndTools.git-extras 8 | self.git-review 9 | self.patchutils 10 | ]; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /machines/alphaomega/dot-files/fonts.nix: -------------------------------------------------------------------------------- 1 | {}:'' 2 | 3 | 4 | 5 | 6 | monospace 7 | 8 | Hack 9 | 10 | 11 | 12 | '' 13 | -------------------------------------------------------------------------------- /machines/common/dot-files/git/ignore.nix: -------------------------------------------------------------------------------- 1 | {}:'' 2 | .dir-locals.el 3 | .bloop 4 | .ensime 5 | .ensime-server.conf 6 | .ensime_cache/ 7 | .importjs.js 8 | .metals/ 9 | .projectile 10 | .tern-port 11 | .term-project 12 | ensime.sbt 13 | ensime-langserver.log 14 | project/.bloop 15 | TAGS 16 | '' 17 | -------------------------------------------------------------------------------- /overlays/env-go-tools.nix: -------------------------------------------------------------------------------- 1 | self: super: 2 | { 3 | goToolsEnv = super.buildEnv { 4 | name = "goTools"; 5 | paths = [ 6 | self.delve 7 | self.go 8 | self.golint 9 | self.go 10 | self.go2nix 11 | self.go-outline 12 | self.gotools 13 | ]; 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /machines/common/dot-files/gnupg/gpg-agent.nix: -------------------------------------------------------------------------------- 1 | {pkgs}: pkgs.lib.optionalString pkgs.stdenv.isDarwin '' 2 | pinentry-program /run/current-system/Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac 3 | '' + '' 4 | default-cache-ttl 600 5 | default-cache-ttl-ssh 600 6 | max-cache-ttl 7200 7 | max-cache-ttl-ssh 7200 8 | enable-ssh-support 9 | '' 10 | -------------------------------------------------------------------------------- /machines/alphaomega/programs/default.nix: -------------------------------------------------------------------------------- 1 | {config, pkgs, ...}: 2 | { 3 | imports =[ 4 | ./gnupg.nix 5 | ./zsh.nix 6 | ]; 7 | 8 | # Some programs need SUID wrappers, can be configured further or are 9 | # started in user sessions. 10 | programs.light.enable = true; 11 | programs.mtr.enable = true; 12 | 13 | security.wrappers.bluetooth.source = "${pkgs.tlp}/bin/bluetooth"; 14 | } 15 | -------------------------------------------------------------------------------- /overlays/env-jvm-tools.nix: -------------------------------------------------------------------------------- 1 | self: super: 2 | { 3 | javaToolsEnv = super.buildEnv { 4 | name = "javaTools"; 5 | paths = [ 6 | self.ant 7 | self.maven 8 | self.jmeter 9 | self.openjdk 10 | ]; 11 | }; 12 | 13 | scalaToolsEnv = super.buildEnv { 14 | name = "scalaTools"; 15 | paths = [ 16 | self.sbt 17 | self.scala 18 | ]; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "nix-darwin"] 2 | path = nix-darwin 3 | url = git@github.com:periklis/nix-darwin.git 4 | [submodule "nixpkgs"] 5 | path = nixpkgs 6 | url = git@github.com:periklis/nixpkgs.git 7 | [submodule "alphaomega"] 8 | path = alphaomega 9 | url = git@github.com:periklis/dot-alphaomega 10 | [submodule "theopompos"] 11 | path = theopompos 12 | url = git@github.com:periklis/dot-theopompos 13 | -------------------------------------------------------------------------------- /overlays/env-emacs-tools.nix: -------------------------------------------------------------------------------- 1 | self: super: 2 | let 3 | emacsWithPkgs = self.emacsWithPackages 4 | (import ./emacs/packages.nix { epkgs = self.emacsPackages; }); 5 | in 6 | { 7 | emacsToolsEnv = super.buildEnv { 8 | name = "emacsTools"; 9 | paths = [ 10 | emacsWithPkgs 11 | self.multimarkdown 12 | self.poppler 13 | self.haskellPackages.pandoc 14 | ]; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /machines/alphaomega/services/default.nix: -------------------------------------------------------------------------------- 1 | {config, pkgs, ...}: 2 | { 3 | imports =[ 4 | ./coredns.nix 5 | ./dovecot.nix 6 | ./offlineimap.nix 7 | ./printing.nix 8 | ./restic.nix 9 | ./throttled.nix 10 | ./udev.nix 11 | ./xserver.nix 12 | ]; 13 | 14 | services.acpid.enable = true; 15 | services.autorandr.enable = false; 16 | services.fwupd.enable = true; 17 | services.printing.enable = true; 18 | services.tlp.enable = true; 19 | } 20 | -------------------------------------------------------------------------------- /overlays/env-nix-tools.nix: -------------------------------------------------------------------------------- 1 | self: super: 2 | { 3 | nixToolsEnv = super.buildEnv { 4 | name = "nixTools"; 5 | paths = [ 6 | self.nix-prefetch-git 7 | self.nix-prefetch-github 8 | self.nix-zsh-completions 9 | ]; 10 | }; 11 | 12 | nixUtilitiesEnv = super.buildEnv { 13 | name = "nixUtilities"; 14 | paths = [ 15 | self.nix-index 16 | self.nix-review 17 | self.nix-top 18 | self.nix-delegate 19 | self.nix-deploy 20 | self.nix-diff 21 | ]; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /machines/alphaomega/dot-files/rofi/config.nix: -------------------------------------------------------------------------------- 1 | {}:'' 2 | rofi.modi: window,run,ssh 3 | rofi.font: Hack 14 4 | rofi.combi-modi: window,run,ssh 5 | rofi.terminal: alacritty 6 | rofi.ssh-command: {terminal} -e /run/current-system/sw/bin/zsh -i -c "{ssh-client} {host}" 7 | rofi.theme: gruvbox-dark 8 | rofi.hide-scrollbar: true 9 | rofi.sidebar-mode: false 10 | rofi.kb-primary-paste: Ctrl+y 11 | rofi.kb-secondary-paste: Insert 12 | rofi.kb-mode-next: Alt+n 13 | rofi.kb-mode-previous: Alt+p 14 | rofi.kb-page-next: Ctrl+v 15 | rofi.kb-page-prev: Alt+v 16 | '' 17 | -------------------------------------------------------------------------------- /machines/alphaomega/programs/zsh.nix: -------------------------------------------------------------------------------- 1 | {config, pkgs, ...}: 2 | { 3 | programs.zsh = { 4 | enable = true; 5 | enableCompletion = false; 6 | syntaxHighlighting = { 7 | enable = true; 8 | highlighters = ["main" "brackets" "pattern"]; 9 | }; 10 | ohMyZsh = { 11 | enable = true; 12 | theme = "powerlevel10k/powerlevel10k"; 13 | }; 14 | promptInit = '' 15 | source $FZF_BASE/share/fzf/completion.zsh 16 | source $FZF_BASE/share/fzf/key-bindings.zsh 17 | source $ZSH_CUSTOM/p10k-lean.zsh 18 | ''; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /machines/common/dot-files/htoprc.nix: -------------------------------------------------------------------------------- 1 | {}:'' 2 | fields=0 48 17 18 38 39 2 46 47 49 1 3 | sort_key=46 4 | sort_direction=1 5 | hide_threads=0 6 | hide_kernel_threads=0 7 | hide_userland_threads=0 8 | shadow_other_users=0 9 | show_thread_names=0 10 | show_program_path=0 11 | highlight_base_name=0 12 | highlight_megabytes=0 13 | highlight_threads=1 14 | tree_view=0 15 | header_margin=0 16 | detailed_cpu_time=0 17 | cpu_count_from_zero=0 18 | update_process_names=0 19 | account_guest_in_cpu_meter=0 20 | color_scheme=0 21 | delay=15 22 | left_meters=AllCPUs Memory Swap 23 | left_meter_modes=1 1 1 24 | right_meters=Tasks LoadAverage Uptime 25 | right_meter_modes=2 2 2 26 | '' 27 | -------------------------------------------------------------------------------- /overlays/env-cpp-tools.nix: -------------------------------------------------------------------------------- 1 | self: super: 2 | { 3 | cppToolsEnv = super.buildEnv { 4 | name = "cppTools"; 5 | paths = [ 6 | self.boost 7 | self.clang-tools 8 | self.cmake 9 | self.cppcheck 10 | self.gdb 11 | self.libcxx 12 | self.libcxxabi 13 | self.qcachegrind 14 | self.rtags 15 | self.stdman 16 | self.valgrind 17 | ]; 18 | }; 19 | 20 | langToolsEnv = super.buildEnv { 21 | name = "langTools"; 22 | paths = [ 23 | self.autoconf 24 | self.automake 25 | self.global 26 | self.gnum4 27 | self.gnumake 28 | self.libtool 29 | self.pkgconfig 30 | ]; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /overlays/env-virtualization-tools.nix: -------------------------------------------------------------------------------- 1 | self: super: 2 | { 3 | # Help derivation to have podman symlinked as docker in $PATH 4 | docker2podman = super.callPackage ({ podman}: self.stdenv.mkDerivation { 5 | name = "docker2podman"; 6 | version = "docker2podman-${podman.version}"; 7 | phases = [ "installPhase"]; 8 | installPhase = '' 9 | mkdir -p $out/bin 10 | ln -s ${podman}/bin/podman $out/bin/docker 11 | ''; 12 | }) {}; 13 | 14 | virtualizationToolsEnv = super.buildEnv { 15 | name = "virtualizationTools"; 16 | paths = [ 17 | self.buildah 18 | self.conmon 19 | # self.docker2podman 20 | self.podman 21 | self.runc 22 | self.skopeo 23 | self.slirp4netns 24 | self.vagrant 25 | ]; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /machines/alphaomega/services/restic.nix: -------------------------------------------------------------------------------- 1 | {config, pkgs, ...}: 2 | { 3 | services.restic.backups.alphaomega = { 4 | initialize = true; 5 | repository = "/run/media/ptsirakidis/hcbackup"; 6 | passwordFile = "/etc/nixos/restic-pw"; 7 | timerConfig = { OnCalendar = "daily"; }; 8 | user = "ptsirakidis"; 9 | paths = [ 10 | "/home/ptsirakidis/.authinfo.gpg" 11 | "/home/ptsirakidis/.ssh" 12 | "/home/ptsirakidis/.newsrc" 13 | "/home/ptsirakidis/.newsrc.eld" 14 | "/home/ptsirakidis/.zsh" 15 | "/home/ptsirakidis/Downloads" 16 | "/home/ptsirakidis/Documents" 17 | "/home/ptsirakidis/Music" 18 | "/home/ptsirakidis/Pictures" 19 | "/home/ptsirakidis/projects" 20 | "/home/ptsirakidis/Videos" 21 | ]; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /machines/theopompos/programs/nix.nix: -------------------------------------------------------------------------------- 1 | { machine, nix }: 2 | { 3 | inherit(machine) distributedBuilds buildMachines; 4 | 5 | package = nix; 6 | 7 | useDaemon = true; 8 | maxJobs = 4; 9 | buildCores = 2; 10 | useSandbox = false; 11 | 12 | trustedUsers = [ "root" ]; 13 | allowedUsers = [ "*" ]; 14 | 15 | envVars = { 16 | OBJC_DISABLE_INITIALIZE_FORK_SAFETY = "YES"; 17 | }; 18 | 19 | extraOptions = '' 20 | keep-derivations = true 21 | show-trace = true 22 | ''; 23 | 24 | nixPath = [ 25 | "darwin=$HOME/projects/periklis/nix-config/nix-darwin" 26 | "darwin-config=$HOME/projects/periklis/nix-config/configuration.nix" 27 | "nixpkgs=/Users/periklis/projects/periklis/nix-config/nixpkgs" 28 | "/nix/var/nix/profiles/per-user/root/channels" 29 | ]; 30 | } 31 | -------------------------------------------------------------------------------- /overlays/env-nixos-apps.nix: -------------------------------------------------------------------------------- 1 | self: super: 2 | { 3 | nixosAppsEnv = super.buildEnv { 4 | name = "nixosApps"; 5 | paths = [ 6 | self.adobeReader 7 | self.corefonts 8 | self.direnv 9 | self.file 10 | self.firefox 11 | self.flameshot 12 | self.gnome3.gnome-tweaks 13 | self.gnupg 14 | self.google-chrome 15 | self.grobi 16 | self.handbrake 17 | self.imagemagick 18 | self.i3lock-fancy 19 | self.i3status-rust 20 | self.killall 21 | self.lsof 22 | self.networkmanagerapplet 23 | self.openfortivpn 24 | self.pa_applet 25 | self.pavucontrol 26 | self.powertop 27 | self.pstree 28 | self.rofi 29 | self.slack 30 | self.xorg.xkbcomp 31 | self.vlc 32 | self.zoom-us 33 | ]; 34 | }; 35 | } 36 | -------------------------------------------------------------------------------- /machines/theopompos/preferences/defaults.nix: -------------------------------------------------------------------------------- 1 | {}: 2 | { 3 | NSGlobalDomain.AppleKeyboardUIMode = 3; 4 | NSGlobalDomain.ApplePressAndHoldEnabled = false; 5 | NSGlobalDomain.AppleShowScrollBars = "WhenScrolling"; 6 | NSGlobalDomain.NSDocumentSaveNewDocumentsToCloud = false; 7 | 8 | dock.autohide = true; 9 | dock.launchanim = false; 10 | dock.orientation = "bottom"; 11 | dock.mru-spaces = false; 12 | dock.show-process-indicators = true; 13 | 14 | finder.QuitMenuItem = true; 15 | finder.FXEnableExtensionChangeWarning = true; 16 | 17 | screencapture.location = "~/Downloads"; 18 | 19 | trackpad.Clicking = true; 20 | trackpad.TrackpadRightClick = true; 21 | trackpad.TrackpadThreeFingerDrag = false; 22 | } 23 | -------------------------------------------------------------------------------- /machines/alphaomega/services/coredns.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ...}: 2 | { 3 | services.coredns = { 4 | enable = true; 5 | config = '' 6 | hc.lan hcg-cloud.internal hcg-dev.internal hcg.cloud hcg-analytics-prod.internal intra.burda.com { 7 | forward . 172.30.10.230 172.30.10.231 8 | errors 9 | cache 600 { 10 | denial 0 11 | prefetch 5 5m 12 | } 13 | } 14 | 15 | fritz.box { 16 | forward . 192.168.178.1 17 | } 18 | 19 | . { 20 | forward . tls://1.1.1.1 tls://1.0.0.1 tls://[2606:4700:4700::1111]:853 tls://[2606:4700:4700::1001]:853 { 21 | except hc.lan hcg-cloud.internal hcg-dev.internal hcg.cloud intranet.burda.com 22 | tls_servername cloudflare-dns.com 23 | expire 2s 24 | } 25 | errors 26 | cache 600 { 27 | denial 5000 600 28 | prefetch 5 5m 29 | } 30 | } 31 | ''; 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /machines/alphaomega/etc/containers/policy.nix: -------------------------------------------------------------------------------- 1 | {}: builtins.toJSON { 2 | default = [ 3 | {type="reject";} 4 | ]; 5 | transports= { 6 | "dir"= { 7 | ""= [ 8 | {type="insecureAcceptAnything";} 9 | ]; 10 | }; 11 | "containers-storage"= { 12 | ""= [ 13 | {type="insecureAcceptAnything";} 14 | ]; 15 | }; 16 | "docker" = { 17 | "docker.io" = [ 18 | {type="insecureAcceptAnything";} 19 | ]; 20 | "quay.io" = [ 21 | {type="insecureAcceptAnything";} 22 | ]; 23 | "gcr.io" = [ 24 | {type="insecureAcceptAnything";} 25 | ]; 26 | "eu.gcr.io" = [ 27 | {type="insecureAcceptAnything";} 28 | ]; 29 | }; 30 | "docker-daemon" = { 31 | "" = [ 32 | {type="insecureAcceptAnything";} 33 | ]; 34 | }; 35 | }; 36 | } 37 | -------------------------------------------------------------------------------- /overlays/env-darwin-apps.nix: -------------------------------------------------------------------------------- 1 | self: super: 2 | { 3 | darwinAppsEnv = super.buildEnv { 4 | name = "darwinApps"; 5 | paths = [ 6 | self.bzip2 7 | self.curl 8 | self.diffutils 9 | self.findutils 10 | self.gawk 11 | self.gnugrep 12 | self.gnused 13 | self.gnupg 14 | self.mtr 15 | self.netcat 16 | self.nix 17 | self.nix-zsh-completions 18 | self.oh-my-zsh 19 | self.openssh 20 | self.patch 21 | self.pinentry_mac 22 | self.reattach-to-user-namespace 23 | self.rsync 24 | self.which 25 | self.zsh-autosuggestions 26 | self.zsh-completions 27 | self.zsh-syntax-highlighting 28 | ]; 29 | }; 30 | 31 | wmToolsEnv = super.buildEnv { 32 | name = "wmTools"; 33 | paths = [ 34 | # self.chunkwm 35 | self.qes 36 | self.skhd 37 | ]; 38 | }; 39 | } 40 | -------------------------------------------------------------------------------- /machines/common/dot-files/gnupg/gpg.nix: -------------------------------------------------------------------------------- 1 | {}:'' 2 | # default-key CREATE_ONE 3 | 4 | #----------------------------- 5 | # behavior 6 | #----------------------------- 7 | 8 | use-agent 9 | no-greeting 10 | no-emit-version 11 | no-comments 12 | keyid-format 0xlong 13 | with-fingerprint 14 | list-options show-uid-validity 15 | verify-options show-uid-validity 16 | 17 | #----------------------------- 18 | # keyserver 19 | #----------------------------- 20 | 21 | keyserver hkp://pool.sks-keyservers.net 22 | keyserver-options no-honor-keyserver-url 23 | keyserver-options include-revoked 24 | 25 | #----------------------------- 26 | # algorithm and ciphers 27 | #----------------------------- 28 | 29 | personal-cipher-preferences AES256 AES192 AES CAST5 30 | personal-digest-preferences SHA512 SHA384 SHA256 SHA224 31 | 32 | cert-digest-algo SHA512 33 | 34 | default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed 35 | '' 36 | -------------------------------------------------------------------------------- /overlays/base-system.nix: -------------------------------------------------------------------------------- 1 | self: super: 2 | { 3 | mailToolsEnv = super.buildEnv { 4 | name = "mailTools"; 5 | paths = [ 6 | self.dovecot 7 | self.offlineimap 8 | ]; 9 | }; 10 | 11 | networkingToolsEnv = super.buildEnv { 12 | name = "networkingTools"; 13 | paths = [ 14 | self.bind 15 | self.nghttp2 16 | self.nmap 17 | self.tcpdump 18 | self.tshark 19 | self.wget 20 | ]; 21 | }; 22 | 23 | systemToolsEnv = super.buildEnv { 24 | name = "systemTools"; 25 | paths = [ 26 | self.alacritty 27 | self.aspell 28 | self.aspellDicts.de 29 | self.aspellDicts.en 30 | self.bat 31 | self.cacert 32 | self.dos2unix 33 | self.exa 34 | self.fd 35 | self.fzf 36 | self.gnutls 37 | self.htop 38 | self.pwgen 39 | self.restic 40 | self.ripgrep 41 | self.shellcheck 42 | self.silver-searcher 43 | self.tree 44 | self.tmux 45 | self.tmux-cssh 46 | self.vim 47 | ]; 48 | }; 49 | } 50 | -------------------------------------------------------------------------------- /machines/alphaomega/dot-files/i3/status.nix: -------------------------------------------------------------------------------- 1 | {}: '' 2 | theme = "solarized-dark" 3 | icons = "awesome" 4 | 5 | [[block]] 6 | block = "backlight" 7 | device = "intel_backlight" 8 | 9 | [[block]] 10 | block = "sound" 11 | 12 | [[block]] 13 | block = "battery" 14 | device = "BAT0" 15 | interval = 10 16 | show = "percentage" 17 | 18 | [[block]] 19 | block = "battery" 20 | device = "BAT1" 21 | interval = 10 22 | show = "percentage" 23 | 24 | [[block]] 25 | block = "disk_space" 26 | path = "/" 27 | alias = "/" 28 | info_type = "available" 29 | unit = "GB" 30 | interval = 20 31 | warning = 20.0 32 | alert = 10.0 33 | 34 | [[block]] 35 | block = "memory" 36 | display_type = "memory" 37 | format_mem = "{Mup}%" 38 | format_swap = "{SUp}%" 39 | 40 | [[block]] 41 | block = "cpu" 42 | interval = 1 43 | 44 | [[block]] 45 | block = "load" 46 | interval = 1 47 | format = "{1m} {5m} {15m}" 48 | 49 | [[block]] 50 | block = "net" 51 | device = "wlp3s0" 52 | ssid = true 53 | ip = true 54 | interval = 5 55 | speed_up = false 56 | speed_down = false 57 | 58 | [[block]] 59 | block = "time" 60 | interval = 60 61 | format = "%a %Y-%m-%d %R" 62 | '' 63 | -------------------------------------------------------------------------------- /machines/alphaomega/services/xserver.nix: -------------------------------------------------------------------------------- 1 | {config, pkgs, ...}: 2 | { 3 | services.xserver = { 4 | enable = true; 5 | enableCtrlAltBackspace = true; 6 | 7 | displayManager.gdm.enable = true; 8 | 9 | desktopManager = { 10 | default = "none"; 11 | xterm.enable = false; 12 | gnome3.enable = true; 13 | }; 14 | 15 | inputClassSections = [ 16 | '' 17 | Identifier "Trackpoint Wheel Emulation" 18 | MatchProduct "ThinkPad USB Keyboard with TrackPoint" 19 | Option "EmulateWheel" "true" 20 | Option "EmulateWheelButton" "2" 21 | Option "Emulate3Buttons" "false" 22 | Option "XkbModel" "pc105" 23 | Option "XkbLayout" "us,gr" 24 | Option "XkbVariant" ",extended" 25 | Option "XKbOptions" "grp:alt_space_toggle,ctrl:nocaps,terminate:ctrl_alt_bksp,eurosign:e" 26 | '' 27 | ]; 28 | 29 | libinput = { 30 | enable = true; 31 | disableWhileTyping = true; 32 | middleEmulation = true; 33 | naturalScrolling = true; 34 | }; 35 | 36 | useGlamor = true; 37 | 38 | videoDrivers = [ "intel" ]; 39 | }; 40 | } 41 | -------------------------------------------------------------------------------- /machines/alphaomega/services/udev.nix: -------------------------------------------------------------------------------- 1 | {config, pkgs, ...}: 2 | { 3 | services.udev.extraRules = '' 4 | SUBSYSTEM=="pci", ATTR{power/control}="auto" 5 | 6 | # power autocontrol for all devices 7 | ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{power/control}="auto" 8 | 9 | # power off usb smart card reader 10 | ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="058f", ATTR{idProduct}=="9540", TEST=="power/control", ATTR{power/control}="off" 11 | 12 | # power off usb smart card reader 13 | ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="0316", TEST=="power/control", ATTR{power/control}="off" 14 | 15 | # power off integraged IR camera 16 | ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="04f2", ATTR{idProduct}=="b613", TEST =="power/control", ATTR{power/control}="off" 17 | 18 | # power off fibocom wwan device 19 | ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="2cb7", ATTR{idProduct}=="0210", TEST =="power/control", ATTR{power/control}="off" 20 | 21 | # disable bluetooth 22 | SUBSYSTEM=="rfkill", ATTR{type}=="bluetooth", ATTR{state}="0" 23 | ''; 24 | } 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Periklis Tsirakidis 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /machines/theopompos/dot-files/tmux.nix: -------------------------------------------------------------------------------- 1 | { bash }: '' 2 | set -g default-terminal "screen-256color" 3 | set -g default-shell "/run/current-system/sw/bin/zsh" 4 | set-option -g default-command "reattach-to-user-namespace -l /run/current-system/sw/bin/zsh" 5 | set -g escape-time 10 6 | set -g focus-events on 7 | set -g monitor-activity off 8 | set -g visual-activity off 9 | set -g visual-bell off 10 | set -g visual-silence off 11 | set -g bell-action none 12 | setw -g mode-keys emacs 13 | set -g history-limit 5000 14 | set -g status-keys emacs 15 | set -g status-interval 5 16 | set -g base-index 1 17 | set -g pane-base-index 1 18 | set -g prefix C-z 19 | 20 | # length of tmux status line 21 | set -g status-left-length 30 22 | set -g status-right-length 150 23 | 24 | set -g pane-active-border-fg colour8 25 | set -g status-position bottom 26 | set -g status-left '#[bg=colour8]#[fg=colour7] #S #[bg=colour3]#[fg=colour8] ' 27 | set -g status-right '#[fg=colour8]#[bg=colour3]#[fg=colour7]#[bg=colour8] #H #[bg=colour3]#[fg=colour0] %a %D %T ' 28 | 29 | # Set the background color 30 | set -g status-bg colour3 31 | 32 | bind | split-window -h -c "#{pane_current_path}" 33 | bind - split-window -v -c "#{pane_current_path}" 34 | unbind '"' 35 | unbind % 36 | '' 37 | -------------------------------------------------------------------------------- /machines/theopompos/system.nix: -------------------------------------------------------------------------------- 1 | { activationScripts }: 2 | { 3 | activationScripts.extraUserActivation.text = activationScripts.extraUserActivation.text + '' 4 | mkdir -p ~/.gnupg 5 | mkdir -p ~/.cache 6 | mkdir -p ~/.gnus 7 | mkdir -p ~/.config/alacritty 8 | mkdir -p ~/.config/darktooth 9 | mkdir -p ~/.config/git 10 | mkdir -p ~/.config/htop 11 | mkdir -p ~/.config/nixpkgs 12 | mkdir -p ~/.tmux 13 | 14 | ln -sf /etc/dot-files/aspell.conf ~/.aspell.conf 15 | ln -sf /etc/dot-files/curlrc ~/.curlrc 16 | ln -sf /etc/dot-files/ctags ~/.ctags 17 | ln -sf /etc/dot-files/darktooth/darktooth.sh ~/.config/darktooth/ 18 | ln -sf /etc/dot-files/htoprc ~/.config/htop 19 | ln -sf /etc/dot-files/git/ignore ~/.config/git 20 | ln -sf /etc/dot-files/gnupg/dirmngr.conf ~/.gnupg 21 | ln -sf /etc/dot-files/gnupg/gpg-agent.conf ~/.gnupg 22 | ln -sf /etc/dot-files/gnupg/gpg.conf ~/.gnupg 23 | ln -sf /etc/dot-files/gnupg/scdaemon.conf ~/.gnupg 24 | ln -sf /etc/dot-files/gnupg/sks-keyservers.netCA.pem ~/.gnupg 25 | ln -sf /etc/dot-files/nixpkgs/config.nix ~/.config/nixpkgs 26 | ln -sf /etc/dot-files/npmrc ~/.npmrc 27 | 28 | ln -sf /etc/dot-files/theopompos/alacritty/alacritty.yml ~/.config/alacritty/ 29 | ln -sf /etc/dot-files/theopompos/tmux.conf ~/.tmux.conf 30 | ''; 31 | 32 | defaults = import ./preferences/defaults.nix {}; 33 | stateVersion = 3; 34 | } 35 | -------------------------------------------------------------------------------- /machines/alphaomega/dot-files/grobi.nix: -------------------------------------------------------------------------------- 1 | {}:'' 2 | # These are the rules grobi tries to match to the current output configuration. 3 | # The rules are evaluated top to bottom, the first matching rule is applied and 4 | # processing stops. 5 | # 6 | # The rules belowe are written for a typical Laptop in mind, which hase several 7 | # external connectors (DP2, HDMI) in addition to the internal display 8 | # (eDP1). It may even be placed in a Docking Station, which adds more outputs 9 | # that aren't present outside it. 10 | rules: 11 | 12 | # This is a rule for a homeoffice's docking station. 13 | - name: HomeOffice 14 | outputs_connected: [eDP1, DP2] 15 | outputs_present: [DP2] 16 | configure_single: DP2 17 | atomic: true 18 | primary: DP2 19 | execute_after: 20 | - xrandr --dpi 96 21 | - i3-msg restart 22 | - xkbcomp /etc/X11/keymap.xkb $DISPLAY 23 | 24 | # This is a rule for a office's docking station. 25 | - name: Office 26 | outputs_connected: [eDP1, DP2] 27 | outputs_present: [DP2] 28 | configure_single: DP2 29 | atomic: true 30 | primary: DP2 31 | execute_after: 32 | - xrandr --dpi 192 33 | - i3-msg restart 34 | - xkbcomp /etc/X11/keymap.xkb $DISPLAY 35 | 36 | # This is a rule for mobile computing, i.e. outside of the docking station defined above. 37 | - name: Mobile 38 | outputs_connected: [eDP1, DP2] 39 | outputs_present: [eDP1] 40 | outputs_disconnected: [DP2] 41 | configure_single: eDP1 42 | primary: eDP1 43 | execute_after: 44 | - xrandr --dpi 192 45 | - i3-msg restart 46 | 47 | - name: Fallback 48 | configure_single: eDP1 49 | '' 50 | -------------------------------------------------------------------------------- /machines/theopompos/configuration.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | let 3 | machine = import ../../machine.nix { inherit lib pkgs; }; 4 | 5 | inherit(machine) activationScripts etc launchd machinePackages networking nix services; 6 | in 7 | { 8 | inherit launchd networking; 9 | 10 | # 11 | # System environment 12 | # 13 | environment = import ./environment.nix 14 | { inherit config etc lib machinePackages pkgs; }; 15 | 16 | # 17 | # Fonts 18 | # 19 | fonts = { 20 | enableFontDir = true; 21 | fonts = with pkgs; [ hack-font ]; 22 | }; 23 | 24 | # 25 | # Nix & Nixpkgs 26 | # 27 | nix = import ./programs/nix.nix { 28 | machine = nix; 29 | inherit(pkgs) nix; 30 | }; 31 | 32 | nixpkgs = { 33 | config = { 34 | allowUnfree = true; 35 | allowBroken = true; 36 | }; 37 | 38 | overlays = let path = ../../overlays; in with builtins; 39 | map (n: import (path + ("/" + n))) 40 | (filter (n: (match ".*\\.nix" n != null && match ".*nixos\-apps.*" n == null) || 41 | pathExists (path + ("/" + n + "/default.nix"))) 42 | (attrNames (readDir path))); 43 | }; 44 | 45 | # 46 | # Programs 47 | # 48 | programs = { 49 | gnupg = import ./programs/gnupg.nix {}; 50 | info.enable = true; 51 | man.enable = true; 52 | nix-index.enable = true; 53 | zsh = import ./programs/zsh.nix {}; 54 | }; 55 | 56 | # 57 | # Services 58 | # 59 | services = services // { 60 | activate-system.enable = true; 61 | nix-daemon.enable = true; 62 | }; 63 | 64 | # 65 | # System configuration 66 | # 67 | system = import ./system.nix 68 | { inherit activationScripts; }; 69 | 70 | time.timeZone = "Europe/Berlin"; 71 | } 72 | -------------------------------------------------------------------------------- /machines/theopompos/programs/zsh.nix: -------------------------------------------------------------------------------- 1 | {}: 2 | { 3 | enable = true; 4 | enableCompletion = true; 5 | enableFzfCompletion = true; 6 | enableFzfHistory = true; 7 | enableSyntaxHighlighting = true; 8 | 9 | loginShellInit = '' 10 | nixBuildOut() { 11 | nix-store --tree -q $(nix-store -q --outputs $(nix-instantiate '' -A $1)) 12 | } 13 | 14 | nixBuildBindingAs() { 15 | nix-store -q --referrers $(nix-store -q --binding $1 $(nix-store -qd $(which $2))) 16 | } 17 | 18 | nixBuildDeps() { 19 | nix-store --tree -q $(nix-instantiate '' -A $1) 20 | } 21 | 22 | nixRuntimeDeps() { 23 | nix-store -q --tree $(nix-store -qR $(nix-instantiate '' -A $1)) 24 | } 25 | 26 | nixCheckUpdates() { 27 | for p in $(nix-env -f '' -q); 28 | do 29 | nix-env -f '' -i --dry-run $p 30 | done 31 | } 32 | 33 | nixEnvRebuild() { 34 | for p in $(nix-env -f '' -q); 35 | do 36 | local res=$(nix-env -f '' -i --dry-run $p 2>&1 | grep -cE "derivations|paths") 37 | if [ "$res" -gt "0" ]; then 38 | nix-env -f '' -i $p 39 | fi 40 | done 41 | } 42 | ''; 43 | 44 | interactiveShellInit = '' 45 | plugins=( 46 | cp 47 | docker 48 | docker-compose 49 | emacs 50 | git 51 | git-extras 52 | history 53 | history-substring-search 54 | kubectl 55 | man 56 | nix 57 | node 58 | npm 59 | osx 60 | sbt 61 | scala 62 | sudo 63 | themes 64 | vagrant 65 | yarn 66 | web-search 67 | ) 68 | ''; 69 | 70 | promptInit = '' 71 | autoload -U promptinit && promptinit && prompt walters 72 | source $ZSH/oh-my-zsh.sh 73 | ''; 74 | } 75 | -------------------------------------------------------------------------------- /machines/alphaomega/services/throttled.nix: -------------------------------------------------------------------------------- 1 | {config, pkgs, ...}: 2 | { 3 | services.throttled = { 4 | enable = true; 5 | extraConfig = '' 6 | [GENERAL] 7 | # Enable or disable the script execution 8 | Enabled: True 9 | # SYSFS path for checking if the system is running on AC power 10 | Sysfs_Power_Path: /sys/class/power_supply/AC*/online 11 | 12 | ## Settings to apply while connected to Battery power 13 | [BATTERY] 14 | # Update the registers every this many seconds 15 | Update_Rate_s: 30 16 | # Max package power for time window #1 17 | PL1_Tdp_W: 29 18 | # Time window #1 duration 19 | PL1_Duration_s: 28 20 | # Max package power for time window #2 21 | PL2_Tdp_W: 44 22 | # Time window #2 duration 23 | PL2_Duration_S: 0.002 24 | # Max allowed temperature before throttling 25 | Trip_Temp_C: 85 26 | # Set cTDP to normal=0, down=1 or up=2 (EXPERIMENTAL) 27 | cTDP: 0 28 | 29 | ## Settings to apply while connected to AC power 30 | [AC] 31 | # Update the registers every this many seconds 32 | Update_Rate_s: 5 33 | # Max package power for time window #1 34 | PL1_Tdp_W: 44 35 | # Time window #1 duration 36 | PL1_Duration_s: 28 37 | # Max package power for time window #2 38 | PL2_Tdp_W: 44 39 | # Time window #2 duration 40 | PL2_Duration_S: 0.002 41 | # Max allowed temperature before throttling 42 | Trip_Temp_C: 97 43 | # Set HWP energy performance hints to 'performance' on high load (EXPERIMENTAL) 44 | HWP_Mode: true 45 | # Set cTDP to normal=0, down=1 or up=2 (EXPERIMENTAL) 46 | cTDP: 0 47 | 48 | [UNDERVOLT.BATTERY] 49 | # CPU core voltage offset (mV) 50 | CORE: 0 51 | # Integrated GPU voltage offset (mV) 52 | GPU: 0 53 | # CPU cache voltage offset (mV) 54 | CACHE: 0 55 | # System Agent voltage offset (mV) 56 | UNCORE: 0 57 | # Analog I/O voltage offset (mV) 58 | ANALOGIO: 0 59 | 60 | [UNDERVOLT.AC] 61 | # CPU core voltage offset (mV) 62 | CORE: 0 63 | # Integrated GPU voltage offset (mV) 64 | GPU: 0 65 | # CPU cache voltage offset (mV) 66 | CACHE: 0 67 | # System Agent voltage offset (mV) 68 | UNCORE: 0 69 | # Analog I/O voltage offset (mV) 70 | ANALOGIO: 0 71 | ''; 72 | }; 73 | } 74 | -------------------------------------------------------------------------------- /machines/common/dot-files/gnupg/sks-keyservers.nix: -------------------------------------------------------------------------------- 1 | {}: '' 2 | -----BEGIN CERTIFICATE----- 3 | MIIFizCCA3OgAwIBAgIJAK9zyLTPn4CPMA0GCSqGSIb3DQEBBQUAMFwxCzAJBgNV 4 | BAYTAk5PMQ0wCwYDVQQIDARPc2xvMR4wHAYDVQQKDBVza3Mta2V5c2VydmVycy5u 5 | ZXQgQ0ExHjAcBgNVBAMMFXNrcy1rZXlzZXJ2ZXJzLm5ldCBDQTAeFw0xMjEwMDkw 6 | MDMzMzdaFw0yMjEwMDcwMDMzMzdaMFwxCzAJBgNVBAYTAk5PMQ0wCwYDVQQIDARP 7 | c2xvMR4wHAYDVQQKDBVza3Mta2V5c2VydmVycy5uZXQgQ0ExHjAcBgNVBAMMFXNr 8 | cy1rZXlzZXJ2ZXJzLm5ldCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC 9 | ggIBANdsWy4PXWNUCkS3L//nrd0GqN3dVwoBGZ6w94Tw2jPDPifegwxQozFXkG6I 10 | 6A4TK1CJLXPvfz0UP0aBYyPmTNadDinaB9T4jIwd4rnxl+59GiEmqkN3IfPsv5Jj 11 | MkKUmJnvOT0DEVlEaO1UZIwx5WpfprB3mR81/qm4XkAgmYrmgnLXd/pJDAMk7y1F 12 | 45b5zWofiD5l677lplcIPRbFhpJ6kDTODXh/XEdtF71EAeaOdEGOvyGDmCO0GWqS 13 | FDkMMPTlieLA/0rgFTcz4xwUYj/cD5e0ZBuSkYsYFAU3hd1cGfBue0cPZaQH2HYx 14 | Qk4zXD8S3F4690fRhr+tki5gyG6JDR67aKp3BIGLqm7f45WkX1hYp+YXywmEziM4 15 | aSbGYhx8hoFGfq9UcfPEvp2aoc8u5sdqjDslhyUzM1v3m3ZGbhwEOnVjljY6JJLx 16 | MxagxnZZSAY424ZZ3t71E/Mn27dm2w+xFRuoy8JEjv1d+BT3eChM5KaNwrj0IO/y 17 | u8kFIgWYA1vZ/15qMT+tyJTfyrNVV/7Df7TNeWyNqjJ5rBmt0M6NpHG7CrUSkBy9 18 | p8JhimgjP5r0FlEkgg+lyD+V79H98gQfVgP3pbJICz0SpBQf2F/2tyS4rLm+49rP 19 | fcOajiXEuyhpcmzgusAj/1FjrtlynH1r9mnNaX4e+rLWzvU5AgMBAAGjUDBOMB0G 20 | A1UdDgQWBBTkwyoJFGfYTVISTpM8E+igjdq28zAfBgNVHSMEGDAWgBTkwyoJFGfY 21 | TVISTpM8E+igjdq28zAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4ICAQAR 22 | OXnYwu3g1ZjHyley3fZI5aLPsaE17cOImVTehC8DcIphm2HOMR/hYTTL+V0G4P+u 23 | gH+6xeRLKSHMHZTtSBIa6GDL03434y9CBuwGvAFCMU2GV8w92/Z7apkAhdLToZA/ 24 | X/iWP2jeaVJhxgEcH8uPrnSlqoPBcKC9PrgUzQYfSZJkLmB+3jEa3HKruy1abJP5 25 | gAdQvwvcPpvYRnIzUc9fZODsVmlHVFBCl2dlu/iHh2h4GmL4Da2rRkUMlbVTdioB 26 | UYIvMycdOkpH5wJftzw7cpjsudGas0PARDXCFfGyKhwBRFY7Xp7lbjtU5Rz0Gc04 27 | lPrhDf0pFE98Aw4jJRpFeWMjpXUEaG1cq7D641RpgcMfPFvOHY47rvDTS7XJOaUT 28 | BwRjmDt896s6vMDcaG/uXJbQjuzmmx3W2Idyh3s5SI0GTHb0IwMKYb4eBUIpQOnB 29 | cE77VnCYqKvN1NVYAqhWjXbY7XasZvszCRcOG+W3FqNaHOK/n/0ueb0uijdLan+U 30 | f4p1bjbAox8eAOQS/8a3bzkJzdyBNUKGx1BIK2IBL9bn/HravSDOiNRSnZ/R3l9G 31 | ZauX0tu7IIDlRCILXSyeazu0aj/vdT3YFQXPcvt5Fkf5wiNTo53f72/jYEJd6qph 32 | WrpoKqrwGwTpRUCMhYIUt65hsTxCiJJ5nKe39h46sg== 33 | -----END CERTIFICATE----- 34 | '' 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # nix-config 2 | 3 | This project defines my declarative multi-machine configuration for NixOS and macOS. It is based [nix][nixos] and [nix-darwin][nix-darwin]. It is based upon sub-modules for tracking dependencies (e.g. machine specific dot-files, secret files). 4 | 5 | # Rationale 6 | 7 | The main objective for this project is to have single machine configurations in addition to machine dependent configurations. The setup of new machine should be as easy as running a single script beyond creating access credentials to repositories. 8 | 9 | The following requirements are met: 10 | - Single script bootstrap process 11 | - Shareable across machines 12 | - Shareable across architectures 13 | - Extensible for machine-specific and per-user specific configurations 14 | - Follows a declarative programming model for the system configuration 15 | - Explicit dependency management for `nix-darwin`, `nixpkgs` and machine configurations 16 | - Integration of Emacs package management 17 | 18 | The following requirements are missing: 19 | 20 | - Pinning for dependencies 21 | - Integration of [dot-emacs][dot-emacs] configuration 22 | - Integration of Applications management (e.g. [jwiegley's apps overlay](https://github.com/jwiegley/nix-config/blob/master/overlays/30-apps.nix)) 23 | 24 | # Bootstrap 25 | 26 | To bootstrap this project a new macOS machine, you have to run the following script only: 27 | 28 | ```Shell 29 | $ curl https://raw.githubusercontent.com/periklis/nix-config/master/bin/bootstrap | \ 30 | bash -s -- $USERNAME $MACHINE_NAME $TARGET_NIXPGS_BRANCH $ARCH 31 | ``` 32 | 33 | # Acknowledgments 34 | This in projects is inspired on the work of other giants in the open source community, thus i would like to thank: 35 | - [John Wiegley's][jwiegley] inspiring [nix-config][nix-jw-config] 36 | - [Daiderd Jordan][lnl7] for the amazing [nix-darwin][nix-darwin] 37 | - [Matthew Justin Bauer][matthewbauer] for the single script bootstrap idea in [bauer][bauer-nix] 38 | 39 | # License 40 | 41 | **nix-config** is licensed under the MIT license, available at http://opensource.org/licenses/MIT and also in the [LICENSE](https://github.com/periklis/nix-config/blob/master/LICENSE) file. 42 | 43 | [bauer-nix]: https://github.com/matthewbauer/bauer 44 | [dot-emacs]: https://github.com/periklis/dot-emacs 45 | [jwiegley]: https://github.com/jwiegley/ 46 | [lnl7]: https://github.com/lnl7/ 47 | [matthewbauer]: https://github.com/matthewbauer/ 48 | [nixos]: https://github.com/nixos 49 | [nix-darwin]: https://github.com/lnl7/nix-darwin 50 | [nix-jw-config]: https://github.com/jwiegley/nix-config 51 | -------------------------------------------------------------------------------- /machines/common/dot-files/ctags.nix: -------------------------------------------------------------------------------- 1 | {}: '' 2 | # Basic options 3 | --recurse=yes 4 | --sort=yes 5 | --tag-relative=yes 6 | --exclude=.git 7 | --exclude=.hg 8 | --exclude=min 9 | --exclude=vendor 10 | --exclude=\*.min.\* 11 | --exclude=\*.map 12 | --exclude=\*.swp 13 | --exclude=\*.bak 14 | --exclude=tags 15 | --exclude=TAGS 16 | --exclude=node_modules 17 | --exclude=bower_components 18 | --exclude=test 19 | --exclude=tests 20 | --exclude=.nyc_cache 21 | --exclude=.nyc_output 22 | --exclude=server-dist 23 | --exclude=test-output 24 | 25 | # --langdef=elm 26 | # --langmap=elm:.elm 27 | # --regex-elm=/^module[ \t]*([A-Z][a-zA-Z0-9'_.]*)/\1/m,module/ 28 | # --regex-elm=/^type[ \t]*([A-Z][a-zA-Z0-9'_]*)./\1/t,type/ 29 | # --regex-elm=/^([a-z_][a-zA-Z0-9'_]*).*=/\1/v,function/ 30 | 31 | --langdef=haskell 32 | --langmap=haskell:.hs 33 | --regex-haskell=/^module[ \t]*([A-Z][a-zA-Z0-9'_.]*)/\1/m,module/ 34 | --regex-haskell=/^(new)?type[ \t]*([A-Z][a-zA-Z0-9'_]*)./\2/t,type/ 35 | --regex-haskell=/^class[ \t]*([A-Z][a-zA-Z0-9'_]*)/\1/c,class/ 36 | --regex-haskell=/^data[ \t]*([A-Z][a-zA-Z0-9'_]*)/\1/d,data/ 37 | --regex-haskell=/^([a-z_][a-zA-Z0-9'_]*).*=/\1/v,function/ 38 | 39 | --langdef=golang 40 | --langmap=golang:.go 41 | --regex-golang=/func([ \t]+\([^)]+\))?[ \t]+([a-zA-Z0-9_]+)/\2/d,func/ 42 | --regex-golang=/var[ \t]+([a-zA-Z_][a-zA-Z0-9_]+)/\1/v,var/ 43 | --regex-golang=/type[ \t]+([a-zA-Z_][a-zA-Z0-9_]+)/\1/t,type/ 44 | 45 | --langdef=scss 46 | --langmap=scss:.scss.sass 47 | --regex-scss=/^[ \t]*@mixin ([A-Za-z0-9_-]+)/\1/m,mixin,mixins/ 48 | --regex-scss=/^[ \t]*\$([A-Za-z0-9_-]+)/\1/v,variable,variables/ 49 | --regex-scss=/^[ \t]*\.([A-Za-z0-9_-]+)/.\1/c,class,classes/ 50 | --regex-scss=/^[ \t]*&\.([A-Za-z0-9_-]+)/.\1/c,class,classes/ 51 | --regex-scss=/^[ \t]*#([A-Za-z0-9_-]+)/#\1/i,id,ids/ 52 | --regex-scss=/^[ \t]*(([A-Za-z0-9_-]+[ \t\n,]+)+)\{/\1/t,tag,tags/ 53 | --regex-scss=/^[ \t]*@media\s+([A-Za-z0-9_-]+)/\1/m,media,medias/ 54 | 55 | --langdef=typescript 56 | --langmap=typescript:.ts 57 | --langmap=typescript:+.tsx 58 | --regex-typescript=/^[ \t]*(export)?[ \t]*class[ \t]+([a-zA-Z0-9_]+)/\2/c,classes/ 59 | --regex-typescript=/^[ \t]*(export)?[ \t]*module[ \t]+([a-zA-Z0-9_]+)/\2/n,modules/ 60 | --regex-typescript=/^[ \t]*(export)?[ \t]*function[ \t]+([a-zA-Z0-9_]+)/\2/f,functions/ 61 | --regex-typescript=/^[ \t]*export[ \t]+var[ \t]+([a-zA-Z0-9_]+)/\1/v,variables/ 62 | --regex-typescript=/^[ \t]*var[ \t]+([a-zA-Z0-9_]+)[ \t]*=[ \t]*function[ \t]*\(\)/\1/l,varlambdas/ 63 | --regex-typescript=/^[ \t]*(export)?[ \t]*(public|private)[ \t]+(static)?[ \t]*([a-zA-Z0-9_]+)/\4/m,members/ 64 | --regex-typescript=/^[ \t]*(export)?[ \t]*interface[ \t]+([a-zA-Z0-9_]+)/\2/i,interfaces/ 65 | --regex-typescript=/^[ \t]*(export)?[ \t]*enum[ \t]+([a-zA-Z0-9_]+)/\2/e,enums/ 66 | --regex-typescript=/^[ \t]*import[ \t]+([a-zA-Z0-9_]+)/\1/I,imports/ 67 | '' 68 | -------------------------------------------------------------------------------- /machines/alphaomega/dot-files/tmux.nix: -------------------------------------------------------------------------------- 1 | { bash }: '' 2 | set -g default-terminal "screen-256color" 3 | set -g default-shell "/run/current-system/sw/bin/zsh" 4 | set -g escape-time 10 5 | set -g focus-events on 6 | set -g monitor-activity off 7 | set -g visual-activity off 8 | set -g visual-bell off 9 | set -g visual-silence off 10 | set -g bell-action none 11 | setw -g mode-keys emacs 12 | set -g history-limit 10000 13 | set -g status-keys emacs 14 | set -g base-index 1 15 | set -g pane-base-index 1 16 | set -g prefix C-z 17 | 18 | # 19 | # Powerline Blue - Tmux Theme 20 | # Created by Jim Myhrberg . 21 | # 22 | # Inspired by vim-powerline: https://github.com/Lokaltog/powerline 23 | # 24 | # Requires terminal to be using a powerline compatible font, find one here: 25 | # https://github.com/Lokaltog/powerline-fonts 26 | # 27 | 28 | # Status update interval 29 | set -g status-interval 1 30 | 31 | # Basic status bar colors 32 | set -g status-style fg=colour238,bg=colour233 33 | 34 | # Left side of status bar 35 | set -g status-left-style bg=colour233,fg=colour243 36 | set -g status-left-length 40 37 | set -g status-left "#[fg=colour232,bg=colour24,bold] #S #[fg=colour24,bg=colour240,nobold]#[fg=colour233,bg=colour240] #(whoami) #[fg=colour240,bg=colour235]#[fg=colour240,bg=colour235] #I:#P #[fg=colour235,bg=colour233,nobold]" 38 | 39 | # Right side of status bar 40 | set -g status-right-style bg=colour233,fg=colour243 41 | set -g status-right-length 150 42 | set -g status-right "#[fg=colour235,bg=colour233]#[fg=colour240,bg=colour235] %H:%M:%S #[fg=colour240,bg=colour235]#[fg=colour233,bg=colour240] %d-%b-%y #[fg=colour245,bg=colour240]#[fg=colour233,bg=colour240,bold] #(${bash}/bin/bash ~/.tmux/plugins/kube.tmux) " 43 | 44 | # Window status 45 | set -g window-status-format " #I:#W#F " 46 | set -g window-status-current-format "#[fg=colour233,bg=black]#[fg=colour33,nobold] #I:#W#F #[fg=colour233,bg=black,nobold]" 47 | 48 | # Current window status 49 | set -g window-status-current-style bg=colour100,fg=colour235 50 | 51 | # Window with activity status 52 | set -g window-status-activity-style bg=colour233,fg=colour245 53 | 54 | # Window separator 55 | set -g window-status-separator "" 56 | 57 | # Window status alignment 58 | set -g status-justify left 59 | 60 | # Pane border 61 | set -g pane-border-style bg=default,fg=colour238 62 | 63 | # Active pane border 64 | set -g pane-active-border-style bg=default,fg=colour24 65 | 66 | # Pane number indicator 67 | set -g display-panes-colour colour233 68 | set -g display-panes-active-colour colour245 69 | 70 | # Clock mode 71 | set -g clock-mode-colour colour24 72 | set -g clock-mode-style 24 73 | 74 | # Message 75 | set -g message-style bg=colour24,fg=black 76 | 77 | # Command message 78 | set -g message-command-style bg=colour233,fg=black 79 | 80 | # Mode 81 | set -g mode-style bg=colour24,fg=colour231 82 | 83 | bind | split-window -h -c "#{pane_current_path}" 84 | bind - split-window -v -c "#{pane_current_path}" 85 | unbind '"' 86 | unbind % 87 | '' 88 | -------------------------------------------------------------------------------- /overlays/emacs/packages.nix: -------------------------------------------------------------------------------- 1 | pkgs: epkgs: with epkgs; 2 | [ 3 | ace-window 4 | alert 5 | async 6 | auto-compile 7 | auto-yasnippet 8 | bbdb 9 | bind-key 10 | cargo 11 | cmake-ide 12 | # cmake-mode 13 | # color-theme-solarized 14 | company 15 | company-c-headers 16 | company-go 17 | company-quickhelp 18 | # company-lsp 19 | company-jedi 20 | # company-rtags 21 | company-tern 22 | counsel-bbdb 23 | counsel-projectile 24 | counsel-tramp 25 | darktooth-theme 26 | deferred 27 | diminish 28 | dired-narrow 29 | direnv 30 | docker 31 | docker-compose-mode 32 | docker-tramp 33 | dockerfile-mode 34 | duplicate-thing 35 | ecb 36 | elm-mode 37 | elm-yasnippets 38 | # elpy 39 | emamux 40 | ensime 41 | eslintd-fix 42 | exec-path-from-shell 43 | expand-region 44 | eyebrowse 45 | f 46 | flx 47 | flx-ido 48 | flycheck 49 | flycheck-elm 50 | flycheck-haskell 51 | flycheck-inline 52 | flycheck-pos-tip 53 | # flycheck-rtags 54 | flycheck-rust 55 | geben 56 | ghc 57 | git-gutter 58 | git-timemachine 59 | gitconfig-mode 60 | gitignore-mode 61 | go-dlv 62 | go-eldoc 63 | go-errcheck 64 | go-fill-struct 65 | go-gen-test 66 | go-guru 67 | go-imenu 68 | go-impl 69 | go-imports 70 | go-mode 71 | go-projectile 72 | go-rename 73 | go-snippets 74 | gotest 75 | google-c-style 76 | google-maps 77 | google-translate 78 | groovy-imports 79 | groovy-mode 80 | gruvbox-theme 81 | guess-language 82 | hardcore-mode 83 | haskell-mode 84 | hcl-mode 85 | helpful 86 | highlight-numbers 87 | highlight-symbol 88 | import-js 89 | interleave 90 | itail 91 | ivy 92 | ivy-rich 93 | javadoc-lookup 94 | jedi 95 | jinja2-mode 96 | js2-mode 97 | js2-refactor 98 | json-mode 99 | json-reformat 100 | json-snatcher 101 | let-alist 102 | list-environment 103 | # lsp-mode 104 | # lsp-ui 105 | macrostep 106 | magit 107 | markdown-mode 108 | markdown-preview-mode 109 | multi-term 110 | nix-mode 111 | nix-sandbox 112 | nord-theme 113 | nov 114 | one-themes 115 | org 116 | org-projectile 117 | orgit 118 | ox-pandoc 119 | pandoc-mode 120 | paradox 121 | pdf-tools 122 | # php-auto-yasnippets # BROKEN 123 | php-mode 124 | php-refactor-mode 125 | phpcbf 126 | phpunit 127 | pinentry 128 | popwin 129 | powerline 130 | prettier-js 131 | projectile 132 | py-autopep8 133 | racer 134 | # realgud 135 | restclient 136 | ripgrep 137 | # rtags 138 | rust-mode 139 | s 140 | sass-mode 141 | sbt-mode 142 | scala-mode 143 | smartparens 144 | smex 145 | spaceline 146 | srefactor 147 | ssh 148 | ssh-config-mode 149 | swiper 150 | term-plus 151 | tern 152 | tide 153 | toml-mode 154 | tramp 155 | tramp-term 156 | undo-tree 157 | use-package 158 | uuidgen 159 | virtualenv 160 | web-mode 161 | wgrep 162 | which-key 163 | whitespace-cleanup-mode 164 | with-editor 165 | xml-rpc 166 | xterm-color 167 | yaml-mode 168 | yasnippet 169 | yasnippet-snippets 170 | zenburn-theme 171 | ] 172 | -------------------------------------------------------------------------------- /machines/alphaomega/system.nix: -------------------------------------------------------------------------------- 1 | {config, pkgs, ...}: 2 | { 3 | system.userActivationScripts.alphaomegaSetup = { 4 | text = '' 5 | mkdir -p ~/.cache 6 | mkdir -p ~/.gnus 7 | mkdir -p ~/.config/alacritty 8 | mkdir -p ~/.config/fontconfig 9 | mkdir -p ~/.config/gtk-3.0 10 | mkdir -p ~/.config/git 11 | mkdir -p ~/.config/htop 12 | mkdir -p ~/.config/i3 13 | mkdir -p ~/.config/nixpkgs/overlays 14 | mkdir -p ~/.config/offlineimap 15 | mkdir -p ~/.config/rofi 16 | mkdir -p ~/.maildirs/hcag 17 | mkdir -p ~/.sbt/1.0/plugins 18 | mkdir -p ~/.sbt/gpg 19 | mkdir -p ~/.ssh 20 | mkdir -p ~/.tmux/plugins 21 | 22 | ln -sf /etc/dot-files/aspell.conf ~/.aspell.conf 23 | ln -sf /etc/dot-files/curlrc ~/.curlrc 24 | ln -sf /etc/dot-files/ctags ~/.ctags 25 | ln -sf /etc/dot-files/htoprc ~/.config/htop 26 | ln -sf /etc/dot-files/git/ignore ~/.config/git 27 | ln -sf /etc/dot-files/nixpkgs/config.nix ~/.config/nixpkgs 28 | ln -sf /etc/dot-files/npmrc ~/.npmrc 29 | 30 | ln -sf /etc/dot-files/alphaomega/alacritty/alacritty.yml ~/.config/alacritty/ 31 | ln -sf /etc/dot-files/alphaomega/fonts.conf ~/.config/fontconfig/ 32 | ln -sf /etc/dot-files/alphaomega/grobi.conf ~/.config/ 33 | ln -sf /etc/dot-files/alphaomega/gtk-3.0/settings.ini ~/.config/gtk-3.0/ 34 | ln -sf /etc/dot-files/alphaomega/i3/config ~/.config/i3/ 35 | ln -sf /etc/dot-files/alphaomega/i3/status.toml ~/.config/i3/ 36 | ln -sf /etc/dot-files/alphaomega/rofi/config ~/.config/rofi/ 37 | ln -sf /etc/dot-files/alphaomega/tmux/plugins/kube.tmux ~/.tmux/plugins 38 | ln -sf /etc/dot-files/alphaomega/tmux.conf ~/.tmux.conf 39 | ln -sf /etc/dot-files/alphaomega/Xresources ~/.Xresources 40 | 41 | for o in $(ls ~/projects/ptsirakidis/nix-config/overlays); 42 | do 43 | if [ -f "$o" ]; 44 | then 45 | ln -sf ~/projects/ptsirakidis/nix-config/overlays/$o ~/.config/nixpkgs/overlays/$o 46 | fi 47 | done 48 | 49 | for o in $(ls ~/projects/ptsirakidis/nix-config/alphaomega/overlays); 50 | do 51 | if [ -f "$o" ]; 52 | then 53 | ln -sf ~/projects/ptsirakidis/nix-config/alphaomega/overlays/$o ~/.config/nixpkgs/overlays/$o 54 | fi 55 | done 56 | 57 | ln -sf /etc/dot-files/ptsirakidis/gitconfig ~/.gitconfig 58 | ln -sf /etc/dot-files/ptsirakidis/gnus.el ~/.gnus.el 59 | ln -sf /etc/dot-files/ptsirakidis/offlineimap/config ~/.config/offlineimap/config 60 | ln -sf /etc/dot-files/ptsirakidis/offlineimap/ca.crt ~/.config/offlineimap/ca.crt 61 | ln -sf /etc/dot-files/ptsirakidis/offlineimap/offlineimap.py ~/.config/offlineimap/offlineimap.py 62 | ln -sf /etc/dot-files/ptsirakidis/signature ~/.signature 63 | ln -sf /etc/dot-files/ptsirakidis/sbt/repositories ~/.sbt/repositories 64 | ln -sf /etc/dot-files/ptsirakidis/sbt/1.0/global.sbt ~/.sbt/1.0/global.sbt 65 | ln -sf /etc/dot-files/ptsirakidis/sbt/1.0/plugins/plugins.sbt ~/.sbt/1.0/plugins/plugins.sbt 66 | ln -sf /etc/dot-files/ptsirakidis/sbt/1.0/sonatype.sbt ~/.sbt/1.0/sonatype.sbt 67 | ln -sf /etc/dot-files/ptsirakidis/ssh-config ~/.ssh/config 68 | ln -sf /etc/dot-files/ptsirakidis/zshrc ~/.zshrc 69 | ''; 70 | deps = []; 71 | }; 72 | } 73 | -------------------------------------------------------------------------------- /machines/alphaomega/configuration.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | { 3 | imports =[ 4 | ./environment.nix 5 | ./hardware-configuration.nix 6 | ./modules 7 | ./programs 8 | ./services 9 | ./system.nix 10 | ]; 11 | 12 | boot.earlyVconsoleSetup = true; 13 | 14 | networking.hostId = "c0bebeef"; 15 | networking.hostName = "alphaomega"; 16 | networking.networkmanager = { 17 | enable = true; 18 | wifi.powersave = true; 19 | insertNameservers = [ "127.0.0.1" ]; 20 | }; 21 | networking.nameservers = [ "127.0.0.1" ]; 22 | 23 | i18n = { 24 | consoleFont = "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz"; 25 | consoleKeyMap = "us"; 26 | defaultLocale = "en_US.UTF-8"; 27 | }; 28 | 29 | time.timeZone = "Europe/Berlin"; 30 | 31 | nixpkgs.config = { 32 | allowUnfree = true; 33 | allowUnfreeRedistributable = true; 34 | }; 35 | 36 | nixpkgs.overlays = 37 | let 38 | paths = [ 39 | ../../overlays 40 | ../../machine/overlays 41 | ]; 42 | in with builtins; 43 | concatMap (path: 44 | (map (n: import (path + ("/" + n))) 45 | (filter (n: match ".*\\.nix" n != null || 46 | pathExists (path + ("/" + n + "/default.nix"))) 47 | (attrNames (readDir path))))) paths; 48 | 49 | environment.systemPackages = with pkgs; [ 50 | emacsToolsEnv 51 | gitToolsEnv 52 | javaToolsEnv 53 | jsToolsEnv 54 | langToolsEnv 55 | manpages 56 | networkingToolsEnv 57 | nixToolsEnv 58 | nixUtilitiesEnv 59 | nixosAppsEnv 60 | gcloudToolsEnv 61 | goToolsEnv 62 | pythonToolsEnv 63 | scalaToolsEnv 64 | systemToolsEnv 65 | virtualizationToolsEnv 66 | ]; 67 | 68 | fonts = { 69 | enableFontDir = true; 70 | enableGhostscriptFonts = true; 71 | fontconfig = { 72 | enable = true; 73 | antialias = true; 74 | hinting.enable = true; 75 | }; 76 | fonts = with pkgs; [ 77 | font-awesome-ttf 78 | hack-font 79 | helvetica-neue-lt-std 80 | noto-fonts-emoji 81 | unifont 82 | ]; 83 | }; 84 | 85 | documentation.dev.enable = true; 86 | 87 | sound.enable = true; 88 | sound.mediaKeys.enable = false; 89 | 90 | virtualisation.docker = { 91 | enable = true; 92 | enableOnBoot = true; 93 | }; 94 | virtualisation.virtualbox.host = { 95 | enable = true; 96 | enableExtensionPack = true; 97 | }; 98 | 99 | users.users.ptsirakidis = { 100 | isNormalUser = true; 101 | uid = 1000; 102 | subUidRanges = [ 103 | { count = 65536; startUid = 10000; } 104 | ]; 105 | subGidRanges = [ 106 | { count = 65536; startGid = 10000; } 107 | ]; 108 | description = "Periklis Tsirakidis"; 109 | extraGroups = [ "docker" "networkmanager" "systemd-journal" "wheel" "video" "vboxusers" ]; 110 | shell = "/run/current-system/sw/bin/zsh"; 111 | }; 112 | 113 | # This value determines the NixOS release with which your system is to be 114 | # compatible, in order to avoid breaking some software such as database 115 | # servers. You should change this only after NixOS release notes say you 116 | # should. 117 | system.stateVersion = "19.03"; # Did you read the comment? 118 | } 119 | -------------------------------------------------------------------------------- /machines/alphaomega/hardware-configuration.nix: -------------------------------------------------------------------------------- 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 | # and may be overwritten by future invocations. Please make changes 3 | # to /etc/nixos/configuration.nix instead. 4 | { config, lib, pkgs, ... }: 5 | 6 | { 7 | imports = [ 8 | 9 | ]; 10 | 11 | boot.kernelPackages = pkgs.linuxPackages_latest; 12 | 13 | boot.initrd.kernelModules = [ "dm-snapshot" "i915" ]; 14 | 15 | boot.initrd.availableKernelModules = [ 16 | "xhci_pci" 17 | "nvme" 18 | "usb_storage" 19 | "sd_mod" 20 | ]; 21 | 22 | boot.kernelModules = [ 23 | "acpi_call" 24 | "kvm-intel" 25 | ]; 26 | 27 | boot.extraModulePackages = with config.boot.kernelPackages; [ 28 | acpi_call 29 | ]; 30 | 31 | boot.kernelParams = [ 32 | "snd_hda_intel.power_save=1" 33 | "i915.enable_dc=2" 34 | "i915.enable_guc=2" 35 | "i915.enable_psr=1" 36 | "i915.enable_dpcd_backlight=1" 37 | "bbswitch.load_state=0" 38 | "bbswitch.unload_state=1" 39 | ]; 40 | 41 | boot.kernel.sysctl = { 42 | "kernel.nmi_watchdog" = 0; 43 | "vm.dirty_writeback_centisecs" = 1500; 44 | "vm.laptop_mode" = 5; 45 | }; 46 | 47 | boot.initrd.luks.devices.cryptroot = { 48 | device = "/dev/disk/by-uuid/4f4e6ecb-178c-4257-ab42-694fbab22459"; 49 | preLVM = true; 50 | allowDiscards = true; 51 | }; 52 | 53 | boot.loader = { 54 | systemd-boot.enable = true; 55 | efi.canTouchEfiVariables = true; 56 | 57 | grub = { 58 | enable = true; 59 | version = 2; 60 | device = "nodev"; 61 | efiSupport = true; 62 | enableCryptodisk = true; 63 | efiInstallAsRemovable = false; 64 | }; 65 | }; 66 | 67 | fileSystems."/" = 68 | { 69 | device = "/dev/disk/by-uuid/59308afb-bbb5-4ace-bfb2-ddc2486dde3a"; 70 | fsType = "ext4"; 71 | }; 72 | 73 | fileSystems."/boot" = 74 | { device = "/dev/disk/by-uuid/31A4-B19B"; 75 | fsType = "vfat"; 76 | }; 77 | 78 | swapDevices = 79 | [ { device = "/dev/disk/by-uuid/b4037c33-5f74-4227-9728-7d4f9623f89a"; } 80 | ]; 81 | 82 | hardware.cpu.intel.updateMicrocode = 83 | lib.mkDefault config.hardware.enableRedistributableFirmware; 84 | 85 | hardware.nvidiaOptimus.disable = true; 86 | 87 | hardware.opengl.extraPackages = with pkgs; [ 88 | vaapiIntel 89 | vaapiVdpau 90 | libvdpau-va-gl 91 | linuxPackages.nvidia_x11.out 92 | ]; 93 | hardware.opengl.extraPackages32 = with pkgs; [ 94 | linuxPackages.nvidia_x11.lib32 95 | ]; 96 | 97 | hardware.enableAllFirmware = true; 98 | 99 | hardware.bluetooth.enable = false; 100 | hardware.bluetooth.powerOnBoot = false; 101 | 102 | hardware.pulseaudio = { 103 | enable = true; 104 | package = pkgs.pulseaudioFull; 105 | support32Bit = true; 106 | }; 107 | 108 | hardware.opengl.enable = true; 109 | hardware.opengl.driSupport = true; 110 | hardware.opengl.driSupport32Bit = true; 111 | 112 | hardware.trackpoint.enable = lib.mkDefault true; 113 | 114 | nix.maxJobs = lib.mkDefault 8; 115 | 116 | powerManagement.powertop.enable = true; 117 | powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; 118 | 119 | systemd.tmpfiles.rules = [ 120 | "w /sys/devices/system/cpu/cpufreq/policy?/energy_performance_preference - - - - balance_power" 121 | ]; 122 | } 123 | -------------------------------------------------------------------------------- /machines/common/dot-files/darktooth/darktooth.nix: -------------------------------------------------------------------------------- 1 | { bash }:'' 2 | #!${bash}/bin/bash 3 | # base16-shell (https://github.com/chriskempson/base16-shell) 4 | # Base16 Shell template by Chris Kempson (http://chriskempson.com) 5 | # Darktooth scheme by Jason Milkins (https://github.com/jasonm23) 6 | 7 | color00="1D/20/21" # Base 00 - Black 8 | color01="FB/54/3F" # Base 08 - Red 9 | color02="95/C0/85" # Base 0B - Green 10 | color03="FA/C0/3B" # Base 0A - Yellow 11 | color04="0D/66/78" # Base 0D - Blue 12 | color05="8F/46/73" # Base 0E - Magenta 13 | color06="8B/A5/9B" # Base 0C - Cyan 14 | color07="A8/99/84" # Base 05 - White 15 | color08="66/5C/54" # Base 03 - Bright Black 16 | color09=$color01 # Base 08 - Bright Red 17 | color10=$color02 # Base 0B - Bright Green 18 | color11=$color03 # Base 0A - Bright Yellow 19 | color12=$color04 # Base 0D - Bright Blue 20 | color13=$color05 # Base 0E - Bright Magenta 21 | color14=$color06 # Base 0C - Bright Cyan 22 | color15="FD/F4/C1" # Base 07 - Bright White 23 | color16="FE/86/25" # Base 09 24 | color17="A8/73/22" # Base 0F 25 | color18="32/30/2F" # Base 01 26 | color19="50/49/45" # Base 02 27 | color20="92/83/74" # Base 04 28 | color21="D5/C4/A1" # Base 06 29 | color_foreground="A8/99/84" # Base 05 30 | color_background="1D/20/21" # Base 00 31 | 32 | if [ -n "$TMUX" ]; then 33 | # Tell tmux to pass the escape sequences through 34 | # (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324) 35 | put_template() { printf '\033Ptmux;\033\033]4;%d;rgb:%s\033\033\\\033\\' $@; } 36 | put_template_var() { printf '\033Ptmux;\033\033]%d;rgb:%s\033\033\\\033\\' $@; } 37 | put_template_custom() { printf '\033Ptmux;\033\033]%s%s\033\033\\\033\\' $@; } 38 | elif [ "\$\{TERM%%[-.]*\}" = "screen" ]; then 39 | # GNU screen (screen, screen-256color, screen-256color-bce) 40 | put_template() { printf '\033P\033]4;%d;rgb:%s\007\033\\' $@; } 41 | put_template_var() { printf '\033P\033]%d;rgb:%s\007\033\\' $@; } 42 | put_template_custom() { printf '\033P\033]%s%s\007\033\\' $@; } 43 | elif [ "\$\{TERM%%-*\}" = "linux" ]; then 44 | put_template() { [ $1 -lt 16 ] && printf "\e]P%x%s" $1 $(echo $2 | sed 's/\///g'); } 45 | put_template_var() { true; } 46 | put_template_custom() { true; } 47 | else 48 | put_template() { printf '\033]4;%d;rgb:%s\033\\' $@; } 49 | put_template_var() { printf '\033]%d;rgb:%s\033\\' $@; } 50 | put_template_custom() { printf '\033]%s%s\033\\' $@; } 51 | fi 52 | 53 | # 16 color space 54 | put_template 0 $color00 55 | put_template 1 $color01 56 | put_template 2 $color02 57 | put_template 3 $color03 58 | put_template 4 $color04 59 | put_template 5 $color05 60 | put_template 6 $color06 61 | put_template 7 $color07 62 | put_template 8 $color08 63 | put_template 9 $color09 64 | put_template 10 $color10 65 | put_template 11 $color11 66 | put_template 12 $color12 67 | put_template 13 $color13 68 | put_template 14 $color14 69 | put_template 15 $color15 70 | 71 | # 256 color space 72 | put_template 16 $color16 73 | put_template 17 $color17 74 | put_template 18 $color18 75 | put_template 19 $color19 76 | put_template 20 $color20 77 | put_template 21 $color21 78 | 79 | # foreground / background / cursor color 80 | if [ -n "$ITERM_SESSION_ID" ]; then 81 | # iTerm2 proprietary escape codes 82 | put_template_custom Pg A89984 # foreground 83 | put_template_custom Ph 1D2021 # background 84 | put_template_custom Pi A89984 # bold color 85 | put_template_custom Pj 504945 # selection color 86 | put_template_custom Pk A89984 # selected text color 87 | put_template_custom Pl A89984 # cursor 88 | put_template_custom Pm 1D2021 # cursor text 89 | else 90 | put_template_var 10 $color_foreground 91 | if [ "$BASE16_SHELL_SET_BACKGROUND" != false ]; then 92 | put_template_var 11 $color_background 93 | if [ "\$\{TERM%%-*\}" = "rxvt" ]; then 94 | put_template_var 708 $color_background # internal border (rxvt) 95 | fi 96 | fi 97 | put_template_custom 12 ";7" # cursor (reverse video) 98 | fi 99 | 100 | # clean up 101 | unset -f put_template 102 | unset -f put_template_var 103 | unset -f put_template_custom 104 | unset color00 105 | unset color01 106 | unset color02 107 | unset color03 108 | unset color04 109 | unset color05 110 | unset color06 111 | unset color07 112 | unset color08 113 | unset color09 114 | unset color10 115 | unset color11 116 | unset color12 117 | unset color13 118 | unset color14 119 | unset color15 120 | unset color16 121 | unset color17 122 | unset color18 123 | unset color19 124 | unset color20 125 | unset color21 126 | unset color_foreground 127 | unset color_background 128 | '' 129 | -------------------------------------------------------------------------------- /machines/alphaomega/dot-files/tmux/plugins/kube.tmux: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Kubernetes status line for tmux 4 | # Displays current context and namespace 5 | 6 | # Copyright 2018 Jon Mosco 7 | # 8 | # Licensed under the Apache License, Version 2.0 (the "License"); 9 | # you may not use this file except in compliance with the License. 10 | # You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, software 15 | # distributed under the License is distributed on an "AS IS" BASIS, 16 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | # See the License for the specific language governing permissions and 18 | # limitations under the License. 19 | 20 | # Default values for the plugin 21 | KUBE_TMUX_BINARY="${KUBE_TMUX_BINARY:-kubectl}" 22 | KUBE_TMUX_SYMBOL_ENABLE="${KUBE_TMUX_SYMBOL_ENABLE:-true}" 23 | KUBE_TMUX_SYMBOL_DEFAULT="${KUBE_TMUX_SYMBOL_DEFAULT:-\u2388 }" 24 | KUBE_TMUX_SYMBOL_USE_IMG="${KUBE_TMUX_SYMBOL_USE_IMG:-false}" 25 | KUBE_TMUX_NS_ENABLE="${KUBE_TMUX_NS_ENABLE:-true}" 26 | KUBE_TMUX_DIVIDER="${KUBE_TMUX_DIVIDER-:}" 27 | KUBE_TMUX_SYMBOL_COLOR="${KUBE_TMUX_SYMBOL_COLOR-blue}" 28 | KUBE_TMUX_CTX_COLOR="${KUBE_TMUX_CTX_COLOR-red}" 29 | KUBE_TMUX_NS_COLOR="${KUBE_TMUX_NS_COLOR-cyan}" 30 | KUBE_TMUX_KUBECONFIG_CACHE="${KUBECONFIG}" 31 | KUBE_TMUX_UNAME=$(uname) 32 | KUBE_TMUX_LAST_TIME=0 33 | 34 | _kube_tmux_binary_check() { 35 | command -v $1 >/dev/null 36 | } 37 | 38 | _kube_tmux_symbol() { 39 | if ((BASH_VERSINFO[0] >= 4)) && [[ $'\u2388 ' != "\\u2388 " ]]; then 40 | KUBE_TMUX_SYMBOL=$'\u2388 ' 41 | KUBE_TMUX_SYMBOL_IMG=$'\u2638 ' 42 | else 43 | KUBE_TMUX_SYMBOL=$'\xE2\x8E\x88 ' 44 | KUBE_TMUX_SYMBOL_IMG=$'\xE2\x98\xB8 ' 45 | fi 46 | 47 | if [[ "${KUBE_TMUX_SYMBOL_USE_IMG}" == true ]]; then 48 | KUBE_TMUX_SYMBOL="${KUBE_TMUX_SYMBOL_IMG}" 49 | fi 50 | 51 | echo "${KUBE_TMUX_SYMBOL}" 52 | } 53 | 54 | _kube_tmux_split() { 55 | type setopt >/dev/null 2>&1 && setopt SH_WORD_SPLIT 56 | local IFS=$1 57 | echo $2 58 | } 59 | 60 | # stat_command() { 61 | # if `stat -f '%a' ` 62 | # stat_bsd="$(stat -f '%a' "$(dirname "${dir}")")" 63 | # stat_gnu="$(stat -c '%Lp' "$(dirname "${dir}")")" 64 | # } 65 | 66 | _kube_tmux_file_newer_than() { 67 | local mtime 68 | local file=$1 69 | local check_time=$2 70 | 71 | if [[ "$KUBE_TMUX_UNAME" == "Linux" ]]; then 72 | mtime=$(stat -c %Y "${file}") 73 | elif [[ "$KUBE_TMUX_UNAME" == "Darwin" ]]; then 74 | # Use native stat in cases where gnutils are installed 75 | mtime=$(/usr/bin/stat -f %m "$file") 76 | fi 77 | 78 | [[ "${mtime}" -gt "${check_time}" ]] 79 | } 80 | 81 | _kube_tmux_update_cache() { 82 | if ! _kube_tmux_binary_check "${KUBE_TMUX_BINARY}"; then 83 | # No ability to fetch context/namespace; display N/A. 84 | KUBE_TMUX_CONTEXT="BINARY-N/A" 85 | KUBE_TMUX_NAMESPACE="N/A" 86 | return 87 | fi 88 | 89 | if [[ "${KUBECONFIG}" != "${KUBE_TMUX_KUBECONFIG_CACHE}" ]]; then 90 | # User changed KUBECONFIG; unconditionally refetch. 91 | KUBE_TMUX_KUBECONFIG_CACHE=${KUBECONFIG} 92 | _kube_tmux_get_context_ns 93 | return 94 | fi 95 | 96 | # kubectl will read the environment variable $KUBECONFIG 97 | # otherwise set it to ~/.kube/config 98 | local conf 99 | for conf in $(_kube_tmux_split : "${KUBECONFIG:-${HOME}/.kube/config}"); do 100 | [[ -r "${conf}" ]] || continue 101 | if _kube_tmux_file_newer_than "${conf}" "${KUBE_TMUX_LAST_TIME}"; then 102 | _kube_tmux_get_context_ns 103 | return 104 | fi 105 | done 106 | } 107 | 108 | _kube_tmux_get_context_ns() { 109 | # Set the command time 110 | if [[ "${KUBE_TMUX_SHELL}" == "bash" ]]; then 111 | if ((BASH_VERSINFO[0] >= 4)); then 112 | KUBE_TMUX_LAST_TIME=$(printf '%(%s)T') 113 | else 114 | KUBE_TMUX_LAST_TIME=$(date +%s) 115 | fi 116 | fi 117 | 118 | KUBE_TMUX_CONTEXT="$(${KUBE_TMUX_BINARY} config current-context 2>/dev/null)" 119 | if [[ -z "${KUBE_TMUX_CONTEXT}" ]]; then 120 | KUBE_TMUX_CONTEXT="N/A" 121 | KUBE_TMUX_NAMESPACE="N/A" 122 | return 123 | elif [[ "${KUBE_TMUX_NS_ENABLE}" == true ]]; then 124 | KUBE_TMUX_NAMESPACE="$(${KUBE_TMUX_BINARY} config view --minify --output 'jsonpath={..namespace}' 2>/dev/null)" 125 | # Set namespace to 'default' if it is not defined 126 | KUBE_TMUX_NAMESPACE="${KUBE_TMUX_NAMESPACE:-default}" 127 | fi 128 | } 129 | 130 | kube_tmux() { 131 | _kube_tmux_update_cache 132 | 133 | local KUBE_TMUX 134 | 135 | # Symbol 136 | KUBE_TMUX+="#[fg=blue]$(_kube_tmux_symbol)#[fg=colour${1}]" 137 | 138 | # Context 139 | KUBE_TMUX+="#[fg=${2}]${KUBE_TMUX_CONTEXT}" 140 | 141 | # Namespace 142 | if [[ "${KUBE_TMUX_NS_ENABLE}" == true ]]; then 143 | if [[ -n "${KUBE_TMUX_DIVIDER}" ]]; then 144 | KUBE_TMUX+="#[fg=colour250]${KUBE_TMUX_DIVIDER}" 145 | fi 146 | KUBE_TMUX+="#[fg=${3}]${KUBE_TMUX_NAMESPACE}" 147 | fi 148 | 149 | echo "${KUBE_TMUX}" 150 | } 151 | 152 | kube_tmux "$@" 153 | -------------------------------------------------------------------------------- /bin/bootstrap: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | BOOT_USER=${1:-periklis} 4 | BOOT_MACHINE=${2:-theopompos} 5 | BOOT_BRANCH=${3:-origin/master} 6 | BOOT_ARCH=${4:-x86_64-linux} 7 | 8 | VALID_USERS=("periklis" "ptsirakidis") 9 | VALID_MACHINES=("alphaomega" "theopompos") 10 | VALID_BRANCHES=("origin/master" "latest-release") 11 | VALID_ARCHS=("x86_64-linux" "x86_64-darwin") 12 | 13 | BASE_DIR=~/projects/"${BOOT_USER}" 14 | BASE_MACHINE_DIR="${BASE_DIR}/nix-config/${BOOT_MACHINE}" 15 | 16 | if [[ " ${VALID_USERS[*]} " != *"$BOOT_USER"* ]]; 17 | then 18 | echo "Provided user is not valid!" 19 | exit 1 20 | fi 21 | 22 | if [[ " ${VALID_MACHINES[*]} " != *"$BOOT_MACHINE"* ]]; 23 | then 24 | echo "Provided machine is not valid!" 25 | exit 1 26 | fi 27 | 28 | if [[ " ${VALID_BRANCHES[*]} " != *"$BOOT_BRANCH"* ]]; 29 | then 30 | echo "Provided branch is not valid!" 31 | exit 1 32 | fi 33 | 34 | if [[ " ${VALID_ARCHS[*]} " != *"$BOOT_ARCH"* ]]; 35 | then 36 | echo "Provided arch is not valid!" 37 | exit 1 38 | fi 39 | 40 | if [[ $BOOT_ARCH == "x86_64-darwin" ]]; 41 | then 42 | if [[ $(xcode-select -p) == "" ]]; 43 | then 44 | echo "Command line tools not installed!" 45 | xcode-select --install 46 | exit 1 47 | fi 48 | fi 49 | 50 | if [ ! -f ~/.newsrc ] && [ ! -f ~/.newsrc.eld ]; 51 | then 52 | echo "Transfer .newsrc and .newsrc.eld to this machine" 53 | exit 1 54 | fi 55 | 56 | echo "Booting machine $BOOT_MACHINE:$BOOT_ARCH for $BOOT_USER on $BOOT_BRANCH" 57 | echo -e "\nInitialize base repositories" 58 | 59 | if [ ! -d "${BASE_DIR}" ]; 60 | then 61 | mkdir -p "${BASE_DIR}" 62 | fi 63 | 64 | cd "${BASE_DIR}" || exit 65 | 66 | if [[ -d "${BASE_DIR}/nix-config" ]]; then 67 | echo "Base repository nix-config exists" 68 | else 69 | git clone git@github.com:periklis/nix-config.git 70 | fi 71 | 72 | 73 | cd "${BASE_DIR}"/nix-config || exit 74 | if [[ -f "${BASE_DIR}/nix-config/nixpkgs/default.nix" ]]; then 75 | echo "Base nix-config submodule nixpkgs exists" 76 | else 77 | git submodule update --init -- nixpkgs 78 | fi 79 | 80 | if [[ -f "${BASE_DIR}/nix-config/nix-darwin/default.nix" ]]; then 81 | echo "Base nix-config submodule nix-darwin exists" 82 | else 83 | git submodule update --init -- nix-darwin 84 | fi 85 | 86 | if [[ -f "${BASE_DIR}/nix-config/${BOOT_MACHINE}/default.nix" ]]; then 87 | echo "Base nix-config submodule ${BOOT_MACHINE} exists" 88 | else 89 | git submodule update --init -- "${BOOT_MACHINE}" 90 | fi 91 | 92 | echo -e "\nCreate nix-config directory symlinks for $BOOT_MACHINE" 93 | echo "Symlink $BOOT_MACHINE configiration.nix" 94 | ln -sf "$BASE_DIR/nix-config/machines/$BOOT_MACHINE/configuration.nix" configuration.nix 95 | 96 | echo "Symlink $BOOT_MACHINE config directory" 97 | ln -sf "$BASE_DIR/nix-config/$BOOT_MACHINE" machine 98 | 99 | if [[ $BOOT_ARCH == "x86_64-darwin" ]]; 100 | then 101 | echo "Symlink $BOOT_MACHINE machine configuration" 102 | ln -sf "${BASE_MACHINE_DIR}/machine.nix" machine.nix 103 | fi 104 | 105 | echo -e "\nInitialize emacs repositories" 106 | 107 | cd "${BASE_DIR}" || exit 108 | if [[ -d "${BASE_DIR}/dot-emacs" ]]; then 109 | echo "Repository dot-emacs exists" 110 | else 111 | git clone --recurse-submodules git@github.com:periklis/dot-emacs.git 112 | 113 | ln -sf "${BASE_DIR}/dot-emacs" ~/.emacs.d 114 | ln -sf "${BASE_DIR}/dot-emacs/machines/common.el" dot-emacs/common.el 115 | ln -sf "${BASE_DIR}/dot-emacs/machines/${BOOT_MACHINE}/local.el" dot-emacs/local.el 116 | fi 117 | 118 | echo -e "\nInitialize org repository" 119 | if [[ -d "${BASE_DIR}/org" ]]; then 120 | echo "Repository org exists" 121 | else 122 | git clone git@github.com:periklis/org.git 123 | ln -sf "${BASE_DIR}/org" ~/org 124 | fi 125 | 126 | # 127 | # Install nix and nix-darwin on macOS machines 128 | # 129 | if [[ $BOOT_ARCH == "x86_64-darwin" ]]; 130 | then 131 | if [[ :$PATH: != *:"/nix/var/nix/profiles/default/bin":* ]]; 132 | then 133 | echo 134 | echo "Install Nix Package Manager" 135 | curl https://nixos.org/nix/install | sh 136 | fi 137 | 138 | if [[ :$NIX_PATH: != *:"${BASE_DIR}/nix-config/nix-darwin":* ]]; 139 | then 140 | echo 141 | echo "Install Nix-Darwin Manager" 142 | sudo ln -sf private/var/run /run 143 | export NIX_PATH=darwin="${BASE_DIR}"/nix-config/nix-darwin:darwin-config="${BASE_DIR}"/nix-config/configuration.nix:"${NIX_PATH}" 144 | "$(nix-build '' -A system --no-out-link)"/sw/bin/darwin-rebuild build 145 | "$(nix-build '' -A system --no-out-link)"/sw/bin/darwin-rebuild switch 146 | 147 | echo "Change default shell to zsh" 148 | chsh -s /run/current-system/sw/bin/zsh -u "${BOOT_USER}" 149 | 150 | echo "Add sourcing of zprofile for user" 151 | echo " 152 | if [[ ! -z \"\$EMACS\" ]]; then 153 | . /etc/zprofile 154 | fi" > ~/.zshrc 155 | 156 | if [ "$(command -v nix)" == "/run/current-system/sw/bin/nix" ]; 157 | then 158 | echo "Nix provided for all users system wide" 159 | else 160 | echo "Missing nix installation for all users" 161 | fi 162 | fi 163 | fi 164 | -------------------------------------------------------------------------------- /machines/theopompos/environment.nix: -------------------------------------------------------------------------------- 1 | { config, etc, lib, machinePackages, pkgs }: 2 | { 3 | etc = etc // { 4 | # 5 | # Common config files 6 | # 7 | "dot-files/aspell.conf".text = import ../common/dot-files/aspell.nix {}; 8 | "dot-files/curlrc".text = import ../common/dot-files/curlrc.nix {}; 9 | "dot-files/ctags".text = import ../common/dot-files/ctags.nix {}; 10 | "dot-files/darktooth/darktooth.sh".text = import ../common/dot-files/darktooth/darktooth.nix { inherit(pkgs) bash; }; 11 | "dot-files/htoprc".text = import ../common/dot-files/htoprc.nix {}; 12 | "dot-files/git/ignore".text = import ../common/dot-files/git/ignore.nix {}; 13 | "dot-files/gnupg/dirmngr.conf".text = import ../common/dot-files/gnupg/dirmngr.nix {}; 14 | "dot-files/gnupg/gpg-agent.conf".text = import ../common/dot-files/gnupg/gpg-agent.nix { inherit pkgs; }; 15 | "dot-files/gnupg/gpg.conf".text = import ../common/dot-files/gnupg/gpg.nix {}; 16 | "dot-files/gnupg/scdaemon.conf".text = import ../common/dot-files/gnupg/scdaemon.nix {}; 17 | "dot-files/gnupg/sks-keyservers.netCA.pem".text = import ../common/dot-files/gnupg/sks-keyservers.nix {}; 18 | "dot-files/nixpkgs/config.nix".text = import ../common/dot-files/nixpkgs/config.nix {}; 19 | "dot-files/npmrc".text = import ../common/dot-files/npmrc.nix {}; 20 | 21 | # 22 | # Per machine config files 23 | # 24 | "dot-files/theopompos/alacritty/alacritty.yml".text = import ./dot-files/alacritty/alacritty.nix {}; 25 | "dot-files/theopompos/tmux.conf".text = import ./dot-files/tmux.nix { inherit(pkgs) bash; }; 26 | 27 | # 28 | # Per-user secret config files 29 | # 30 | "dot-files/periklis/gitconfig".text = import ../../machine/per-user/gitconfig.nix {}; 31 | "dot-files/periklis/gnus.el".text = import ../../machine/per-user/gnus.nix {}; 32 | "dot-files/periklis/signature".text = import ../../machine/per-user/signature.nix {}; 33 | "dot-files/periklis/ssh-config".text = import ../../machine/per-user/ssh-user-config.nix {}; 34 | }; 35 | 36 | extraOutputsToInstall = [ "doc" "lib" "man" "info" ]; 37 | 38 | pathsToLink = [ "/lib" "/libexec" "/share" ]; 39 | 40 | variables = { 41 | TERM = "screen-256color"; 42 | LANG = "en_US.UTF-8"; 43 | LC_ALL = "en_US.UTF-8"; 44 | PAGER = "less -R"; 45 | EDITOR = "emacsclient"; 46 | ALTERNATE_EDITOR = "vim"; 47 | LSCOLORS = "gxfxbEaEBxxEhEhBaDaCaD"; 48 | MANPATH = [ 49 | "/Users/periklis/.nix-profile/share/man" 50 | "/Users/periklis/.nix-profile/man" 51 | "${config.system.path}/share/man" 52 | "${config.system.path}/man" 53 | "/usr/local/share/man" 54 | "/usr/share/man" 55 | "/Developer/usr/share/man" 56 | "/usr/X11/man" 57 | ]; 58 | ACLOCAL_PATH = "$HOME/.nix-profile/share/aclocal"; 59 | CACHIX_SIGNING_KEY = "UezrEGeJqHdXD97YjoMqdAV64/O+Sk5mzsBH7hV7rrjpUsDGacxW7t6FEeUAK7HJ4YOMYjz13tCfRRN2xmLfnw=="; 60 | GOPATH = "$HOME/projects/golang/"; 61 | PKG_CONFIG_PATH = "$HOME/.nix-profile/lib/pkgconfig"; 62 | PKG_CONFIG_LIBDIR = "$HOME/.nix-profile/lib/pkgconfig"; 63 | PYTHONPATH = "$HOME/.local/lib/python3.6/site-packages:${pkgs.pythonToolsEnv}/lib/python3.6/site-packages"; 64 | SSH_AUTH_SOCK = "$HOME/.gnupg/S.gpg-agent.ssh"; 65 | ZSH = "/run/current-system/sw/share/oh-my-zsh"; 66 | ZSH_CUSTOM = "$HOME/.zsh/custom"; 67 | ZSH_CACHE_DIR = "$HOME/.zsh/cache"; 68 | ZSH_THEME = "sunrise"; 69 | FZF_DEFAULT_COMMAND = "fd --type file --color=always --follow --hidden --exclude .git"; 70 | FZF_COMMON_OPTS = "--select-1 --exit-0"; 71 | FZF_CTRL_T_OPTS = lib.concatStringsSep " " [ 72 | "$FZF_COMMON_OPTS --preview" 73 | "'(highlight -O ansi -l {} 2> /dev/null || cat {} || tree -C {}) 2> /dev/null | head -200'" 74 | ]; 75 | FZF_CTRL_R_OPTS = lib.concatStringsSep " " [ 76 | "$FZF_COMMON_OPTS --preview" 77 | "'echo {}' --preview-window down:3:hidden:wrap --bind '?:toggle-preview'" 78 | ]; 79 | FZF_DEFAULT_OPTS = lib.concatStringsSep " " [ 80 | "--ansi" 81 | "--color dark,hl:33,hl+:37,fg+:235,bg+:234,fg+:254" 82 | "--color info:254,prompt:37,spinner:108,pointer:235,marker:235" 83 | "--reverse" 84 | ]; 85 | PATH = lib.concatStringsSep ":" [ 86 | "$HOME/.local/bin" 87 | "$HOME/.cabal/bin" 88 | "$HOME/.cargo/bin" 89 | "$HOME/.composer/vendor/bin" 90 | "$HOME/.node/bin" 91 | "$HOME/projects/golang/bin" 92 | "$PATH" 93 | ]; 94 | }; 95 | 96 | shells = [ 97 | pkgs.bashInteractive 98 | pkgs.zsh 99 | ]; 100 | 101 | shellAliases = { 102 | mmv = "noglob zmv -W"; 103 | emacs-nox = "$HOME/Applications/Emacs.app/Contents/MacOS/Emacs -nw"; 104 | ec = "emacsclient -t"; 105 | nix-env = "nix-env -f ''"; 106 | nix-build-out = "nixBuildOut"; 107 | nix-build-binding-as = "nixBuildBindingAs"; 108 | nix-build-deps = "nixBuildDeps"; 109 | nix-runtime-deps = "nixRuntimeDeps"; 110 | nix-check-updates = "nixCheckUpdates"; 111 | nix-env-rebuild = "nixEnvRebuild"; 112 | fts = "ag --nobreak --nonumbers --noheading . | fzf"; 113 | }; 114 | 115 | systemPackages = with pkgs; [ 116 | emacsToolsEnv 117 | gitToolsEnv 118 | networkingToolsEnv 119 | nixToolsEnv 120 | systemToolsEnv 121 | ] ++ machinePackages; 122 | } 123 | -------------------------------------------------------------------------------- /machines/alphaomega/environment.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | let 3 | fzfCtrlOpts = pkgs.lib.concatStringsSep " " [ 4 | "$FZF_COMMON_OPTS" 5 | "--preview '(highlight -O ansi -l {} 2> /dev/null || cat {} || tree -C {}) 2> /dev/null | head -200'" 6 | "--preview-window right:50%:hidden:wrap --bind '?:toggle-preview'" 7 | ]; 8 | 9 | fzfCtrlROpts = pkgs.lib.concatStringsSep " " [ 10 | fzfCtrlOpts 11 | "--history-size=10000" 12 | ]; 13 | 14 | fzfDefaultOpts = pkgs.lib.concatStringsSep " " [ 15 | "--ansi" 16 | "--color dark,hl:33,hl+:37,fg+:235,bg+:234,fg+:254" 17 | "--color info:254,prompt:37,spinner:108,pointer:235,marker:235" 18 | "--reverse" 19 | ]; 20 | 21 | manPath = pkgs.lib.concatStringsSep ":" [ 22 | "/home/ptsirakidis/.nix-profile/share/man" 23 | "/home/ptsirakidis/.nix-profile/man" 24 | "${config.system.path}/share/man" 25 | "${config.system.path}/man" 26 | "/usr/local/share/man" 27 | "/usr/share/man" 28 | ]; 29 | 30 | path = pkgs.lib.concatStringsSep ":" [ 31 | "$HOME/.local/bin" 32 | "$HOME/.cabal/bin" 33 | "$HOME/.cargo/bin" 34 | "$HOME/.composer/vendor/bin" 35 | "$HOME/.node/bin" 36 | "$HOME/projects/golang/bin" 37 | "$PATH" 38 | ]; 39 | in 40 | { 41 | environment = { 42 | etc."containers/registries.conf".text = import ./etc/containers/registries.nix {}; 43 | etc."containers/policy.json".text = import ./etc/containers/policy.nix {}; 44 | 45 | # 46 | # Common config files 47 | # 48 | etc."dot-files/aspell.conf".text = import ../common/dot-files/aspell.nix {}; 49 | etc."dot-files/curlrc".text = import ../common/dot-files/curlrc.nix {}; 50 | etc."dot-files/ctags".text = import ../common/dot-files/ctags.nix {}; 51 | etc."dot-files/htoprc".text = import ../common/dot-files/htoprc.nix {}; 52 | etc."dot-files/git/ignore".text = import ../common/dot-files/git/ignore.nix {}; 53 | etc."dot-files/nixpkgs/config.nix".text = import ../common/dot-files/nixpkgs/config.nix {}; 54 | etc."dot-files/npmrc".text = import ../common/dot-files/npmrc.nix {}; 55 | 56 | # 57 | # Per machine config files 58 | # 59 | etc."dot-files/alphaomega/alacritty/alacritty.yml".text = import ./dot-files/alacritty/alacritty.nix {}; 60 | etc."dot-files/alphaomega/fonts.conf".text = import ./dot-files/fonts.nix {}; 61 | etc."dot-files/alphaomega/gtk-3.0/settings.ini".text = import ./dot-files/gtk-3.0/settings.nix {}; 62 | etc."dot-files/alphaomega/grobi.conf".text = import ./dot-files/grobi.nix {}; 63 | etc."dot-files/alphaomega/i3/config".text = import ./dot-files/i3/config.nix { inherit (pkgs) light pamixer; }; 64 | etc."dot-files/alphaomega/i3/status.toml".text = import ./dot-files/i3/status.nix {}; 65 | etc."dot-files/alphaomega/rofi/config".text = import ./dot-files/rofi/config.nix {}; 66 | etc."dot-files/alphaomega/tmux/plugins/kube.tmux".text = pkgs.lib.fileContents ./dot-files/tmux/plugins/kube.tmux; 67 | etc."dot-files/alphaomega/tmux.conf".text = import ./dot-files/tmux.nix { inherit(pkgs) bash; }; 68 | etc."dot-files/alphaomega/Xresources".text = import ./dot-files/Xresources.nix {}; 69 | 70 | # 71 | # Per-user secret config files 72 | # 73 | etc."dot-files/ptsirakidis/gitconfig".text = import ../../machine/per-user/gitconfig.nix {}; 74 | etc."dot-files/ptsirakidis/gnus.el".text = import ../../machine/per-user/gnus.nix {}; 75 | etc."dot-files/ptsirakidis/offlineimap/config".text = import ../../machine/per-user/offlineimap/config.nix { inherit (pkgs) cacert; }; 76 | etc."dot-files/ptsirakidis/offlineimap/ca.crt".text = import ../../machine/per-user/offlineimap/ca.nix {}; 77 | etc."dot-files/ptsirakidis/offlineimap/offlineimap.py".text = import ../../machine/per-user/offlineimap/offlineimap.nix { inherit (pkgs) gnupg python; }; 78 | etc."dot-files/ptsirakidis/sbt/repositories".text = import ../../machine/per-user/sbt/repositories.nix {}; 79 | etc."dot-files/ptsirakidis/sbt/1.0/global.sbt".text = import ../../machine/per-user/sbt/1.0/global.nix {}; 80 | etc."dot-files/ptsirakidis/sbt/1.0/plugins/plugins.sbt".text = import ../../machine/per-user/sbt/1.0/plugins/plugins.nix {}; 81 | etc."dot-files/ptsirakidis/sbt/1.0/sonatype.sbt".text = import ../../machine/per-user/sbt/1.0/sonatype.nix {}; 82 | etc."dot-files/ptsirakidis/signature".text = import ../../machine/per-user/signature.nix {}; 83 | etc."dot-files/ptsirakidis/ssh-config".text = import ../../machine/per-user/ssh-user-config.nix {}; 84 | etc."dot-files/ptsirakidis/zshrc".text = import ../../machine/per-user/zshrc.nix {}; 85 | 86 | extraOutputsToInstall = [ "doc" "lib" "man" "info" ]; 87 | 88 | pathsToLink = [ "/lib" "/libexec" "/share" ]; 89 | 90 | loginShellInit = '' 91 | export TERM="screen-256color" 92 | export LC_ALL="en_US.UTF-8" 93 | export PAGER="less -R" 94 | export EDITOR="emacsclient" 95 | export ALTERNATE_EDITOR="vim" 96 | export MANPATH="${manPath}" 97 | export ACLOCAL_PATH="$HOME/.nix-profile/share/aclocal" 98 | export GOPATH="$HOME/projects/golang" 99 | export GOPROXY="https://proxy.golang.org" 100 | export PKG_CONFIG_PATH="$HOME/.nix-profile/lib/pkgconfig" 101 | export PYTHONPATH="$HOME/.local/lib/python3.6/site-packages:${pkgs.pythonToolsEnv}/lib/python3.6/site-packages" 102 | export ZSH_CUSTOM="$HOME/.zsh/custom" 103 | export ZSH_CACHE_DIR="$HOME/.zsh/cache" 104 | export FZF_BASE="${pkgs.fzf}" 105 | export FZF_DEFAULT_COMMAND="${pkgs.fd}/bin/fd --type file --color=always --follow --hidden --exclude .git" 106 | export FZF_COMMON_OPTS="--select-1 --exit-0" 107 | export FZF_CTRL_T_OPTS="${fzfCtrlOpts}" 108 | export FZF_CTRL_R_OPTS="${fzfCtrlROpts}" 109 | export FZF_DEFAULT_OPTS="${fzfDefaultOpts}" 110 | export PATH="${path}" 111 | ''; 112 | 113 | shells = with pkgs; [ 114 | bashInteractive 115 | zsh 116 | ]; 117 | 118 | shellAliases = { 119 | emacs-nox = "emacs -nw"; 120 | ec = "emacsclient -t"; 121 | ll = "exa -la"; 122 | lt = "exa -T"; 123 | nix-build-out = "nixBuildOut"; 124 | nix-build-binding-as = "nixBuildBindingAs"; 125 | nix-build-deps = "nixBuildDeps"; 126 | nix-runtime-deps = "nixRuntimeDeps"; 127 | nix-check-updates = "nixCheckUpdates"; 128 | nix-env-rebuild = "nixEnvRebuild"; 129 | }; 130 | }; 131 | } 132 | -------------------------------------------------------------------------------- /machines/alphaomega/dot-files/i3/config.nix: -------------------------------------------------------------------------------- 1 | { light, pamixer }: '' 2 | # i3 config file (v4) 3 | # 4 | # Please see https://i3wm.org/docs/userguide.html for a complete reference! 5 | 6 | set $mod Mod4 7 | 8 | # set primary gruvbox colorscheme colors 9 | set $bg #282828 10 | set $red #cc241d 11 | set $green #98971a 12 | set $yellow #d79921 13 | set $blue #458588 14 | set $purple #b16286 15 | set $aqua #689d68 16 | set $gray #a89984 17 | set $darkgray #1d2021 18 | 19 | # class border|backgr|text|indicator|child_border 20 | client.focused $yellow $yellow $darkgray $purple $darkgray 21 | client.focused_inactive $darkgray $darkgray $yellow $purple $darkgray 22 | client.unfocused $darkgray $darkgray $yellow $purple $darkgray 23 | client.urgent $red $red $white $red $red 24 | 25 | # Font for window titles. Will also be used by the bar unless a different font 26 | # is used in the bar {} block below. 27 | font pango:Hack 8 28 | 29 | # Use Mouse+$mod to drag floating windows to their wanted position 30 | floating_modifier $mod 31 | 32 | # Make the currently focused window a scratchpad 33 | bindsym $mod+Shift+minus move scratchpad 34 | 35 | # Show the first scratchpad window 36 | bindsym $mod+minus scratchpad show 37 | 38 | # Take a screenshot 39 | bindsym Ctrl+Print exec scrot '%Y-%m-%d-%s_screenshot_$wx$h.jpg' -e 'mv $f ~/Pictures/' 40 | 41 | # start a terminal 42 | bindsym $mod+Return exec alacritty 43 | 44 | # kill focused window 45 | bindsym $mod+Shift+q kill 46 | 47 | # start dmenu (a program launcher) 48 | bindsym $mod+d exec "rofi -show combi" 49 | 50 | # change focus 51 | bindsym $mod+h focus left 52 | bindsym $mod+l focus right 53 | bindsym $mod+j focus up 54 | bindsym $mod+k focus down 55 | bindsym $mod+semicolon focus right 56 | 57 | # move focused window 58 | bindsym $mod+Shift+Left move left 59 | bindsym $mod+Shift+Right move right 60 | bindsym $mod+Shift+Up move up 61 | bindsym $mod+Shift+Down move down 62 | bindsym $mod+Shift+semicolon move right 63 | 64 | # split in horizontal orientation 65 | bindsym $mod+Shift+h split h 66 | 67 | # split in vertical orientation 68 | bindsym $mod+Shift+v split v 69 | 70 | # enter fullscreen mode for the focused container 71 | bindsym $mod+shift+f fullscreen toggle 72 | 73 | # change container layout (stacked, tabbed, toggle split) 74 | bindsym $mod+Shift+s layout stacking 75 | bindsym $mod+Shift+w layout tabbed 76 | bindsym $mod+e layout toggle split 77 | 78 | # toggle tiling / floating 79 | bindsym $mod+Shift+space floating toggle 80 | 81 | # change focus between tiling / floating windows 82 | bindsym $mod+space focus mode_toggle 83 | 84 | # focus the parent container 85 | bindsym $mod+a focus parent 86 | 87 | # focus the child container 88 | bindsym $mod+z focus child 89 | 90 | # Define names for default workspaces for which we configure key bindings later on. 91 | # We use variables to avoid repeating the names in multiple places. 92 | set $ws1 "1" 93 | set $ws2 "2" 94 | set $ws3 "3" 95 | set $ws4 "4" 96 | set $ws5 "5" 97 | set $ws6 "6" 98 | set $ws7 "7" 99 | set $ws8 "8" 100 | set $ws9 "9" 101 | set $ws10 "10" 102 | 103 | # switch to workspace 104 | bindsym $mod+1 workspace $ws1 105 | bindsym $mod+2 workspace $ws2 106 | bindsym $mod+3 workspace $ws3 107 | bindsym $mod+4 workspace $ws4 108 | bindsym $mod+5 workspace $ws5 109 | bindsym $mod+6 workspace $ws6 110 | bindsym $mod+7 workspace $ws7 111 | bindsym $mod+8 workspace $ws8 112 | bindsym $mod+9 workspace $ws9 113 | bindsym $mod+0 workspace $ws10 114 | 115 | # move focused container to workspace 116 | bindsym $mod+Shift+1 move container to workspace $ws1 117 | bindsym $mod+Shift+2 move container to workspace $ws2 118 | bindsym $mod+Shift+3 move container to workspace $ws3 119 | bindsym $mod+Shift+4 move container to workspace $ws4 120 | bindsym $mod+Shift+5 move container to workspace $ws5 121 | bindsym $mod+Shift+6 move container to workspace $ws6 122 | bindsym $mod+Shift+7 move container to workspace $ws7 123 | bindsym $mod+Shift+8 move container to workspace $ws8 124 | bindsym $mod+Shift+9 move container to workspace $ws9 125 | bindsym $mod+Shift+0 move container to workspace $ws10 126 | 127 | # reload the configuration file 128 | bindsym $mod+Shift+c reload 129 | # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) 130 | bindsym $mod+Shift+r restart 131 | # lock screen 132 | bindsym $mod+Shift+l exec "i3lock-fancy" 133 | # exit i3 (logs you out of your X session) 134 | bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" 135 | 136 | bindcode 121 exec --no-startup-id ${pamixer}/bin/pamixer --sink 0 -t 137 | bindcode 122 exec --no-startup-id ${pamixer}/bin/pamixer --sink 0 -d 5 138 | bindcode 123 exec --no-startup-id ${pamixer}/bin/pamixer --sink 0 -i 5 139 | bindcode 198 exec --no-startup-id ${pamixer}/bin/pamixer --source 1 -t 140 | 141 | 142 | bindcode 232 exec --no-startup-id ${light}/bin/light -U 5 143 | bindcode 233 exec --no-startup-id ${light}/bin/light -A 5 144 | bindcode 245 exec --no-startup-id /run/wrappers/bin/bluetooth toggle 145 | 146 | # resize window (you can also use the mouse for that) 147 | mode "resize" { 148 | # These bindings trigger as soon as you enter the resize mode 149 | 150 | # Pressing left will shrink the window’s width. 151 | # Pressing right will grow the window’s width. 152 | # Pressing up will shrink the window’s height. 153 | # Pressing down will grow the window’s height. 154 | bindsym j resize shrink width 10 px or 10 ppt 155 | bindsym k resize grow height 10 px or 10 ppt 156 | bindsym l resize shrink height 10 px or 10 ppt 157 | bindsym semicolon resize grow width 10 px or 10 ppt 158 | 159 | # same bindings, but for the arrow keys 160 | bindsym Left resize shrink width 10 px or 10 ppt 161 | bindsym Down resize grow height 10 px or 10 ppt 162 | bindsym Up resize shrink height 10 px or 10 ppt 163 | bindsym Right resize grow width 10 px or 10 ppt 164 | 165 | # back to normal: Enter or Escape or $mod+r 166 | bindsym Return mode "default" 167 | bindsym Escape mode "default" 168 | bindsym $mod+r mode "default" 169 | } 170 | 171 | bindsym $mod+r mode "resize" 172 | 173 | mode "screen" { 174 | bindsym o exec --no-startup-id grobi apply Office 175 | bindsym h exec --no-startup-id grobi apply HomeOffice 176 | bindsym m exec --no-startup-id grobi apply Mobile 177 | bindsym Return mode "default" 178 | bindsym Escape mode "default" 179 | bindcode 235 mode "default" 180 | } 181 | 182 | bindcode 235 mode "screen" 183 | 184 | # Start i3bar to display a workspace bar (plus the system information i3status 185 | # finds out, if available) 186 | bar { 187 | font pango:DejaVu Sans Mono, FontAwesome 8 188 | position bottom 189 | status_command i3status-rs ~/.config/i3/status.toml 190 | binding_mode_indicator yes 191 | colors { 192 | separator #666666 193 | background #222222 194 | statusline #dddddd 195 | focused_workspace #0088CC #0088CC #ffffff 196 | active_workspace #333333 #333333 #ffffff 197 | inactive_workspace #333333 #333333 #888888 198 | urgent_workspace #2f343a #900000 #ffffff 199 | } 200 | } 201 | 202 | focus_follows_mouse no 203 | 204 | assign [class="Firefox"] 1 205 | assign [class="Emacs"] 2 206 | assign [class="Slack"] 3 207 | 208 | exec --no-startup-id nm-applet 209 | exec --no-startup-id pa-applet 210 | '' 211 | -------------------------------------------------------------------------------- /machines/theopompos/dot-files/alacritty/alacritty.nix: -------------------------------------------------------------------------------- 1 | {}:'' 2 | # Configuration for Alacritty, the GPU enhanced terminal emulator 3 | 4 | # Any items in the `env` entry below will be added as 5 | # environment variables. Some entries may override variables 6 | # set by alacritty it self. 7 | env: 8 | # TERM env customization. 9 | # 10 | # If this property is not set, alacritty will set it to xterm-256color. 11 | # 12 | # Note that some xterm terminfo databases don't declare support for italics. 13 | # You can verify this by checking for the presence of `smso` and `sitm` in 14 | # `infocmp xterm-256color`. 15 | TERM: screen-256color 16 | 17 | window: 18 | # Window dimensions in character columns and lines 19 | # (changes require restart) 20 | dimensions: 21 | columns: 80 22 | lines: 24 23 | 24 | # Adds this many blank pixels of padding around the window 25 | # Units are physical pixels; this is not DPI aware. 26 | # (change requires restart) 27 | padding: 28 | x: 2 29 | y: 2 30 | 31 | # Window decorations 32 | # Setting this to false will result in window without borders and title bar. 33 | decorations: none 34 | 35 | # Display tabs using this many cells (changes require restart) 36 | tabspaces: 4 37 | 38 | # When true, bold text is drawn using the bright variant of colors. 39 | draw_bold_text_with_bright_colors: true 40 | 41 | # Font configuration (changes require restart) 42 | font: 43 | # The normal (roman) font face to use. 44 | normal: 45 | family: Hack 46 | # Style can be specified to pick a specific face. 47 | style: Regular 48 | 49 | # The bold font face 50 | family: 51 | bold: Hack 52 | # Style can be specified to pick a specific face. 53 | style: Bold 54 | 55 | # The italic font face 56 | italic: 57 | family: Hack 58 | # Style can be specified to pick a specific face. 59 | style: Italic 60 | 61 | # Point size of the font 62 | size: 14.0 63 | 64 | # Offset is the extra space around each character. offset.y can be thought of 65 | # as modifying the linespacing, and offset.x as modifying the letter spacing. 66 | offset: 67 | x: 0 68 | y: 0 69 | 70 | # Glyph offset determines the locations of the glyphs within their cells with 71 | # the default being at the bottom. Increase the x offset to move the glyph to 72 | # the right, increase the y offset to move the glyph upward. 73 | glyph_offset: 74 | x: 0 75 | y: 0 76 | 77 | # OS X only: use thin stroke font rendering. Thin strokes are suitable 78 | # for retina displays, but for non-retina you probably want this set to 79 | # false. 80 | use_thin_strokes: true 81 | 82 | # Should display the render timer 83 | render_timer: false 84 | 85 | # Colors (Darktooth) 86 | colors: 87 | 88 | # Default colors 89 | primary: 90 | background: '0x282828' 91 | foreground: '0xfdf4c1' 92 | 93 | # Normal colors 94 | normal: 95 | black: '0x282828' 96 | red: '0x9d0006' 97 | green: '0x79740e' 98 | yellow: '0xb57614' 99 | blue: '0x076678' 100 | magenta: '0x8f3f71' 101 | cyan: '0x00a7af' 102 | white: '0xfdf4c1' 103 | 104 | # Bright colors 105 | bright: 106 | black: '0x32302f' 107 | red: '0xfb4933' 108 | green: '0xb8bb26' 109 | yellow: '0xfabd2f' 110 | blue: '0x83a598' 111 | magenta: '0xd3869b' 112 | cyan: '0x3fd7e5' 113 | white: '0xffffc8' 114 | 115 | # Dim colors (Optional) 116 | dim: 117 | black: '0x1d2021' 118 | red: '0x421e1e' 119 | green: '0x232b0f' 120 | yellow: '0x4d3b27' 121 | blue: '0x2b3c44' 122 | magenta: '0x4e3d45' 123 | cyan: '0x205161' 124 | white: '0xf4e8ba' 125 | 126 | # Visual Bell 127 | # 128 | # Any time the BEL code is received, Alacritty "rings" the visual bell. Once 129 | # rung, the terminal background will be set to white and transition back to the 130 | # default background color. You can control the rate of this transition by 131 | # setting the `duration` property (represented in milliseconds). You can also 132 | # configure the transition function by setting the `animation` property. 133 | # 134 | # Possible values for `animation` 135 | # `Ease` 136 | # `EaseOut` 137 | # `EaseOutSine` 138 | # `EaseOutQuad` 139 | # `EaseOutCubic` 140 | # `EaseOutQuart` 141 | # `EaseOutQuint` 142 | # `EaseOutExpo` 143 | # `EaseOutCirc` 144 | # `Linear` 145 | # 146 | # To completely disable the visual bell, set its duration to 0. 147 | # 148 | visual_bell: 149 | animation: EaseOutExpo 150 | duration: 0 151 | 152 | # Background opacity 153 | background_opacity: 1.0 154 | 155 | # Mouse bindings 156 | # 157 | # Currently doesn't support modifiers. Both the `mouse` and `action` fields must 158 | # be specified. 159 | # 160 | # Values for `mouse`: 161 | # - Middle 162 | # - Left 163 | # - Right 164 | # - Numeric identifier such as `5` 165 | # 166 | # Values for `action`: 167 | # - Paste 168 | # - PasteSelection 169 | # - Copy (TODO) 170 | mouse_bindings: 171 | - { mouse: Middle, action: PasteSelection } 172 | 173 | mouse: 174 | # Click settings 175 | # 176 | # The `double_click` and `triple_click` settings control the time 177 | # alacritty should wait for accepting multiple clicks as one double 178 | # or triple click. 179 | double_click: { threshold: 300 } 180 | triple_click: { threshold: 300 } 181 | 182 | # Faux Scrollback 183 | # 184 | # The `faux_scrollback_lines` setting controls the number 185 | # of lines the terminal should scroll when the alternate 186 | # screen buffer is active. This is used to allow mouse 187 | # scrolling for applications like `man`. 188 | # 189 | # To disable this completely, set `faux_scrollback_lines` to 0. 190 | faux_scrolling_lines: 1 191 | 192 | hide_cursor_typing: true 193 | 194 | selection: 195 | semantic_escape_chars: ",│`|:\"' ()[]{}<>" 196 | 197 | dynamic_title: true 198 | 199 | # Style of the cursor 200 | # 201 | # Values for 'cursor_style': 202 | # - Block 203 | # - Underline 204 | # - Beam 205 | cursor: 206 | style: Block 207 | # Whether the cursor should be a hollow block on window focus loss 208 | unfocused_hollow: true 209 | 210 | # Live config reload (changes require restart) 211 | live_config_reload: true 212 | 213 | # Shell 214 | # 215 | # You can set shell.program to the path of your favorite shell, e.g. /bin/fish. 216 | # Entries in shell.args are passed unmodified as arguments to the shell. 217 | # 218 | shell: 219 | program: /run/current-system/sw/bin/zsh 220 | args: 221 | - --login 222 | 223 | # Key bindings 224 | # 225 | # Each binding is defined as an object with some properties. Most of the 226 | # properties are optional. All of the alphabetical keys should have a letter for 227 | # the `key` value such as `V`. Function keys are probably what you would expect 228 | # as well (F1, F2, ..). The number keys above the main keyboard are encoded as 229 | # `Key1`, `Key2`, etc. Keys on the number pad are encoded `Number1`, `Number2`, 230 | # etc. These all match the glutin::VirtualKeyCode variants. 231 | # 232 | # A list with all available `key` names can be found here: 233 | # https://docs.rs/glutin/*/glutin/enum.VirtualKeyCode.html#variants 234 | # 235 | # Possible values for `mods` 236 | # `Command`, `Super` refer to the super/command/windows key 237 | # `Control` for the control key 238 | # `Shift` for the Shift key 239 | # `Alt` and `Option` refer to alt/option 240 | # 241 | # mods may be combined with a `|`. For example, requiring control and shift 242 | # looks like: 243 | # 244 | # mods: Control|Shift 245 | # 246 | # The parser is currently quite sensitive to whitespace and capitalization - 247 | # capitalization must match exactly, and piped items must not have whitespace 248 | # around them. 249 | # 250 | # Either an `action`, `chars`, or `command` field must be present. 251 | # `action` must be one of `Paste`, `PasteSelection`, `Copy`, or `Quit`. 252 | # `chars` writes the specified string every time that binding is activated. 253 | # These should generally be escape sequences, but they can be configured to 254 | # send arbitrary strings of bytes. 255 | # `command` must be a map containing a `program` string, and `args` array of 256 | # strings. For example: 257 | # - { ... , command: { program: "alacritty", args: ["-e", "vttest"] } } 258 | key_bindings: 259 | # Emacs Keybindings for Meta bound on MacOS Cmd key 260 | - { key: A, mods: Command, chars: "\x1ba" } 261 | - { key: B, mods: Command, chars: "\x1bb" } 262 | - { key: C, mods: Command, chars: "\x1bc" } 263 | - { key: D, mods: Command, chars: "\x1bd" } 264 | - { key: E, mods: Command, chars: "\x1be" } 265 | - { key: F, mods: Command, chars: "\x1bf" } 266 | - { key: G, mods: Command, chars: "\x1bg" } 267 | - { key: H, mods: Command, chars: "\x1bh" } 268 | - { key: I, mods: Command, chars: "\x1bi" } 269 | - { key: J, mods: Command, chars: "\x1bj" } 270 | - { key: K, mods: Command, chars: "\x1bk" } 271 | - { key: L, mods: Command, chars: "\x1bl" } 272 | - { key: M, mods: Command, chars: "\x1bm" } 273 | - { key: N, mods: Command, chars: "\x1bn" } 274 | - { key: O, mods: Command, chars: "\x1bo" } 275 | - { key: P, mods: Command, chars: "\x1bp" } 276 | - { key: Q, mods: Command, chars: "\x1bq" } 277 | - { key: R, mods: Command, chars: "\x1br" } 278 | - { key: S, mods: Command, chars: "\x1bs" } 279 | - { key: T, mods: Command, chars: "\x1bt" } 280 | - { key: U, mods: Command, chars: "\x1bu" } 281 | - { key: V, mods: Command, chars: "\x1bv" } 282 | - { key: W, mods: Command, chars: "\x1bw" } 283 | - { key: X, mods: Command, chars: "\x1bx" } 284 | - { key: Y, mods: Command, chars: "\x1by" } 285 | - { key: Z, mods: Command, chars: "\x1bz" } 286 | - { key: A, mods: Command|Shift, chars: "\x1bA" } 287 | - { key: B, mods: Command|Shift, chars: "\x1bB" } 288 | - { key: C, mods: Command|Shift, chars: "\x1bC" } 289 | - { key: D, mods: Command|Shift, chars: "\x1bD" } 290 | - { key: E, mods: Command|Shift, chars: "\x1bE" } 291 | - { key: F, mods: Command|Shift, chars: "\x1bF" } 292 | - { key: G, mods: Command|Shift, chars: "\x1bG" } 293 | - { key: H, mods: Command|Shift, chars: "\x1bH" } 294 | - { key: I, mods: Command|Shift, chars: "\x1bI" } 295 | - { key: J, mods: Command|Shift, chars: "\x1bJ" } 296 | - { key: K, mods: Command|Shift, chars: "\x1bK" } 297 | - { key: L, mods: Command|Shift, chars: "\x1bL" } 298 | - { key: M, mods: Command|Shift, chars: "\x1bM" } 299 | - { key: N, mods: Command|Shift, chars: "\x1bN" } 300 | - { key: O, mods: Command|Shift, chars: "\x1bO" } 301 | - { key: P, mods: Command|Shift, chars: "\x1bP" } 302 | - { key: Q, mods: Command|Shift, chars: "\x1bQ" } 303 | - { key: R, mods: Command|Shift, chars: "\x1bR" } 304 | - { key: S, mods: Command|Shift, chars: "\x1bS" } 305 | - { key: T, mods: Command|Shift, chars: "\x1bT" } 306 | - { key: U, mods: Command|Shift, chars: "\x1bU" } 307 | - { key: V, mods: Command|Shift, chars: "\x1bV" } 308 | - { key: X, mods: Command|Shift, chars: "\x1bX" } 309 | - { key: Y, mods: Command|Shift, chars: "\x1bY" } 310 | - { key: Z, mods: Command|Shift, chars: "\x1bZ" } 311 | - { key: Key1, mods: Command, chars: "\x1b1" } 312 | - { key: Key2, mods: Command, chars: "\x1b2" } 313 | - { key: Key3, mods: Command, chars: "\x1b3" } 314 | - { key: Key4, mods: Command, chars: "\x1b4" } 315 | - { key: Key5, mods: Command, chars: "\x1b5" } 316 | - { key: Key6, mods: Command, chars: "\x1b6" } 317 | - { key: Key7, mods: Command, chars: "\x1b7" } 318 | - { key: Key8, mods: Command, chars: "\x1b8" } 319 | - { key: Key9, mods: Command, chars: "\x1b9" } 320 | - { key: Key0, mods: Command, chars: "\x1b0" } 321 | - { key: Space, mods: Control, chars: "\x00" } # Ctrl + Space 322 | - { key: Grave, mods: Command, chars: "\x1b`" } # Command + ` 323 | - { key: Grave, mods: Command|Shift, chars: "\x1b~" } # Command + ~ 324 | - { key: Period, mods: Alt, chars: "\x1b." } # Command + . 325 | - { key: Comma, mods: Alt, chars: "\x1b," } # Command + , 326 | - { key: Key8, mods: Command|Shift, chars: "\x1b*" } # Command + * 327 | - { key: Key3, mods: Command|Shift, chars: "\x1b#" } # Command + # 328 | - { key: Period, mods: Command|Shift, chars: "\x1b>" } # Command + > 329 | - { key: Comma, mods: Command|Shift, chars: "\x1b<" } # Command + < 330 | - { key: Minus, mods: Command|Shift, chars: "\x1b_" } # Command + _ 331 | - { key: Key5, mods: Command|Shift, chars: "\x1b%" } # Command + % 332 | - { key: Key6, mods: Command|Shift, chars: "\x1b^" } # Command + ^ 333 | - { key: Backslash, mods: Command, chars: "\x1b\\" } # Command + \ 334 | - { key: Backslash, mods: Command|Shift, chars: "\x1b|" } # Command + | 335 | - { key: Y, mods: Control, action: Paste } 336 | - { key: W, mods: Command, action: Copy } 337 | - { key: Paste, action: Paste } 338 | - { key: Copy, action: Copy } 339 | - { key: Q, mods: Command, action: Quit } 340 | - { key: Home, chars: "\x1bOH", mode: AppCursor } 341 | - { key: Home, chars: "\x1b[H", mode: ~AppCursor } 342 | - { key: End, chars: "\x1bOF", mode: AppCursor } 343 | - { key: End, chars: "\x1b[F", mode: ~AppCursor } 344 | - { key: Key0, mods: Command, action: ResetFontSize } 345 | - { key: Equals, mods: Command, action: IncreaseFontSize } 346 | - { key: Minus, mods: Command, action: DecreaseFontSize } 347 | - { key: PageUp, mods: Shift, chars: "\x1b[5;2~" } 348 | - { key: PageUp, mods: Control, chars: "\x1b[5;5~" } 349 | - { key: PageUp, chars: "\x1b[5~" } 350 | - { key: PageDown, mods: Shift, chars: "\x1b[6;2~" } 351 | - { key: PageDown, mods: Control, chars: "\x1b[6;5~" } 352 | - { key: PageDown, chars: "\x1b[6~" } 353 | - { key: Tab, mods: Shift, chars: "\x1b[Z" } 354 | - { key: Back, chars: "\x7f" } 355 | - { key: Back, mods: Alt, chars: "\x1b\x7f" } 356 | - { key: Insert, chars: "\x1b[2~" } 357 | - { key: Delete, chars: "\x1b[3~" } 358 | - { key: Left, mods: Shift, chars: "\x1b[1;2D" } 359 | - { key: Left, mods: Control, chars: "\x1b[1;5D" } 360 | - { key: Left, mods: Alt, chars: "\x1b[1;3D" } 361 | - { key: Left, chars: "\x1b[D", mode: ~AppCursor } 362 | - { key: Left, chars: "\x1bOD", mode: AppCursor } 363 | - { key: Right, mods: Shift, chars: "\x1b[1;2C" } 364 | - { key: Right, mods: Control, chars: "\x1b[1;5C" } 365 | - { key: Right, mods: Alt, chars: "\x1b[1;3C" } 366 | - { key: Right, chars: "\x1b[C", mode: ~AppCursor } 367 | - { key: Right, chars: "\x1bOC", mode: AppCursor } 368 | - { key: Up, mods: Shift, chars: "\x1b[1;2A" } 369 | - { key: Up, mods: Control, chars: "\x1b[1;5A" } 370 | - { key: Up, mods: Alt, chars: "\x1b[1;3A" } 371 | - { key: Up, chars: "\x1b[A", mode: ~AppCursor } 372 | - { key: Up, chars: "\x1bOA", mode: AppCursor } 373 | - { key: Down, mods: Shift, chars: "\x1b[1;2B" } 374 | - { key: Down, mods: Control, chars: "\x1b[1;5B" } 375 | - { key: Down, mods: Alt, chars: "\x1b[1;3B" } 376 | - { key: Down, chars: "\x1b[B", mode: ~AppCursor } 377 | - { key: Down, chars: "\x1bOB", mode: AppCursor } 378 | - { key: F1, chars: "\x1bOP" } 379 | - { key: F2, chars: "\x1bOQ" } 380 | - { key: F3, chars: "\x1bOR" } 381 | - { key: F4, chars: "\x1bOS" } 382 | - { key: F5, chars: "\x1b[15~" } 383 | - { key: F6, chars: "\x1b[17~" } 384 | - { key: F7, chars: "\x1b[18~" } 385 | - { key: F8, chars: "\x1b[19~" } 386 | - { key: F9, chars: "\x1b[20~" } 387 | - { key: F10, chars: "\x1b[21~" } 388 | - { key: F11, chars: "\x1b[23~" } 389 | - { key: F12, chars: "\x1b[24~" } 390 | - { key: F1, mods: Shift, chars: "\x1b[1;2P" } 391 | - { key: F2, mods: Shift, chars: "\x1b[1;2Q" } 392 | - { key: F3, mods: Shift, chars: "\x1b[1;2R" } 393 | - { key: F4, mods: Shift, chars: "\x1b[1;2S" } 394 | - { key: F5, mods: Shift, chars: "\x1b[15;2~" } 395 | - { key: F6, mods: Shift, chars: "\x1b[17;2~" } 396 | - { key: F7, mods: Shift, chars: "\x1b[18;2~" } 397 | - { key: F8, mods: Shift, chars: "\x1b[19;2~" } 398 | - { key: F9, mods: Shift, chars: "\x1b[20;2~" } 399 | - { key: F10, mods: Shift, chars: "\x1b[21;2~" } 400 | - { key: F11, mods: Shift, chars: "\x1b[23;2~" } 401 | - { key: F12, mods: Shift, chars: "\x1b[24;2~" } 402 | - { key: F1, mods: Control, chars: "\x1b[1;5P" } 403 | - { key: F2, mods: Control, chars: "\x1b[1;5Q" } 404 | - { key: F3, mods: Control, chars: "\x1b[1;5R" } 405 | - { key: F4, mods: Control, chars: "\x1b[1;5S" } 406 | - { key: F5, mods: Control, chars: "\x1b[15;5~" } 407 | - { key: F6, mods: Control, chars: "\x1b[17;5~" } 408 | - { key: F7, mods: Control, chars: "\x1b[18;5~" } 409 | - { key: F8, mods: Control, chars: "\x1b[19;5~" } 410 | - { key: F9, mods: Control, chars: "\x1b[20;5~" } 411 | - { key: F10, mods: Control, chars: "\x1b[21;5~" } 412 | - { key: F11, mods: Control, chars: "\x1b[23;5~" } 413 | - { key: F12, mods: Control, chars: "\x1b[24;5~" } 414 | - { key: F1, mods: Alt, chars: "\x1b[1;6P" } 415 | - { key: F2, mods: Alt, chars: "\x1b[1;6Q" } 416 | - { key: F3, mods: Alt, chars: "\x1b[1;6R" } 417 | - { key: F4, mods: Alt, chars: "\x1b[1;6S" } 418 | - { key: F5, mods: Alt, chars: "\x1b[15;6~" } 419 | - { key: F6, mods: Alt, chars: "\x1b[17;6~" } 420 | - { key: F7, mods: Alt, chars: "\x1b[18;6~" } 421 | - { key: F8, mods: Alt, chars: "\x1b[19;6~" } 422 | - { key: F9, mods: Alt, chars: "\x1b[20;6~" } 423 | - { key: F10, mods: Alt, chars: "\x1b[21;6~" } 424 | - { key: F11, mods: Alt, chars: "\x1b[23;6~" } 425 | - { key: F12, mods: Alt, chars: "\x1b[24;6~" } 426 | - { key: F1, mods: Command, chars: "\x1b[1;3P" } 427 | - { key: F2, mods: Command, chars: "\x1b[1;3Q" } 428 | - { key: F3, mods: Command, chars: "\x1b[1;3R" } 429 | - { key: F4, mods: Command, chars: "\x1b[1;3S" } 430 | - { key: F5, mods: Command, chars: "\x1b[15;3~" } 431 | - { key: F6, mods: Command, chars: "\x1b[17;3~" } 432 | - { key: F7, mods: Command, chars: "\x1b[18;3~" } 433 | - { key: F8, mods: Command, chars: "\x1b[19;3~" } 434 | - { key: F9, mods: Command, chars: "\x1b[20;3~" } 435 | - { key: F10, mods: Command, chars: "\x1b[21;3~" } 436 | - { key: F11, mods: Command, chars: "\x1b[23;3~" } 437 | - { key: F12, mods: Command, chars: "\x1b[24;3~" } 438 | '' 439 | -------------------------------------------------------------------------------- /machines/alphaomega/dot-files/alacritty/alacritty.nix: -------------------------------------------------------------------------------- 1 | {}:'' 2 | # Configuration for Alacritty, the GPU enhanced terminal emulator 3 | 4 | # Any items in the `env` entry below will be added as 5 | # environment variables. Some entries may override variables 6 | # set by alacritty it self. 7 | env: 8 | # TERM env customization. 9 | # 10 | # If this property is not set, alacritty will set it to xterm-256color. 11 | # 12 | # Note that some xterm terminfo databases don't declare support for italics. 13 | # You can verify this by checking for the presence of `smso` and `sitm` in 14 | # `infocmp xterm-256color`. 15 | TERM: screen-256color 16 | 17 | window: 18 | # Window dimensions in character columns and lines 19 | # (changes require restart) 20 | dimensions: 21 | columns: 80 22 | lines: 24 23 | 24 | # Adds this many blank pixels of padding around the window 25 | # Units are physical pixels; this is not DPI aware. 26 | # (change requires restart) 27 | padding: 28 | x: 2 29 | y: 2 30 | 31 | # Window decorations 32 | # Setting this to false will result in window without borders and title bar. 33 | decorations: none 34 | 35 | # Display tabs using this many cells (changes require restart) 36 | tabspaces: 4 37 | 38 | # When true, bold text is drawn using the bright variant of colors. 39 | draw_bold_text_with_bright_colors: true 40 | 41 | # Font configuration (changes require restart) 42 | font: 43 | # The normal (roman) font face to use. 44 | normal: 45 | family: DejaVu Sans Mono 46 | # Style can be specified to pick a specific face. 47 | style: Book 48 | 49 | # The bold font face 50 | family: 51 | bold: DejaVu Sans Mono 52 | # Style can be specified to pick a specific face. 53 | style: Bold 54 | 55 | # The italic font face 56 | italic: 57 | family: DejaVu Sans Mono 58 | # Style can be specified to pick a specific face. 59 | style: Italic 60 | 61 | # Point size of the font 62 | size: 12.0 63 | 64 | # Offset is the extra space around each character. offset.y can be thought of 65 | # as modifying the linespacing, and offset.x as modifying the letter spacing. 66 | offset: 67 | x: 0 68 | y: 0 69 | 70 | # Glyph offset determines the locations of the glyphs within their cells with 71 | # the default being at the bottom. Increase the x offset to move the glyph to 72 | # the right, increase the y offset to move the glyph upward. 73 | glyph_offset: 74 | x: 0 75 | y: 0 76 | 77 | # OS X only: use thin stroke font rendering. Thin strokes are suitable 78 | # for retina displays, but for non-retina you probably want this set to 79 | # false. 80 | use_thin_strokes: true 81 | 82 | # Should display the render timer 83 | debug: 84 | render_timer: false 85 | 86 | # Colors (Gruvbox dark) 87 | colors: 88 | # Default colors 89 | primary: 90 | # hard contrast: background = '0x1d2021' 91 | background: '0x282828' 92 | # soft contrast: background = '0x32302f' 93 | foreground: '0xebdbb2' 94 | 95 | # Normal colors 96 | normal: 97 | black: '0x282828' 98 | red: '0xcc241d' 99 | green: '0x98971a' 100 | yellow: '0xd79921' 101 | blue: '0x458588' 102 | magenta: '0xb16286' 103 | cyan: '0x689d6a' 104 | white: '0xa89984' 105 | 106 | # Bright colors 107 | bright: 108 | black: '0x928374' 109 | red: '0xfb4934' 110 | green: '0xb8bb26' 111 | yellow: '0xfabd2f' 112 | blue: '0x83a598' 113 | magenta: '0xd3869b' 114 | cyan: '0x8ec07c' 115 | white: '0xebdbb2' 116 | 117 | # Colors (Darktooth) 118 | # colors: 119 | 120 | # # Default colors 121 | # primary: 122 | # background: '0x282828' 123 | # foreground: '0xfdf4c1' 124 | 125 | # # Normal colors 126 | # normal: 127 | # black: '0x282828' 128 | # red: '0x9d0006' 129 | # green: '0x79740e' 130 | # yellow: '0xb57614' 131 | # blue: '0x076678' 132 | # magenta: '0x8f3f71' 133 | # cyan: '0x00a7af' 134 | # white: '0xfdf4c1' 135 | 136 | # # Bright colors 137 | # bright: 138 | # black: '0x32302f' 139 | # red: '0xfb4933' 140 | # green: '0xb8bb26' 141 | # yellow: '0xfabd2f' 142 | # blue: '0x83a598' 143 | # magenta: '0xd3869b' 144 | # cyan: '0x3fd7e5' 145 | # white: '0xffffc8' 146 | 147 | # # Dim colors (Optional) 148 | # dim: 149 | # black: '0x1d2021' 150 | # red: '0x421e1e' 151 | # green: '0x232b0f' 152 | # yellow: '0x4d3b27' 153 | # blue: '0x2b3c44' 154 | # magenta: '0x4e3d45' 155 | # cyan: '0x205161' 156 | # white: '0xf4e8ba' 157 | 158 | # Visual Bell 159 | # 160 | # Any time the BEL code is received, Alacritty "rings" the visual bell. Once 161 | # rung, the terminal background will be set to white and transition back to the 162 | # default background color. You can control the rate of this transition by 163 | # setting the `duration` property (represented in milliseconds). You can also 164 | # configure the transition function by setting the `animation` property. 165 | # 166 | # Possible values for `animation` 167 | # `Ease` 168 | # `EaseOut` 169 | # `EaseOutSine` 170 | # `EaseOutQuad` 171 | # `EaseOutCubic` 172 | # `EaseOutQuart` 173 | # `EaseOutQuint` 174 | # `EaseOutExpo` 175 | # `EaseOutCirc` 176 | # `Linear` 177 | # 178 | # To completely disable the visual bell, set its duration to 0. 179 | # 180 | visual_bell: 181 | animation: EaseOutExpo 182 | duration: 0 183 | 184 | # Background opacity 185 | background_opacity: 1.0 186 | 187 | # Mouse bindings 188 | # 189 | # Currently doesn't support modifiers. Both the `mouse` and `action` fields must 190 | # be specified. 191 | # 192 | # Values for `mouse`: 193 | # - Middle 194 | # - Left 195 | # - Right 196 | # - Numeric identifier such as `5` 197 | # 198 | # Values for `action`: 199 | # - Paste 200 | # - PasteSelection 201 | # - Copy (TODO) 202 | mouse_bindings: 203 | - { mouse: Middle, action: PasteSelection } 204 | 205 | mouse: 206 | # Click settings 207 | # 208 | # The `double_click` and `triple_click` settings control the time 209 | # alacritty should wait for accepting multiple clicks as one double 210 | # or triple click. 211 | double_click: { threshold: 300 } 212 | triple_click: { threshold: 300 } 213 | 214 | # Faux Scrollback 215 | # 216 | # The `faux_scrollback_lines` setting controls the number 217 | # of lines the terminal should scroll when the alternate 218 | # screen buffer is active. This is used to allow mouse 219 | # scrolling for applications like `man`. 220 | # 221 | # To disable this completely, set `faux_scrollback_lines` to 0. 222 | faux_scrolling_lines: 1 223 | 224 | hide_when_typing: true 225 | 226 | selection: 227 | semantic_escape_chars: ",│`|:\"' ()[]{}<>" 228 | 229 | dynamic_title: true 230 | 231 | # Style of the cursor 232 | # 233 | # Values for 'cursor_style': 234 | # - Block 235 | # - Underline 236 | # - Beam 237 | cursor: 238 | style: Block 239 | 240 | # Whether the cursor should be a hollow block on window focus loss 241 | unfocused_hollow: true 242 | 243 | # Live config reload (changes require restart) 244 | live_config_reload: true 245 | 246 | # Shell 247 | # 248 | # You can set shell.program to the path of your favorite shell, e.g. /bin/fish. 249 | # Entries in shell.args are passed unmodified as arguments to the shell. 250 | # 251 | shell: 252 | program: /run/current-system/sw/bin/zsh 253 | args: 254 | - --login 255 | 256 | # Key bindings 257 | # 258 | # Each binding is defined as an object with some properties. Most of the 259 | # properties are optional. All of the alphabetical keys should have a letter for 260 | # the `key` value such as `V`. Function keys are probably what you would expect 261 | # as well (F1, F2, ..). The number keys above the main keyboard are encoded as 262 | # `Key1`, `Key2`, etc. Keys on the number pad are encoded `Number1`, `Number2`, 263 | # etc. These all match the glutin::VirtualKeyCode variants. 264 | # 265 | # A list with all available `key` names can be found here: 266 | # https://docs.rs/glutin/*/glutin/enum.VirtualKeyCode.html#variants 267 | # 268 | # Possible values for `mods` 269 | # `Command`, `Super` refer to the super/command/windows key 270 | # `Control` for the control key 271 | # `Shift` for the Shift key 272 | # `Alt` and `Option` refer to alt/option 273 | # 274 | # mods may be combined with a `|`. For example, requiring control and shift 275 | # looks like: 276 | # 277 | # mods: Control|Shift 278 | # 279 | # The parser is currently quite sensitive to whitespace and capitalization - 280 | # capitalization must match exactly, and piped items must not have whitespace 281 | # around them. 282 | # 283 | # Either an `action`, `chars`, or `command` field must be present. 284 | # `action` must be one of `Paste`, `PasteSelection`, `Copy`, or `Quit`. 285 | # `chars` writes the specified string every time that binding is activated. 286 | # These should generally be escape sequences, but they can be configured to 287 | # send arbitrary strings of bytes. 288 | # `command` must be a map containing a `program` string, and `args` array of 289 | # strings. For example: 290 | # - { ... , command: { program: "alacritty", args: ["-e", "vttest"] } } 291 | key_bindings: 292 | # Emacs Keybindings for Meta bound on MacOS Cmd key 293 | - { key: A, mods: Command, chars: "\x1ba" } 294 | - { key: B, mods: Command, chars: "\x1bb" } 295 | - { key: C, mods: Command, chars: "\x1bc" } 296 | - { key: D, mods: Command, chars: "\x1bd" } 297 | - { key: E, mods: Command, chars: "\x1be" } 298 | - { key: F, mods: Command, chars: "\x1bf" } 299 | - { key: G, mods: Command, chars: "\x1bg" } 300 | - { key: H, mods: Command, chars: "\x1bh" } 301 | - { key: I, mods: Command, chars: "\x1bi" } 302 | - { key: J, mods: Command, chars: "\x1bj" } 303 | - { key: K, mods: Command, chars: "\x1bk" } 304 | - { key: L, mods: Command, chars: "\x1bl" } 305 | - { key: M, mods: Command, chars: "\x1bm" } 306 | - { key: N, mods: Command, chars: "\x1bn" } 307 | - { key: O, mods: Command, chars: "\x1bo" } 308 | - { key: P, mods: Command, chars: "\x1bp" } 309 | - { key: Q, mods: Command, chars: "\x1bq" } 310 | - { key: R, mods: Command, chars: "\x1br" } 311 | - { key: S, mods: Command, chars: "\x1bs" } 312 | - { key: T, mods: Command, chars: "\x1bt" } 313 | - { key: U, mods: Command, chars: "\x1bu" } 314 | - { key: V, mods: Command, chars: "\x1bv" } 315 | - { key: W, mods: Command, chars: "\x1bw" } 316 | - { key: X, mods: Command, chars: "\x1bx" } 317 | - { key: Y, mods: Command, chars: "\x1by" } 318 | - { key: Z, mods: Command, chars: "\x1bz" } 319 | - { key: A, mods: Command|Shift, chars: "\x1bA" } 320 | - { key: B, mods: Command|Shift, chars: "\x1bB" } 321 | - { key: C, mods: Command|Shift, chars: "\x1bC" } 322 | - { key: D, mods: Command|Shift, chars: "\x1bD" } 323 | - { key: E, mods: Command|Shift, chars: "\x1bE" } 324 | - { key: F, mods: Command|Shift, chars: "\x1bF" } 325 | - { key: G, mods: Command|Shift, chars: "\x1bG" } 326 | - { key: H, mods: Command|Shift, chars: "\x1bH" } 327 | - { key: I, mods: Command|Shift, chars: "\x1bI" } 328 | - { key: J, mods: Command|Shift, chars: "\x1bJ" } 329 | - { key: K, mods: Command|Shift, chars: "\x1bK" } 330 | - { key: L, mods: Command|Shift, chars: "\x1bL" } 331 | - { key: M, mods: Command|Shift, chars: "\x1bM" } 332 | - { key: N, mods: Command|Shift, chars: "\x1bN" } 333 | - { key: O, mods: Command|Shift, chars: "\x1bO" } 334 | - { key: P, mods: Command|Shift, chars: "\x1bP" } 335 | - { key: Q, mods: Command|Shift, chars: "\x1bQ" } 336 | - { key: R, mods: Command|Shift, chars: "\x1bR" } 337 | - { key: S, mods: Command|Shift, chars: "\x1bS" } 338 | - { key: T, mods: Command|Shift, chars: "\x1bT" } 339 | - { key: U, mods: Command|Shift, chars: "\x1bU" } 340 | - { key: V, mods: Command|Shift, chars: "\x1bV" } 341 | - { key: X, mods: Command|Shift, chars: "\x1bX" } 342 | - { key: Y, mods: Command|Shift, chars: "\x1bY" } 343 | - { key: Z, mods: Command|Shift, chars: "\x1bZ" } 344 | - { key: Key1, mods: Command, chars: "\x1b1" } 345 | - { key: Key2, mods: Command, chars: "\x1b2" } 346 | - { key: Key3, mods: Command, chars: "\x1b3" } 347 | - { key: Key4, mods: Command, chars: "\x1b4" } 348 | - { key: Key5, mods: Command, chars: "\x1b5" } 349 | - { key: Key6, mods: Command, chars: "\x1b6" } 350 | - { key: Key7, mods: Command, chars: "\x1b7" } 351 | - { key: Key8, mods: Command, chars: "\x1b8" } 352 | - { key: Key9, mods: Command, chars: "\x1b9" } 353 | - { key: Key0, mods: Command, chars: "\x1b0" } 354 | - { key: Space, mods: Control, chars: "\x00" } # Ctrl + Space 355 | - { key: Grave, mods: Command, chars: "\x1b`" } # Command + ` 356 | - { key: Grave, mods: Command|Shift, chars: "\x1b~" } # Command + ~ 357 | - { key: Period, mods: Alt, chars: "\x1b." } # Command + . 358 | - { key: Comma, mods: Alt, chars: "\x1b," } # Command + , 359 | - { key: Key8, mods: Command|Shift, chars: "\x1b*" } # Command + * 360 | - { key: Key3, mods: Command|Shift, chars: "\x1b#" } # Command + # 361 | - { key: Period, mods: Command|Shift, chars: "\x1b>" } # Command + > 362 | - { key: Comma, mods: Command|Shift, chars: "\x1b<" } # Command + < 363 | - { key: Minus, mods: Command|Shift, chars: "\x1b_" } # Command + _ 364 | - { key: Key5, mods: Command|Shift, chars: "\x1b%" } # Command + % 365 | - { key: Key6, mods: Command|Shift, chars: "\x1b^" } # Command + ^ 366 | - { key: Backslash, mods: Command, chars: "\x1b\\" } # Command + \ 367 | - { key: Backslash, mods: Command|Shift, chars: "\x1b|" } # Command + | 368 | - { key: Y, mods: Control, action: Paste } 369 | - { key: W, mods: Alt, action: Copy } 370 | - { key: Paste, action: Paste } 371 | - { key: Copy, action: Copy } 372 | - { key: Q, mods: Command, action: Quit } 373 | - { key: Home, chars: "\x1bOH", mode: AppCursor } 374 | - { key: Home, chars: "\x1b[H", mode: ~AppCursor } 375 | - { key: End, chars: "\x1bOF", mode: AppCursor } 376 | - { key: End, chars: "\x1b[F", mode: ~AppCursor } 377 | - { key: Key0, mods: Command, action: ResetFontSize } 378 | - { key: Equals, mods: Command, action: IncreaseFontSize } 379 | - { key: Minus, mods: Command, action: DecreaseFontSize } 380 | - { key: PageUp, mods: Shift, chars: "\x1b[5;2~" } 381 | - { key: PageUp, mods: Control, chars: "\x1b[5;5~" } 382 | - { key: PageUp, chars: "\x1b[5~" } 383 | - { key: PageDown, mods: Shift, chars: "\x1b[6;2~" } 384 | - { key: PageDown, mods: Control, chars: "\x1b[6;5~" } 385 | - { key: PageDown, chars: "\x1b[6~" } 386 | - { key: Tab, mods: Shift, chars: "\x1b[Z" } 387 | - { key: Back, chars: "\x7f" } 388 | - { key: Back, mods: Alt, chars: "\x1b\x7f" } 389 | - { key: Insert, chars: "\x1b[2~" } 390 | - { key: Delete, chars: "\x1b[3~" } 391 | - { key: Left, mods: Shift, chars: "\x1b[1;2D" } 392 | - { key: Left, mods: Control, chars: "\x1b[1;5D" } 393 | - { key: Left, mods: Alt, chars: "\x1b[1;3D" } 394 | - { key: Left, chars: "\x1b[D", mode: ~AppCursor } 395 | - { key: Left, chars: "\x1bOD", mode: AppCursor } 396 | - { key: Right, mods: Shift, chars: "\x1b[1;2C" } 397 | - { key: Right, mods: Control, chars: "\x1b[1;5C" } 398 | - { key: Right, mods: Alt, chars: "\x1b[1;3C" } 399 | - { key: Right, chars: "\x1b[C", mode: ~AppCursor } 400 | - { key: Right, chars: "\x1bOC", mode: AppCursor } 401 | - { key: Up, mods: Shift, chars: "\x1b[1;2A" } 402 | - { key: Up, mods: Control, chars: "\x1b[1;5A" } 403 | - { key: Up, mods: Alt, chars: "\x1b[1;3A" } 404 | - { key: Up, chars: "\x1b[A", mode: ~AppCursor } 405 | - { key: Up, chars: "\x1bOA", mode: AppCursor } 406 | - { key: Down, mods: Shift, chars: "\x1b[1;2B" } 407 | - { key: Down, mods: Control, chars: "\x1b[1;5B" } 408 | - { key: Down, mods: Alt, chars: "\x1b[1;3B" } 409 | - { key: Down, chars: "\x1b[B", mode: ~AppCursor } 410 | - { key: Down, chars: "\x1bOB", mode: AppCursor } 411 | - { key: F1, chars: "\x1bOP" } 412 | - { key: F2, chars: "\x1bOQ" } 413 | - { key: F3, chars: "\x1bOR" } 414 | - { key: F4, chars: "\x1bOS" } 415 | - { key: F5, chars: "\x1b[15~" } 416 | - { key: F6, chars: "\x1b[17~" } 417 | - { key: F7, chars: "\x1b[18~" } 418 | - { key: F8, chars: "\x1b[19~" } 419 | - { key: F9, chars: "\x1b[20~" } 420 | - { key: F10, chars: "\x1b[21~" } 421 | - { key: F11, chars: "\x1b[23~" } 422 | - { key: F12, chars: "\x1b[24~" } 423 | - { key: F1, mods: Shift, chars: "\x1b[1;2P" } 424 | - { key: F2, mods: Shift, chars: "\x1b[1;2Q" } 425 | - { key: F3, mods: Shift, chars: "\x1b[1;2R" } 426 | - { key: F4, mods: Shift, chars: "\x1b[1;2S" } 427 | - { key: F5, mods: Shift, chars: "\x1b[15;2~" } 428 | - { key: F6, mods: Shift, chars: "\x1b[17;2~" } 429 | - { key: F7, mods: Shift, chars: "\x1b[18;2~" } 430 | - { key: F8, mods: Shift, chars: "\x1b[19;2~" } 431 | - { key: F9, mods: Shift, chars: "\x1b[20;2~" } 432 | - { key: F10, mods: Shift, chars: "\x1b[21;2~" } 433 | - { key: F11, mods: Shift, chars: "\x1b[23;2~" } 434 | - { key: F12, mods: Shift, chars: "\x1b[24;2~" } 435 | - { key: F1, mods: Control, chars: "\x1b[1;5P" } 436 | - { key: F2, mods: Control, chars: "\x1b[1;5Q" } 437 | - { key: F3, mods: Control, chars: "\x1b[1;5R" } 438 | - { key: F4, mods: Control, chars: "\x1b[1;5S" } 439 | - { key: F5, mods: Control, chars: "\x1b[15;5~" } 440 | - { key: F6, mods: Control, chars: "\x1b[17;5~" } 441 | - { key: F7, mods: Control, chars: "\x1b[18;5~" } 442 | - { key: F8, mods: Control, chars: "\x1b[19;5~" } 443 | - { key: F9, mods: Control, chars: "\x1b[20;5~" } 444 | - { key: F10, mods: Control, chars: "\x1b[21;5~" } 445 | - { key: F11, mods: Control, chars: "\x1b[23;5~" } 446 | - { key: F12, mods: Control, chars: "\x1b[24;5~" } 447 | - { key: F1, mods: Alt, chars: "\x1b[1;6P" } 448 | - { key: F2, mods: Alt, chars: "\x1b[1;6Q" } 449 | - { key: F3, mods: Alt, chars: "\x1b[1;6R" } 450 | - { key: F4, mods: Alt, chars: "\x1b[1;6S" } 451 | - { key: F5, mods: Alt, chars: "\x1b[15;6~" } 452 | - { key: F6, mods: Alt, chars: "\x1b[17;6~" } 453 | - { key: F7, mods: Alt, chars: "\x1b[18;6~" } 454 | - { key: F8, mods: Alt, chars: "\x1b[19;6~" } 455 | - { key: F9, mods: Alt, chars: "\x1b[20;6~" } 456 | - { key: F10, mods: Alt, chars: "\x1b[21;6~" } 457 | - { key: F11, mods: Alt, chars: "\x1b[23;6~" } 458 | - { key: F12, mods: Alt, chars: "\x1b[24;6~" } 459 | - { key: F1, mods: Command, chars: "\x1b[1;3P" } 460 | - { key: F2, mods: Command, chars: "\x1b[1;3Q" } 461 | - { key: F3, mods: Command, chars: "\x1b[1;3R" } 462 | - { key: F4, mods: Command, chars: "\x1b[1;3S" } 463 | - { key: F5, mods: Command, chars: "\x1b[15;3~" } 464 | - { key: F6, mods: Command, chars: "\x1b[17;3~" } 465 | - { key: F7, mods: Command, chars: "\x1b[18;3~" } 466 | - { key: F8, mods: Command, chars: "\x1b[19;3~" } 467 | - { key: F9, mods: Command, chars: "\x1b[20;3~" } 468 | - { key: F10, mods: Command, chars: "\x1b[21;3~" } 469 | - { key: F11, mods: Command, chars: "\x1b[23;3~" } 470 | - { key: F12, mods: Command, chars: "\x1b[24;3~" } 471 | '' 472 | --------------------------------------------------------------------------------