~ruther/nixos-config

ref: 7febab38bb34a9254054a639c98c41f4b681c6c0 nixos-config/nix/pacman.nix -rw-r--r-- 1.9 KiB
7febab38 — František Boháček feat: add initial configurations 1 year, 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#
# Nix setup using Home-manager
#
# flake.nix
#   └─ ./nix
#       ├─ default.nix
#       └─ pacman.nix *
#

{ config, pkgs, inputs, nixgl, user, ... }:

{
  home = {
    packages = [
      (import nixgl { inherit pkgs; }).nixGLIntel       # OpenGL for GUI apps. Add to aliases is recommended.
                                     #.nixVulkanIntel
      pkgs.hello
      pkgs.emacs
    ];

    #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 = {
    enable = true;
    systemDirs.data = [ "/home/${user}/.nix-profile/share" ]; # Will add nix packages to XDG_DATA_DIRS and thus accessible from the menus.
  };

  nix = {                                               # Nix Package Manager settings
    settings ={
      auto-optimise-store = true;                       # Optimise syslinks
    };
    package = pkgs.nixFlakes;                           # Enable nixFlakes on system
    registry.nixpkgs.flake = inputs.nixpkgs;
    extraOptions = ''
      experimental-features = nix-command flakes
      keep-outputs          = true
      keep-derivations      = true
    '';
  };
  nixpkgs.config.allowUnfree = true;                    # Allow proprietary software.
}
Do not follow this link