-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
130 lines (103 loc) · 3.66 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
{
description = "Caramel Mint";
inputs = {
# NixPkgs (nixos-24.11)
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
stylix.url = "github:danth/stylix/release-24.11";
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-facter-modules.url = "github:numtide/nixos-facter-modules";
# System Deployment
deploy-rs.url = "github:serokell/deploy-rs";
deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
# NixPkgs Unstable (nixos-unstable)
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nix-colors.url = "github:misterio77/nix-colors";
catppuccin.url = "github:catppuccin/nix";
nv.url = "github:hzmmohamed/nv";
# Home Manager (release-23.11)
home-manager.url = "github:nix-community/home-manager/release-24.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nix-index-database.url = "github:nix-community/nix-index-database";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
# macOS Support (master)
# darwin.url = "github:lnl7/nix-darwin";
# darwin.inputs.nixpkgs.follows = "nixpkgs";
# Hardware Configuration
nixos-hardware.url = "github:nixos/nixos-hardware";
# Generate System Images
nixos-generators.url = "github:nix-community/nixos-generators";
nixos-generators.inputs.nixpkgs.follows = "nixpkgs";
# Snowfall Lib
snowfall-lib.url = "github:snowfallorg/lib";
snowfall-lib.inputs.nixpkgs.follows = "nixpkgs";
# Snowfall Flake
flake.url = "github:snowfallorg/flake";
flake.inputs.nixpkgs.follows = "nixpkgs";
# Flake Hygiene
flake-checker = {
url =
"github:DeterminateSystems/flake-checker/46b02e6172ed961113d336a035688ac12c96d9f4";
inputs.nixpkgs.follows = "nixpkgs";
};
# GPG default configuration
gpg-base-conf = {
url = "github:drduh/config";
flake = false;
};
# TODO: Adding this input to remind myself to learn to use it. This should be, in principle, easier than setting up formatters from pre-commit-hooks.nix
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "unstable";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
musnix = { url = "github:musnix/musnix"; };
};
outputs = inputs:
let
lib = inputs.snowfall-lib.mkLib {
inherit inputs;
src = ./.;
snowfall = {
meta = {
name = "caramelmint";
title = "Caramel Mint";
};
namespace = "caramelmint";
};
};
in lib.mkFlake {
channels-config = {
allowUnfree = true;
# This version of Electron is EOL, but latest Obsidian still uses it.
permittedInsecurePackages = [ "electron-25.9.0" ];
};
systems.modules.nixos = with inputs; [
catppuccin.nixosModules.catppuccin
home-manager.nixosModules.home-manager
sops-nix.nixosModules.sops
musnix.nixosModules.musnix
disko.nixosModules.disko
stylix.nixosModules.stylix
];
homes.users.hfahmi.modules = with inputs; [
nix-colors.homeManagerModules.default
catppuccin.homeManagerModules.catppuccin
nix-index-database.hmModules.nix-index
stylix.homeManagerModules.stylix
];
deploy = lib.mkDeploy { inherit (inputs) self; };
checks = builtins.mapAttrs
(system: deploy-lib: deploy-lib.deployChecks inputs.self.deploy)
inputs.deploy-rs.lib;
};
}