change shell to fish and set git user data
This commit is contained in:
		
							parent
							
								
									a739ccf140
								
							
						
					
					
						commit
						1674039e36
					
				
					 2 changed files with 21 additions and 7 deletions
				
			
		| 
						 | 
					@ -15,16 +15,29 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(def options (:options (parse-opts *command-line-args* cli-options)))
 | 
					(def options (:options (parse-opts *command-line-args* cli-options)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(defn- setup-spacemacs [user home]
 | 
				
			||||||
 | 
					  ;; installing spacemacs
 | 
				
			||||||
 | 
					  (println "setting up spacemacs..")
 | 
				
			||||||
 | 
					  (-> (fs/file (str home "/.emacs.d")) (fs/delete-tree))
 | 
				
			||||||
 | 
					  (safe-sh "git" "clone" "https://github.com/syl20bnr/spacemacs" (str home "/.emacs.d"))
 | 
				
			||||||
 | 
					  (safe-sh "chown" (str user ":" user) "-R" (str home "/.emacs.d"))
 | 
				
			||||||
 | 
					  (println "spacemacs set up"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(if-let [user (:user options)]
 | 
					(if-let [user (:user options)]
 | 
				
			||||||
  (let [home (str "/home/" user)]
 | 
					  (let [home (str "/home/" user)]
 | 
				
			||||||
    ;;todo: fetch spacemacs
 | 
					    ;;todo: fetch spacemacs
 | 
				
			||||||
    ;;todo: disable locking when closing lid on ac
 | 
					    ;;todo: disable locking when closing lid on ac
 | 
				
			||||||
    (println "applying configuration..")
 | 
					    (println "applying configuration..")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ;; installing spacemacs
 | 
					    ;;(setup-spacemacs user home)
 | 
				
			||||||
    (-> (fs/file (str home "/.emacs.d")) (fs/delete-tree))
 | 
					
 | 
				
			||||||
    (safe-sh "git" "clone" "https://github.com/syl20bnr/spacemacs" (str home "/.emacs.d"))
 | 
					    ;;change shell to fish
 | 
				
			||||||
    (safe-sh "chown" (str user ":" user) "-R" (str home "/.emacs.d"))
 | 
					    (safe-sh "chsh" "-s" "/usr/bin/fish" user)
 | 
				
			||||||
 | 
					    (println "changed shell to fish")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    (safe-sh "git" "config" "--global" "user.name" "Florian Schrofner")
 | 
				
			||||||
 | 
					    (safe-sh "git" "config" "--global" "user.email" "florian@schro.fi")
 | 
				
			||||||
 | 
					    (println "changed git user data")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    (println "configuration applied"))
 | 
					    (println "configuration applied"))
 | 
				
			||||||
  (println "error: must provide a user to set up"))
 | 
					  (println "error: must provide a user to set up"))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -18,12 +18,13 @@
 | 
				
			||||||
(def home (str "/home/" user))
 | 
					(def home (str "/home/" user))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(def packages {
 | 
					(def packages {
 | 
				
			||||||
  :base ["bluez" "chromium" "emacs-gtk3" "fish-shell" "firefox" "flatpak" "git" "htop" "pass" "ranger" "thunar-archive-plugin" "wget" "xarchiver"]
 | 
					  :base ["bluez" "chromium" "emacs-gtk3" "fish-shell" "firefox" "flameshot" "flatpak" "git" "htop" "pass" "ranger" "Signal-Desktop" "thunar-archive-plugin" "wget" "xarchiver" "xclip"]
 | 
				
			||||||
  :work ["kotlin-bin" "scrcpy"]
 | 
					  :work ["kotlin-bin" "scrcpy"]
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(def flatpak-packages {
 | 
					(def flatpak-packages {
 | 
				
			||||||
  :work ["com.getpostman.Postman" "com.slack.Slack"]
 | 
					  :work ["com.getpostman.Postman" "com.slack.Slack"]
 | 
				
			||||||
 | 
					  :game ["com.discordapp.Discord"]
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(def toolbox-link "https://download.jetbrains.com/toolbox/jetbrains-toolbox-2.1.1.18388.tar.gz")
 | 
					(def toolbox-link "https://download.jetbrains.com/toolbox/jetbrains-toolbox-2.1.1.18388.tar.gz")
 | 
				
			||||||
| 
						 | 
					@ -53,4 +54,4 @@
 | 
				
			||||||
  (fs/gunzip download-file target-directory {:replace-existing true})
 | 
					  (fs/gunzip download-file target-directory {:replace-existing true})
 | 
				
			||||||
  (fs/delete (fs/file download-file))
 | 
					  (fs/delete (fs/file download-file))
 | 
				
			||||||
  (safe-sh "chown" (str user ":" user) "-R" target-directory))
 | 
					  (safe-sh "chown" (str user ":" user) "-R" target-directory))
 | 
				
			||||||
(println "jetbrains toolbox installed")
 | 
					(println "jetbrains toolbox installed")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue