From afb108abf9a0543cc4c19b1689b810ad7a2f9d0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Wed, 24 Nov 2021 10:33:12 +0000 Subject: [PATCH] Fix home-manager config on ubuntu --- README.md | 36 +++++++++++++++++++++++++++++ nixos/home-manager/programs/vim.nix | 6 +---- nixos/home-other-os.nix | 5 +++- 3 files changed, 41 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d4fd028d..9b7c5aad 100644 --- a/README.md +++ b/README.md @@ -193,6 +193,42 @@ specialArgs = { inherit inputs; }; }; ``` +## Ubuntu +``` +sudo apt install git vim curl +curl -L https://nixos.org/nix/install | sh +``` + +make sure + +``` +if [ -e /home/cyryl/.nix-profile/etc/profile.d/nix.sh ]; then . /home/cyryl/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer +export NIX_PATH=$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH +``` is in `~/.profile` + + +``` +reboot +``` + +``` +nix-shell '' -A install +``` + +``` +mkdir dev +cd dev +git clone https://git.sr.ht/~cyplo/dotfiles +cd dotfiles +``` + + +``` +ln -vfs /home/cyryl/dev/dotfiles/nixos/home-other-os.nix /home/cyryl/.config/nixpkgs/home.nix +home-manager switch +``` + + ## guix I'm just starting to play with guix, these are just loose notes: diff --git a/nixos/home-manager/programs/vim.nix b/nixos/home-manager/programs/vim.nix index cb89d310..1aa3facc 100644 --- a/nixos/home-manager/programs/vim.nix +++ b/nixos/home-manager/programs/vim.nix @@ -1,7 +1,4 @@ -{ config, pkgs, inputs, ... }: -let - unstable = inputs.nixpkgs-nixos-unstable.legacyPackages.${pkgs.system}; -in +{ config, pkgs, ... }: { home.file.".vimrc".source = ../../../.vimrc.nixos; home.packages = with pkgs; [ @@ -15,7 +12,6 @@ in withNodeJs = true; withPython3 = true; withRuby = true; - package = unstable.neovim-unwrapped; plugins = with pkgs.vimPlugins; [ ack-vim diff --git a/nixos/home-other-os.nix b/nixos/home-other-os.nix index 6f0d7e03..ddbae674 100644 --- a/nixos/home-other-os.nix +++ b/nixos/home-other-os.nix @@ -5,6 +5,10 @@ let dotfiles = "/home/cyryl/dev/dotfiles"; in { + home.username = "cyryl"; + home.homeDirectory = "/home/cyryl"; + home.stateVersion = "21.11"; + nixpkgs.config = { allowUnfree = true; packageOverrides = pkgs: { @@ -24,7 +28,6 @@ in imports = [ ./git/home.nix ./home-manager/programs/tmux.nix - ./home-manager/programs/zsh.nix ./home-manager/links.nix ./home-manager/programs/vim.nix ];