refactoring

This commit is contained in:
Cyryl Płotnicki 2020-05-19 18:10:36 +01:00
parent 537938e407
commit a4b90ac45a
7 changed files with 52 additions and 15 deletions

View file

@ -36,13 +36,13 @@
imports = [
/etc/nixos/hardware-configuration.nix
../boot.nix
../common.nix
../gfx-intel.nix
../zerotier.nix
../gnome/system.nix
../distributed-builds.nix
../virtualbox.nix
../../boot.nix
../../common.nix
../../gfx-intel.nix
../../zerotier.nix
../../distributed-builds.nix
../../virtualbox.nix
../../gnome/system.nix
];

View file

@ -21,9 +21,10 @@ in
home.file.".config/i3/status.toml".source = ~/dev/dotfiles/.config/i3/status-double-bat.toml;
imports = [
./home-common.nix
./programs/git.nix
./gui.nix
../../home-common.nix
../../programs/git.nix
../../gui.nix
../../gnome/home.nix
];
}

View file

@ -0,0 +1,30 @@
{ 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.sessionVariables = {
TERMINAL="alacritty";
};
home.file.".config/i3/status.toml".source = ~/dev/dotfiles/.config/i3/status-single-bat.toml;
imports = [
../../home-common.nix
../../programs/git.nix
../../gui.nix
../../i3/home.nix
];
}

View file

@ -23,7 +23,6 @@
./programs.nix
./links.nix
./cli.nix
./gnome/home.nix
];
}

View file

@ -5,25 +5,24 @@ set -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DIR=`realpath "$DIR/../"`
CURL="curl -sSfL"
if [[ -z $DIR ]]; then
echo "please set DIR"
exit 1
fi
HOST=`hostname`
DIR=`realpath $DIR`
echo "using $DIR as the top level directory"
cd $DIR
git submodule update --init --recursive
mkdir -p ~/.config/Code/User
ln -vfs "$DIR/.config/Code/User/settings.json" ~/.config/Code/User/settings.json
ln -vfs "$DIR/.config/Code/User/keybindings.json" ~/.config/Code/User/keybindings.json
mkdir -p ~/.local/share/applications
cp -v "$DIR/keeweb.desktop" ~/.local/share/applications/
ln -vfs "$DIR/tools" ~/
ln -vsf "$DIR/nixos/boxes/$HOST/home.nix" ~/.config/nixpkgs/home.nix
sudo ln -vsf "$DIR/nixos/boxes/$HOST/configuration.nix" /etc/nixos/configuration.nix
echo "all links done"
sudo nix-channel --add https://nixos.org/channels/nixos-20.03 nixos

8
nixos/variables.nix Normal file
View file

@ -0,0 +1,8 @@
{ config, lib, ... }:
{
options.variables = lib.mkOption {
type = lib.types.attrs;
default = { };
};
config._module.args.variables = config.variables;
}