mirror of
https://github.com/nmasur/dotfiles
synced 2025-04-24 04:32:24 +00:00
Compare commits
No commits in common. "90fd9f54a724d8771ed79ac1ddc40275afe5262d" and "fbb00d95048a1af73768beae4deb484fa3e583b5" have entirely different histories.
90fd9f54a7
...
fbb00d9504
@ -6,7 +6,6 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (config.nmasur.settings) username;
|
|
||||||
cfg = config.nmasur.presets.services.nix;
|
cfg = config.nmasur.presets.services.nix;
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -24,7 +23,7 @@ in
|
|||||||
# For security, only allow specific users
|
# For security, only allow specific users
|
||||||
settings.allowed-users = [
|
settings.allowed-users = [
|
||||||
"@wheel" # Anyone in the wheel group
|
"@wheel" # Anyone in the wheel group
|
||||||
username # The current user
|
config.home.username # The current user
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enable features in Nix commands
|
# Enable features in Nix commands
|
||||||
@ -45,20 +44,21 @@ in
|
|||||||
trusted-users = [
|
trusted-users = [
|
||||||
"root"
|
"root"
|
||||||
"@wheel"
|
"@wheel"
|
||||||
username
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Add community Cachix to binary cache
|
# Add community Cachix to binary cache
|
||||||
# Don't use at work because blocked by corporate firewall
|
# Don't use at work because blocked by corporate firewall
|
||||||
builders-use-substitutes = true;
|
builders-use-substitutes = true;
|
||||||
substituters = [
|
substituters = lib.mkIf (!config.nmasur.profiles.work.enable) [
|
||||||
"https://nix-community.cachix.org"
|
"https://nix-community.cachix.org"
|
||||||
];
|
];
|
||||||
trusted-public-keys = [
|
trusted-public-keys = lib.mkIf (!config.nmasur.profiles.work.enable) [
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
];
|
];
|
||||||
|
|
||||||
auto-optimise-store = true;
|
# Scans and hard links identical files in the store
|
||||||
|
# Not working with macOS: https://github.com/NixOS/nix/issues/7273
|
||||||
|
auto-optimise-store = lib.mkIf (!pkgs.stdenv.isDarwin) true;
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
@ -35,6 +35,7 @@ in
|
|||||||
nixpkgs.enable = lib.mkDefault true;
|
nixpkgs.enable = lib.mkDefault true;
|
||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
|
nix.enable = lib.mkDefault true;
|
||||||
loadkey.enable = lib.mkDefault true;
|
loadkey.enable = lib.mkDefault true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,60 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
inherit (config.nmasur.settings) username;
|
|
||||||
cfg = config.nmasur.presets.services.nix;
|
|
||||||
in
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
options.nmasur.presets.services.nix.enable = lib.mkEnableOption "Nix settings and presets";
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
|
|
||||||
nix = {
|
|
||||||
|
|
||||||
# Set channel to flake packages, used for nix-shell commands
|
|
||||||
nixPath = [ "nixpkgs=${pkgs.path}" ];
|
|
||||||
|
|
||||||
# For security, only allow specific users
|
|
||||||
settings.allowed-users = [
|
|
||||||
"@wheel" # Anyone in the wheel group
|
|
||||||
username # The current user
|
|
||||||
];
|
|
||||||
|
|
||||||
# Enable features in Nix commands
|
|
||||||
extraOptions = ''
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
warn-dirty = false
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Set automatic generation cleanup for home-manager
|
|
||||||
gc = {
|
|
||||||
automatic = true;
|
|
||||||
options = "--delete-older-than 10d";
|
|
||||||
};
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
|
|
||||||
# Trust users for messing with Nix stuff
|
|
||||||
trusted-users = [
|
|
||||||
"root"
|
|
||||||
"@wheel"
|
|
||||||
username
|
|
||||||
];
|
|
||||||
|
|
||||||
# Scans and hard links identical files in the store
|
|
||||||
# Not working with macOS: https://github.com/NixOS/nix/issues/7273
|
|
||||||
auto-optimise-store = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -21,9 +21,6 @@ in
|
|||||||
programs = {
|
programs = {
|
||||||
doas.enable = lib.mkDefault true;
|
doas.enable = lib.mkDefault true;
|
||||||
};
|
};
|
||||||
services = {
|
|
||||||
nix.enable = lib.mkDefault true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.fish.enable = lib.mkDefault config.home-manager.users.${username}.programs.fish.enable;
|
programs.fish.enable = lib.mkDefault config.home-manager.users.${username}.programs.fish.enable;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user