flake: refactor, use colmenaHive
This commit is contained in:
parent
602995c205
commit
19fdca07b1
4 changed files with 146 additions and 112 deletions
30
flake.lock
30
flake.lock
|
@ -1,5 +1,34 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"colmena": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": [
|
||||||
|
"flake-compat"
|
||||||
|
],
|
||||||
|
"flake-utils": [
|
||||||
|
"flake-utils"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"stable": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1711386353,
|
||||||
|
"narHash": "sha256-gWEpb8Hybnoqb4O4tmpohGZk6+aerAbJpywKcFIiMlg=",
|
||||||
|
"owner": "zhaofengli",
|
||||||
|
"repo": "colmena",
|
||||||
|
"rev": "cd65ef7a25cdc75052fbd04b120aeb066c3881db",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "zhaofengli",
|
||||||
|
"repo": "colmena",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"crane": {
|
"crane": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -276,6 +305,7 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"colmena": "colmena",
|
||||||
"crane": "crane",
|
"crane": "crane",
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
|
|
48
flake.nix
48
flake.nix
|
@ -10,6 +10,13 @@
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/c169763c3087b02a8308e2f8a9bba77c428dcca1"; # userborn
|
nixpkgs.url = "github:NixOS/nixpkgs/c169763c3087b02a8308e2f8a9bba77c428dcca1"; # userborn
|
||||||
# nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
# nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
|
|
||||||
|
colmena = {
|
||||||
|
url = "github:zhaofengli/colmena";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
inputs.flake-compat.follows = "flake-compat";
|
||||||
|
inputs.flake-utils.follows = "flake-utils";
|
||||||
|
inputs.stable.follows = "nixpkgs";
|
||||||
|
};
|
||||||
disko = {
|
disko = {
|
||||||
url = "github:nix-community/disko";
|
url = "github:nix-community/disko";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
@ -49,7 +56,9 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
inputs.nixpkgs-stable.follows = "nixpkgs";
|
inputs.nixpkgs-stable.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
systems.url = "github:nix-systems/default";
|
systems = {
|
||||||
|
url = "github:nix-systems/default";
|
||||||
|
};
|
||||||
treefmt-nix = {
|
treefmt-nix = {
|
||||||
url = "github:numtide/treefmt-nix";
|
url = "github:numtide/treefmt-nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
@ -93,16 +102,16 @@
|
||||||
treefmtEval = inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
|
treefmtEval = inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
### nix fmt
|
# nix fmt
|
||||||
formatter = treefmtEval.config.build.wrapper;
|
formatter = treefmtEval.config.build.wrapper;
|
||||||
|
|
||||||
### nix flake check
|
# nix flake check
|
||||||
checks.formatting = treefmtEval.config.build.check inputs.self;
|
checks.formatting = treefmtEval.config.build.check inputs.self;
|
||||||
|
|
||||||
### nix {run,shell,build}
|
# nix {run,shell,build}
|
||||||
legacyPackages = import ./pkgs pkgs;
|
legacyPackages = import ./pkgs pkgs;
|
||||||
|
|
||||||
### nix develop
|
# nix develop
|
||||||
devShells.default = pkgs.mkShellNoCC {
|
devShells.default = pkgs.mkShellNoCC {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
colmena
|
colmena
|
||||||
|
@ -112,26 +121,23 @@
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
// {
|
// {
|
||||||
### imports = [];
|
|
||||||
nixosModules.default = ./nixos/modules;
|
nixosModules.default = ./nixos/modules;
|
||||||
homeManagerModules.default = ./home/modules;
|
overlays.default = import ./overlays;
|
||||||
|
|
||||||
### nixpkgs.overlays = [];
|
nixosConfigurations = {
|
||||||
overlays = import ./overlays;
|
"dust" = inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
### NixOS
|
modules = [
|
||||||
nixosConfigurations."dust" = inputs.nixpkgs.lib.nixosSystem {
|
./nixos/profiles/core
|
||||||
system = "x86_64-linux";
|
./hosts/dust
|
||||||
modules = [
|
];
|
||||||
./nixos/profiles/core
|
specialArgs = {
|
||||||
./hosts/dust
|
inherit inputs;
|
||||||
];
|
};
|
||||||
specialArgs = {
|
|
||||||
inherit inputs;
|
|
||||||
};
|
};
|
||||||
};
|
} // inputs.self.colmenaHive.nodes;
|
||||||
|
|
||||||
colmena = {
|
colmenaHive = inputs.colmena.lib.makeHive {
|
||||||
meta = {
|
meta = {
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
]);
|
]);
|
||||||
|
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
inputs.self.overlays.patches
|
inputs.self.overlays.default
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
|
@ -5,97 +5,95 @@ let
|
||||||
patches = (old.patches or [ ]) ++ patches;
|
patches = (old.patches or [ ]) ++ patches;
|
||||||
});
|
});
|
||||||
in
|
in
|
||||||
{
|
_final: prev: {
|
||||||
patches = _final: prev: {
|
# https://aur.archlinux.org/pkgbase/nautilus-typeahead
|
||||||
# https://aur.archlinux.org/pkgbase/nautilus-typeahead
|
nautilus = prev.nautilus.overrideAttrs {
|
||||||
nautilus = prev.nautilus.overrideAttrs {
|
src = prev.fetchFromGitLab {
|
||||||
src = prev.fetchFromGitLab {
|
domain = "gitlab.gnome.org";
|
||||||
domain = "gitlab.gnome.org";
|
owner = "albertvaka";
|
||||||
owner = "albertvaka";
|
repo = "nautilus";
|
||||||
repo = "nautilus";
|
rev = "f5f593bf36c41756a29d5112a10cf7ec70b8eafb";
|
||||||
rev = "f5f593bf36c41756a29d5112a10cf7ec70b8eafb";
|
hash = "sha256-PfkCY2gQ8jfPIgTRC9Xzxh4N3f2oB339Hym5RCbKwkw=";
|
||||||
hash = "sha256-PfkCY2gQ8jfPIgTRC9Xzxh4N3f2oB339Hym5RCbKwkw=";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable type-ahead behavior by default
|
|
||||||
postPatch = ''
|
|
||||||
awk -i inplace '/type-ahead-search/{c++;} c==1 && /true/{sub("true", "false"); c++;} 1' data/org.gnome.nautilus.gschema.xml
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
qt6Packages = prev.qt6Packages.overrideScope (
|
# Enable type-ahead behavior by default
|
||||||
_final': prev': {
|
postPatch = ''
|
||||||
# HACK: no more qt5
|
awk -i inplace '/type-ahead-search/{c++;} c==1 && /true/{sub("true", "false"); c++;} 1' data/org.gnome.nautilus.gschema.xml
|
||||||
fcitx5-with-addons = prev'.fcitx5-with-addons.override {
|
'';
|
||||||
libsForQt5.fcitx5-qt = prev.emptyDirectory;
|
|
||||||
};
|
|
||||||
|
|
||||||
# HACK: no more qtwebengine, opencc
|
|
||||||
fcitx5-chinese-addons =
|
|
||||||
(prev'.fcitx5-chinese-addons.override {
|
|
||||||
curl = prev.emptyDirectory;
|
|
||||||
opencc = prev.emptyDirectory;
|
|
||||||
qtwebengine = prev.emptyDirectory;
|
|
||||||
}).overrideAttrs
|
|
||||||
(oldAttrs: {
|
|
||||||
buildInputs = oldAttrs.buildInputs ++ [
|
|
||||||
prev.gettext
|
|
||||||
prev'.qtbase
|
|
||||||
];
|
|
||||||
cmakeFlags = oldAttrs.cmakeFlags ++ [
|
|
||||||
(prev.lib.cmakeBool "ENABLE_BROWSER" false)
|
|
||||||
(prev.lib.cmakeBool "ENABLE_CLOUDPINYIN" false)
|
|
||||||
(prev.lib.cmakeBool "ENABLE_OPENCC" false)
|
|
||||||
];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
# HACK: no more gtk2
|
|
||||||
gnome-themes-extra =
|
|
||||||
(prev.gnome-themes-extra.override {
|
|
||||||
gtk2 = prev.emptyDirectory;
|
|
||||||
}).overrideAttrs
|
|
||||||
{
|
|
||||||
configureFlags = [ "--disable-gtk2-engine" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
sway-unwrapped = addPatches prev.sway-unwrapped [
|
|
||||||
# text_input: Implement input-method popups
|
|
||||||
# https://github.com/swaywm/sway/pull/7226
|
|
||||||
(prev.fetchpatch2 {
|
|
||||||
name = "0001-text_input-Implement-input-method-popups.patch";
|
|
||||||
url = "https://github.com/swaywm/sway/commit/de74d1f6360810c0a5fd11d8022fbffe56fc97c5.patch";
|
|
||||||
hash = "sha256-iTZIYHBp8vxjVdmH/k+jlN0/Zj6Ofe/qefv7ubtowHs=";
|
|
||||||
})
|
|
||||||
(prev.fetchpatch2 {
|
|
||||||
name = "0002-chore-fractal-scale-handle.patch";
|
|
||||||
url = "https://github.com/swaywm/sway/commit/2aa72e8dfd3b3d051fdec6b2d05c5635adcfb57b.patch";
|
|
||||||
hash = "sha256-aJYXoZ7xEEy8J8DjxANOe14HdHRni6IXSNcAzLzNvIo=";
|
|
||||||
})
|
|
||||||
(prev.fetchpatch2 {
|
|
||||||
name = "0003-chore-left_pt-on-method-popup.patch";
|
|
||||||
url = "https://github.com/swaywm/sway/commit/0789c12a8edf46fbc1c7024e153f3e8f8f35fe12.patch";
|
|
||||||
hash = "sha256-zvhp5eXqDngMNtctzVpryZY3zKi3IVjV7oFIBMC2jMk=";
|
|
||||||
})
|
|
||||||
|
|
||||||
# Tray D-Bus Menu
|
|
||||||
# https://github.com/swaywm/sway/pull/6249
|
|
||||||
(prev.fetchpatch2 {
|
|
||||||
name = "0001-Tray-Implement-dbusmenu.patch";
|
|
||||||
url = "https://github.com/NickHu/sway/commit/0fc5d7aed84415a77b718ca9dc3c0b3ad2c05b02.patch";
|
|
||||||
hash = "sha256-eosg6m2P6e8NRXjOAQL3SZg+Yc4Av9Wd+LOy0G3+xkA=";
|
|
||||||
})
|
|
||||||
(prev.fetchpatch2 {
|
|
||||||
name = "0002-Tray-dont-invoke-dbus-menu-when-tray-is-disabled.patch";
|
|
||||||
url = "https://github.com/NickHu/sway/commit/03c14421354e54332e12f78d029dcaa9919fd161.patch";
|
|
||||||
hash = "sha256-8RGtpfN/tnkA7nuGdXGHoKUoKVeG7brSQR6V4RU3z88=";
|
|
||||||
})
|
|
||||||
(prev.fetchpatch2 {
|
|
||||||
name = "0003-swaybar-dbusmenu-fix-crash-if-the-program-exits-while-menu.patch";
|
|
||||||
url = "https://github.com/llyyr/sway/commit/84481c26a4c55674da5804bb2619d3575ba405b3.patch";
|
|
||||||
hash = "sha256-+JJoHNOmDzqT1TaFM83DR3/BdCab240tfs21VNMv6wE=";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
qt6Packages = prev.qt6Packages.overrideScope (
|
||||||
|
_final': prev': {
|
||||||
|
# HACK: no more qt5
|
||||||
|
fcitx5-with-addons = prev'.fcitx5-with-addons.override {
|
||||||
|
libsForQt5.fcitx5-qt = prev.emptyDirectory;
|
||||||
|
};
|
||||||
|
|
||||||
|
# HACK: no more qtwebengine, opencc
|
||||||
|
fcitx5-chinese-addons =
|
||||||
|
(prev'.fcitx5-chinese-addons.override {
|
||||||
|
curl = prev.emptyDirectory;
|
||||||
|
opencc = prev.emptyDirectory;
|
||||||
|
qtwebengine = prev.emptyDirectory;
|
||||||
|
}).overrideAttrs
|
||||||
|
(oldAttrs: {
|
||||||
|
buildInputs = oldAttrs.buildInputs ++ [
|
||||||
|
prev.gettext
|
||||||
|
prev'.qtbase
|
||||||
|
];
|
||||||
|
cmakeFlags = oldAttrs.cmakeFlags ++ [
|
||||||
|
(prev.lib.cmakeBool "ENABLE_BROWSER" false)
|
||||||
|
(prev.lib.cmakeBool "ENABLE_CLOUDPINYIN" false)
|
||||||
|
(prev.lib.cmakeBool "ENABLE_OPENCC" false)
|
||||||
|
];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
# HACK: no more gtk2
|
||||||
|
gnome-themes-extra =
|
||||||
|
(prev.gnome-themes-extra.override {
|
||||||
|
gtk2 = prev.emptyDirectory;
|
||||||
|
}).overrideAttrs
|
||||||
|
{
|
||||||
|
configureFlags = [ "--disable-gtk2-engine" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
sway-unwrapped = addPatches prev.sway-unwrapped [
|
||||||
|
# text_input: Implement input-method popups
|
||||||
|
# https://github.com/swaywm/sway/pull/7226
|
||||||
|
(prev.fetchpatch2 {
|
||||||
|
name = "0001-text_input-Implement-input-method-popups.patch";
|
||||||
|
url = "https://github.com/swaywm/sway/commit/de74d1f6360810c0a5fd11d8022fbffe56fc97c5.patch";
|
||||||
|
hash = "sha256-iTZIYHBp8vxjVdmH/k+jlN0/Zj6Ofe/qefv7ubtowHs=";
|
||||||
|
})
|
||||||
|
(prev.fetchpatch2 {
|
||||||
|
name = "0002-chore-fractal-scale-handle.patch";
|
||||||
|
url = "https://github.com/swaywm/sway/commit/2aa72e8dfd3b3d051fdec6b2d05c5635adcfb57b.patch";
|
||||||
|
hash = "sha256-aJYXoZ7xEEy8J8DjxANOe14HdHRni6IXSNcAzLzNvIo=";
|
||||||
|
})
|
||||||
|
(prev.fetchpatch2 {
|
||||||
|
name = "0003-chore-left_pt-on-method-popup.patch";
|
||||||
|
url = "https://github.com/swaywm/sway/commit/0789c12a8edf46fbc1c7024e153f3e8f8f35fe12.patch";
|
||||||
|
hash = "sha256-zvhp5eXqDngMNtctzVpryZY3zKi3IVjV7oFIBMC2jMk=";
|
||||||
|
})
|
||||||
|
|
||||||
|
# Tray D-Bus Menu
|
||||||
|
# https://github.com/swaywm/sway/pull/6249
|
||||||
|
(prev.fetchpatch2 {
|
||||||
|
name = "0001-Tray-Implement-dbusmenu.patch";
|
||||||
|
url = "https://github.com/NickHu/sway/commit/0fc5d7aed84415a77b718ca9dc3c0b3ad2c05b02.patch";
|
||||||
|
hash = "sha256-eosg6m2P6e8NRXjOAQL3SZg+Yc4Av9Wd+LOy0G3+xkA=";
|
||||||
|
})
|
||||||
|
(prev.fetchpatch2 {
|
||||||
|
name = "0002-Tray-dont-invoke-dbus-menu-when-tray-is-disabled.patch";
|
||||||
|
url = "https://github.com/NickHu/sway/commit/03c14421354e54332e12f78d029dcaa9919fd161.patch";
|
||||||
|
hash = "sha256-8RGtpfN/tnkA7nuGdXGHoKUoKVeG7brSQR6V4RU3z88=";
|
||||||
|
})
|
||||||
|
(prev.fetchpatch2 {
|
||||||
|
name = "0003-swaybar-dbusmenu-fix-crash-if-the-program-exits-while-menu.patch";
|
||||||
|
url = "https://github.com/llyyr/sway/commit/84481c26a4c55674da5804bb2619d3575ba405b3.patch";
|
||||||
|
hash = "sha256-+JJoHNOmDzqT1TaFM83DR3/BdCab240tfs21VNMv6wE=";
|
||||||
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue