2023-09-12 18:18:39 +02:00
|
|
|
{
|
|
|
|
description = "flake for nixos-pulse";
|
|
|
|
|
2023-11-12 21:16:35 +01:00
|
|
|
nixConfig = { };
|
2023-09-29 15:00:10 +02:00
|
|
|
|
2023-09-12 18:18:39 +02:00
|
|
|
inputs = {
|
2024-07-16 17:03:33 +02:00
|
|
|
systems = {
|
|
|
|
url = "github:nix-systems/x86_64-linux";
|
|
|
|
};
|
2024-05-03 17:39:43 +02:00
|
|
|
nixos-hardware = {
|
|
|
|
url = "github:NixOS/nixos-hardware/master";
|
|
|
|
};
|
2023-09-12 18:18:39 +02:00
|
|
|
nixpkgs = {
|
2024-02-02 16:13:55 +01:00
|
|
|
url = "github:NixOS/nixpkgs/nixos-unstable";
|
2023-09-12 18:18:39 +02:00
|
|
|
};
|
2024-07-16 17:03:33 +02:00
|
|
|
nixpkgs-stable = {
|
|
|
|
url = "github:NixOS/nixpkgs/nixos-24.05";
|
|
|
|
};
|
|
|
|
flake-utils = {
|
|
|
|
url = "github:numtide/flake-utils";
|
|
|
|
inputs.systems.follows = "systems";
|
|
|
|
};
|
|
|
|
flake-parts = {
|
|
|
|
url = "github:hercules-ci/flake-parts";
|
|
|
|
inputs.nixpkgs-lib.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
gitignore = {
|
|
|
|
url = "github:hercules-ci/gitignore.nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
pre-commit-hooks = {
|
|
|
|
url = "github:cachix/pre-commit-hooks.nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.nixpkgs-stable.follows = "nixpkgs-stable";
|
|
|
|
inputs.flake-compat.follows = "flake-compat";
|
|
|
|
inputs.gitignore.follows = "gitignore";
|
|
|
|
};
|
|
|
|
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
|
2024-07-16 09:29:19 +02:00
|
|
|
lanzaboote = {
|
|
|
|
url = "github:nix-community/lanzaboote/v0.4.1";
|
|
|
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2024-07-16 17:03:33 +02:00
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
|
|
inputs.flake-compat.follows = "flake-compat";
|
|
|
|
inputs.pre-commit-hooks-nix.follows = "pre-commit-hooks";
|
|
|
|
inputs.flake-parts.follows = "flake-parts";
|
|
|
|
};
|
2024-07-11 20:21:45 +02:00
|
|
|
lix-module = {
|
2024-09-23 18:19:00 +02:00
|
|
|
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.0.tar.gz";
|
2024-07-11 20:21:45 +02:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2024-07-16 17:03:33 +02:00
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
2024-07-11 20:21:45 +02:00
|
|
|
};
|
2023-11-29 10:10:03 +01:00
|
|
|
chaotic = {
|
2024-07-16 17:03:33 +02:00
|
|
|
url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
|
|
|
|
inputs.systems.follows = "systems";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.home-manager.follows = "home-manager";
|
2023-11-29 10:10:03 +01:00
|
|
|
};
|
2023-09-12 18:18:39 +02:00
|
|
|
home-manager = {
|
2024-02-02 16:13:55 +01:00
|
|
|
url = "github:nix-community/home-manager";
|
2023-09-12 18:18:39 +02:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-09-14 17:21:46 +02:00
|
|
|
emacs-overlay = {
|
2024-08-26 12:05:57 +02:00
|
|
|
url = "github:nix-community/emacs-overlay/3052bb01d404ee9bd03b040c9ae898febca05b81";
|
2024-07-16 17:03:33 +02:00
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
|
|
inputs.nixpkgs-stable.follows = "nixpkgs-stable";
|
2024-07-08 10:36:57 +02:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2023-09-14 17:21:46 +02:00
|
|
|
};
|
2023-09-18 14:04:36 +02:00
|
|
|
disko = {
|
|
|
|
url = "github:nix-community/disko";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-09-19 02:51:21 +02:00
|
|
|
nur = {
|
|
|
|
url = "github:nix-community/NUR";
|
|
|
|
};
|
2023-09-19 15:14:49 +02:00
|
|
|
nix-wallpaper = {
|
|
|
|
url = "github:lunik1/nix-wallpaper";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2024-07-16 17:03:33 +02:00
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
|
|
inputs.pre-commit-hooks.follows = "pre-commit-hooks";
|
2023-09-19 15:14:49 +02:00
|
|
|
};
|
2023-09-19 16:40:21 +02:00
|
|
|
nix-index-database = {
|
|
|
|
url = "github:Mic92/nix-index-database";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-09-29 15:59:14 +02:00
|
|
|
plasma-manager = {
|
2024-07-30 13:30:42 +02:00
|
|
|
url = "github:nix-community/plasma-manager";
|
2023-09-29 15:59:14 +02:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.home-manager.follows = "home-manager";
|
|
|
|
};
|
2024-07-16 17:03:33 +02:00
|
|
|
nix-alien = {
|
|
|
|
url = "github:thiagokokada/nix-alien";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.nix-index-database.follows = "nix-index-database";
|
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
|
|
inputs.flake-compat.follows = "flake-compat";
|
|
|
|
};
|
2024-01-18 18:08:19 +01:00
|
|
|
envfs = {
|
|
|
|
url = "github:Mic92/envfs";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2024-07-16 17:03:33 +02:00
|
|
|
inputs.flake-parts.follows = "flake-parts";
|
|
|
|
};
|
|
|
|
nix-ld-rs = {
|
|
|
|
url = "github:nix-community/nix-ld-rs";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
|
|
inputs.flake-compat.follows = "flake-compat";
|
2024-01-18 18:08:19 +01:00
|
|
|
};
|
2024-08-09 21:50:47 +02:00
|
|
|
stylix = {
|
|
|
|
url = "github:danth/stylix";
|
|
|
|
inputs.flake-compat.follows = "flake-compat";
|
2024-08-26 14:24:39 +02:00
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
|
|
inputs.home-manager.follows = "home-manager";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.systems.follows = "systems";
|
2024-08-09 21:50:47 +02:00
|
|
|
};
|
2024-05-03 22:40:09 +02:00
|
|
|
llama-cpp = {
|
|
|
|
url = "git+https://git.vlt81.de/tristan/llama.cpp.git";
|
2024-07-16 17:03:33 +02:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.flake-parts.follows = "flake-parts";
|
2024-05-03 22:40:09 +02:00
|
|
|
};
|
2023-09-12 18:18:39 +02:00
|
|
|
};
|
|
|
|
|
2023-10-17 14:12:26 +02:00
|
|
|
outputs =
|
2023-10-19 17:30:06 +02:00
|
|
|
{ self
|
|
|
|
, nixpkgs
|
2024-07-16 09:29:19 +02:00
|
|
|
, lanzaboote
|
2024-05-03 17:39:43 +02:00
|
|
|
, nixos-hardware
|
2024-07-11 20:21:45 +02:00
|
|
|
, lix-module
|
2023-10-17 14:12:26 +02:00
|
|
|
, home-manager
|
2023-12-24 08:39:26 +01:00
|
|
|
, plasma-manager
|
2023-10-17 14:12:26 +02:00
|
|
|
, emacs-overlay
|
|
|
|
, nur
|
|
|
|
, nix-index-database
|
|
|
|
, disko
|
2023-11-29 10:10:03 +01:00
|
|
|
, chaotic
|
2024-01-18 18:08:19 +01:00
|
|
|
, envfs
|
2024-05-03 22:40:09 +02:00
|
|
|
, llama-cpp
|
2024-08-09 21:50:47 +02:00
|
|
|
, stylix
|
|
|
|
, nix-wallpaper
|
2023-10-17 14:12:26 +02:00
|
|
|
, ...
|
|
|
|
} @ inputs:
|
|
|
|
let
|
|
|
|
system = "x86_64-linux";
|
2024-01-22 15:50:26 +01:00
|
|
|
my-overlay = final: prev: {
|
|
|
|
my = self.packages."${system}";
|
2024-08-09 21:50:47 +02:00
|
|
|
nix-wallpaper = nix-wallpaper.packages."${system}".default;
|
2023-10-17 14:12:26 +02:00
|
|
|
};
|
|
|
|
overlays = [
|
2024-01-22 15:50:26 +01:00
|
|
|
my-overlay
|
2023-10-17 14:12:26 +02:00
|
|
|
emacs-overlay.overlay
|
2024-01-18 18:08:19 +01:00
|
|
|
inputs.nix-alien.overlays.default
|
|
|
|
inputs.nix-ld-rs.overlays.default
|
2023-10-17 14:12:26 +02:00
|
|
|
];
|
2024-07-09 16:40:07 +02:00
|
|
|
config = {
|
|
|
|
allowUnfree = true;
|
2024-08-26 09:17:31 +02:00
|
|
|
permittedInsecurePackages = [
|
|
|
|
"jitsi-meet-1.0.8043"
|
|
|
|
# "olm-3.2.16"
|
|
|
|
];
|
2024-07-09 16:40:07 +02:00
|
|
|
};
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit config system overlays;
|
2023-10-17 14:12:26 +02:00
|
|
|
};
|
|
|
|
hmModules = [
|
|
|
|
nix-index-database.hmModules.nix-index
|
|
|
|
nur.hmModules.nur
|
2023-12-24 08:39:26 +01:00
|
|
|
plasma-manager.homeManagerModules.plasma-manager
|
2024-08-09 21:50:47 +02:00
|
|
|
# stylix.homeManagerModules.stylix
|
2023-10-17 14:12:26 +02:00
|
|
|
];
|
|
|
|
osModules = [
|
2024-07-16 09:29:19 +02:00
|
|
|
lanzaboote.nixosModules.lanzaboote
|
2024-07-11 20:21:45 +02:00
|
|
|
lix-module.nixosModules.default
|
2023-10-17 14:12:26 +02:00
|
|
|
disko.nixosModules.disko
|
|
|
|
home-manager.nixosModules.home-manager
|
|
|
|
nix-index-database.nixosModules.nix-index
|
|
|
|
nur.nixosModules.nur
|
2023-11-29 10:10:03 +01:00
|
|
|
chaotic.nixosModules.default
|
2024-01-18 18:08:19 +01:00
|
|
|
envfs.nixosModules.envfs
|
2024-08-09 21:50:47 +02:00
|
|
|
stylix.nixosModules.stylix
|
2023-10-17 14:12:26 +02:00
|
|
|
];
|
|
|
|
args = {
|
2024-01-23 00:41:55 +01:00
|
|
|
inherit self inputs system;
|
2023-10-17 14:12:26 +02:00
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
formatter = {
|
|
|
|
${system} = pkgs.nixpkgs-fmt;
|
2023-10-17 03:12:55 +02:00
|
|
|
};
|
2024-10-10 17:03:28 +02:00
|
|
|
packages."${system}" =
|
|
|
|
let
|
|
|
|
# list paths
|
|
|
|
pkgs-paths-list = pkgs.lib.fileset.toList (pkgs.lib.fileset.fromSource (pkgs.lib.sources.sourceFilesBySuffices ./pkgs [ ".nix" ]));
|
|
|
|
# filename-extension parsed out
|
2024-10-11 02:12:15 +02:00
|
|
|
pkgs-paths =
|
|
|
|
builtins.map
|
|
|
|
(path: {
|
|
|
|
name = pkgs.lib.strings.removeSuffix ".nix" (builtins.baseNameOf path);
|
|
|
|
path = path;
|
|
|
|
})
|
|
|
|
pkgs-paths-list;
|
2024-10-10 17:03:28 +02:00
|
|
|
# import each path
|
2024-10-11 02:12:15 +02:00
|
|
|
imported-pkgs = pkgs.lib.attrsets.mergeAttrsList (builtins.map
|
2024-10-10 17:03:28 +02:00
|
|
|
(pkg: {
|
|
|
|
"${pkg.name}" = pkgs.callPackage pkg.path { };
|
|
|
|
})
|
2024-10-11 02:12:15 +02:00
|
|
|
pkgs-paths);
|
2024-10-10 17:03:28 +02:00
|
|
|
in
|
|
|
|
imported-pkgs;
|
2023-10-17 14:12:26 +02:00
|
|
|
diskoConfigurations = {
|
2023-11-02 23:22:08 +01:00
|
|
|
nixos-desk = import ./systems/nixos-desk/disko.nix;
|
2024-01-11 07:25:57 +01:00
|
|
|
nixos-pulse = import ./systems/nixos-pulse/disko.nix;
|
|
|
|
nixos-he4 = import ./systems/nixos-he4/disko.nix;
|
2023-10-17 14:12:26 +02:00
|
|
|
};
|
2024-10-10 17:03:28 +02:00
|
|
|
# replace this with a auto-importing variant like the packages decl. above (instead of callPackage we just need to import the path)
|
2024-06-20 20:48:13 +02:00
|
|
|
nixosConfigurations = nixpkgs.lib.attrsets.mergeAttrsList (
|
|
|
|
nixpkgs.lib.lists.forEach [
|
|
|
|
"nixos-desk"
|
|
|
|
"nixos-he4"
|
|
|
|
"nixos-karl-kvm-guest"
|
|
|
|
"nixos-pulse"
|
|
|
|
"nixos-fw16"
|
2024-10-17 22:03:38 +02:00
|
|
|
"rescue-iso"
|
2024-06-20 20:48:13 +02:00
|
|
|
]
|
|
|
|
(host: {
|
|
|
|
"${host}" = nixpkgs.lib.nixosSystem {
|
|
|
|
inherit system;
|
|
|
|
specialArgs = args;
|
|
|
|
modules =
|
|
|
|
[
|
|
|
|
./systems/${host}
|
|
|
|
{
|
2024-07-09 16:40:07 +02:00
|
|
|
nixpkgs = {
|
|
|
|
inherit config system overlays;
|
|
|
|
};
|
|
|
|
# nixpkgs.pkgs = pkgs;
|
2024-06-20 20:48:13 +02:00
|
|
|
nix.registry.nixpkgs.flake = nixpkgs;
|
|
|
|
home-manager.sharedModules = hmModules;
|
|
|
|
home-manager.extraSpecialArgs = args;
|
|
|
|
}
|
|
|
|
]
|
|
|
|
++ osModules;
|
|
|
|
};
|
|
|
|
})
|
|
|
|
);
|
2023-09-12 18:18:39 +02:00
|
|
|
};
|
|
|
|
}
|