From 5ead8f0d25e66a6877711c386be0b6e6c9857e7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Boh=C3=A1=C4=8Dek?= Date: Sat, 23 Sep 2023 08:56:00 +0200 Subject: [PATCH] feat: update environment for non-NixOS --- flake.nix | 2 +- modules/editors/nvim/home.nix | 2 +- nix/default.nix | 9 ++++++--- nix/pacman.nix | 38 ++++++++++++++++++----------------- 4 files changed, 28 insertions(+), 23 deletions(-) diff --git a/flake.nix b/flake.nix index 7e1091b..6ce24bd 100644 --- a/flake.nix +++ b/flake.nix @@ -50,7 +50,7 @@ homeConfigurations = ( # Non-NixOS configurations import ./nix { inherit (nixpkgs) lib; - inherit inputs nixpkgs nixpkgs-unstable home-manager nixgl user; + inherit inputs nixpkgs nixpkgs-unstable home-manager nixgl user location; } ); }; diff --git a/modules/editors/nvim/home.nix b/modules/editors/nvim/home.nix index bd70714..1cfbbe3 100644 --- a/modules/editors/nvim/home.nix +++ b/modules/editors/nvim/home.nix @@ -36,7 +36,7 @@ syntax enable " Syntax highlighting colorscheme srcery " Color scheme text - set iskeyword=!-~,^*,^45,^124,^34,192-255,^_,^.,^, + set iskeyword=!-~,^*,^45,^124,^34,192-255,^_,^.,^,,^/,^\ let g:lightline = { \ 'colorscheme': 'wombat', diff --git a/nix/default.nix b/nix/default.nix index 5cb4c1a..e88640c 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -6,7 +6,7 @@ # └─ default.nix * # -{ lib, inputs, nixpkgs, home-manager, nixgl, user, ... }: +{ lib, inputs, nixpkgs, home-manager, nixgl, user, location, ... }: let system = "x86_64-linux"; @@ -14,8 +14,11 @@ let in { pacman = home-manager.lib.homeManagerConfiguration { # Currently only host that can be built - inherit pkgs; - extraSpecialArgs = { inherit inputs nixgl user; }; + pkgs = import nixpkgs { + inherit system; + config.allowUnfree = true; + }; + extraSpecialArgs = { inherit inputs nixgl user location; }; modules = [ ./pacman.nix { diff --git a/nix/pacman.nix b/nix/pacman.nix index 43c0f9e..ac88781 100644 --- a/nix/pacman.nix +++ b/nix/pacman.nix @@ -7,28 +7,30 @@ # └─ pacman.nix * # -{ config, pkgs, inputs, nixgl, user, ... }: +{ config, pkgs, inputs, nixgl, user, location, ... }: { + imports = + (import ../modules/editors/home.nix) ++ + # (import ../modules/programs/home.nix) ++ # Some problems with alacritty, see nixGL, but still, the .desktop files are not great + (import ../modules/shell/home.nix); + + fonts.fontconfig.enable = true; home = { - packages = [ - (import nixgl { inherit pkgs; }).nixGLIntel # OpenGL for GUI apps. Add to aliases is recommended. - #.nixVulkanIntel - pkgs.hello - pkgs.emacs + packages = with pkgs; [ + # Fonts + carlito # NixOS + vegur # NixOS + source-code-pro + jetbrains-mono + font-awesome # Icons + corefonts # MS + (nerdfonts.override { # Nerdfont Icons override + fonts = [ + "FiraCode" + ]; + }) ]; - - #file.".bash_aliases".text = '' - # alias alacritty="nixGLIntel ${pkgs.alacritty}/bin/alacritty" - #''; # Aliases for packages that need openGL using nixGL. Change to your shell alias file. Note that home.shellAliases does not work... - - activation = { # Run script during rebuild/switch. - linkDesktopApplications = { # Script that will add all packages to the system menu. (Mainly tested on Gnome) - after = [ "writeBoundary" "createXdgUserDirectories" ]; - before = [ ]; - data = "sudo /usr/bin/update-desktop-database"; # This will update the database, requires sudo. Not recommended to install via home-manager so do it manually for your distro. - }; - }; }; xdg = { -- 2.48.1