style: use alejandra formatter on all nix files
This commit is contained in:
parent
d563805909
commit
0d8a394dcf
76 changed files with 1287 additions and 935 deletions
89
flake.nix
89
flake.nix
|
@ -9,7 +9,7 @@
|
|||
};
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
sops-nix = {
|
||||
url = "github:Mic92/sops-nix";
|
||||
|
@ -19,36 +19,52 @@
|
|||
url = "git+ssh://git@git.epha.se:24422/ephase/nix-private.git?shallow=1&ref=main";
|
||||
};
|
||||
};
|
||||
outputs = { self, nixpkgs, home-manager, nur, nixgl, sops-nix, ... }@inputs:
|
||||
let
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
nur,
|
||||
nixgl,
|
||||
sops-nix,
|
||||
...
|
||||
} @ inputs: let
|
||||
stateVersion = "23.11";
|
||||
|
||||
allSystems = [
|
||||
"x86_64-linux" # 64bit AMD/Intel x86
|
||||
"x86_64-linux" # 64bit AMD/Intel x86
|
||||
"aarch64-linux" # 64bit ARM Linux
|
||||
];
|
||||
|
||||
forAllSystems = fn:
|
||||
nixpkgs.lib.genAttrs allSystems
|
||||
(system: fn { pkgs = import nixpkgs { inherit system; }; });
|
||||
(system: fn {pkgs = import nixpkgs {inherit system;};});
|
||||
|
||||
createNixosSystem = { system, hostname, username ? "ephase" }: nixpkgs.lib.nixosSystem {
|
||||
system = system;
|
||||
specialArgs = {
|
||||
inherit stateVersion inputs;
|
||||
hostname = hostname;
|
||||
username = username;
|
||||
createNixosSystem = {
|
||||
system,
|
||||
hostname,
|
||||
username ? "ephase",
|
||||
}:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
system = system;
|
||||
specialArgs = {
|
||||
inherit stateVersion inputs;
|
||||
hostname = hostname;
|
||||
username = username;
|
||||
};
|
||||
modules = [
|
||||
./nixos/default.nix
|
||||
];
|
||||
};
|
||||
modules = [
|
||||
./nixos/default.nix
|
||||
];
|
||||
};
|
||||
|
||||
createHomeConfiguration = { system ? "x86_64-linux", hostname, username ? "ephase" }:
|
||||
createHomeConfiguration = {
|
||||
system ? "x86_64-linux",
|
||||
hostname,
|
||||
username ? "ephase",
|
||||
}:
|
||||
home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = import nixpkgs {
|
||||
system = system;
|
||||
overlays = [ nixgl.overlay ];
|
||||
overlays = [nixgl.overlay];
|
||||
};
|
||||
extraSpecialArgs = {
|
||||
inherit stateVersion inputs nixgl;
|
||||
|
@ -56,12 +72,12 @@
|
|||
username = username;
|
||||
};
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ nixgl.overlay ];}
|
||||
{nixpkgs.overlays = [nixgl.overlay];}
|
||||
./home-manager/default.nix
|
||||
];
|
||||
};
|
||||
in {
|
||||
devShells = forAllSystems ({ pkgs }: {
|
||||
devShells = forAllSystems ({pkgs}: {
|
||||
default = pkgs.mkShell {
|
||||
name = "nixfiles";
|
||||
buildInputs = [
|
||||
|
@ -78,15 +94,36 @@
|
|||
};
|
||||
});
|
||||
nixosConfigurations = {
|
||||
morty = createNixosSystem { system = "x86_64-linux"; hostname = "morty"; };
|
||||
mrmeeseeks = createNixosSystem { system = "x86_64-linux"; hostname = "mrmeeseeks";};
|
||||
luci = createNixosSystem { system = "x86_64-linux"; hostname = "luci"; };
|
||||
morty = createNixosSystem {
|
||||
system = "x86_64-linux";
|
||||
hostname = "morty";
|
||||
};
|
||||
mrmeeseeks = createNixosSystem {
|
||||
system = "x86_64-linux";
|
||||
hostname = "mrmeeseeks";
|
||||
};
|
||||
luci = createNixosSystem {
|
||||
system = "x86_64-linux";
|
||||
hostname = "luci";
|
||||
};
|
||||
};
|
||||
homeConfigurations = {
|
||||
"rick" = createHomeConfiguration { system = "aarch64-linux"; hostname = "rick";};
|
||||
"luci" = createHomeConfiguration { system = "x86_64-linux"; hostname = "luci";};
|
||||
"morty" = createHomeConfiguration { system = "x86_64-linux"; hostname = "morty";};
|
||||
"mrmeeseeks" = createHomeConfiguration { system = "x86_64-linux"; hostname = "mrmeeseeks";};
|
||||
"rick" = createHomeConfiguration {
|
||||
system = "aarch64-linux";
|
||||
hostname = "rick";
|
||||
};
|
||||
"luci" = createHomeConfiguration {
|
||||
system = "x86_64-linux";
|
||||
hostname = "luci";
|
||||
};
|
||||
"morty" = createHomeConfiguration {
|
||||
system = "x86_64-linux";
|
||||
hostname = "morty";
|
||||
};
|
||||
"mrmeeseeks" = createHomeConfiguration {
|
||||
system = "x86_64-linux";
|
||||
hostname = "mrmeeseeks";
|
||||
};
|
||||
"work" = createHomeConfiguration {
|
||||
system = "x86_64-linux";
|
||||
hostname = "work";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue