~ruther/nixos-config

5ead8f0d25e66a6877711c386be0b6e6c9857e7a — František Boháček 1 year, 6 months ago 7ec4d0c
feat: update environment for non-NixOS
4 files changed, 28 insertions(+), 23 deletions(-)

M flake.nix
M modules/editors/nvim/home.nix
M nix/default.nix
M nix/pacman.nix
M flake.nix => flake.nix +1 -1
@@ 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;
        }
      );
    };

M modules/editors/nvim/home.nix => modules/editors/nvim/home.nix +1 -1
@@ 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',

M nix/default.nix => nix/default.nix +6 -3
@@ 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
      {

M nix/pacman.nix => nix/pacman.nix +20 -18
@@ 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 = {

Do not follow this link