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 niri = {
13 url = "github:sodiboo/niri-flake";
14 inputs.nixpkgs.follows = "nixpkgs";
15 };
16 };
17 outputs =
18 {
19 self,
20 nixpkgs,
21 nixpkgs-unstable,
22 lix,
23 niri,
24 ...
25 }@inputs:
26 {
27 nixosConfigurations = {
28 runestone = nixpkgs.lib.nixosSystem {
29 system = "x86_64-linux";
30
31 specialArgs = {
32 user-pkgs = self.packages."x86_64-linux";
33 unstable-pkgs = nixpkgs-unstable.legacyPackages."x86_64-linux";
34 };
35
36 modules = [
37 /*
38 ({ config, pkgs, ... }: {
39 nixpkgs.overlays = [
40 (final: prev: {
41 xdg-desktop-portal-gnome = prev.xdg-desktop-portal-gnome.overrideAttrs (oldAttrs: {
42 patches = (oldAttrs.patches or [ ]) ++ [
43 ./packages/xdg-desktop-portal-gnome/unattended.patch
44 ];
45 });
46 })
47 ];
48 })
49 */
50
51 niri.nixosModules.niri
52
53 lix.nixosModules.default
54
55 (
56 { ... }:
57 {
58 system.stateVersion = "24.05";
59 }
60 )
61
62 ./profiles/common/base.nix
63 ./profiles/common/locale.nix
64 ./profiles/common/networking.nix
65 ./profiles/common/desktop.nix
66
67 ./profiles/runestone/hardware-configuration.nix
68 ./profiles/runestone/base.nix
69 ./profiles/runestone/desktop.nix
70 ];
71 };
72
73 opal = nixpkgs.lib.nixosSystem {
74 system = "x86_64-linux";
75
76 specialArgs = {
77 user-pkgs = self.packages."x86_64-linux";
78 unstable-pkgs = nixpkgs-unstable.legacyPackages."x86_64-linux";
79 };
80
81 modules = [
82 lix.nixosModules.default
83
84 (
85 { ... }:
86 {
87 system.stateVersion = "24.05";
88 }
89 )
90
91 ./profiles/common/base.nix
92 ./profiles/common/locale.nix
93 ./profiles/common/networking.nix
94 ./profiles/common/desktop.nix
95
96 ./profiles/opal/hardware-configuration.nix
97 ./profiles/opal/base.nix
98 ./profiles/runestone/desktop.nix # TODO: replace with a nice wayland twm or something
99 ];
100 };
101 };
102
103 packages = {
104 x86_64-linux = import ./packages/default.nix {
105 pkgs = import nixpkgs { system = "x86_64-linux"; };
106 };
107 };
108 };
109}