mirror of
https://codeberg.org/jopejoe1/nix-conf.git
synced 2025-04-20 03:34:07 +02:00
Compare commits
No commits in common. "dd6c19315cb288eb41fdcddebedd638de1fffe61" and "d99e6efba9fba52a463171dafdf1dcac54378593" have entirely different histories.
dd6c19315c
...
d99e6efba9
6 changed files with 46 additions and 32 deletions
23
flake.lock
generated
23
flake.lock
generated
|
@ -665,7 +665,8 @@
|
||||||
"nuschtos": "nuschtos",
|
"nuschtos": "nuschtos",
|
||||||
"snm": "snm",
|
"snm": "snm",
|
||||||
"sops-nix": "sops-nix_2",
|
"sops-nix": "sops-nix_2",
|
||||||
"srvos": "srvos"
|
"srvos": "srvos",
|
||||||
|
"treefmt-nix": "treefmt-nix_4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"snm": {
|
"snm": {
|
||||||
|
@ -866,6 +867,26 @@
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"treefmt-nix_4": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1743081648,
|
||||||
|
"narHash": "sha256-WRAylyYptt6OX5eCEBWyTwOEqEtD6zt33rlUkr6u3cE=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "treefmt-nix",
|
||||||
|
"rev": "29a3d7b768c70addce17af0869f6e2bd8f5be4b7",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "treefmt-nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
32
flake.nix
32
flake.nix
|
@ -59,17 +59,25 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
inputs.disko.follows = "disko";
|
inputs.disko.follows = "disko";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Flake Stuff
|
||||||
|
treefmt-nix = {
|
||||||
|
url = "github:numtide/treefmt-nix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
inputs@{
|
inputs@{
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
|
treefmt-nix,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
forSystems = f: nixpkgs.lib.attrsets.genAttrs nixpkgs.lib.systems.flakeExposed (system: f system);
|
forSystems = f: nixpkgs.lib.attrsets.genAttrs nixpkgs.lib.systems.flakeExposed (system: f system);
|
||||||
pkgs' = system: nixpkgs.legacyPackages.${system};
|
pkgs' = system: nixpkgs.legacyPackages.${system};
|
||||||
|
treefmtEval = system: treefmt-nix.lib.evalModule (pkgs' system) ./treefmt.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
modules.default = import ./modules;
|
modules.default = import ./modules;
|
||||||
|
@ -83,25 +91,9 @@
|
||||||
pkgs = pkgs' system;
|
pkgs = pkgs' system;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
formatter = forSystems (
|
formatter = forSystems (system: (treefmtEval system).config.build.wrapper);
|
||||||
system:
|
checks = forSystems (system: {
|
||||||
let
|
formatting = (treefmtEval system).config.build.check self;
|
||||||
pkgs = pkgs' system;
|
});
|
||||||
in
|
|
||||||
pkgs.treefmt.withConfig {
|
|
||||||
runtimeInputs = with pkgs; [
|
|
||||||
nixfmt-rfc-style
|
|
||||||
];
|
|
||||||
settings = {
|
|
||||||
tree-root-file = ".git/index";
|
|
||||||
formatter = {
|
|
||||||
nixfmt = {
|
|
||||||
command = "nixfmt";
|
|
||||||
includes = [ "*.nix" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,13 +65,13 @@ in
|
||||||
environment.sessionVariables =
|
environment.sessionVariables =
|
||||||
let
|
let
|
||||||
makePluginPath =
|
makePluginPath =
|
||||||
format:
|
format:
|
||||||
"$HOME/.${format}:"
|
"$HOME/.${format}:" +
|
||||||
+ (lib.makeSearchPath format [
|
(lib.makeSearchPath format [
|
||||||
"$HOME/.nix-profile/lib"
|
"$HOME/.nix-profile/lib"
|
||||||
"/run/current-system/sw/lib"
|
"/run/current-system/sw/lib"
|
||||||
"/etc/profiles/per-user/$USER/lib"
|
"/etc/profiles/per-user/$USER/lib"
|
||||||
]);
|
]);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
CLAP_PATH = lib.mkDefault (makePluginPath "clap");
|
CLAP_PATH = lib.mkDefault (makePluginPath "clap");
|
||||||
|
|
|
@ -7,8 +7,7 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
network_interface_name =
|
network_interface_name = (lib.elemAt config.facter.report.hardware.network_interface 0).unix_device_name;
|
||||||
(lib.elemAt config.facter.report.hardware.network_interface 0).unix_device_name;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -117,7 +116,7 @@ in
|
||||||
federating = true;
|
federating = true;
|
||||||
federation_incoming_replies_max_depth = null;
|
federation_incoming_replies_max_depth = null;
|
||||||
max_remote_account_fields = 100;
|
max_remote_account_fields = 100;
|
||||||
federated_timeline_available = true;
|
federated_timeline_available =true;
|
||||||
languages = [
|
languages = [
|
||||||
"en"
|
"en"
|
||||||
"de"
|
"de"
|
||||||
|
|
|
@ -12,10 +12,7 @@
|
||||||
fileSystems."/home/jopejoe1/Public/games" = {
|
fileSystems."/home/jopejoe1/Public/games" = {
|
||||||
device = "/dev/sda";
|
device = "/dev/sda";
|
||||||
fsType = "bcachefs";
|
fsType = "bcachefs";
|
||||||
options = [
|
options = [ "compression=zstd" "nofail" ];
|
||||||
"compression=zstd"
|
|
||||||
"nofail"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
||||||
|
|
5
treefmt.nix
Normal file
5
treefmt.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
projectRootFile = "flake.nix";
|
||||||
|
programs.nixfmt-rfc-style.enable = true;
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue