Compare commits
No commits in common. "00eb9d49b3a8d5fc1c89fe4515348f271b9db9a2" and "6915677422b7d7cc107bf86101f51ea2c79bda87" have entirely different histories.
00eb9d49b3
...
6915677422
@ -5,6 +5,5 @@
|
|||||||
./me.nix
|
./me.nix
|
||||||
./remote.nix
|
./remote.nix
|
||||||
./wm.nix
|
./wm.nix
|
||||||
./nix.nix
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -1,65 +0,0 @@
|
|||||||
{ pkgs, lib, config, options, inputs, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.nixfiles.common.nix;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.nixfiles.common.nix = {
|
|
||||||
enable = lib.mkEnableOption "common Nix configuration";
|
|
||||||
registerNixpkgs = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = cfg.enable;
|
|
||||||
example = "true";
|
|
||||||
description = "Whether to register the Nixpkgs revision used by Nixfiles to the system's flake registry and make it tye system's <nixpkgs> channel";
|
|
||||||
};
|
|
||||||
/* # TODO
|
|
||||||
register = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = cfg.enable;
|
|
||||||
example = "true";
|
|
||||||
description = "Whether to register Nixfiles to the system's flake registry";
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkMerge [
|
|
||||||
( lib.mkIf cfg.registerNixpkgs {
|
|
||||||
|
|
||||||
# this makes modern nix tools use the system's version of nixpkgs
|
|
||||||
nix.registry = {
|
|
||||||
nixpkgs = {
|
|
||||||
exact = true;
|
|
||||||
from = {
|
|
||||||
id = "nixpkgs";
|
|
||||||
type = "indirect";
|
|
||||||
};
|
|
||||||
|
|
||||||
# used instead of `flake` option so produced flake.lock files are
|
|
||||||
# portable
|
|
||||||
to = {
|
|
||||||
type = "github";
|
|
||||||
owner = "NixOS";
|
|
||||||
repo = "nixpkgs";
|
|
||||||
rev = "${inputs.nixpkgs.rev}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# this makes comma and legacy nix utils use the flake nixpkgs for ABI
|
|
||||||
# compatibility becasue once `, vkcube` couldn't find the correct opengl
|
|
||||||
# driver or something (also it reduces the download size of temporary shell
|
|
||||||
# closures)
|
|
||||||
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ] ++ options.nix.nixPath.default;
|
|
||||||
})
|
|
||||||
( lib.mkIf cfg.enable {
|
|
||||||
|
|
||||||
# direnv is a tool to automatically load shell environments upon entering
|
|
||||||
# a directory. nix-direnv has an extensionn to keep nix shells in the
|
|
||||||
# system's gcroots so shells can be used after a gc without rebuilding.
|
|
||||||
programs.direnv.enable = lib.mkDefault true;
|
|
||||||
|
|
||||||
# fallback to building locally if binary cache fails (home-manager should be
|
|
||||||
# able to handle simple rebuilds offline)
|
|
||||||
nix.settings.fallback = lib.mkDefault true;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
}
|
|
@ -11,24 +11,24 @@ in
|
|||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
(lib.mkIf cfg.enable {
|
(lib.mkIf cfg.enable {
|
||||||
|
|
||||||
nixfiles.common = {
|
|
||||||
# Enable my account
|
# Enable my account
|
||||||
me.enable = lib.mkDefault true;
|
nixfiles.common.me.enable = lib.mkDefault true;
|
||||||
# Enable system Nix configuration
|
|
||||||
nix.enable = lib.mkDefault true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# locale settings
|
# locale settings
|
||||||
i18n = {
|
i18n = {
|
||||||
defaultLocale = lib.mkDefault "en_US.UTF-8";
|
defaultLocale = "en_US.UTF-8";
|
||||||
extraLocaleSettings = {
|
extraLocaleSettings = {
|
||||||
LC_ALL = lib.mkDefault "en_US.UTF-8";
|
LC_ALL = "en_US.UTF-8";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable flakes
|
# Enable flakes
|
||||||
nix.settings.experimental-features = ["nix-command" "flakes" ];
|
nix.settings.experimental-features = ["nix-command" "flakes" ];
|
||||||
|
|
||||||
|
# fallback to building locally if binary cache fails (home-manager should be
|
||||||
|
# able to handle simple rebuilds offline)
|
||||||
|
nix.settings.fallback = true;
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
@ -81,10 +81,16 @@ in
|
|||||||
sops
|
sops
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.neovim.defaultEditor = lib.mkDefault true;
|
programs.neovim.defaultEditor = true;
|
||||||
|
|
||||||
programs.ssh.enableAskPassword = lib.mkDefault false;
|
# this makes comma and legacy nix utils use the flake nixpkgs for ABI
|
||||||
programs.fuse.userAllowOther = lib.mkDefault true;
|
# compatibility becasue once `, vkcube` couldn't find the correct opengl
|
||||||
|
# driver or something (also it reduces the download size of temporary shell
|
||||||
|
# closures)
|
||||||
|
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ] ++ options.nix.nixPath.default;
|
||||||
|
|
||||||
|
programs.ssh.enableAskPassword = false;
|
||||||
|
programs.fuse.userAllowOther = true;
|
||||||
|
|
||||||
programs.gnupg.agent = {
|
programs.gnupg.agent = {
|
||||||
enable = lib.mkDefault true;
|
enable = lib.mkDefault true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user