From dc480e6c9c3d164e4ddcfa0d46c8a90b96c7bbf0 Mon Sep 17 00:00:00 2001 From: Mike Vink Date: Wed, 14 Dec 2022 21:22:12 +0100 Subject: docker and some aliases --- configuration.nix | 2 ++ flake.nix | 2 +- home.nix | 11 ++++++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/configuration.nix b/configuration.nix index fb72f67..c619c38 100644 --- a/configuration.nix +++ b/configuration.nix @@ -6,6 +6,8 @@ isNormalUser = true; extraGroups = [ "wheel" "networkmanager" "docker"]; }; + + virtualisation.docker.enable = true; boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; diff --git a/flake.nix b/flake.nix index 6e8c269..0e42c7d 100644 --- a/flake.nix +++ b/flake.nix @@ -37,7 +37,7 @@ in { nixosConfigurations.lemptop = nixpkgs.lib.nixosSystem { inherit system; - modules = [ ./configuration.nix ./lemptop.nix ]; + modules = [./configuration.nix ./lemptop.nix]; }; homeConfigurations.mike = home-manager.lib.homeManagerConfiguration { diff --git a/home.nix b/home.nix index 7f2567a..6ab3af2 100644 --- a/home.nix +++ b/home.nix @@ -52,6 +52,11 @@ programs.bash = { enable = true; shellAliases = { + s = "sudo nixos-rebuild switch --flake ${config.home.homeDirectory}/flake#"; + h = "home-manager switch --flake ${config.home.homeDirectory}/flake#${config.home.username}"; + V = "xrandr --output HDMI1 --auto --output eDP1 --off"; + v = "xrandr --output eDP1 --auto --output HDMI1 --off"; + vV = "xrandr --output eDP1 --auto --output HDMI1 --off"; newflake = "nix flake new -t github:nix-community/nix-direnv "; }; }; @@ -93,7 +98,11 @@ neovim-symlink = home-manager.lib.hm.dag.entryAfter ["writeBoundary"] '' NEOVIM_CONFIG="${config.home.homeDirectory}/neovim" XDG_CONFIG_HOME_NVIM="${config.xdg.configHome}/nvim" - $DRY_RUN_CMD ln -sf $NEOVIM_CONFIG $XDG_CONFIG_HOME_NVIM + if [ -L $XDG_CONFIG_HOME_NVIM ] && [ -e $XDG_CONFIG_HOME_NVIM ]; then + $DRY_RUN_CMD echo "neovim linked" + else + $DRY_RUN_CMD ln -s $NEOVIM_CONFIG $XDG_CONFIG_HOME_NVIM + fi ''; clearHotpotCache = home-manager.lib.hm.dag.entryAfter ["writeBoundary"] '' HOTPOT_CACHE="${config.xdg.cacheHome}/nvim/hotpot" -- cgit v1.2.3