-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
99 lines (85 loc) · 2.77 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
{
description = "coco-system";
nixConfig = {
extra-substituters = [ "https://nix-community.cachix.org" ];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
cachix.url = "github:cachix/cachix";
# Home manager
home-manager = {
url = "github:nix-community/home-manager/";
inputs.nixpkgs.follows = "nixpkgs";
};
nur.url = "github:nix-community/nur";
nix-colors.url = "github:misterio77/nix-colors";
spicetify-nix = {
url = "github:Gerg-L/spicetify-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
neorg-overlay.url = "github:nvim-neorg/nixpkgs-neorg-overlay";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
};
outputs = inputs@{ self, nixpkgs, home-manager, nur, cachix, nixpkgs-unstable
, nixos-hardware, spicetify-nix, ... }:
let
inherit (nixpkgs) lib;
systemSettings = {
hostname = "nixos";
timeZone = "Asia/Kolkata";
locale = "en_US.UTF-8";
};
userSettings = {
username = "coco"; # username
name = "sachin chaudhary";
hostname = "nixos";
};
unstable-packages = final: _prev: {
unstable = import inputs.nixpkgs-unstable {
inherit (final) system;
config.allowUnfree = true;
};
};
# pkgs = nixpkgs-unstable.legacyPackages."${system}";
# config = { allowunfree = true; };
in {
nixosConfigurations = {
${systemSettings.hostname} = lib.nixosSystem {
specialArgs = { inherit inputs userSettings systemSettings; };
modules = [
nixos-hardware.nixosModules.lenovo-ideapad-15alc6
./configuration.nix
home-manager.nixosModules.home-manager
{
nixpkgs.overlays = [
nur.overlay
inputs.neorg-overlay.overlays.default
unstable-packages
];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit inputs;
inherit userSettings;
};
users.${userSettings.username} = {
imports = [
./home-manager.nix
inputs.nix-colors.homeManagerModules.default
inputs.nur.hmModules.nur
# inputs.spicetify-nix.homeManagerModules.default
./modules/gui/spicetify.nix
];
};
};
}
];
};
};
};
}