diff options
33 files changed, 78 insertions, 352 deletions
diff --git a/.dockerignore b/.dockerignore index 2d2ecd6..ce47e6b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1 +1,4 @@ .git/ +.gitmodules +Dockerfile +README.md diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 618063e..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,9 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: weekly - labels: - - "dependencies" - - "skip-changelog" diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml deleted file mode 100644 index cc0913c..0000000 --- a/.github/workflows/ansible-lint.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: ansible-lint -on: - push: - branches: - - master - pull_request: - branches: - - master -jobs: - build: - name: Ansible Lint - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Setup Python - uses: actions/setup-python@v4 - - name: Install ansible-lint - run: | - python -m pip install --upgrade pip - pip install ansible-lint - - name: Run ansible-lint - run: ansible-lint . diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..6403195 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,24 @@ +[submodule "dotfiles/zsh/.zsh/zsh-autosuggestions"] + path = dotfiles/zsh/.zsh/zsh-autosuggestions + url = https://github.com/zsh-users/zsh-autosuggestions +[submodule "dotfiles/zsh/.zsh/zsh-syntax-highlighting"] + path = dotfiles/zsh/.zsh/zsh-syntax-highlighting + url = https://github.com/zsh-users/zsh-syntax-highlighting.git +[submodule "dotfiles/zsh/.zsh/pure"] + path = dotfiles/zsh/.zsh/pure + url = https://github.com/sindresorhus/pure.git +[submodule "dotfiles/zsh/.zsh/zsh-completions"] + path = dotfiles/zsh/.zsh/zsh-completions + url = https://github.com/zsh-users/zsh-completions.git +[submodule "dotfiles/tmux/.tmux/tmux-resurrect"] + path = dotfiles/tmux/.tmux/tmux-resurrect + url = https://github.com/tmux-plugins/tmux-resurrect +[submodule "dotfiles/tmux/.tmux/tmux-continuum"] + path = dotfiles/tmux/.tmux/tmux-continuum + url = https://github.com/tmux-plugins/tmux-continuum +[submodule "dotfiles/tmux/.tmux/tmux-sessionist"] + path = dotfiles/tmux/.tmux/tmux-sessionist + url = https://github.com/tmux-plugins/tmux-sessionist +[submodule "dotfiles/nvim/.config/nvim"] + path = dotfiles/nvim/.config/nvim + url = https://github.com/nikolaosboutalas/kickstart.nvim diff --git a/Dockerfile.ubuntu b/Dockerfile index 2668fad..2668fad 100644 --- a/Dockerfile.ubuntu +++ b/Dockerfile diff --git a/Dockerfile.fedora b/Dockerfile.fedora deleted file mode 100644 index b0781cd..0000000 --- a/Dockerfile.fedora +++ /dev/null @@ -1,19 +0,0 @@ -FROM fedora:latest - -RUN dnf update -y && \ - dnf install -y ansible - -RUN dnf install -y passwd \ - && useradd -m -s /bin/bash admin \ - && echo "admin ALL=(ALL) ALL" >> /etc/sudoers \ - && passwd -d root - -RUN echo 'admin:admin' | chpasswd - -USER admin -WORKDIR /home/admin - -COPY --chown=admin . init -WORKDIR init - -CMD ["/bin/bash"] @@ -2,13 +2,13 @@ ## Development -In order to test this, you can use *Docker* and build a simple Linux container +In order to test this, you can use *Docker* ```bash - $ git clone git@github.com:nikolaosboutalas/init.git + $ git clone --recurse-submodules https://github.com/nikolaosboutalas/init.git $ cd init - # Build a docker container with the specified distribution - $ docker build . -t ansible -f Dockerfile.<distribution> && docker run --rm -it ansible + # Build and run the docker container + $ docker build . -t ansible && docker run --rm -it ansible # Inside the new running container $ ansible-playbook local.yml ``` diff --git a/dotfiles/git/.gitconfig b/dotfiles/git/.gitconfig new file mode 100644 index 0000000..d35eab3 --- /dev/null +++ b/dotfiles/git/.gitconfig @@ -0,0 +1,2 @@ +[core] + editor = nvim diff --git a/dotfiles/node/.nvmrc b/dotfiles/node/.nvmrc new file mode 100644 index 0000000..b9bc2fd --- /dev/null +++ b/dotfiles/node/.nvmrc @@ -0,0 +1 @@ +latest
\ No newline at end of file diff --git a/dotfiles/nvim/.config/nvim b/dotfiles/nvim/.config/nvim new file mode 160000 +Subproject aacf5fe4d8760c73fa6ade4259630c2028cf037 diff --git a/dotfiles/nvm/.nvmrc b/dotfiles/nvm/.nvmrc deleted file mode 100644 index 64f5a0a..0000000 --- a/dotfiles/nvm/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -node diff --git a/dotfiles/sdkman/.sdkmanrc b/dotfiles/sdkman/.sdkmanrc index 690971c..241c605 100644 --- a/dotfiles/sdkman/.sdkmanrc +++ b/dotfiles/sdkman/.sdkmanrc @@ -1,3 +1 @@ -# Enable auto-env through the sdkman_auto_env config -# Add key=value pairs of SDKs to use below java=17.0.7-zulu diff --git a/dotfiles/tmux/.tmux.conf b/dotfiles/tmux/.tmux.conf index f4114f8..bdd00cd 100644 --- a/dotfiles/tmux/.tmux.conf +++ b/dotfiles/tmux/.tmux.conf @@ -1,5 +1,9 @@ -# Remove elements from the right side of the status bar +set -g mouse off set -g status-right '' -set -g mouse off +set -g @continuum-save-interval '1' +set -g @continuum-restore 'on' +run-shell ~/.tmux/tmux-resurrect/resurrect.tmux +run-shell ~/.tmux/tmux-continuum/continuum.tmux +run-shell ~/.tmux/tmux-sessionist/sessionist.tmux diff --git a/dotfiles/tmux/.tmux/tmux-continuum b/dotfiles/tmux/.tmux/tmux-continuum new file mode 160000 +Subproject 0698e8f4b17d6454c71bf5212895ec055c578da diff --git a/dotfiles/tmux/.tmux/tmux-resurrect b/dotfiles/tmux/.tmux/tmux-resurrect new file mode 160000 +Subproject cff343cf9e81983d3da0c8562b01616f12e8d54 diff --git a/dotfiles/tmux/.tmux/tmux-sessionist b/dotfiles/tmux/.tmux/tmux-sessionist new file mode 160000 +Subproject a315c423328d9bdf5cf796435ce7075fa5e1bff diff --git a/dotfiles/zsh/.zsh/pure b/dotfiles/zsh/.zsh/pure new file mode 160000 +Subproject 4e0ce0a2f8576894e5dad83857e9a9851faa0f5 diff --git a/dotfiles/zsh/.zsh/zsh-autosuggestions b/dotfiles/zsh/.zsh/zsh-autosuggestions new file mode 160000 +Subproject c3d4e576c9c86eac62884bd47c01f6faed043fc diff --git a/dotfiles/zsh/.zsh/zsh-completions b/dotfiles/zsh/.zsh/zsh-completions new file mode 160000 +Subproject 507f1f8715edd9f1f403c140fa332644d81ebab diff --git a/dotfiles/zsh/.zsh/zsh-syntax-highlighting b/dotfiles/zsh/.zsh/zsh-syntax-highlighting new file mode 160000 +Subproject e0165eaa730dd0fa321a6a6de74f092fe87630b diff --git a/dotfiles/zsh/.zshrc b/dotfiles/zsh/.zshrc new file mode 100644 index 0000000..cf9ecde --- /dev/null +++ b/dotfiles/zsh/.zshrc @@ -0,0 +1,21 @@ +source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh + +source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh + +fpath=(path/to/zsh-completions/src $fpath) + +fpath+=($HOME/.zsh/pure) +autoload -U promptinit; promptinit +prompt pure + +# Enable vi mode +bindkey -v + +export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm + +[ -f ~/.blue/.aliasrc ] && source ~/.blue/.aliasrc + +#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! +export SDKMAN_DIR="$HOME/.sdkman" +[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh" @@ -1,9 +1,6 @@ - hosts: localhost tasks: - - ansible.builtin.import_tasks: tasks/dependencies/all.yml - - ansible.builtin.import_tasks: tasks/zsh.yml - - ansible.builtin.import_tasks: tasks/ssh.yml - - ansible.builtin.import_tasks: tasks/node.yml - - ansible.builtin.import_tasks: tasks/sdkman.yml + - ansible.builtin.import_tasks: tasks/dependencies.yml - ansible.builtin.import_tasks: tasks/dotfiles.yml - - ansible.builtin.import_tasks: tasks/tmux.yml + - ansible.builtin.import_tasks: tasks/sdkman.yml + - ansible.builtin.import_tasks: tasks/node.yml diff --git a/ssh/id_rsa b/ssh/id_rsa deleted file mode 100644 index 5353347..0000000 --- a/ssh/id_rsa +++ /dev/null @@ -1,137 +0,0 @@ -$ANSIBLE_VAULT;1.1;AES256 -64353835353235326635346137643338613666616230333064353066363732656564336130633464 -3437663266336135363935623035326534646538613463310a373061383762393964316461326231 -30336330333539663436303637343834656338623238353031626661383736313738333235323432 -3837373334623730380a383239373034636636346132363565303235313236386465336131323331 -31333762396266633063366162636330373164386135643539613131353161616266303838383764 -66303566313462383835333439323536656132653838353437366135303131663839373334313435 -30393933323037643430626630386531303235653130663731306365333331376331323430323838 -30373632353733386662346538343763363331653164663331653736333263333633623639353261 -34313331323334303633393365353637663462326436613765323966346235393734383863306464 -35366166373038363634633134396164663132643166653330393539663838663861393833663663 -64383966363765316133323336343365613366643566356264656135303134333664616430333561 -34636265333436363232613162353264366362363733623634326631666130333034383937623235 -66333235646137343236353236643061663263333564353965353333366430613935663830373336 -30386336383931393564346434633564613434353935393466303066623930333166653861383165 -61663365333838636264313831636461366534643439653330343136386234613832353564336532 -32326462626639386566333939316138663239343236633237616532313137666365616632646134 -31303437643066653632643434316234343435653030616266616638393339633566646261336634 -38333264623730663739306663323934396330393830636339353536613439393061633734653263 -32633636663938396266613463353738313862356436316238613432323538353266653765356239 -62323434626632646533366335393536373238636462393731396565346561396663633861646638 -65353036653466326261616264396339316364666233313438653738396634383965393165356337 -39343465363232363636643631333331396134653330376265333131373264393838346633303933 -38666331333130313237383731393065326430346364636663316337653165613138613761343262 -66363435616563666638376139643864643062656633346437373463383966653738633166393138 -36623863633363316164343337386431353762323734643437636362393561323232616339386533 -33346163313237383938616238643034396130306166623431613434656266323834626565636666 -39336664343337323134613933383332376161626436303732323531353165323833306365353666 -30393263656335396361636631383335623064396230393566383134306164646666326534326464 -37373264393463616133653162633464326332613838356238306334616233376539356436393839 -66613139393231663632383964393761653331353435633566666166326235306338333262646364 -31633834313838663534393636373062353138306266636564626138386662313832643838303262 -61353266333563633335663036626565383638386536666231663734366561343164386463363233 -62376566383666663530383066346563623364653430616362336462663366313266626530373130 -38316365623932643137326235636664353765666530346535656163326661643938656438623463 -34316164383132643534646461666532646162653662363836396366346661393864343361346430 -37343733323538393731373565393837333433303731363130653766353830646664656134666131 -64656637313563376133386163663466323338636563383734616562383134323330626635306437 -65633366663432633135623566646637656132616536333130653565323838633838376637356130 -39623737376534306261366365623931313761386364366531306538343166616138646236616536 -35343662336336396532303138633965333465333037396436666231313764643863636232393662 -36663339396333646134663264353866633136613933363732303864633233303265643831333061 -30353631373639633033646561636162653939663132353030646438376438653038386535373362 -34653362633733643339663061623232633762353137636233626664653432316331643165373630 -33353862653330353237653163303936646532613733303238356333633064353061336261393761 -32303231363866343465316562346365373866386330323864613134383261316566386339383861 -39336339623239623030626538396339396534356433656531643062623736616533663737636236 -30616465333939646564393665393333663963656130313831396634396666643764333663303030 -32346530656231653465303537366138363037396439343562316338616336663134383864663163 -66323638313335666134646664383062383563396532633364363838383266333438633365306462 -38336236353434356166356138373334356432373531623930316330313631646434316236616561 -62303731366538666363663334643964616461346239643139616537656165623863303639626133 -39363336353435623438393762616532346631363066373738323733393531393832326363393833 -38383237333362663933646461366131663438366364333835343734313562633464333361343665 -30353238353763666363313764316161663837323963626639666136376433333033336261663237 -35656537646464623733306534643432386562333032636230396132373637363865346537626233 -35616361373436663834636333653865663663376431333566333131623262653862626438376534 -33656539383431313965316633313561316361343261316530613630646131323439613238383331 -33306531396530646132636537393338343366633834643633636263613636626331383739323735 -61643232303166396562366634663736313366393635653863323365613263656237363263316431 -33626635313665333630623031316666343732356132353663356664353065623930316565666663 -35373232663037303939363132356632353161316561353937623433656437633862613561333138 -62386239333465353866633435386661643339356161633436626532623833613866633761353261 -62646265663564313161396165366634666138323266316633643835633430373365643461363765 -36633136663565646538336263313966343863393639383534613233396661666639663665653830 -66333739633765623138363165356264656532343830363334316333396461363536366236383934 -30633932323831646534383434613865373632373231346365653636613433323061613262323038 -36633634326263396638653034326666636438663865376130303366343130373130653133616563 -37343664623532633238346632393231376166303863393830373431366430393132336631363331 -66396363333463303239353164313634653637323337396166613732326563376539313261616164 -38653034616639333433333135353234356333646665376337613538383664663832396137303632 -65383637663263376233383362333735633032303062326664313938353439316463356263343339 -36356161653333613739353061646166663362623465643666666538346262663932383435363437 -39656338393333313866666263363162636566386435326139373463653062393938386537383466 -39336236313166363934613131383462666236363239323239353838626365303063336138646230 -64646266383635663066643465376133616636613437383235316664323437333739366134323961 -30353235613633383532396238366630396233333366353437376437373061663134326533326334 -38613630303963333361316562393961646436383263373731326431326664643165303030356330 -63633863343738383262396538663336653661653363393435666435393931663061366664333861 -32306339333366663661643763386466396238633166343134306461343639313030363563373235 -30393265646433653466383436363364306264636630613166303732383739623030316535613063 -31343262373933316366633266326537613865356431373835353837623733613463353734316139 -66663138383430373037393461336630613532343661626564366662653662363334323235393833 -30343864386466393336633135633335323430623130356333613338356538336239313737303336 -62633632346130333236373063346564653461656638333839323739333732633634636234393365 -36336134613264663666306639303362666335666631353235626565383132656562306663656464 -66333936343862356238353730653033353563376438623064303263306439666535653631303561 -35326266623865323335633832313365643930666236366135626333333139656661633237313262 -33303963306530623637396363303636626134663362623366386264623630653030643130623631 -63386365316135336530336165613539633264656566616666393538623830373065393739373566 -64396236346432316533656636363062303361643237346235353336366534666165363834373362 -66613434393862663062353436383736653730333634666137363035303337636231613339316563 -63363831363665356166393965393631346639616263333361323630303436363939346265316532 -31623966313931666334373762653362326135663638656664323336656332623531333337376631 -62636361666131306339383262613334393932656130613236333538323731623563333162386161 -30666533316134616365663631623232383634643763643965376362383937623834353739303834 -37643939313262656433623438366237343335363134376335666561366538633537663537643632 -31353636613635633062366434303762613865373839666236353436353239383230313866323365 -64646466656363333462666565626639363332663936626139326331613238613462653737643132 -33623430353433386562393366316532643136356337656338663034326434306364626635323138 -63333334353564653536653432366235636335306530656130393564356438623934666630616133 -34643838386339306165646536353162666638333933336533653632623938666233396532343039 -34653438376537383731333264363935363038616533303234363765633435393466346561646139 -38663339303262386361393433626165646361313737373864363738303064346538316162663739 -61633233306336636663643463663038636636363962316239663064306365663666346230303531 -30303563623732386639633735356632373961633331626438356135633930613766616366393764 -30333564326439373238613964353538353431653264353433376363633932376661653663376635 -39303138626165653437316666393331393561643437663365366334333163653039343063663066 -34383466383063386531393335386434633064623638626263366236346233363535373539323238 -31663236643130343165326364376632666163306334656565336664643738333138316230616335 -33633933616435633133313830646436623930353263373639313731303463383835313335396366 -30613564653631356261323935626133306134393861326463333138303030393861663661613966 -64663064373064393861666538363263666430386466663137666464643635333561653231353831 -32323665623965333731626266313834306238313665373038656134323533643261353637633264 -65356266633462656366316130396437383462363937366130626566316639376135316266613265 -62303930333862353335336664346161636134626335623935313134663732373561333562383332 -36393165616232306461663735343964303066643935666530316261383038303833636236623166 -36343738366332623035366363623363343666363732373737626165303032323166303666383734 -33366338383433313432616432613062393839363337363932303937653664363038343939386364 -35653938343062366239366432303863383132386438363762633935393332316462633732346166 -30336564376562353136386565623531316133636433336663616561623762366235366663343062 -36353365343938616538623365653839323065653561626533316163363839646561613838613865 -39616535623237303736626665626662626562333466646430306335613562376662623564323064 -32303735653465656139323030343832363261313433356364626461343566353534643062663961 -66383538623636623666653139363561346437626339313332333039356539653035653764613331 -38643732383966643431303636623232626233376361323665663931353236643063383639656439 -66613235346335336535333332643535393836343261326232323132323133653537626436303532 -30376563623932396266313630356637303363383662643266353534613035383564616361366232 -31373336643062326438333737663230623866323338376137356333353932346139333364353131 -35626561326532643135633663366662363535613935623861303539383136306433306438633738 -63373062356233666634383632373335306132356434323035616465303032313137363034373263 -61623664356263383535386364383965343832636234346561343164333432303363633161376231 -33363361643065316431386130323639356465333638633564623062613164643464313535653737 -63613464633536633365643936313038313762306137646638663966636333396536313763393333 -66306164636463656266363262636139306565346662343366383362386339383838336165646631 -39383464616562383834656362653065323733393062633364333766366530353362326532333130 -63313739313230313436 diff --git a/ssh/id_rsa.pub b/ssh/id_rsa.pub deleted file mode 100644 index 9bf215e..0000000 --- a/ssh/id_rsa.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDL4TxmSD7FgkRGOVJ+NbfXuLqd0LrOEeJXhHvnDh7DkFPOtj8fYGzm6rY06x/UtFAZ+qXpC7JD7yLkeSUkqgBa+LQnVaiVC5jF3fxkT5j4RZxosVfEAGx9NWDO7n6oplCnWPDB6cwQZ2BTDLRu4pnFhdiZvBggtLUORsJzv/qpRgEqfUXE+0eXt4hn/Gl+t4PC+no3adMiFerlyBi3lKRTwEI+7e5A476jPUrie83d+xEWe+hDHIZqys3RnlLCw0uWAJPXmSmlhWu15jI9F0JkAnK1KyDw2CkC3cedbrjUkHScg/Hcz6vk20btxx5ZJ1aki6GGeFftmQZnWi9ofNlwdPBtDU2qBBoV+Lzd51/lNSf2kR8VtSkdbC2ApwhVteycsIWS+IJLxJaI6rwtZXrJg/8NXdTcSJ1hlUx8LumNmsXbs7uX69ARSwNyIrnuVYQ2n2eMaBvVSTiEz6y3XV9nJ7/SZCKA45jwfn7mqRBq+KBXDk0dNO4DHPTzD+osQSU= nikolaosboutalas diff --git a/tasks/dependencies.yml b/tasks/dependencies.yml new file mode 100644 index 0000000..baba4a2 --- /dev/null +++ b/tasks/dependencies.yml @@ -0,0 +1,13 @@ +- name: Update Aptitude + become: true + ansible.builtin.apt: + update_cache: true + tags: + - dependencies + +- name: Install dependencies + become: true + ansible.builtin.package: + name: [curl, git, docker, fzf, tmux, stow, unzip, zip, neovim, zsh, ripgrep] + tags: + - dependencies diff --git a/tasks/dependencies/all.yml b/tasks/dependencies/all.yml deleted file mode 100644 index aa05885..0000000 --- a/tasks/dependencies/all.yml +++ /dev/null @@ -1,20 +0,0 @@ -- name: Install Ubuntu dependencies - ansible.builtin.import_tasks: - file: tasks/dependencies/ubuntu.yml - when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' - tags: - - always - -- name: Install Fedora dependencies - ansible.builtin.import_tasks: - file: tasks/dependencies/fedora.yml - when: ansible_distribution == 'Fedora' - tags: - - always - -- name: Install dependencies - become: true - ansible.builtin.package: - name: [curl, git, zsh, docker, fzf, tmux, stow, unzip, zip] - tags: - - always diff --git a/tasks/dependencies/fedora.yml b/tasks/dependencies/fedora.yml deleted file mode 100644 index df554c6..0000000 --- a/tasks/dependencies/fedora.yml +++ /dev/null @@ -1,6 +0,0 @@ -- name: Install which - become: true - ansible.builtin.package: - name: which - tags: - - always diff --git a/tasks/dependencies/ubuntu.yml b/tasks/dependencies/ubuntu.yml deleted file mode 100644 index 742fda3..0000000 --- a/tasks/dependencies/ubuntu.yml +++ /dev/null @@ -1,6 +0,0 @@ -- name: Update Aptitude - become: true - ansible.builtin.apt: - update_cache: true - tags: - - always diff --git a/tasks/node.yml b/tasks/node.yml index 9699e22..5ca660b 100644 --- a/tasks/node.yml +++ b/tasks/node.yml @@ -11,32 +11,3 @@ changed_when: true tags: - node - -- name: Enable nvm - ansible.builtin.lineinfile: - path: "~/.config/zsh/.zshrc" - line: | - export NVM_DIR=~/.nvm - [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" - autoload -U add-zsh-hook - load-nvmrc() { - local node_version="$(nvm version)" - local nvmrc_path="$(nvm_find_nvmrc)" - - if [ -n "$nvmrc_path" ]; then - local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")") - - if [ "$nvmrc_node_version" = "N/A" ]; then - nvm install - elif [ "$nvmrc_node_version" != "$node_version" ]; then - nvm use - fi - elif [ "$node_version" != "$(nvm version default)" ]; then - echo "Reverting to nvm default version" - nvm use default - fi - } - add-zsh-hook chpwd load-nvmrc - load-nvmrc - tags: - - node diff --git a/tasks/sdkman.yml b/tasks/sdkman.yml index e87a4c0..42186b7 100644 --- a/tasks/sdkman.yml +++ b/tasks/sdkman.yml @@ -1,6 +1,6 @@ - name: Fetch sdkman installation script ansible.builtin.get_url: - url: https://get.sdkman.io?rcupdate=false + url: https://get.sdkman.io dest: /tmp/sdkman_install.sh mode: '0755' tags: @@ -11,21 +11,3 @@ changed_when: true tags: - sdkman - -- name: Enable sdkman - ansible.builtin.lineinfile: - path: "~/.config/zsh/.zshrc" - line: | - #THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! - export SDKMAN_DIR="$HOME/.sdkman" - [[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh" - tags: - - sdkman - -- name: Configure sdkman_auto_env - ansible.builtin.lineinfile: - path: "~/.sdkman/etc/config" - regexp: '^sdkman_auto_env=' - line: sdkman_auto_env=true - tags: - - sdkman diff --git a/tasks/ssh.yml b/tasks/ssh.yml deleted file mode 100644 index af4f923..0000000 --- a/tasks/ssh.yml +++ /dev/null @@ -1,9 +0,0 @@ -- name: Copy SSH keys - ansible.builtin.copy: - src: ./ssh/ - dest: ~/.ssh - owner: "{{ ansible_user_id }}" - group: "{{ ansible_user_id }}" - mode: '0600' - tags: - - ssh diff --git a/tasks/tmux.yml b/tasks/tmux.yml deleted file mode 100644 index 8863d64..0000000 --- a/tasks/tmux.yml +++ /dev/null @@ -1,7 +0,0 @@ -- name: Install tmux plugin manager - ansible.builtin.git: - repo: 'https://github.com/tmux-plugins/tpm' - dest: "~/.tmux/plugins/tpm" - version: master - tags: - - tmux diff --git a/tasks/zsh.yml b/tasks/zsh.yml deleted file mode 100644 index 5301496..0000000 --- a/tasks/zsh.yml +++ /dev/null @@ -1,52 +0,0 @@ -- name: Change default shell - become: true - ansible.builtin.shell: "usermod -s $(which zsh) {{ ansible_user_id }}" - changed_when: true - tags: - - zsh - -- name: Create .zshenv - ansible.builtin.shell: "echo \"ZDOTDIR=~/.config/zsh\" > ~/.zshenv" - changed_when: true - tags: - - zsh - -- name: Install Oh My Zsh - ansible.builtin.shell: zsh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" - changed_when: true - tags: - - zsh - -- name: Install zsh-autosuggestions plugin - ansible.builtin.git: - repo: 'https://github.com/zsh-users/zsh-autosuggestions.git' - dest: "~/.config/zsh/ohmyzsh/plugins/zsh-autosuggestions" - version: master - tags: - - zsh - -- name: Install zsh-syntax-highlighting plugin - ansible.builtin.git: - repo: 'https://github.com/zsh-users/zsh-syntax-highlighting.git' - dest: "~/.config/zsh/ohmyzsh/plugins/zsh-syntax-highlighting" - version: master - tags: - - zsh - -- name: Enable ZSH plugins - ansible.builtin.lineinfile: - path: "~/.config/zsh/.zshrc" - regexp: '^plugins=' - line: plugins=(git tmux zsh-autosuggestions zsh-syntax-highlighting) - tags: - - zsh - -- name: Enable tmux autostart - ansible.builtin.lineinfile: - path: "~/.config/zsh/.zshrc" - line: | - if [[ -z $TMUX ]]; then - tmux -u attach || exec tmux -u new-session && exit - fi - tags: - - zsh |