flake.nix (view raw)
1{
2 description = "charlotte's NixOS flake";
3 inputs = {
4 nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
5 nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
6
7 lix = {
8 url = "https://git.lix.systems/lix-project/nixos-module/archive/2.92.0.tar.gz";
9 inputs.nixpkgs.follows = "nixpkgs";
10 };
11 };
12 outputs =
13 {
14 self,
15 nixpkgs,
16 nixpkgs-unstable,
17 lix,
18 ...
19 }@inputs:
20 {
21 nixosConfigurations = {
22 runestone = nixpkgs.lib.nixosSystem {
23 system = "x86_64-linux";
24
25 specialArgs = {
26 user-pkgs = self.packages."x86_64-linux";
27 unstable-pkgs = nixpkgs-unstable.legacyPackages."x86_64-linux";
28 };
29
30 modules = [
31 /*
32 ({ config, pkgs, ... }: {
33 nixpkgs.overlays = [
34 (final: prev: {
35 xdg-desktop-portal-gnome = prev.xdg-desktop-portal-gnome.overrideAttrs (oldAttrs: {
36 patches = (oldAttrs.patches or [ ]) ++ [
37 ./packages/xdg-desktop-portal-gnome/unattended.patch
38 ];
39 });
40 })
41 ];
42 })
43 */
44
45 lix.nixosModules.default
46
47 (
48 { ... }:
49 {
50 system.stateVersion = "24.05";
51 }
52 )
53
54 ./profiles/common/base.nix
55 ./profiles/common/locale.nix
56 ./profiles/common/networking.nix
57 ./profiles/common/desktop.nix
58
59 ./profiles/runestone/hardware-configuration.nix
60 ./profiles/runestone/base.nix
61 ./profiles/runestone/desktop.nix
62 ./profiles/runestone/grafana-prometheus.nix
63 ];
64 };
65
66 opal = nixpkgs.lib.nixosSystem {
67 system = "x86_64-linux";
68
69 specialArgs = {
70 user-pkgs = self.packages."x86_64-linux";
71 unstable-pkgs = nixpkgs-unstable.legacyPackages."x86_64-linux";
72 };
73
74 modules = [
75 lix.nixosModules.default
76
77 (
78 { ... }:
79 {
80 system.stateVersion = "24.05";
81 }
82 )
83
84 ./profiles/common/base.nix
85 ./profiles/common/locale.nix
86 ./profiles/common/networking.nix
87 ./profiles/common/desktop.nix
88
89 ./profiles/opal/hardware-configuration.nix
90 ./profiles/opal/base.nix
91 ./profiles/runestone/gnome.nix # TODO: replace with a nice wayland twm or something
92 ];
93 };
94 };
95
96 packages = {
97 x86_64-linux = import ./packages/default.nix {
98 pkgs = import nixpkgs { system = "x86_64-linux"; };
99 };
100 };
101 };
102}