-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·39 lines (31 loc) · 1.18 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#! /usr/bin/env bash
# Shows the output of every command
set +x
# Pin Nixpkgs to NixOS unstable on January 31st of 2021
export PINNED_NIX_PKGS="https://github.com/NixOS/nixpkgs/archive/891f607d530.tar.gz"
# Switch to the unstable channel
sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos
rm -rf ~/.xmonad/*
rm -rf ~/.config/*
# Nix configuration
sudo cp system/configuration.nix /etc/nixos/
sudo cp -r system/wm/ /etc/nixos/
sudo cp -r system/nvidia/ /etc/nixos/
sudo nixos-rebuild -I nixpkgs=$PINNED_NIX_PKGS switch --upgrade --show-trace
# Manual steps
mkdir -p $HOME/.config/polybar/logs
touch $HOME/.config/polybar/logs/bottom.log
touch $HOME/.config/polybar/logs/top.log
mkdir -p $HOME/.cache/fzf-hoogle
touch $HOME/.cache/fzf-hoogle/cache.json
# Home manager
mkdir -p $HOME/.config/nixpkgs/
cp -r home/* $HOME/.config/nixpkgs/
nix-channel --add https://github.com/rycee/home-manager/archive/master.tar.gz home-manager
nix-channel --update
export NIX_PATH=$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH
nix-shell '<home-manager>' -A install
cp home/nixos.png $HOME/Pictures/
home-manager switch --show-trace
# Set screenlock wallpaper
betterlockscreen -u home/nixos.png