Compare commits

..

No commits in common. "bdabf307281e40e1451b0b57304b4526b207061c" and "82d5e8a466a4c2a1d6847f372fec7ec78367606c" have entirely different histories.

4 changed files with 60 additions and 88 deletions

View file

@ -220,24 +220,6 @@
"inputs": { "inputs": {
"systems": "systems_2" "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": { "locked": {
"lastModified": 1701680307, "lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
@ -252,9 +234,9 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_4": { "flake-utils_3": {
"inputs": { "inputs": {
"systems": "systems_4" "systems": "systems_3"
}, },
"locked": { "locked": {
"lastModified": 1685518550, "lastModified": 1685518550,
@ -383,7 +365,7 @@
}, },
"lix-module": { "lix-module": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils",
"flakey-profile": "flakey-profile", "flakey-profile": "flakey-profile",
"lix": [ "lix": [
"lix" "lix"
@ -519,7 +501,7 @@
}, },
"nixvim": { "nixvim": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_2",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
@ -606,7 +588,7 @@
"pre-commit-hooks": { "pre-commit-hooks": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"flake-utils": "flake-utils_4", "flake-utils": "flake-utils_3",
"gitignore": "gitignore", "gitignore": "gitignore",
"nixpkgs": [ "nixpkgs": [
"nixvim", "nixvim",
@ -631,7 +613,6 @@
"root": { "root": {
"inputs": { "inputs": {
"disko": "disko", "disko": "disko",
"flake-utils": "flake-utils",
"home-manager": "home-manager", "home-manager": "home-manager",
"lix": "lix", "lix": "lix",
"lix-module": "lix-module", "lix-module": "lix-module",
@ -721,21 +702,6 @@
"type": "github" "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": { "unixpkgs": {
"locked": { "locked": {
"lastModified": 1714280680, "lastModified": 1714280680,

View file

@ -45,12 +45,9 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nur.url = "github:nix-community/NUR"; nur.url = "github:nix-community/NUR";
# Local
flake-utils.url = "github:numtide/flake-utils";
}; };
outputs = { self, nixpkgs, unixpkgs, disko, nix-on-droid, flake-utils, ... }@attrs: outputs = { self, nixpkgs, unixpkgs, disko, nix-on-droid, stylix, ... }@attrs:
# Machine independant outputs
let let
nixpkgsConfig = { nixpkgsConfig = {
config = { config = {
@ -93,62 +90,73 @@
} }
]; ];
}; };
flakeTools = { self }: flake-utils.lib.eachDefaultSystem (system:
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";
};
repl = {
type = "app";
program = "${pkgs.writeShellScript "vivarium-repl" ''
${pkgs.nix}/bin/nix repl --expr 'let flake = builtins.getFlake "${self}"; in flake // flake.nixosConfigurations // rec { pkgs = flake.inputs.nixpkgs.legacyPackages.${system}; lib = pkgs.lib; }'
''}";
};
};
}
);
}; };
in 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 # Reusable configurations
inherit lib; lib = lib;
nixosModules.dotfiles.imports = [ ./os ]; nixosModules.dotfiles = {
nixOnDroidModules.dotfiles.imports = [ ./nod ]; imports = [
homeManagerModules.dotfiles.imports = [ ./hm ]; ./os
disko.nixosModules.disko
];
};
nixOnDroidModules.dotfiles = {
imports = [
./nod
# home-manager is included
];
};
homeManagerModules.dotfiles = {
imports = [
./hm
stylix.homeManagerModules.stylix
];
};
# Actual configurations # Actual configurations
nixosConfigurations.curacao = lib.nixosSystem { nixosConfigurations.curacao = lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ ./curacao ]; modules = [
./curacao
];
}; };
nixosConfigurations.curacao-usb = lib.nixosSystem { nixosConfigurations.curacao-usb = lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ ./curacao/usb.nix ]; modules = [
./curacao/usb.nix
];
}; };
nixosConfigurations.pindakaas = lib.nixosSystem { nixosConfigurations.pindakaas = lib.nixosSystem {
system = "aarch64-linux"; system = "aarch64-linux";
modules = [ ./pindakaas ]; modules = [
./pindakaas
];
}; };
nixosConfigurations.pindakaas-sd = lib.nixosSystem { nixosConfigurations.pindakaas-sd = lib.nixosSystem {
system = "aarch64-linux"; system = "aarch64-linux";
modules = [ ./pindakaas/sd.nix ]; modules = [
./pindakaas/sd.nix
];
}; };
nixOnDroidConfigurations.sprinkles = lib.nixOnDroidConfiguration { }; nixOnDroidConfigurations.sprinkles = lib.nixOnDroidConfiguration { };
} // (lib.flakeTools { inherit self; }); };
} }

View file

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

View file

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