-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
87 lines (82 loc) · 2.78 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
{
description = "My first flake!";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
home-manager.url = "github:nix-community/home-manager/release-23.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
unstablepkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
#catppuccin.url = "github:catppuccin/nix";
};
outputs = { self, nixpkgs, home-manager, nixos-hardware, unstablepkgs, ... }:
let
# -------- System Settings -------- #
systemSettings = {
profile = "laptop";
lib = nixpkgs.lib;
system = "x86_64-linux";
hostname = if (systemSettings.profile == "desktop") then "desky" else "zephy";
timezone = "America/Chicago";
locale = "en_US.UTF-8";
};
# -------- User Settings -------- #
userSettings = {
username = "thunlix";
name = "Thunlix";
email = "[email protected]";
dotfilesDir = "~/.dotfiles";
wm = "hyprland";
wmType = if (userSettings.wm == "hyprland") then "wayland" else "x11";
browser = "librewolf";
term = "footclient";
editor = "emacsclient";
monitor = if (systemSettings.profile == "desktop") then "DP-2, 3440x1440@160, 0x0, 1" else "eDP, 2560x1440@165, 0x0, 1.25";
};
#pkgs = nixpkgs.legacyPackages.${systemSettings.system};
pkgs = import nixpkgs { system = systemSettings.system; config.allowUnfree = true; };
unstable = import unstablepkgs { system = systemSettings.system; config.allowUnfree = true; };
in {
nixosConfigurations = {
desky = systemSettings.lib.nixosSystem {
system = systemSettings.system;
modules = [
#catppuccin.nixosModules.catppuccin
(./. + "/profiles" + ("/" + systemSettings.profile) + "/configuration.nix")
];
specialArgs = {
inherit pkgs;
inherit unstable;
inherit systemSettings;
inherit userSettings;
};
};
zephy = systemSettings.lib.nixosSystem {
system = systemSettings.system;
modules = [
nixos-hardware.nixosModules.asus-zephyrus-ga503
#catppuccin.nixosModules.catppuccin
(./. + "/profiles" + ("/" + systemSettings.profile) + "/configuration.nix")
];
specialArgs = {
inherit pkgs;
inherit unstable;
inherit systemSettings;
inherit userSettings;
};
};
};
homeConfigurations = {
thunlix = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
#catppuccin.nixosModules.catppuccin
(./. + "/profiles" + ("/" + systemSettings.profile) + "/home.nix")
];
extraSpecialArgs = {
inherit unstable;
inherit userSettings;
};
};
};
};
}