Shorten flake a bit

This commit is contained in:
Geoffrey Frogeye 2024-05-08 09:37:04 +02:00
parent 82d5e8a466
commit 176be4f218
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
4 changed files with 81 additions and 59 deletions

View file

@ -220,6 +220,24 @@
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
@ -234,9 +252,9 @@
"type": "github"
}
},
"flake-utils_3": {
"flake-utils_4": {
"inputs": {
"systems": "systems_3"
"systems": "systems_4"
},
"locked": {
"lastModified": 1685518550,
@ -365,7 +383,7 @@
},
"lix-module": {
"inputs": {
"flake-utils": "flake-utils",
"flake-utils": "flake-utils_2",
"flakey-profile": "flakey-profile",
"lix": [
"lix"
@ -501,7 +519,7 @@
},
"nixvim": {
"inputs": {
"flake-utils": "flake-utils_2",
"flake-utils": "flake-utils_3",
"nixpkgs": [
"nixpkgs"
],
@ -588,7 +606,7 @@
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils_3",
"flake-utils": "flake-utils_4",
"gitignore": "gitignore",
"nixpkgs": [
"nixvim",
@ -613,6 +631,7 @@
"root": {
"inputs": {
"disko": "disko",
"flake-utils": "flake-utils",
"home-manager": "home-manager",
"lix": "lix",
"lix-module": "lix-module",
@ -702,6 +721,21 @@
"type": "github"
}
},
"systems_4": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"unixpkgs": {
"locked": {
"lastModified": 1714280680,

View file

@ -45,9 +45,12 @@
inputs.nixpkgs.follows = "nixpkgs";
};
nur.url = "github:nix-community/NUR";
# Local
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, unixpkgs, disko, nix-on-droid, stylix, ... }@attrs:
outputs = { self, nixpkgs, unixpkgs, disko, nix-on-droid, flake-utils, ... }@attrs:
# Machine independant outputs
let
nixpkgsConfig = {
config = {
@ -93,70 +96,53 @@
};
in
{
# Easily expose apps to scripts
apps = nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ] (system: {
disko = {
type = "app";
program = "${disko.packages.${system}.default}/bin/disko";
};
nixos-generate-config = {
type = "app";
program = "${nixpkgs.legacyPackages.${system}.nixos-install-tools}/bin/nixos-generate-config";
};
nixos-install = {
type = "app";
program = "${nixpkgs.legacyPackages.${system}.nixos-install-tools}/bin/nixos-install";
};
nixos-rebuild = {
type = "app";
program = "${nixpkgs.legacyPackages.${system}.nixos-rebuild}/bin/nixos-rebuild";
};
});
# Reusable configurations
lib = lib;
nixosModules.dotfiles = {
imports = [
./os
disko.nixosModules.disko
];
};
nixOnDroidModules.dotfiles = {
imports = [
./nod
# home-manager is included
];
};
homeManagerModules.dotfiles = {
imports = [
./hm
stylix.homeManagerModules.stylix
];
};
inherit lib;
nixosModules.dotfiles.imports = [ ./os ];
nixOnDroidModules.dotfiles.imports = [ ./nod ];
homeManagerModules.dotfiles.imports = [ ./hm ];
# Actual configurations
nixosConfigurations.curacao = lib.nixosSystem {
system = "x86_64-linux";
modules = [
./curacao
];
modules = [ ./curacao ];
};
nixosConfigurations.curacao-usb = lib.nixosSystem {
system = "x86_64-linux";
modules = [
./curacao/usb.nix
];
modules = [ ./curacao/usb.nix ];
};
nixosConfigurations.pindakaas = lib.nixosSystem {
system = "aarch64-linux";
modules = [
./pindakaas
];
modules = [ ./pindakaas ];
};
nixosConfigurations.pindakaas-sd = lib.nixosSystem {
system = "aarch64-linux";
modules = [
./pindakaas/sd.nix
];
modules = [ ./pindakaas/sd.nix ];
};
nixOnDroidConfigurations.sprinkles = lib.nixOnDroidConfiguration { };
};
} // (flake-utils.lib.eachDefaultSystem (system:
# Machine dependant outputs
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
apps = {
disko = {
type = "app";
program = "${disko.packages.${system}.default}/bin/disko";
};
nixos-generate-config = {
type = "app";
program = "${pkgs.nixos-install-tools}/bin/nixos-generate-config";
};
nixos-install = {
type = "app";
program = "${pkgs.nixos-install-tools}/bin/nixos-install";
};
nixos-rebuild = {
type = "app";
program = "${pkgs.nixos-rebuild}/bin/nixos-rebuild";
};
};
}
));
}

View file

@ -1,4 +1,4 @@
{ ... }:
{ stylix, ... }:
{
imports = [
../common/frogarized
@ -21,6 +21,7 @@
./rebuild
./shell
./ssh.nix
stylix.homeManagerModules.stylix
./theme
./tmux
./vim

View file

@ -1,4 +1,4 @@
{ ... }:
{ disko, ... }:
{
imports = [
../options.nix
@ -10,6 +10,7 @@
./desktop.nix
./dev
./diff
disko.nixosModules.disko
./gaming
./geoffrey.nix
# ./lix