start configuration using cdist
parent
5e3eb91a34
commit
2dfbd65d2f
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# once there are more types, this should be handled by a parameter
|
||||||
|
__manjaro_desktop
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
package="$__object_id"
|
||||||
|
user="$(cat "$__object/parameter/user")"
|
||||||
|
directory="$(cat "$__object/parameter/directory")/$package"
|
||||||
|
|
||||||
|
#install dependencies as root
|
||||||
|
#echo "source $directory/PKGBUILD && pacman -Sy --noconfirm --needed --asdeps \"${makedepends[@]}\""
|
||||||
|
|
||||||
|
#make package as user
|
||||||
|
echo "su - $user -s /bin/bash -c \"(cd $directory && makepkg -f)\""
|
||||||
|
|
||||||
|
#install package as root
|
||||||
|
echo "pacman --noconfirm -U $directory/*-x86_64.pkg.*"
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
package="$__object_id"
|
||||||
|
user="$(cat "$__object/parameter/user")"
|
||||||
|
directory="$(cat "$__object/parameter/directory")"
|
||||||
|
packagedir="$directory/$package"
|
||||||
|
|
||||||
|
export CDIST_ORDER_DEPENDENCY=on
|
||||||
|
__git $packagedir --source https://aur.archlinux.org/$package.git
|
||||||
|
require="__git/$packagedir" __directory $directory --owner $user --group $user --recursive
|
||||||
|
unset CDIST_ORDER_DEPENDENCY
|
|
@ -0,0 +1,2 @@
|
||||||
|
user
|
||||||
|
directory
|
|
@ -1,11 +1,16 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# vars
|
||||||
user="schrofi"
|
user="schrofi"
|
||||||
home="/home/schrofi"
|
home="/home/schrofi"
|
||||||
|
|
||||||
# setup user
|
# setup user
|
||||||
__user "$user" --home "$home" --shell /bin/bash
|
__user "$user" --home "$home" --shell /bin/fish
|
||||||
require="__user/$user" __directory "$home" \
|
require="__user/$user" __directory "$home" \
|
||||||
--owner "$user" --group "$user" --mode 0755
|
--owner "$user" --group "$user" --mode 0755
|
||||||
|
|
||||||
|
__timezone --tz Europe/Vienna
|
||||||
|
|
||||||
# install packages
|
# install packages
|
||||||
__package_update_index
|
__package_update_index
|
||||||
require="__package_update_index" __package_upgrade_all
|
require="__package_update_index" __package_upgrade_all
|
||||||
|
@ -59,7 +64,28 @@ for package in $package_list
|
||||||
done
|
done
|
||||||
|
|
||||||
# setup dotfiles
|
# setup dotfiles
|
||||||
__dot_file .config/i3/config --user "$user" --source "$__files/dotfiles/i3/config"
|
__dot_file .config/i3/config --user "$user" --source "$__type/dotfiles/i3/config"
|
||||||
__dot_file .config/ncspot/config.toml --user "$user" --source "$__files/dotfiles/ncspot/config.toml"
|
__dot_file .config/ncspot/config.toml --user "$user" --source "$__type/dotfiles/ncspot/config.toml"
|
||||||
|
|
||||||
|
# those have to be done in order, install spacemacs
|
||||||
|
export CDIST_ORDER_DEPENDENCY=on
|
||||||
require="__package/emacs" __git "$home/.emacs.d" --source https://github.com/syl20bnr/spacemacs
|
require="__package/emacs" __git "$home/.emacs.d" --source https://github.com/syl20bnr/spacemacs
|
||||||
|
__directory "$home/.emacs.d" --owner $user --group $user --recursive
|
||||||
|
unset CDIST_ORDER_DEPENDENCY
|
||||||
|
|
||||||
|
# install aura
|
||||||
|
aurdir="$home/Projects/AUR"
|
||||||
|
aur_packages="
|
||||||
|
aura-bin
|
||||||
|
android-studio
|
||||||
|
postman-bin
|
||||||
|
"
|
||||||
|
|
||||||
|
export CDIST_ORDER_DEPENDENCY=on
|
||||||
|
|
||||||
|
for package in $aur_packages
|
||||||
|
do
|
||||||
|
__aur $package --user $user --directory $aurdir
|
||||||
|
done
|
||||||
|
|
||||||
|
unset CDIST_ORDER_DEPENDENCY
|
||||||
|
|
21
readme.md
21
readme.md
|
@ -1,8 +1,27 @@
|
||||||
# schrofi's system configuration
|
# schrofi's system configuration
|
||||||
My personal system configuration using NixOS and chezmoi, specifically tailored towards me and nobody else ¯\_(ツ)_/¯
|
My personal system configuration using cdist on a Manjaro system, specifically tailored towards me and nobody else ¯\_(ツ)_/¯
|
||||||
You can use it for inspiration though.
|
You can use it for inspiration though.
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
1. Install cdist
|
||||||
|
```
|
||||||
|
git clone https://code.ungleich.ch/ungleich-public/cdist.git
|
||||||
|
cd cdist
|
||||||
|
export PATH=$PATH:$(pwd -P)/bin
|
||||||
|
./bin/cdist-build-helper version
|
||||||
|
make install
|
||||||
|
sudo python setup.py install
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Setup SSH root access
|
||||||
|
//TODO
|
||||||
|
|
||||||
|
3. CD into wanted configuration directory and apply configuration to localhost
|
||||||
|
```
|
||||||
|
cdist config -v -i manifest localhost
|
||||||
|
```
|
||||||
|
|
||||||
|
## Getting Started - DEPRECATED NIXOS
|
||||||
1. Clone the repository into your /etc/nixos directory (delete/rename the existing configuration.nix).
|
1. Clone the repository into your /etc/nixos directory (delete/rename the existing configuration.nix).
|
||||||
2. Add the unstable NixOS channel
|
2. Add the unstable NixOS channel
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue