statix
This commit is contained in:
parent
5b06263044
commit
430e2aaa99
142
flake.lock
generated
142
flake.lock
generated
@ -108,29 +108,6 @@
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"comma": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"naersk": "naersk",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1670543350,
|
||||
"narHash": "sha256-JMYwGa2nJPInuVuYbR3XSGUJewTDyeoTDQaALydduko=",
|
||||
"owner": "nix-community",
|
||||
"repo": "comma",
|
||||
"rev": "1b07c19774129ebce3af846fb571e1c0b97f24a3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "comma",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"crane": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
@ -170,31 +147,6 @@
|
||||
}
|
||||
},
|
||||
"devshell": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"direnv-vscode",
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"direnv-vscode",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1671489820,
|
||||
"narHash": "sha256-qoei5HDJ8psd1YUPD7DhbHdhLIT9L2nadscp4Qk37uk=",
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"rev": "5aa3a8039c68b4bf869327446590f4cdf90bb634",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"devshell_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1663445644,
|
||||
@ -210,30 +162,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"direnv-vscode": {
|
||||
"inputs": {
|
||||
"devshell": "devshell",
|
||||
"flake-compat": "flake-compat_2",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"npmlock2nix": "npmlock2nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1673358096,
|
||||
"narHash": "sha256-A2nS0ruQwoldc0OBPay6NSJ0JXdrsauCFigNau4ZOno=",
|
||||
"owner": "direnv",
|
||||
"repo": "direnv-vscode",
|
||||
"rev": "497bc6a9b0e9474e763d5253da4e1cb0b5ca2466",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "direnv",
|
||||
"repo": "direnv-vscode",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"dream2nix": {
|
||||
"inputs": {
|
||||
"alejandra": "alejandra",
|
||||
@ -355,22 +283,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_5": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1668681692,
|
||||
"narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "009399224d5e398d03b22badca40a37ac85412a1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
@ -1052,7 +964,7 @@
|
||||
},
|
||||
"nixpkgs-wayland": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_4",
|
||||
"flake-compat": "flake-compat_3",
|
||||
"lib-aggregate": "lib-aggregate",
|
||||
"nix-eval-jobs": "nix-eval-jobs",
|
||||
"nixpkgs": [
|
||||
@ -1169,22 +1081,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"npmlock2nix": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1670666882,
|
||||
"narHash": "sha256-hoCm6Z6fXuYML+gh+HISsRVPMXDmyknAWlaentg9zcc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "npmlock2nix",
|
||||
"rev": "cc11d791fdc3afb2ae7c2f11e10abf7c33b40763",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "npmlock2nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1673466346,
|
||||
@ -1288,7 +1184,7 @@
|
||||
"base16": "base16",
|
||||
"base16-tokyonight-scheme": "base16-tokyonight-scheme",
|
||||
"deploy-rs": "deploy-rs",
|
||||
"flake-compat": "flake-compat_3",
|
||||
"flake-compat": "flake-compat_2",
|
||||
"flake-registry": "flake-registry",
|
||||
"flake-utils-plus": "flake-utils-plus_2",
|
||||
"home-manager": "home-manager",
|
||||
@ -1352,12 +1248,12 @@
|
||||
"simple-nixos-mailserver": {
|
||||
"inputs": {
|
||||
"blobs": "blobs",
|
||||
"flake-compat": "flake-compat_5",
|
||||
"flake-compat": "flake-compat_4",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-22_11": "nixpkgs-22_11",
|
||||
"utils": "utils_5"
|
||||
"utils": "utils_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1671738303,
|
||||
@ -1374,36 +1270,6 @@
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"locked": {
|
||||
"lastModified": 1659877975,
|
||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils_2": {
|
||||
"locked": {
|
||||
"lastModified": 1667395993,
|
||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils_3": {
|
||||
"locked": {
|
||||
"lastModified": 1667395993,
|
||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||
|
@ -55,7 +55,7 @@
|
||||
url = "github:nix-community/nixos-generators";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nur.url = github:nix-community/NUR;
|
||||
nur.url = "github:nix-community/NUR";
|
||||
qbittorrent-ee = {
|
||||
url = "github:c0re100/qBittorrent-Enhanced-Edition";
|
||||
flake = false;
|
||||
@ -112,7 +112,7 @@
|
||||
findModules (dir + "/${name}"))
|
||||
(builtins.readDir dir)));
|
||||
|
||||
patchesPath = (patches: map (x: ./patches + "/${x}") patches);
|
||||
patchesPath = map (x: ./patches + "/${x}");
|
||||
in flake-utils-plus.lib.mkFlake rec {
|
||||
inherit self inputs;
|
||||
supportedSystems = [ "x86_64-linux" ];
|
||||
@ -180,7 +180,7 @@
|
||||
name = "aliases";
|
||||
packages = with pkgs; [
|
||||
rebuild update-vscode upgrade upgrade-hyprland
|
||||
nixfmt nixpkgs-fmt statix
|
||||
nixfmt nixpkgs-fmt statix vulnix deadnix
|
||||
];
|
||||
};
|
||||
packages = {
|
||||
|
@ -30,27 +30,27 @@ with types; {
|
||||
isLaptop = mkOption {
|
||||
type = bool;
|
||||
default =
|
||||
!isNull (builtins.match ".*Laptop" config.networking.hostName);
|
||||
(builtins.match ".*Laptop" config.networking.hostName) != null;
|
||||
};
|
||||
isVM = mkOption {
|
||||
type = bool;
|
||||
default =
|
||||
!isNull (builtins.match ".*VM" config.networking.hostName);
|
||||
(builtins.match ".*VM" config.networking.hostName) != null;
|
||||
};
|
||||
isServer = mkOption {
|
||||
type = bool;
|
||||
default =
|
||||
!isNull (builtins.match ".*(Cloud|Server)" config.networking.hostName);
|
||||
(builtins.match ".*(Cloud|Server)" config.networking.hostName) != null;
|
||||
};
|
||||
isContainer = mkOption {
|
||||
type = bool;
|
||||
default =
|
||||
!isNull (builtins.match ".*(CT|Container)" config.networking.hostName);
|
||||
(builtins.match ".*(CT|Container)" config.networking.hostName) != null;
|
||||
};
|
||||
isISO = mkOption {
|
||||
type = bool;
|
||||
default =
|
||||
!isNull (builtins.match ".*ISO" config.networking.hostName);
|
||||
(builtins.match ".*ISO" config.networking.hostName) != null;
|
||||
};
|
||||
isDesktop = mkOption {
|
||||
type = bool;
|
||||
|
@ -56,7 +56,7 @@ in {
|
||||
};
|
||||
|
||||
config.systemd.tmpfiles.rules =
|
||||
mapAttrsToList (tmpfileEntry) cfg.sharedMemoryFiles;
|
||||
mapAttrsToList tmpfileEntry cfg.sharedMemoryFiles;
|
||||
|
||||
config.boot.kernelParams = optionals cfg.hugepages.enable [
|
||||
"default_hugepagesz=${cfg.hugepages.defaultPageSize}"
|
||||
|
@ -28,7 +28,7 @@ let
|
||||
};
|
||||
permissions = mkOption {
|
||||
type = lib.types.addCheck lib.types.str
|
||||
(perm: !isNull (builtins.match "[0-7]{3}" perm));
|
||||
(perm: (builtins.match "[0-7]{3}" perm) != null);
|
||||
default = "400";
|
||||
};
|
||||
services = mkOption {
|
||||
@ -43,7 +43,7 @@ let
|
||||
};
|
||||
|
||||
exportSecrets = name: cfg:
|
||||
let prefix = lib.optionalString (!isNull cfg.prefix) "${cfg.prefix}_";
|
||||
let prefix = lib.optionalString (cfg.prefix != null) "${cfg.prefix}_";
|
||||
in map (secret:
|
||||
''
|
||||
export ${prefix}${secret}="$(cat ${
|
||||
@ -98,7 +98,7 @@ let
|
||||
map (x: {
|
||||
"${name}-envsubst-${x}" = {
|
||||
encrypted = "${config.home-manager.users.${config.mainuser}.xdg.dataHome}/password-store/${
|
||||
lib.optionalString (!isNull cfg.directory) "${cfg.directory}/"
|
||||
lib.optionalString (cfg.directory != null) "${cfg.directory}/"
|
||||
}${x}.gpg";
|
||||
services = [ ];
|
||||
};
|
||||
|
@ -33,7 +33,7 @@ let
|
||||
};
|
||||
permissions = mkOption {
|
||||
type = lib.types.addCheck lib.types.str
|
||||
(perm: !isNull (builtins.match "[0-7]{3}" perm));
|
||||
(perm: (builtins.match "[0-7]{3}" perm) != null);
|
||||
default = "400";
|
||||
};
|
||||
services = mkOption {
|
||||
@ -112,10 +112,10 @@ let
|
||||
|
||||
mkServices = name: cfg: [ (decrypt name cfg) (addDependencies name cfg) ];
|
||||
|
||||
allServicesMap = (map (name: "${name}-envsubst.service")
|
||||
allServicesMap = map (name: "${name}-envsubst.service")
|
||||
(builtins.attrNames config.secrets-envsubst)
|
||||
++ map (name: "${name}-secrets.service")
|
||||
(builtins.attrNames config.secrets));
|
||||
(builtins.attrNames config.secrets);
|
||||
|
||||
allServices = toString allServicesMap;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
home-manager.users.${config.mainuser} = {
|
||||
programs.nnn = {
|
||||
enable = true;
|
||||
package = pkgs.nnn.override ({ withNerdIcons = true; });
|
||||
package = pkgs.nnn.override { withNerdIcons = true; };
|
||||
# extraPackages = with pkgs; [ ffmpegthumbnailer mediainfo sxiv ];
|
||||
# bookmarks = {
|
||||
# d = "~/Documents";
|
||||
|
@ -1,14 +1,14 @@
|
||||
{ pkgs, config, lib, inputs, ... }:
|
||||
let
|
||||
inherit (pkgs.hostPlatform) system;
|
||||
master = import inputs.nixpkgs-master ({
|
||||
master = import inputs.nixpkgs-master {
|
||||
config = config.nixpkgs.config;
|
||||
localSystem = { inherit system; };
|
||||
});
|
||||
stable = import inputs.nixpkgs-stable ({
|
||||
};
|
||||
stable = import inputs.nixpkgs-stable {
|
||||
config = config.nixpkgs.config;
|
||||
localSystem = { inherit system; };
|
||||
});
|
||||
};
|
||||
roundcube-plugins = import ./packages/roundcube-plugins/default.nix;
|
||||
in
|
||||
with lib; {
|
||||
|
@ -50,9 +50,7 @@ let
|
||||
# cp -r ${release}/po ./
|
||||
# chmod 644 -R ./po
|
||||
|
||||
in (
|
||||
|
||||
assert efiSupport -> canEfi;
|
||||
in assert efiSupport -> canEfi;
|
||||
assert zfsSupport -> zfs != null;
|
||||
assert !(efiSupport && xenSupport);
|
||||
|
||||
@ -191,4 +189,4 @@ stdenv.mkDerivation rec {
|
||||
|
||||
maintainers = [ maintainers.samueldr ];
|
||||
};
|
||||
})
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = https://github.com/haiwen/seadrive-fuse;
|
||||
homepage = "https://github.com/haiwen/seadrive-fuse";
|
||||
description = "SeaDrive daemon with FUSE interface";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.all;
|
||||
|
@ -1,9 +1,5 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
# init = pkgs.writeScript "init.sh" ''
|
||||
# CHANGEME
|
||||
# '';
|
||||
in with config.virtualisation.oci-containers; {
|
||||
with config.virtualisation.oci-containers; {
|
||||
virtualisation.oci-containers.containers.stable-diffusion = {
|
||||
# autoStart = true;
|
||||
autoStart = false;
|
||||
|
@ -2,9 +2,9 @@
|
||||
home-manager.users.${config.mainuser} = {
|
||||
xdg.configFile = {
|
||||
"easyeffects/output/HE4XX.json".text =
|
||||
(builtins.readFile ./HE4XX.json);
|
||||
builtins.readFile ./HE4XX.json;
|
||||
"easyeffects/output/Bluetooth.json".text =
|
||||
(builtins.readFile ./Bluetooth.json);
|
||||
builtins.readFile ./Bluetooth.json;
|
||||
};
|
||||
services.easyeffects.enable = true;
|
||||
};
|
||||
|
@ -54,7 +54,7 @@ with config.deviceSpecific; {
|
||||
|
||||
virtualisation.lxd = lib.mkIf (!isContainer) {
|
||||
enable = true;
|
||||
zfsSupport = (devInfo.fileSystem == "zfs");
|
||||
zfsSupport = devInfo.fileSystem == "zfs";
|
||||
recommendedSysctlSettings = true;
|
||||
};
|
||||
virtualisation.lxc = lib.mkIf (!isContainer) {
|
||||
|
@ -17,7 +17,7 @@
|
||||
}
|
||||
{
|
||||
keys = [ 431 ];
|
||||
command = (toString (pkgs.writeTextFile {
|
||||
command = toString (pkgs.writeTextFile {
|
||||
name = "dark-script";
|
||||
text = ''
|
||||
if [[ `${pkgs.light}/bin/light` -eq 0 ]]
|
||||
@ -28,7 +28,7 @@
|
||||
${pkgs.light}/bin/light -S 0
|
||||
fi'';
|
||||
executable = true;
|
||||
}));
|
||||
});
|
||||
}
|
||||
];
|
||||
};
|
||||
|
5
statix.toml
Normal file
5
statix.toml
Normal file
@ -0,0 +1,5 @@
|
||||
disabled = [
|
||||
"manual_inherit",
|
||||
"manual_inherit_from",
|
||||
"empty_pattern",
|
||||
]
|
Loading…
x
Reference in New Issue
Block a user