-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
78 lines (68 loc) · 2.28 KB
/
flake.nix
File metadata and controls
78 lines (68 loc) · 2.28 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
{
description = "mostlyk's NixOS configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# because unstable is slow AF
nixpkgs-small.url = "github:NixOS/nixpkgs/nixos-unstable-small";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
niri-flake = {
url = "github:sodiboo/niri-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
noctalia = {
url = "github:noctalia-dev/noctalia-shell";
inputs.nixpkgs.follows = "nixpkgs";
};
mostlyk-zed.url = "github:mostlykiguess/zed-nix-cache";
};
outputs = inputs @ { self, nixpkgs, nixpkgs-small, home-manager, niri-flake, noctalia, mostlyk-zed, ... }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
pkgs-small = import nixpkgs-small { inherit system; config.allowUnfree = true; };
in
{
nixosConfigurations.mostlyk = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; };
modules = [
./nixos/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.backupFileExtension = "backup";
home-manager.extraSpecialArgs = { inherit inputs mostlyk-zed pkgs-small; };
home-manager.users.mostlyk = { ... }: {
imports = [
./home-manager/home.nix
niri-flake.homeModules.niri
noctalia.homeModules.default
];
};
}
];
};
# nix fmt
formatter.${system} = pkgs.nixpkgs-fmt;
# nix develop
devShells.${system}.default = pkgs.mkShell {
packages = with pkgs; [
nixpkgs-fmt # formatter
deadnix # dead code finder
statix # nix anti-pattern linter
nil # nix LSP
];
shellHook = ''
echo "my dots dev shell :3 wohohohohoh WELCOMEEE - run 'deadnix .' or 'statix check .'"
exec zsh
'';
};
# nix flake check (dry-build the system)
checks.${system}.build =
self.nixosConfigurations.mostlyk.config.system.build.toplevel;
};
}