Basic ubuntu setup using nix
This commit is contained in:
parent
551114c780
commit
f91980ed53
2 changed files with 46 additions and 18 deletions
40
nixos/home-other-os.nix
Normal file
40
nixos/home-other-os.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
unstableTarball = fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz;
|
||||
dotfiles = "/home/cyryl/dev/dotfiles";
|
||||
in
|
||||
{
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
packageOverrides = pkgs: {
|
||||
unstable = import unstableTarball {
|
||||
config = config.nixpkgs.config;
|
||||
};
|
||||
};
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
fontconfig kpcli
|
||||
];
|
||||
home.sessionVariables = {
|
||||
TERMINAL="alacritty";
|
||||
};
|
||||
|
||||
imports = [
|
||||
./programs/tmux.nix
|
||||
./programs/zsh.nix
|
||||
./programs/vim.nix
|
||||
./programs/alacritty.nix
|
||||
./programs/git.nix
|
||||
];
|
||||
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
|
||||
fzf.enable = true;
|
||||
firefox.enable = true;
|
||||
chromium.enable = true;
|
||||
go.enable = true;
|
||||
bat.enable = true;
|
||||
};
|
||||
}
|
24
ubuntu/up.sh
24
ubuntu/up.sh
|
@ -5,28 +5,16 @@ set -v
|
|||
|
||||
sudo apt update
|
||||
sudo apt -y upgrade
|
||||
sudo apt -y --fix-missing install apt-file aptitude aria2 atop cmake curl git glances gnupg2 keepass2 mercurial pv python-dev python-pip python3-pip ruby-dev tmux vim whois zsh dirmngr syncthing net-tools coreutils xclip wget scdaemon flatpak gnome-software-plugin-flatpak ufw tlp
|
||||
sudo apt -y --fix-missing install apt-file aptitude git curl flatpak
|
||||
|
||||
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
|
||||
# gsconnect
|
||||
sudo ufw allow 1714:1764/udp
|
||||
sudo ufw allow 1714:1764/tcp
|
||||
sudo ufw reload
|
||||
curl https://nixos.org/nix/install | sh
|
||||
|
||||
if [[ -z $USER ]]; then
|
||||
USER=`whoami`
|
||||
fi
|
||||
. /home/cyryl/.nix-profile/etc/profile.d/nix.sh
|
||||
export NIX_PATH=$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH
|
||||
|
||||
sudo groupadd docker | true
|
||||
sudo usermod -aG docker $USER
|
||||
ln -vfs $HOME/dev/dotfiles/nixos/home-other-os.nix $HOME/.config/nixpkgs/home.nix
|
||||
|
||||
if [[ -z $NO_SYSTEMCTL ]]; then
|
||||
sudo systemctl enable --now tlp
|
||||
sudo systemctl enable --now docker
|
||||
sudo systemctl enable --now syncthing@$USER.service
|
||||
fi
|
||||
home-manager switch
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
DIR="$DIR/../"
|
||||
DIR="$DIR" $DIR/common/up.sh
|
||||
|
|
Loading…
Reference in a new issue