refactor: massive refactor using flake-parts; use typos-cli and
keep-sorted
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
};
|
};
|
||||||
share = {
|
share = {
|
||||||
path = "/mnt/nas/share";
|
path = "/mnt/nas/share";
|
||||||
browseable = "yes";
|
browsable = "yes";
|
||||||
"read only" = "no";
|
"read only" = "no";
|
||||||
"guest ok" = "no";
|
"guest ok" = "no";
|
||||||
"create mask" = "0664";
|
"create mask" = "0664";
|
||||||
|
|||||||
54
flake.lock
generated
54
flake.lock
generated
@@ -292,6 +292,26 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-parts_2": {
|
"flake-parts_2": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1765835352,
|
||||||
|
"narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "a34fae9c08a15ad73f295041fec82323541400a9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-parts_3": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
"go-musicfox",
|
"go-musicfox",
|
||||||
@@ -314,7 +334,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-parts_3": {
|
"flake-parts_4": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
@@ -331,7 +351,7 @@
|
|||||||
"type": "indirect"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-parts_4": {
|
"flake-parts_5": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
"stylix",
|
"stylix",
|
||||||
@@ -473,7 +493,7 @@
|
|||||||
"go-musicfox": {
|
"go-musicfox": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"devenv": "devenv",
|
"devenv": "devenv",
|
||||||
"flake-parts": "flake-parts_3",
|
"flake-parts": "flake-parts_4",
|
||||||
"flake-root": "flake-root",
|
"flake-root": "flake-root",
|
||||||
"mission-control": "mission-control",
|
"mission-control": "mission-control",
|
||||||
"mk-shell-bin": "mk-shell-bin",
|
"mk-shell-bin": "mk-shell-bin",
|
||||||
@@ -483,11 +503,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1762961141,
|
"lastModified": 1766200280,
|
||||||
"narHash": "sha256-q6B/qUbz2JvCLg3ZQKf24xsIICJz5Lh77Ki+fInfllU=",
|
"narHash": "sha256-FGYAy+d0lJrsjvlnJi79jYBXm8NP1BLiYmYXze/3pRA=",
|
||||||
"owner": "imxyy1soope1",
|
"owner": "imxyy1soope1",
|
||||||
"repo": "go-musicfox",
|
"repo": "go-musicfox",
|
||||||
"rev": "266ae5f6a791e16a7afdc3d08b6294ceff0ec4d8",
|
"rev": "d7ac9fe76572eeef9fb4c8113d52243430497790",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -713,7 +733,7 @@
|
|||||||
"go-musicfox",
|
"go-musicfox",
|
||||||
"devenv"
|
"devenv"
|
||||||
],
|
],
|
||||||
"flake-parts": "flake-parts_2",
|
"flake-parts": "flake-parts_3",
|
||||||
"libgit2": "libgit2",
|
"libgit2": "libgit2",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixpkgs-23-11": [
|
"nixpkgs-23-11": [
|
||||||
@@ -900,22 +920,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-working": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1762844143,
|
|
||||||
"narHash": "sha256-SlybxLZ1/e4T2lb1czEtWVzDCVSTvk9WLwGhmxFmBxI=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "9da7f1cf7f8a6e2a7cb3001b048546c92a8258b4",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "9da7f1cf7f8a6e2a7cb3001b048546c92a8258b4",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717432640,
|
"lastModified": 1717432640,
|
||||||
@@ -1049,6 +1053,7 @@
|
|||||||
"catppuccin": "catppuccin",
|
"catppuccin": "catppuccin",
|
||||||
"darkly": "darkly",
|
"darkly": "darkly",
|
||||||
"fenix": "fenix",
|
"fenix": "fenix",
|
||||||
|
"flake-parts": "flake-parts_2",
|
||||||
"go-musicfox": "go-musicfox",
|
"go-musicfox": "go-musicfox",
|
||||||
"haumea": "haumea",
|
"haumea": "haumea",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
@@ -1063,7 +1068,6 @@
|
|||||||
"nixpkgs-master": "nixpkgs-master",
|
"nixpkgs-master": "nixpkgs-master",
|
||||||
"nixpkgs-stable": "nixpkgs-stable_2",
|
"nixpkgs-stable": "nixpkgs-stable_2",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
"nixpkgs-working": "nixpkgs-working",
|
|
||||||
"noctalia": "noctalia",
|
"noctalia": "noctalia",
|
||||||
"plant": "plant",
|
"plant": "plant",
|
||||||
"sops-nix": "sops-nix",
|
"sops-nix": "sops-nix",
|
||||||
@@ -1117,7 +1121,7 @@
|
|||||||
"base16-helix": "base16-helix",
|
"base16-helix": "base16-helix",
|
||||||
"base16-vim": "base16-vim",
|
"base16-vim": "base16-vim",
|
||||||
"firefox-gnome-theme": "firefox-gnome-theme",
|
"firefox-gnome-theme": "firefox-gnome-theme",
|
||||||
"flake-parts": "flake-parts_4",
|
"flake-parts": "flake-parts_5",
|
||||||
"gnome-shell": "gnome-shell",
|
"gnome-shell": "gnome-shell",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
|
|||||||
290
flake.nix
290
flake.nix
@@ -6,253 +6,115 @@
|
|||||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
nixpkgs-stable.url = "github:nixos/nixpkgs/release-25.11";
|
nixpkgs-stable.url = "github:nixos/nixpkgs/release-25.11";
|
||||||
nixpkgs-master.url = "github:nixos/nixpkgs/master";
|
nixpkgs-master.url = "github:nixos/nixpkgs/master";
|
||||||
nixpkgs-working.url = "github:nixos/nixpkgs/9da7f1cf7f8a6e2a7cb3001b048546c92a8258b4";
|
|
||||||
# nixpkgs.follows = "nixpkgs-stable";
|
# nixpkgs.follows = "nixpkgs-stable";
|
||||||
nixpkgs.follows = "nixpkgs-unstable";
|
nixpkgs.follows = "nixpkgs-unstable";
|
||||||
# nixpkgs.follows = "nixpkgs-master";
|
# nixpkgs.follows = "nixpkgs-master";
|
||||||
|
|
||||||
# TODO: sops-nix: remove pr patch once merged
|
|
||||||
# https://github.com/Mic92/sops-nix/pull/779
|
|
||||||
sops-nix = {
|
|
||||||
url = "github:Mic92/sops-nix/pull/779/merge";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Home manager
|
# Home manager
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/master";
|
url = "github:nix-community/home-manager/master";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Impermanence
|
|
||||||
impermanence.url = "github:nix-community/impermanence";
|
|
||||||
|
|
||||||
# Niri
|
|
||||||
niri.url = "github:sodiboo/niri-flake";
|
|
||||||
|
|
||||||
darkly = {
|
|
||||||
url = "github:Bali10050/Darkly";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
stylix = {
|
|
||||||
url = "github:danth/stylix";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
# go-musicfox
|
|
||||||
go-musicfox = {
|
|
||||||
url = "github:imxyy1soope1/go-musicfox";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
# NixOS-WSL
|
# NixOS-WSL
|
||||||
nixos-wsl = {
|
nixos-wsl = {
|
||||||
url = "github:nix-community/NixOS-WSL";
|
url = "github:nix-community/NixOS-WSL";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
fenix = {
|
# Flake organization tools
|
||||||
url = "github:nix-community/fenix";
|
# keep-sorted start block=yes
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
flake-parts = {
|
||||||
|
url = "github:hercules-ci/flake-parts";
|
||||||
|
inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
zen.url = "github:0xc000022070/zen-browser-flake";
|
|
||||||
zen.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
|
|
||||||
noctalia = {
|
|
||||||
url = "github:noctalia-dev/noctalia-shell/v3.7.1";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
angrr = {
|
|
||||||
url = "github:linyinfeng/angrr";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
plant = {
|
|
||||||
url = "git+ssh://git@git.imxyy.top:2222/imxyy1soope1/HF-plant.git?rev=08dc0b3889797eb3618c7475c3c367ec0e5fdf40";
|
|
||||||
flake = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
catppuccin = {
|
|
||||||
url = "github:catppuccin/nix";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
infuse = {
|
|
||||||
url = "git+https://codeberg.org/amjoseph/infuse.nix";
|
|
||||||
flake = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
haumea = {
|
haumea = {
|
||||||
url = "github:nix-community/haumea/v0.2.2";
|
url = "github:nix-community/haumea/v0.2.2";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
infuse = {
|
||||||
|
url = "git+https://codeberg.org/amjoseph/infuse.nix";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
# keep-sorted end
|
||||||
|
|
||||||
|
# Useful modules
|
||||||
|
# keep-sorted start block=yes
|
||||||
|
catppuccin = {
|
||||||
|
url = "github:catppuccin/nix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
impermanence.url = "github:nix-community/impermanence";
|
||||||
|
# TODO: sops-nix: remove pr patch once merged
|
||||||
|
# https://github.com/Mic92/sops-nix/pull/779
|
||||||
|
sops-nix = {
|
||||||
|
url = "github:Mic92/sops-nix/pull/779/merge";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
stylix = {
|
||||||
|
url = "github:danth/stylix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
# keep-sorted end
|
||||||
|
|
||||||
|
# Useful software
|
||||||
|
# keep-sorted start block=yes
|
||||||
|
angrr = {
|
||||||
|
url = "github:linyinfeng/angrr";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
darkly = {
|
||||||
|
url = "github:Bali10050/Darkly";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
fenix = {
|
||||||
|
url = "github:nix-community/fenix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
go-musicfox = {
|
||||||
|
url = "github:imxyy1soope1/go-musicfox";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
niri.url = "github:sodiboo/niri-flake";
|
||||||
|
noctalia = {
|
||||||
|
url = "github:noctalia-dev/noctalia-shell/v3.7.1";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
zen.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
zen.url = "github:0xc000022070/zen-browser-flake";
|
||||||
|
# keep-sorted end
|
||||||
|
|
||||||
|
# Misc
|
||||||
treefmt.url = "github:numtide/treefmt-nix";
|
treefmt.url = "github:numtide/treefmt-nix";
|
||||||
|
plant = {
|
||||||
|
url = "git+ssh://git@git.imxyy.top:2222/imxyy1soope1/HF-plant.git?rev=08dc0b3889797eb3618c7475c3c367ec0e5fdf40";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
my-templates.url = "git+https://git.imxyy.top/imxyy1soope1/flake-templates";
|
my-templates.url = "git+https://git.imxyy.top/imxyy1soope1/flake-templates";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{
|
{
|
||||||
self,
|
flake-parts,
|
||||||
nixpkgs,
|
|
||||||
...
|
...
|
||||||
}@inputs:
|
}@inputs:
|
||||||
let
|
flake-parts.lib.mkFlake
|
||||||
inherit (self) outputs;
|
|
||||||
vars = import ./vars.nix;
|
|
||||||
forAllSystems = lib.genAttrs lib.systems.flakeExposed;
|
|
||||||
forAllHosts =
|
|
||||||
mkSystem:
|
|
||||||
lib.mergeAttrsList (
|
|
||||||
builtins.map (hostname: {
|
|
||||||
${hostname} = mkSystem hostname;
|
|
||||||
}) (builtins.attrNames (builtins.readDir ./config/hosts))
|
|
||||||
);
|
|
||||||
|
|
||||||
lib = (import ./lib/stdlib-extended.nix nixpkgs.lib).extend (
|
|
||||||
final: prev: {
|
|
||||||
inherit (inputs.home-manager.lib) hm;
|
|
||||||
inherit infuse;
|
|
||||||
haumea = inputs.haumea.lib;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
infuse = (import inputs.infuse { inherit (nixpkgs) lib; }).v1.infuse;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
packages = forAllSystems (
|
inherit inputs;
|
||||||
system:
|
specialArgs.lib = import ./lib {
|
||||||
lib.haumea.load {
|
inherit (inputs.nixpkgs) lib;
|
||||||
src = ./pkgs;
|
inherit inputs;
|
||||||
loader = [
|
};
|
||||||
|
}
|
||||||
{
|
{
|
||||||
matches = str: builtins.match ".*\\.nix" str != null;
|
systems = [
|
||||||
loader = _: path: nixpkgs.legacyPackages.${system}.callPackage path { };
|
"x86_64-linux"
|
||||||
}
|
|
||||||
];
|
];
|
||||||
transformer = lib.haumea.transformers.liftDefault;
|
imports = [
|
||||||
}
|
./nixos.nix
|
||||||
);
|
./treefmt.nix
|
||||||
|
./pkgs
|
||||||
formatter = forAllSystems (
|
./overlays
|
||||||
system:
|
|
||||||
let
|
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
|
||||||
treefmtEval = inputs.treefmt.lib.evalModule pkgs ./treefmt.nix;
|
|
||||||
in
|
|
||||||
treefmtEval.config.build.wrapper
|
|
||||||
);
|
|
||||||
check = forAllSystems (
|
|
||||||
system:
|
|
||||||
let
|
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
|
||||||
treefmtEval = inputs.treefmt.lib.evalModule pkgs ./treefmt.nix;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
formatting = treefmtEval.config.build.check self;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
overlays = import ./overlays {
|
|
||||||
inherit inputs lib;
|
|
||||||
};
|
|
||||||
|
|
||||||
nixosConfigurations = forAllHosts (
|
|
||||||
hostname:
|
|
||||||
let
|
|
||||||
overlays = builtins.attrValues self.overlays ++ [
|
|
||||||
inputs.go-musicfox.overlays.default
|
|
||||||
inputs.niri.overlays.niri
|
|
||||||
inputs.fenix.overlays.default
|
|
||||||
inputs.angrr.overlays.default
|
|
||||||
(final: prev: {
|
|
||||||
darkly-qt5 = inputs.darkly.packages.${final.stdenv.hostPlatform.system}.darkly-qt5;
|
|
||||||
darkly-qt6 = inputs.darkly.packages.${final.stdenv.hostPlatform.system}.darkly-qt6;
|
|
||||||
|
|
||||||
noctalia-shell = inputs.noctalia.packages.${final.stdenv.hostPlatform.system}.default;
|
|
||||||
})
|
|
||||||
(final: prev: {
|
|
||||||
inherit lib;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
home = {
|
|
||||||
home-manager = {
|
|
||||||
sharedModules = [
|
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
|
||||||
inputs.impermanence.nixosModules.home-manager.impermanence
|
|
||||||
inputs.stylix.homeModules.stylix
|
|
||||||
inputs.noctalia.homeModules.default
|
|
||||||
inputs.zen.homeModules.beta
|
|
||||||
# workaround for annoying stylix
|
|
||||||
(
|
|
||||||
{ lib, ... }:
|
|
||||||
{
|
|
||||||
nixpkgs.overlays = lib.mkForce null;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
];
|
|
||||||
useGlobalPkgs = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
pkgsConf.nixpkgs = {
|
|
||||||
inherit overlays;
|
|
||||||
config.allowUnfree = true;
|
|
||||||
flake.setNixPath = false;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
lib.nixosSystem {
|
|
||||||
specialArgs = {
|
|
||||||
inherit
|
|
||||||
inputs
|
|
||||||
outputs
|
|
||||||
hostname
|
|
||||||
;
|
|
||||||
assets =
|
|
||||||
with lib.haumea;
|
|
||||||
load {
|
|
||||||
src = ./assets;
|
|
||||||
loader = [
|
|
||||||
(matchers.always loaders.path)
|
|
||||||
];
|
|
||||||
};
|
|
||||||
secrets =
|
|
||||||
with lib.haumea;
|
|
||||||
load {
|
|
||||||
src = ./secrets;
|
|
||||||
loader = [
|
|
||||||
(matchers.always loaders.path)
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// vars;
|
|
||||||
modules =
|
|
||||||
(lib.umport {
|
|
||||||
paths = [ ./modules ];
|
|
||||||
exclude = [
|
|
||||||
./modules/virt/types
|
|
||||||
];
|
|
||||||
recursive = true;
|
|
||||||
})
|
|
||||||
++ (lib.umport {
|
|
||||||
paths = [ ./config/hosts/${hostname} ];
|
|
||||||
recursive = true;
|
|
||||||
})
|
|
||||||
++ [
|
|
||||||
(lib.mkAliasOptionModule [ "my" "hm" ] [ "home-manager" "users" vars.username ])
|
|
||||||
./config/base.nix
|
|
||||||
inputs.sops-nix.nixosModules.sops
|
|
||||||
inputs.impermanence.nixosModules.impermanence
|
|
||||||
inputs.home-manager.nixosModules.default
|
|
||||||
inputs.niri.nixosModules.niri
|
|
||||||
inputs.catppuccin.nixosModules.catppuccin
|
|
||||||
inputs.angrr.nixosModules.angrr
|
|
||||||
home
|
|
||||||
pkgsConf
|
|
||||||
];
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
110
lib/default.nix
110
lib/default.nix
@@ -1,102 +1,10 @@
|
|||||||
{ lib }:
|
{ lib, inputs }:
|
||||||
|
lib.extend (
|
||||||
{
|
self: super: {
|
||||||
makeSwitch =
|
my = import ./my.nix { lib = self; };
|
||||||
{
|
umport = import ./umport.nix { lib = self; };
|
||||||
default ? false,
|
inherit (inputs.home-manager.lib) hm;
|
||||||
config,
|
haumea = inputs.haumea.lib;
|
||||||
optionPath,
|
infuse = (import inputs.infuse { inherit lib; }).v1.infuse;
|
||||||
optionName,
|
|
||||||
config',
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
cfg = lib.getAttrFromPath optionPath config.my;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.my = lib.setAttrByPath optionPath {
|
|
||||||
enable = (lib.mkEnableOption optionName) // {
|
|
||||||
inherit default;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable config';
|
|
||||||
};
|
|
||||||
|
|
||||||
makeHomePackageConfig =
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
packageName,
|
|
||||||
packagePath,
|
|
||||||
optionPath,
|
|
||||||
extraConfig ? { },
|
|
||||||
}:
|
|
||||||
lib.my.makeSwitch {
|
|
||||||
inherit config optionPath;
|
|
||||||
optionName = packageName;
|
|
||||||
config' = lib.mkMerge [
|
|
||||||
{
|
|
||||||
my.hm.home.packages = [ (lib.getAttrFromPath packagePath pkgs) ];
|
|
||||||
}
|
|
||||||
extraConfig
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
makeHomeProgramConfig =
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
programName,
|
|
||||||
optionPath,
|
|
||||||
extraConfig ? { },
|
|
||||||
}:
|
|
||||||
lib.my.makeSwitch {
|
|
||||||
inherit config optionPath;
|
|
||||||
optionName = programName;
|
|
||||||
|
|
||||||
config' = lib.mkMerge [
|
|
||||||
{
|
|
||||||
my.hm.programs = lib.setAttrByPath [ programName "enable" ] true;
|
|
||||||
}
|
|
||||||
extraConfig
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
makeNixosPackageConfig =
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
packageName,
|
|
||||||
packagePath,
|
|
||||||
optionPath,
|
|
||||||
extraConfig ? { },
|
|
||||||
}:
|
|
||||||
lib.my.makeSwitch {
|
|
||||||
inherit config optionPath;
|
|
||||||
optionName = packageName;
|
|
||||||
config' = lib.mkMerge [
|
|
||||||
{
|
|
||||||
environment.systemPackages = [ (lib.getAttrFromPath packagePath pkgs) ];
|
|
||||||
}
|
|
||||||
extraConfig
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
makeNixosProgramConfig =
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
programName,
|
|
||||||
optionPath,
|
|
||||||
extraConfig ? { },
|
|
||||||
}:
|
|
||||||
lib.my.makeSwitch {
|
|
||||||
inherit config optionPath;
|
|
||||||
optionName = programName;
|
|
||||||
|
|
||||||
config' = lib.mkMerge [
|
|
||||||
{
|
|
||||||
programs = lib.setAttrByPath [ programName "enable" ] true;
|
|
||||||
}
|
|
||||||
extraConfig
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
)
|
||||||
|
|||||||
102
lib/my.nix
Normal file
102
lib/my.nix
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
{ lib }:
|
||||||
|
|
||||||
|
{
|
||||||
|
makeSwitch =
|
||||||
|
{
|
||||||
|
default ? false,
|
||||||
|
config,
|
||||||
|
optionPath,
|
||||||
|
optionName,
|
||||||
|
config',
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = lib.getAttrFromPath optionPath config.my;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my = lib.setAttrByPath optionPath {
|
||||||
|
enable = (lib.mkEnableOption optionName) // {
|
||||||
|
inherit default;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable config';
|
||||||
|
};
|
||||||
|
|
||||||
|
makeHomePackageConfig =
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
packageName,
|
||||||
|
packagePath,
|
||||||
|
optionPath,
|
||||||
|
extraConfig ? { },
|
||||||
|
}:
|
||||||
|
lib.my.makeSwitch {
|
||||||
|
inherit config optionPath;
|
||||||
|
optionName = packageName;
|
||||||
|
config' = lib.mkMerge [
|
||||||
|
{
|
||||||
|
my.hm.home.packages = [ (lib.getAttrFromPath packagePath pkgs) ];
|
||||||
|
}
|
||||||
|
extraConfig
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
makeHomeProgramConfig =
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
programName,
|
||||||
|
optionPath,
|
||||||
|
extraConfig ? { },
|
||||||
|
}:
|
||||||
|
lib.my.makeSwitch {
|
||||||
|
inherit config optionPath;
|
||||||
|
optionName = programName;
|
||||||
|
|
||||||
|
config' = lib.mkMerge [
|
||||||
|
{
|
||||||
|
my.hm.programs = lib.setAttrByPath [ programName "enable" ] true;
|
||||||
|
}
|
||||||
|
extraConfig
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
makeNixosPackageConfig =
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
packageName,
|
||||||
|
packagePath,
|
||||||
|
optionPath,
|
||||||
|
extraConfig ? { },
|
||||||
|
}:
|
||||||
|
lib.my.makeSwitch {
|
||||||
|
inherit config optionPath;
|
||||||
|
optionName = packageName;
|
||||||
|
config' = lib.mkMerge [
|
||||||
|
{
|
||||||
|
environment.systemPackages = [ (lib.getAttrFromPath packagePath pkgs) ];
|
||||||
|
}
|
||||||
|
extraConfig
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
makeNixosProgramConfig =
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
programName,
|
||||||
|
optionPath,
|
||||||
|
extraConfig ? { },
|
||||||
|
}:
|
||||||
|
lib.my.makeSwitch {
|
||||||
|
inherit config optionPath;
|
||||||
|
optionName = programName;
|
||||||
|
|
||||||
|
config' = lib.mkMerge [
|
||||||
|
{
|
||||||
|
programs = lib.setAttrByPath [ programName "enable" ] true;
|
||||||
|
}
|
||||||
|
extraConfig
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# Just a convenience function that returns the given Nixpkgs standard
|
|
||||||
# library extended with the imxyy library.
|
|
||||||
|
|
||||||
stdlib:
|
|
||||||
|
|
||||||
let
|
|
||||||
mkMyLib = import ./.;
|
|
||||||
in
|
|
||||||
stdlib.extend (
|
|
||||||
self: super: {
|
|
||||||
my = mkMyLib { lib = self; };
|
|
||||||
umport = import ./umport.nix { lib = self; };
|
|
||||||
}
|
|
||||||
)
|
|
||||||
@@ -16,7 +16,6 @@ lib.my.makeSwitch {
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
vim
|
vim
|
||||||
wget
|
wget
|
||||||
git
|
|
||||||
|
|
||||||
file
|
file
|
||||||
gnused
|
gnused
|
||||||
@@ -39,8 +38,6 @@ lib.my.makeSwitch {
|
|||||||
dnsutils
|
dnsutils
|
||||||
|
|
||||||
killall
|
killall
|
||||||
|
|
||||||
comma
|
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
@@ -51,16 +48,20 @@ lib.my.makeSwitch {
|
|||||||
];
|
];
|
||||||
my.hm = {
|
my.hm = {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
lsd
|
# keep-sorted start
|
||||||
fd
|
|
||||||
neofetch
|
|
||||||
fastfetch
|
|
||||||
fzf
|
|
||||||
bat
|
|
||||||
ripgrep
|
|
||||||
|
|
||||||
aria2
|
aria2
|
||||||
|
bat
|
||||||
|
comma
|
||||||
|
fastfetch
|
||||||
|
fd
|
||||||
|
fzf
|
||||||
|
keep-sorted
|
||||||
|
lsd
|
||||||
|
neofetch
|
||||||
|
ripgrep
|
||||||
socat
|
socat
|
||||||
|
typos
|
||||||
|
# keep-sorted end
|
||||||
];
|
];
|
||||||
programs.tmux = {
|
programs.tmux = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ theme[main_fg]="#D8DEE9"
|
|||||||
# Title color for boxes
|
# Title color for boxes
|
||||||
theme[title]="#8FBCBB"
|
theme[title]="#8FBCBB"
|
||||||
|
|
||||||
# Higlight color for keyboard shortcuts
|
# Highlight color for keyboard shortcuts
|
||||||
theme[hi_fg]="#5E81AC"
|
theme[hi_fg]="#5E81AC"
|
||||||
|
|
||||||
# Background color of selected item in processes box
|
# Background color of selected item in processes box
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ lib.my.makeSwitch {
|
|||||||
url = "https://raw.githubusercontent.com/folke/tokyonight.nvim/refs/tags/v4.14.1/extras/fish_themes/tokyonight_storm.theme";
|
url = "https://raw.githubusercontent.com/folke/tokyonight.nvim/refs/tags/v4.14.1/extras/fish_themes/tokyonight_storm.theme";
|
||||||
sha256 = "02n1w5x65683c8mlwg1rav06iqm3xk90zq45qmygpm7pzyn8dqh1";
|
sha256 = "02n1w5x65683c8mlwg1rav06iqm3xk90zq45qmygpm7pzyn8dqh1";
|
||||||
};
|
};
|
||||||
|
programs.starship.enableFishIntegration = false;
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = [
|
plugins = [
|
||||||
@@ -34,6 +35,15 @@ lib.my.makeSwitch {
|
|||||||
hash = "sha256-yef5NX4HdZ3ab/2AzNrvvhi0CbeTvXYKZmyH76gIpyk=";
|
hash = "sha256-yef5NX4HdZ3ab/2AzNrvvhi0CbeTvXYKZmyH76gIpyk=";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
name = "starship";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "tyler-stefani";
|
||||||
|
repo = "starship";
|
||||||
|
rev = "fff9bc53ef9997775d31d860246af88cd7721ec8";
|
||||||
|
hash = "sha256-S/Vt/jfYTCrMXXfu6YUIv+d0RoT7GYG1isayhtHc7DA=";
|
||||||
|
};
|
||||||
|
}
|
||||||
];
|
];
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
la = "lsd -lah";
|
la = "lsd -lah";
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ lib.my.makeHomeProgramConfig {
|
|||||||
gcc # treesitter
|
gcc # treesitter
|
||||||
|
|
||||||
ripgrep # telescope
|
ripgrep # telescope
|
||||||
|
|
||||||
|
typos-lsp
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ vim.g.autoread = true
|
|||||||
|
|
||||||
vim.g.loaded_ruby_provider = 0
|
vim.g.loaded_ruby_provider = 0
|
||||||
|
|
||||||
-- Hightlight on yank
|
-- Highlight on yank
|
||||||
local highlight_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true })
|
local highlight_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true })
|
||||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||||
callback = function()
|
callback = function()
|
||||||
@@ -55,12 +55,12 @@ vim.cmd([[
|
|||||||
\ endif
|
\ endif
|
||||||
]])
|
]])
|
||||||
|
|
||||||
-- Automaticly switch input method
|
-- Automatically switch input method
|
||||||
Last_input_method = 1
|
Last_input_method = 1
|
||||||
vim.api.nvim_create_augroup("AutoInputMethod", {})
|
vim.api.nvim_create_augroup("AutoInputMethod", {})
|
||||||
vim.api.nvim_create_autocmd("InsertLeave", {
|
vim.api.nvim_create_autocmd("InsertLeave", {
|
||||||
pattern = "*",
|
pattern = "*",
|
||||||
desc = "Automaticly switch input method",
|
desc = "Automatically switch input method",
|
||||||
callback = function()
|
callback = function()
|
||||||
Last_input_method = require("core.globals").switch_input_method(1)
|
Last_input_method = require("core.globals").switch_input_method(1)
|
||||||
end,
|
end,
|
||||||
@@ -68,7 +68,7 @@ vim.api.nvim_create_autocmd("InsertLeave", {
|
|||||||
})
|
})
|
||||||
vim.api.nvim_create_autocmd("CmdlineLeave", {
|
vim.api.nvim_create_autocmd("CmdlineLeave", {
|
||||||
pattern = "*",
|
pattern = "*",
|
||||||
desc = "Automaticly switch input method",
|
desc = "Automatically switch input method",
|
||||||
callback = function()
|
callback = function()
|
||||||
require("core.globals").switch_input_method(1)
|
require("core.globals").switch_input_method(1)
|
||||||
end,
|
end,
|
||||||
@@ -76,7 +76,7 @@ vim.api.nvim_create_autocmd("CmdlineLeave", {
|
|||||||
})
|
})
|
||||||
vim.api.nvim_create_autocmd("InsertEnter", {
|
vim.api.nvim_create_autocmd("InsertEnter", {
|
||||||
pattern = "*",
|
pattern = "*",
|
||||||
desc = "Automaticly switch input method",
|
desc = "Automatically switch input method",
|
||||||
callback = function()
|
callback = function()
|
||||||
require("core.globals").switch_input_method(Last_input_method)
|
require("core.globals").switch_input_method(Last_input_method)
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -42,7 +42,16 @@ local servers = {
|
|||||||
command = { "nixfmt" },
|
command = { "nixfmt" },
|
||||||
},
|
},
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
expr = "import <nixpkgs> { }",
|
expr = [[
|
||||||
|
let
|
||||||
|
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||||
|
nodeName = lock.nodes.root.inputs.nixpkgs;
|
||||||
|
in
|
||||||
|
import (fetchTarball {
|
||||||
|
url = lock.nodes.${nodeName}.locked.url or "https://github.com/NixOS/nixpkgs/archive/${lock.nodes.${nodeName}.locked.rev}.tar.gz";
|
||||||
|
sha256 = lock.nodes.${nodeName}.locked.narHash;
|
||||||
|
}) { }
|
||||||
|
]],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -54,14 +63,17 @@ local servers = {
|
|||||||
qmlls = {
|
qmlls = {
|
||||||
cmd = { "qmlls", "-E" },
|
cmd = { "qmlls", "-E" },
|
||||||
},
|
},
|
||||||
pyright = {},
|
-- keep-sorted start
|
||||||
gopls = {},
|
|
||||||
clangd = {},
|
clangd = {},
|
||||||
ts_ls = {},
|
|
||||||
jsonls = {},
|
|
||||||
cssls = {},
|
cssls = {},
|
||||||
|
gopls = {},
|
||||||
html = {},
|
html = {},
|
||||||
java_language_server = {},
|
java_language_server = {},
|
||||||
|
jsonls = {},
|
||||||
|
pyright = {},
|
||||||
|
ts_ls = {},
|
||||||
|
typos_lsp = {},
|
||||||
|
-- keep-sorted end
|
||||||
}
|
}
|
||||||
|
|
||||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ lib.my.makeSwitch {
|
|||||||
settings = {
|
settings = {
|
||||||
globalOptions = {
|
globalOptions = {
|
||||||
"PreeditEnabledByDefault"."0" = true;
|
"PreeditEnabledByDefault"."0" = true;
|
||||||
"Hotkey"."EnumrateWithTriggerKeys" = false;
|
"Hotkey"."EnumerateWithTriggerKeys" = false;
|
||||||
"Hotkey/TriggerKeys"."0" = "";
|
"Hotkey/TriggerKeys"."0" = "";
|
||||||
"Hotkey/AltTriggerKeys"."0" = "Shift_L";
|
"Hotkey/AltTriggerKeys"."0" = "Shift_L";
|
||||||
"Hotkey/EnumerateForwardKeys"."0" = "";
|
"Hotkey/EnumerateForwardKeys"."0" = "";
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
inputs,
|
inputs,
|
||||||
|
self,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@@ -16,7 +17,7 @@ lib.my.makeSwitch {
|
|||||||
# This will add each flake input as a registry
|
# This will add each flake input as a registry
|
||||||
# To make nix3 commands consistent with your flake
|
# To make nix3 commands consistent with your flake
|
||||||
nix.registry = (lib.mapAttrs (_: flake: { inherit flake; })) (
|
nix.registry = (lib.mapAttrs (_: flake: { inherit flake; })) (
|
||||||
(lib.filterAttrs (_: lib.isType "flake")) inputs
|
((lib.filterAttrs (_: lib.isType "flake")) inputs) // { flake = self; }
|
||||||
);
|
);
|
||||||
|
|
||||||
# This will additionally add your inputs to the system's legacy channels
|
# This will additionally add your inputs to the system's legacy channels
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
grabKeyboard = lib.mkOption {
|
grabKeyboard = lib.mkOption {
|
||||||
description = "Grab the keybaord in capture mode";
|
description = "Grab the keyboard in capture mode";
|
||||||
default = true;
|
default = true;
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
clipboardToLocal = lib.mkOption {
|
clipboardToLocal = lib.mkOption {
|
||||||
description = "Allow the clipbaord to be synchronized FROM the VM";
|
description = "Allow the clipboard to be synchronized FROM the VM";
|
||||||
default = true;
|
default = true;
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
};
|
};
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
captureOnStart = lib.mkOption {
|
captureOnStart = lib.mkOption {
|
||||||
description = "Capture mouse and keybaord on start";
|
description = "Capture mouse and keyboard on start";
|
||||||
default = false;
|
default = false;
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
};
|
};
|
||||||
|
|||||||
89
nixos.nix
Normal file
89
nixos.nix
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
withSystem,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
forAllHosts =
|
||||||
|
mkSystem:
|
||||||
|
lib.mergeAttrsList (
|
||||||
|
builtins.map (hostname: {
|
||||||
|
${hostname} = mkSystem hostname;
|
||||||
|
}) (builtins.attrNames (builtins.readDir ./config/hosts))
|
||||||
|
);
|
||||||
|
pkgsModule =
|
||||||
|
{ config, ... }:
|
||||||
|
withSystem config.nixpkgs.hostPlatform.system (perSystem: {
|
||||||
|
nixpkgs.pkgs = perSystem.pkgs;
|
||||||
|
});
|
||||||
|
hmModule = {
|
||||||
|
home-manager = {
|
||||||
|
sharedModules = [
|
||||||
|
inputs.sops-nix.homeManagerModules.sops
|
||||||
|
inputs.impermanence.nixosModules.home-manager.impermanence
|
||||||
|
inputs.stylix.homeModules.stylix
|
||||||
|
inputs.noctalia.homeModules.default
|
||||||
|
inputs.zen.homeModules.beta
|
||||||
|
];
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
vars = import ./vars.nix;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
flake.nixosConfigurations = forAllHosts (
|
||||||
|
hostname:
|
||||||
|
lib.nixosSystem {
|
||||||
|
specialArgs = {
|
||||||
|
inherit
|
||||||
|
inputs
|
||||||
|
self
|
||||||
|
hostname
|
||||||
|
;
|
||||||
|
assets =
|
||||||
|
with lib.haumea;
|
||||||
|
load {
|
||||||
|
src = ./assets;
|
||||||
|
loader = [
|
||||||
|
(matchers.always loaders.path)
|
||||||
|
];
|
||||||
|
};
|
||||||
|
secrets =
|
||||||
|
with lib.haumea;
|
||||||
|
load {
|
||||||
|
src = ./secrets;
|
||||||
|
loader = [
|
||||||
|
(matchers.always loaders.path)
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// vars;
|
||||||
|
modules =
|
||||||
|
(lib.umport {
|
||||||
|
paths = [ ./modules ];
|
||||||
|
exclude = [
|
||||||
|
./modules/virt/types
|
||||||
|
];
|
||||||
|
recursive = true;
|
||||||
|
})
|
||||||
|
++ (lib.umport {
|
||||||
|
paths = [ ./config/hosts/${hostname} ];
|
||||||
|
recursive = true;
|
||||||
|
})
|
||||||
|
++ [
|
||||||
|
(lib.mkAliasOptionModule [ "my" "hm" ] [ "home-manager" "users" vars.username ])
|
||||||
|
./config/base.nix
|
||||||
|
inputs.sops-nix.nixosModules.sops
|
||||||
|
inputs.impermanence.nixosModules.impermanence
|
||||||
|
inputs.home-manager.nixosModules.default
|
||||||
|
inputs.niri.nixosModules.niri
|
||||||
|
inputs.catppuccin.nixosModules.catppuccin
|
||||||
|
inputs.angrr.nixosModules.angrr
|
||||||
|
pkgsModule
|
||||||
|
hmModule
|
||||||
|
];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,69 +1,27 @@
|
|||||||
{
|
{
|
||||||
inputs,
|
inputs,
|
||||||
lib,
|
lib,
|
||||||
|
...
|
||||||
}:
|
}:
|
||||||
{
|
let
|
||||||
additions =
|
mkPkgs = type: final: _prev: {
|
||||||
final: prev:
|
${type} = import inputs."nixpkgs-${type}" {
|
||||||
lib.haumea.load {
|
system = final.stdenv.hostPlatform.system;
|
||||||
src = ../pkgs;
|
config.allowUnfree = true;
|
||||||
loader = [
|
|
||||||
{
|
|
||||||
matches = str: builtins.match ".*\\.nix" str != null;
|
|
||||||
loader = _: path: final.callPackage path { };
|
|
||||||
}
|
|
||||||
];
|
|
||||||
transformer = lib.haumea.transformers.liftDefault;
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
flake.overlays = {
|
||||||
modifications =
|
modifications =
|
||||||
final: prev:
|
final: prev:
|
||||||
lib.infuse prev {
|
lib.infuse prev {
|
||||||
cage.__output.patches.__append = [ ./cage-specify-output-name.patch ];
|
cage.__output.patches.__append = [ ./cage-specify-output-name.patch ];
|
||||||
matrix-synapse.__assign = final.stable.matrix-synapse;
|
|
||||||
bottles.__input.removeWarningPopup.__assign = true;
|
bottles.__input.removeWarningPopup.__assign = true;
|
||||||
|
|
||||||
sing-box.__assign = prev.sing-box.overrideAttrs (finalAttrs: {
|
|
||||||
version = "1.11.14";
|
|
||||||
src = final.fetchFromGitHub {
|
|
||||||
owner = "qjebbs";
|
|
||||||
repo = "sing-box";
|
|
||||||
# due to faulty tag generation
|
|
||||||
tag = "v${finalAttrs.version}+rev";
|
|
||||||
hash = "sha256-/p2PBTeeRJW3iq/BXJlw/Qn92Nrnw9fmUn5yNGl/o34=";
|
|
||||||
};
|
|
||||||
vendorHash = "sha256-C2HCNOzP1Jg3vz2i9uPmM1wC7Sw2YNt7MdYn939cu1Y=";
|
|
||||||
postInstall = "";
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
# this allows us to access specific version of nixpkgs
|
|
||||||
# by `pkgs.unstable`, `pkgs.stable` and `pkgs.master`
|
|
||||||
unstable-packages = final: _prev: {
|
|
||||||
unstable = import inputs.nixpkgs-unstable {
|
|
||||||
system = final.stdenv.hostPlatform.system;
|
|
||||||
config.allowUnfree = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
stable-packages = final: _prev: {
|
|
||||||
stable = import inputs.nixpkgs-stable {
|
|
||||||
system = final.stdenv.hostPlatform.system;
|
|
||||||
config.allowUnfree = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
master-packages = final: _prev: {
|
|
||||||
master = import inputs.nixpkgs-master {
|
|
||||||
system = final.stdenv.hostPlatform.system;
|
|
||||||
config.allowUnfree = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
working-packages = final: _prev: {
|
|
||||||
working = import inputs.nixpkgs-working {
|
|
||||||
system = final.stdenv.hostPlatform.system;
|
|
||||||
config.allowUnfree = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
//
|
||||||
|
# this allows us to access specific version of nixpkgs
|
||||||
|
# by `pkgs.unstable`, `pkgs.stable` and `pkgs.master`
|
||||||
|
lib.genAttrs [ "stable" "unstable" "master" ] mkPkgs;
|
||||||
|
}
|
||||||
|
|||||||
52
pkgs/default.nix
Normal file
52
pkgs/default.nix
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
perSystem =
|
||||||
|
{ system, pkgs, ... }:
|
||||||
|
{
|
||||||
|
_module.args.pkgs = import inputs.nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
overlays = builtins.attrValues config.flake.overlays ++ [
|
||||||
|
inputs.go-musicfox.overlays.default
|
||||||
|
inputs.niri.overlays.niri
|
||||||
|
inputs.fenix.overlays.default
|
||||||
|
inputs.angrr.overlays.default
|
||||||
|
(final: prev: {
|
||||||
|
darkly-qt5 = inputs.darkly.packages.${final.stdenv.hostPlatform.system}.darkly-qt5;
|
||||||
|
darkly-qt6 = inputs.darkly.packages.${final.stdenv.hostPlatform.system}.darkly-qt6;
|
||||||
|
|
||||||
|
noctalia-shell = inputs.noctalia.packages.${final.stdenv.hostPlatform.system}.default;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
config.allowUnfree = true;
|
||||||
|
flake.setNixPath = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
legacyPackages = pkgs;
|
||||||
|
|
||||||
|
packages = lib.genAttrs (builtins.attrNames (config.flake.overlays.additions pkgs pkgs)) (
|
||||||
|
pkg: pkgs.${pkg}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
flake.overlays.additions =
|
||||||
|
final: prev:
|
||||||
|
let
|
||||||
|
paths = [
|
||||||
|
./fcitx5-lightly
|
||||||
|
./mono-gtk-theme.nix
|
||||||
|
./ttf-wps-fonts.nix
|
||||||
|
./wps-office-fonts.nix
|
||||||
|
];
|
||||||
|
in
|
||||||
|
builtins.listToAttrs (
|
||||||
|
map (path: {
|
||||||
|
name = builtins.elemAt (lib.splitString "." (builtins.baseNameOf path)) 0;
|
||||||
|
value = final.callPackage path { };
|
||||||
|
}) paths
|
||||||
|
);
|
||||||
|
}
|
||||||
10
treefmt.nix
10
treefmt.nix
@@ -1,8 +1,16 @@
|
|||||||
{ ... }:
|
{ inputs, ... }:
|
||||||
{
|
{
|
||||||
|
imports = [ inputs.treefmt.flakeModule ];
|
||||||
|
perSystem.treefmt = {
|
||||||
projectRootFile = "flake.nix";
|
projectRootFile = "flake.nix";
|
||||||
programs = {
|
programs = {
|
||||||
nixfmt.enable = true;
|
nixfmt.enable = true;
|
||||||
stylua.enable = true;
|
stylua.enable = true;
|
||||||
|
keep-sorted.enable = true;
|
||||||
|
typos = {
|
||||||
|
enable = true;
|
||||||
|
configFile = "typos.toml";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
16
typos.toml
Normal file
16
typos.toml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
[files]
|
||||||
|
extend-exclude = [
|
||||||
|
"secrets"
|
||||||
|
]
|
||||||
|
|
||||||
|
[default.extend-words]
|
||||||
|
# noice.nvim
|
||||||
|
noice = "noice"
|
||||||
|
enew = "enew"
|
||||||
|
iif = "iif"
|
||||||
|
|
||||||
|
[default]
|
||||||
|
extend-ignore-identifiers-re = [
|
||||||
|
"KEY_102ND",
|
||||||
|
"VE_UE"
|
||||||
|
]
|
||||||
Reference in New Issue
Block a user