mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 14:01:34 +01:00
Switch to nixfmt
This commit is contained in:
parent
1d70117186
commit
b38d2df431
55 changed files with 1559 additions and 1540 deletions
136
flake.nix
136
flake.nix
|
|
@ -1,84 +1,70 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
wrapper-manager = {
|
||||
url = "github:viperML/wrapper-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
disko = {
|
||||
url = "github:nix-community/disko";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
sops-nix = {
|
||||
url = "github:Mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nix-index-database = {
|
||||
url = "github:Mic92/nix-index-database";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nix-vscode-extensions = {
|
||||
url = "github:nix-community/nix-vscode-extensions";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
...
|
||||
} @ inputs: let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
north = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit self;
|
||||
inherit inputs;
|
||||
};
|
||||
modules = [
|
||||
./hosts/north
|
||||
"${./.}/users/seb/@north.nix"
|
||||
];
|
||||
};
|
||||
inspiron = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit self;
|
||||
inherit inputs;
|
||||
};
|
||||
modules = [
|
||||
./hosts/inspiron
|
||||
"${./.}/users/seb/@inspiron.nix"
|
||||
];
|
||||
};
|
||||
};
|
||||
wrapper-manager = {
|
||||
url = "github:viperML/wrapper-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
formatter.${system} = nixpkgs.legacyPackages.${system}.alejandra.overrideAttrs {
|
||||
passthru.tests.version = {};
|
||||
postPatch = ''
|
||||
substituteInPlace src/alejandra/src/builder.rs \
|
||||
--replace '2 * build_ctx.indentation' '4 * build_ctx.indentation'
|
||||
substituteInPlace src/alejandra/src/rules/string.rs \
|
||||
--replace 'format!(" {}", line)' 'format!(" {}", line)'
|
||||
substituteInPlace src/alejandra_cli/src/cli.rs \
|
||||
--replace 'eprint!("{}", random_ad());' ""
|
||||
rm -r src/alejandra/tests
|
||||
'';
|
||||
};
|
||||
disko = {
|
||||
url = "github:nix-community/disko";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
packages = [pkgs.sops];
|
||||
sops-nix = {
|
||||
url = "github:Mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nix-index-database = {
|
||||
url = "github:Mic92/nix-index-database";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nix-vscode-extensions = {
|
||||
url = "github:nix-community/nix-vscode-extensions";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self, nixpkgs, ... }@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
north = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit self;
|
||||
inherit inputs;
|
||||
};
|
||||
modules = [
|
||||
./hosts/north
|
||||
"${./.}/users/seb/@north.nix"
|
||||
];
|
||||
};
|
||||
inspiron = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit self;
|
||||
inherit inputs;
|
||||
};
|
||||
modules = [
|
||||
./hosts/inspiron
|
||||
"${./.}/users/seb/@inspiron.nix"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
devShells.${system}.default = pkgs.mkShell { packages = [ pkgs.sops ]; };
|
||||
|
||||
formatter.${system} = nixpkgs.legacyPackages.${system}.nixfmt-rfc-style;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue