-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathflake.nix
109 lines (104 loc) · 3.27 KB
/
flake.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
108
109
{
description = "A simple flake for an atomic system";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nixvim = {
url = "github:Sly-Harvey/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
spicetify-nix = {
url = "github:Gerg-L/spicetify-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
nur.url = "github:nix-community/NUR";
betterfox = {
url = "github:yokoffing/Betterfox";
flake = false;
};
thunderbird-catppuccin = {
url = "github:catppuccin/thunderbird";
flake = false;
};
zen-browser = {
url = "github:maximoffua/zen-browser.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
nvchad4nix = {
url = "github:nix-community/nix4nvchad";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
nixpkgs,
nixpkgs-stable,
...
} @ inputs: let
settings = {
# User configuration
username = "error"; # no need to touch this since install.sh uses sed to replace this (otherwise if manually installing then you need to change this yourself)
editor = "nixvim"; # nixvim, vscode, emacs, nvchad, neovim
browser = "floorp"; # firefox, floorp, zen
terminal = "kitty"; # kitty, alacritty, wezterm
terminalFileManager = "yazi"; # yazi or lf
wallpaper = "Train.jpg"; # see modules/themes/wallpapers
# System configuration
gpuDriver = "nvidia"; # CHOOSE YOUR GPU DRIVERS (nvidia or amdgpu) THIS IS IMPORTANT
hostname = "NixOS"; # CHOOSE A HOSTNAME HERE
locale = "en_GB.UTF-8"; # CHOOSE YOUR LOCALE
timezone = "Europe/London"; # CHOOSE YOUR TIMEZONE
kbdLayout = "gb"; # CHOOSE YOUR KEYBOARD LAYOUT
kbdVariant = "extd"; # CHOOSE YOUR KEYBOARD VARIANT (Can leave empty)
consoleKeymap = "uk"; # CHOOSE YOUR CONSOLE KEYMAP (Affects the tty?)
overlays = [
inputs.nur.overlays.default
(
_final: _prev: {
stable = import nixpkgs-stable {
system = forAllSystems (system: system);
config.allowUnfree = true;
config.nvidia.acceptLicense = true;
};
}
)
];
};
systems = [
"x86_64-linux"
"aarch64-linux"
];
forAllSystems = nixpkgs.lib.genAttrs systems;
in {
templates = import ./dev-shells;
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
nixosConfigurations = {
Default = nixpkgs.lib.nixosSystem {
system = forAllSystems (system: system);
specialArgs = (settings // {inherit inputs;}) // inputs;
modules = [./hosts/Default/configuration.nix];
};
};
devShells = forAllSystems (system: let
pkgs = import nixpkgs {
system = system;
config.allowUnfree = true;
config.nvidia.acceptLicense = true;
# overlays = settings.overlays;
};
in {
default = pkgs.mkShell {
packages = with pkgs; [
git
nix
figlet
lolcat
];
NIX_CONFIG = "experimental-features = nix-command flakes";
};
});
};
}