-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
106 lines (92 loc) · 2.98 KB
/
flake.nix
File metadata and controls
106 lines (92 loc) · 2.98 KB
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
{
description = "Nixos configuration";
inputs = {
# NixOS official package source
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; # i want to try unstable
# Home-manager oficial repo
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
# Stylix
stylix = {
url = "github:nix-community/stylix/master";
inputs.nixpkgs.follows = "nixpkgs";
};
# Nixcord
nixcord = {
url = "github:kaylorben/nixcord";
inputs.nixpkgs.follows = "nixpkgs";
};
# Firefox extensions
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
# Binary ninja
binaryninja = {
url = "github:jchv/nix-binary-ninja";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
nixpkgs,
home-manager,
stylix,
binaryninja,
...
}@inputs:
let
systemSettings = {
system = "x86_64-linux"; # Your architecture
host = "Laptop"; # One of: {Laptop, Desktop}
hostname = "dire-laptop"; # select your hostname
timezone = "Europe/Madrid"; # select timezone
defaultLocale = "en_US.UTF-8"; # select locale
};
pkgs = import nixpkgs { system = systemSettings.system; };
userSettings = {
# Core
username = "dire";
name = "Direwolfesp";
email = "alvarolg365@gmail.com";
# Program preferences
shell = "nushell"; # Default shell, same name as in nixpkgs
editor = "helix"; # Default editor, same name as in nixpkgs
term = "ghostty"; # Default terminal, same name as in nixpkgs
web_browser = "firefox"; # Default browser, same name as in nixpkgs
# Looks
theme = "uwunicorn"; # Same name as in ./themes/
font = "JetBrainsMono Nerd Font"; # Font name, same name as in `fc-list : family`
fontPkg = pkgs.nerd-fonts.jetbrains-mono; # Font package to use
};
in
{
nixosConfigurations.${systemSettings.hostname} = nixpkgs.lib.nixosSystem rec {
system = systemSettings.system;
modules = [
./hosts/${systemSettings.host}/configuration.nix
stylix.nixosModules.stylix
binaryninja.nixosModules.binaryninja
home-manager.nixosModules.home-manager
{
home-manager.backupFileExtension = "backup";
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${userSettings.username}.imports = [ ./home-manager/home.nix ];
home-manager.extraSpecialArgs = specialArgs;
home-manager.sharedModules = [
inputs.nixcord.homeModules.nixcord
];
}
];
specialArgs = {
# pass config variables
inherit systemSettings;
inherit userSettings;
inherit inputs;
};
};
};
}