Compare commits
7 commits
b90be0acdf
...
a827a34501
Author | SHA1 | Date | |
---|---|---|---|
Bruno BELANYI | a827a34501 | ||
Bruno BELANYI | 610b0f2f4b | ||
Bruno BELANYI | 59cb038045 | ||
Bruno BELANYI | 15db81eb3b | ||
Bruno BELANYI | 24efa3edca | ||
Bruno BELANYI | 2fe4f1faad | ||
Bruno BELANYI | 4f1f687eea |
1
.envrc
1
.envrc
|
@ -6,3 +6,4 @@ use_flake() {
|
|||
|
||||
ulimit -s unlimited # Bypass current bug in `nix` flakes evaluation
|
||||
use flake
|
||||
eval "$shellHooks"
|
||||
|
|
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
.pre-commit-config.yaml
|
||||
.pre-commit-config.yaml
|
|
@ -1,21 +0,0 @@
|
|||
repos:
|
||||
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
|
||||
rev: 'v2.3.0'
|
||||
hooks:
|
||||
- id: 'trailing-whitespace'
|
||||
- id: 'end-of-file-fixer'
|
||||
- id: 'check-yaml'
|
||||
- id: 'check-added-large-files'
|
||||
- repo: 'https://github.com/jumanjihouse/pre-commit-hooks'
|
||||
rev: '2.1.4'
|
||||
hooks:
|
||||
- id: 'forbid-binary'
|
||||
- repo: 'local'
|
||||
hooks:
|
||||
- id: 'nixpkgs-fmt'
|
||||
name: 'nixpkgs-fmt'
|
||||
description: 'Format nix code with nixpkgs-fmt'
|
||||
entry: 'nixpkgs-fmt'
|
||||
language: 'system'
|
||||
files: '\.nix$'
|
||||
always_run: true
|
27
flake.lock
27
flake.lock
|
@ -69,12 +69,37 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"pre-commit-hooks": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"futils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1621411868,
|
||||
"narHash": "sha256-R+7OQ2JYFCb3E7Jl7LhRifzMVCR6Gl8R98zYsNhZtJ8=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "2e7fac06108b4fc81f5ff9ed9a02bc4f6ede7001",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"ref": "master",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"futils": "futils",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nur": "nur"
|
||||
"nur": "nur",
|
||||
"pre-commit-hooks": "pre-commit-hooks"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
42
flake.nix
42
flake.nix
|
@ -31,9 +31,28 @@
|
|||
repo = "NUR";
|
||||
ref = "master";
|
||||
};
|
||||
|
||||
pre-commit-hooks = {
|
||||
type = "github";
|
||||
owner = "cachix";
|
||||
repo = "pre-commit-hooks.nix";
|
||||
ref = "master";
|
||||
inputs = {
|
||||
flake-utils.follows = "futils";
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, futils, home-manager, nixpkgs, nur } @ inputs:
|
||||
outputs =
|
||||
inputs @
|
||||
{ self
|
||||
, futils
|
||||
, home-manager
|
||||
, nixpkgs
|
||||
, nur
|
||||
, pre-commit-hooks
|
||||
}:
|
||||
let
|
||||
inherit (futils.lib) eachDefaultSystem;
|
||||
|
||||
|
@ -52,12 +71,12 @@
|
|||
];
|
||||
}
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.users.ambroisie = import ./home;
|
||||
({ config, ... }: {
|
||||
home-manager.users.${config.my.username} = import ./home;
|
||||
# Nix Flakes compatibility
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
}
|
||||
})
|
||||
# Include generic settings
|
||||
./modules
|
||||
# Include bundles of settings
|
||||
|
@ -89,16 +108,31 @@
|
|||
diff-flake = futils.lib.mkApp { drv = packages.diff-flake; };
|
||||
};
|
||||
|
||||
checks = {
|
||||
pre-commit = pre-commit-hooks.lib.${system}.run {
|
||||
src = ./.;
|
||||
|
||||
hooks = {
|
||||
nixpkgs-fmt = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
defaultApp = apps.diff-flake;
|
||||
|
||||
devShell = pkgs.mkShell {
|
||||
name = "NixOS-config";
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
git-crypt
|
||||
gitAndTools.pre-commit
|
||||
gnupg
|
||||
nixpkgs-fmt
|
||||
];
|
||||
|
||||
inherit (self.checks.${system}.pre-commit) shellHook;
|
||||
};
|
||||
|
||||
packages = import ./pkgs { inherit pkgs; };
|
||||
|
|
|
@ -22,5 +22,13 @@
|
|||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
hardware = {
|
||||
cpu.intel.updateMicrocode = true;
|
||||
|
||||
trackpoint = {
|
||||
enable = true;
|
||||
|
||||
emulateWheel = true; # Holding middle buttons allows scrolling
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Simplify setting home options
|
||||
{ lib, ... }:
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
actualPath = [ "home-manager" "users" "ambroisie" "my" "home" ];
|
||||
actualPath = [ "home-manager" "users" config.my.username "my" "home" ];
|
||||
aliasPath = [ "my" "home" ];
|
||||
in
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue