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 { self
19 , nixpkgs
20 , nixpkgs-unstable
21 , lix
22 , niri
23 , ...
24 }@inputs:
25 {
26 nixosConfigurations = {
27 runestone = nixpkgs.lib.nixosSystem {
28 system = "x86_64-linux";
29
30 specialArgs = {
31 user-pkgs = self.packages."x86_64-linux";
32 unstable-pkgs = nixpkgs-unstable.legacyPackages."x86_64-linux";
33 };
34
35 modules = [
36 /*
37 ({ config, pkgs, ... }: {
38 nixpkgs.overlays = [
39 (final: prev: {
40 xdg-desktop-portal-gnome = prev.xdg-desktop-portal-gnome.overrideAttrs (oldAttrs: {
41 patches = (oldAttrs.patches or [ ]) ++ [
42 ./packages/xdg-desktop-portal-gnome/unattended.patch
43 ];
44 });
45 })
46 ];
47 })
48 */
49
50 niri.nixosModules.niri
51 ({ ... }: {
52 nixpkgs.overlays = [ niri.overlays.niri ];
53 })
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 niri.nixosModules.niri
83 ({ ... }: {
84 nixpkgs.overlays = [ niri.overlays.niri ];
85 })
86
87 (
88 { ... }:
89 {
90 system.stateVersion = "23.05";
91 }
92 )
93
94 ./profiles/common/base.nix
95 ./profiles/common/locale.nix
96 ./profiles/common/networking.nix
97 ./profiles/common/desktop.nix
98
99 ./profiles/opal/hardware-configuration.nix
100 ./profiles/opal/base.nix
101 ./profiles/opal/software.nix
102 ./profiles/runestone/desktop.nix
103 ];
104 };
105 };
106
107 packages = {
108 x86_64-linux = import ./packages/default.nix {
109 pkgs = import nixpkgs { system = "x86_64-linux"; };
110 };
111 };
112 };
113}