mirror of
https://github.com/nickolaj-jepsen/nixos.git
synced 2026-01-22 08:06:50 +01:00
complete rework v2
This commit is contained in:
parent
16813aeef9
commit
7409e9ca10
106 changed files with 1522 additions and 403 deletions
68
flake.nix
68
flake.nix
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
||||
colmena.url = "github:zhaofengli/colmena";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixos-generators = {
|
||||
url = "github:nix-community/nixos-generators";
|
||||
|
|
@ -12,6 +13,9 @@
|
|||
url = "github:nix-community/home-manager/release-24.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
disko.url = "github:nix-community/disko";
|
||||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||
nixos-facter-modules.url = "github:numtide/nixos-facter-modules";
|
||||
astal = {
|
||||
url = "github:aylur/astal";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
@ -20,34 +24,44 @@
|
|||
url = "github:aylur/ags";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
treefmt-nix = {
|
||||
url = "github:numtide/treefmt-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
flake-parts = {
|
||||
url = "github:hercules-ci/flake-parts";
|
||||
inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||
};
|
||||
deploy-rs.url = "github:serokell/deploy-rs";
|
||||
agenix.url = "github:ryantm/agenix";
|
||||
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
agenix-rekey.url = "github:oddlama/agenix-rekey";
|
||||
agenix-rekey.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
nixpkgs,
|
||||
nixpkgs-unstable,
|
||||
nixos-generators,
|
||||
home-manager,
|
||||
...
|
||||
} @ inputs: let
|
||||
system = "x86_64-linux";
|
||||
stateVersion = "24.11";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
mkSystem = username: machine:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
system = system;
|
||||
specialArgs = {inherit inputs username machine stateVersion;};
|
||||
modules = [
|
||||
(import (./machines + "/${machine}"))
|
||||
home-manager.nixosModules.home-manager
|
||||
nixos-generators.nixosModules.all-formats
|
||||
outputs = {flake-parts, ...} @ inputs:
|
||||
flake-parts.lib.mkFlake {inherit inputs;} (
|
||||
{
|
||||
withSystem,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
];
|
||||
};
|
||||
in {
|
||||
# Available through 'nixos-rebuild --flake .#wsl'
|
||||
formatter.${system} = pkgs.alejandra;
|
||||
nixosConfigurations = {
|
||||
desktop = mkSystem "nickolaj" "desktop";
|
||||
qemu = mkSystem "nickolaj" "qemu";
|
||||
};
|
||||
};
|
||||
imports = [
|
||||
inputs.agenix-rekey.flakeModule
|
||||
# ./parts/hosts/laptop
|
||||
# ./parts/hosts/desktop
|
||||
# ./parts/hosts/qemu
|
||||
./parts/hosts
|
||||
# ./parts/vm.nix
|
||||
./parts/formatter.nix
|
||||
./parts/devshell.nix
|
||||
];
|
||||
_module.args.mylib = import ./lib {inherit lib withSystem inputs;};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue