-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
executable file
·83 lines (73 loc) · 2.51 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
{
description = "Flake of captniz (aka Simone), inspired by librephoenix";
inputs = {
# Base
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# Additional Packages
hyprland-qtutils.url = "github:hyprwm/hyprland-qtutils";
};
outputs =
{
# Base
self,
nixpkgs,
home-manager,
# Additional Packages
hyprland-qtutils,
...
}@inputs:
let
#? Took this configuration from librephoenix
#? Probably I will change it in the future.
#? For now ill just use it as a base and modify it as I need;
#? Not everything is needed, but I will keep it for now.
# ----- SYSTEM SETTINGS ----- #
systemSettings = rec {
system = "x86_64-linux"; # system arch
hostname = "nixos"; # hostname
profile = "default"; # select a profile defined from my profiles directory
timezone = "Europe/Rome"; # select timezone
locale = "it_IT.UTF-8"; # select locale
bootMode = "uefi"; # uefi or bios
keyboard = "it"; # select keyboard layout
};
# ----- USER SETTINGS ----- #
userSettings = rec {
keyboard = systemSettings.keyboard; # select keyboard layout
username = "simo"; # username
theme = "Gruvbox-Dark"; # selcted theme from my themes directory (./themes/)
wm = "hyprland"; # Selected window manager or desktop environment; must select one in both ./user/wm/ and ./system/wm/
# window manager type (hyprland or x11) translator
wmType = if (wm == "hyprland") then "wayland" else "x11";
browser = "firefox"; # Default browser; must select one from ./user/app/browser/
term = "alacritty"; # Default terminal command;
editor = "nvim"; # Default editor;
};
lib = nixpkgs.lib;
pkgs = nixpkgs.legacyPackages.${systemSettings.system};
in
{
nixosConfigurations = {
nixos = lib.nixosSystem {
system = systemSettings.system;
modules = [ ./configuration.nix ];
specialArgs = {
inherit systemSettings;
inherit userSettings;
};
};
};
homeConfigurations = {
simo = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./home.nix ];
extraSpecialArgs = {
inherit userSettings;
inherit inputs;
};
};
};
};
}