Compare commits

..

No commits in common. "a827a3450135eb1dbc633dcda66b6f116497d327" and "b90be0acdf1d2bed1c361db89e9de430e4913be4" have entirely different histories.

7 changed files with 47 additions and 96 deletions

1
.envrc
View file

@ -6,4 +6,3 @@ use_flake() {
ulimit -s unlimited # Bypass current bug in `nix` flakes evaluation
use flake
eval "$shellHooks"

2
.gitignore vendored
View file

@ -1,2 +0,0 @@
.pre-commit-config.yaml
.pre-commit-config.yaml

21
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,21 @@
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

View file

@ -69,37 +69,12 @@
"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",
"pre-commit-hooks": "pre-commit-hooks"
"nur": "nur"
}
}
},

View file

@ -31,28 +31,9 @@
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 =
inputs @
{ self
, futils
, home-manager
, nixpkgs
, nur
, pre-commit-hooks
}:
outputs = { self, futils, home-manager, nixpkgs, nur } @ inputs:
let
inherit (futils.lib) eachDefaultSystem;
@ -71,12 +52,12 @@
];
}
home-manager.nixosModules.home-manager
({ config, ... }: {
home-manager.users.${config.my.username} = import ./home;
{
home-manager.users.ambroisie = import ./home;
# Nix Flakes compatibility
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
})
}
# Include generic settings
./modules
# Include bundles of settings
@ -100,43 +81,28 @@
in
eachDefaultSystem
(system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
rec {
apps = {
diff-flake = futils.lib.mkApp { drv = packages.diff-flake; };
};
checks = {
pre-commit = pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
nixpkgs-fmt = {
enable = true;
};
};
let
pkgs = nixpkgs.legacyPackages.${system};
in
rec {
apps = {
diff-flake = futils.lib.mkApp { drv = packages.diff-flake; };
};
};
defaultApp = apps.diff-flake;
defaultApp = apps.diff-flake;
devShell = pkgs.mkShell {
name = "NixOS-config";
devShell = pkgs.mkShell {
name = "NixOS-config";
buildInputs = with pkgs; [
git-crypt
gitAndTools.pre-commit
gnupg
nixpkgs-fmt
];
};
buildInputs = with pkgs; [
git-crypt
gitAndTools.pre-commit
gnupg
nixpkgs-fmt
];
inherit (self.checks.${system}.pre-commit) shellHook;
};
packages = import ./pkgs { inherit pkgs; };
}) // {
packages = import ./pkgs { inherit pkgs; };
}) // {
overlay = self.overlays.pkgs;
overlays = import ./overlays // {

View file

@ -22,13 +22,5 @@
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware = {
cpu.intel.updateMicrocode = true;
trackpoint = {
enable = true;
emulateWheel = true; # Holding middle buttons allows scrolling
};
};
hardware.cpu.intel.updateMicrocode = true;
}

View file

@ -1,7 +1,7 @@
# Simplify setting home options
{ config, lib, ... }:
{ lib, ... }:
let
actualPath = [ "home-manager" "users" config.my.username "my" "home" ];
actualPath = [ "home-manager" "users" "ambroisie" "my" "home" ];
aliasPath = [ "my" "home" ];
in
{