-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfiguration.nix
98 lines (80 loc) · 2.56 KB
/
configuration.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
{
pkgs,
lib,
...
}: let
sources = import ./npins;
in {
imports = [
"${sources.home-manager}/nixos"
(import "${sources.lix-module}/module.nix" {inherit (sources) lix;})
];
_module.args = {inherit sources;};
# make `nix run nixpkgs#nixpkgs` use the same nixpkgs as the one used by this config.
nix.registry.nixpkgs.flake = sources.nixpkgs;
# remove nix-channel related tools & configs, we use system-wide npins instead.
nix.channel.enable = false;
nix.nixPath = [
"nixpkgs=${sources.nixpkgs}"
"rust-overlay=${sources.rust-overlay}"
];
nix.settings.experimental-features = ["nix-command" "flakes"];
system.tools.nixos-option.enable = false; # Complains about Lix or something
boot.supportedFilesystems = ["ntfs"];
boot.kernel.sysctl = {
"kernel.sysrq" = 1;
"vm.swappiness" = 5;
};
boot.kernelPackages = pkgs.linuxPackages_zen;
i18n.defaultLocale = "en_GB.UTF-8";
i18n.extraLocaleSettings = {
LC_MEASUREMENT = "bg_BG.UTF-8"; # Imperial metrics?! Couldn't be me.
};
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.coca = {
isNormalUser = true;
extraGroups = ["wheel"]; # Enable ‘sudo’ for the user.
shell = pkgs.fish;
};
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.coca = lib.mkDefault (import ./home.nix);
environment.systemPackages = with pkgs; [
wl-clipboard-rs
nvd
nix-output-monitor
lsof
fatrace
waypipe
sshfs
btrfs-progs
npins
];
environment.shellAliases.unpins = lib.getExe (import sources.unpins {});
programs.fish.enable = true;
programs.nix-index.enable = true;
programs.command-not-found.enable = false;
environment.variables.MANPAGER = "${lib.getExe pkgs.bat} --wrap=auto --language=man --plain --strip-ansi=auto";
programs.git = {
enable = true;
config = {
init.defaultBranch = "main";
aliases.url = {
"https://codeberg.org/".insteadOf = ["cb:" "codeberg:"];
"https://github.com/".insteadOf = ["gh:" "github:"];
"https://gitlab.com/".insteadOf = ["gl:" "gitlab:"];
"https://git.lix.systems/".insteadOf = "lix:";
"https://git.coca.codes/".insteadOf = "coca:";
};
};
};
programs.ssh.package = pkgs.openssh_hpn;
nixpkgs.config.allowUnfree = true;
nix.extraOptions = ''
trusted-users = @wheel
# Keeps the compiled build outputs, means we don't have to rebuild everything again after gc
keep-outputs = true
keep-derivations = true
'';
system.rebuild.enableNg = true;
}