-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbase.nix
107 lines (97 loc) · 2.75 KB
/
base.nix
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/*
A trait for all boxxen
*/
{ config, pkgs, lib, ... }:
{
config = {
time.timeZone = "America/Vancouver";
# Windows wants hardware clock in local time instead of UTC
time.hardwareClockInLocalTime = true;
i18n.defaultLocale = "en_CA.UTF-8";
i18n.supportedLocales = [ "all" ];
environment.systemPackages = with pkgs; [
# Shell utilities
patchelf
direnv
nix-direnv
git
jq
fzf
ripgrep
lsof
htop
bat
grex
broot
bottom
fd
sd
fio
hyperfine
tokei
bandwhich
lsd
ntfs3g
# nvme-cli
# nvmet-cli
# libhugetlbfs # This has a build failure.
killall
gptfdisk
fio
smartmontools
neovimConfigured
helix
rnix-lsp
graphviz
simple-http-server
clinfo
];
environment.shellAliases = { };
environment.variables = {
EDITOR = "${pkgs.neovimConfigured}/bin/nvim";
};
environment.pathsToLink = [
"/share/nix-direnv"
];
programs.bash.promptInit = ''
eval "$(${pkgs.starship}/bin/starship init bash)"
'';
programs.bash.shellInit = ''
'';
programs.bash.loginShellInit = ''
HAS_SHOWN_NEOFETCH=''${HAS_SHOWN_NEOFETCH:-false}
if [[ $- == *i* ]] && [[ "$HAS_SHOWN_NEOFETCH" == "false" ]]; then
${pkgs.neofetch}/bin/neofetch --config ${../config/neofetch/config}
HAS_SHOWN_NEOFETCH=true
fi
'';
programs.bash.interactiveShellInit = ''
eval "$(${pkgs.direnv}/bin/direnv hook bash)"
source "${pkgs.fzf}/share/fzf/key-bindings.bash"
source "${pkgs.fzf}/share/fzf/completion.bash"
'';
programs.fish.enable = true;
security.sudo.wheelNeedsPassword = false;
security.sudo.extraConfig = ''
Defaults lecture = never
'';
# Use edge NixOS.
nix.extraOptions = ''
experimental-features = nix-command flakes
builders-use-substitutes = true
'';
# nix.package = pkgs.nixUnstable;
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
nixpkgs.config.allowUnfree = true;
# Hack: https://github.com/NixOS/nixpkgs/issues/180175
systemd.services.systemd-udevd.restartIfChanged = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "22.05"; # Did you read the comment?
};
}