1
Fork 0

Remove support for non-nixos installations

This commit is contained in:
caem 2024-07-25 21:35:41 +02:00
parent 0898c67a5a
commit 49ebf1155e
Signed by: caem
GPG key ID: 69A830D03203405F
12 changed files with 0 additions and 92 deletions

View file

@ -47,7 +47,6 @@ modify and share this configuration to your heart's content, no attribution requ
``` ```
## Installing ## Installing
### NixOS
This configuration uses impermanence with btrfs snapshots so you'll have to partition This configuration uses impermanence with btrfs snapshots so you'll have to partition
your system in a certain way. your system in a certain way.
@ -76,8 +75,3 @@ in the `secrets/{user}` directory as `pass`.
Finally, in the config directory run `nixos-install --flake '.#'`, reboot and you're done. Finally, in the config directory run `nixos-install --flake '.#'`, reboot and you're done.
### Non-NixOS
Run the `non-nixos-install.sh` script. It will install both home-manager and nix.
Your user is assumed to be called "i". You need to replace every instance of it
in case you want to use a different username.

View file

@ -1,28 +0,0 @@
#!/usr/bin/env bash
# This script sets up nix and home-manager for distributions that are not NixOS.
set -e
BASE_PATH="$(dirname "$(realpath "$0")")"
if [ ! -d "/nix" ]; then
# Do multi-user installation
sh <(curl -L https://nixos.org/nix/install) --daemon
exec bash -e "$(realpath "$0")"
fi
if [ -z "$(nix-channel --list | grep nixpkgs)" ]; then
nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs
nix-channel --update
fi
if [ ! -x "$HOME/.nix-profile/bin/home-manager" ]; then
ln -svf "$BASE_PATH/users/i/home-manager" "$HOME/.config/home-manager"
ln -svf "$BASE_PATH/users/i/nixpkgs" "$HOME/.config/nixpkgs"
ln -svf "$BASE_PATH/users/i/nix" "$HOME/.config/nix"
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
nix-channel --update
nix-shell '<home-manager>' -A install
fi

View file

@ -1,4 +0,0 @@
This user is a standalone home-manager user which I use for
systems that are not NixOS but still make use of home-manager.
You should not import this user when running NixOS.

View file

@ -1 +0,0 @@
/home/i/Projects/nixos-system-config/users/i/home-manager

View file

@ -1,28 +0,0 @@
{ pkgs, ... }:
{
home.username = "i";
home.homeDirectory = "/home/i";
home.stateVersion = "24.05";
home.file.".zshenv" = {
text = "source ~/.nix-profile/etc/profile.d/hm-session-vars.sh";
};
home.sessionVariables = {
EDITOR = "nvim";
};
imports = [
./shared_packages/nvim/neovim.nix
./shared_packages/zsh/zsh-home.nix
./packages/neovim.nix
];
home.packages = with pkgs; [
act
];
programs.home-manager.enable = true;
}

View file

@ -1,16 +0,0 @@
{ pkgs, ... }:
{
/* Because programs.neovim.extraPackages doesn't work */
home.packages = with pkgs; [
lua-language-server
nodePackages.intelephense
nodePackages.typescript-language-server
clang-tools
ripgrep
nil
gcc
basedpyright
];
}

View file

@ -1 +0,0 @@
../../../hu/packages/nvim

View file

@ -1 +0,0 @@
../../../hu/packages/zsh

View file

@ -1 +0,0 @@
/home/i/Projects/nixos-system-config/users/i/nix

View file

@ -1 +0,0 @@
experimental-features = nix-command flakes

View file

@ -1,4 +0,0 @@
{
allowUnfree = true;
}

View file

@ -1 +0,0 @@
/home/i/Projects/nixos-system-config/users/i/nixpkgs