mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-12 00:18:59 +00:00
config: improve default host and user config
This commit is contained in:
parent
c1e07bd7ac
commit
cdc26a9f37
49
flake.nix
49
flake.nix
@ -141,9 +141,6 @@
|
|||||||
# Take note to only set as minimal configuration as possible since we're
|
# Take note to only set as minimal configuration as possible since we're
|
||||||
# also using this with the stable version of nixpkgs.
|
# also using this with the stable version of nixpkgs.
|
||||||
hostSharedConfig = { options, config, lib, pkgs, ... }: {
|
hostSharedConfig = { options, config, lib, pkgs, ... }: {
|
||||||
# Some defaults for evaluating modules.
|
|
||||||
_module.check = true;
|
|
||||||
|
|
||||||
# Initialize some of the XDG base directories ourselves since it is
|
# Initialize some of the XDG base directories ourselves since it is
|
||||||
# used by NIX_PROFILES to properly link some of them.
|
# used by NIX_PROFILES to properly link some of them.
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
@ -308,31 +305,26 @@
|
|||||||
nix.package = lib.mkDefault pkgs.nixUnstable;
|
nix.package = lib.mkDefault pkgs.nixUnstable;
|
||||||
|
|
||||||
# Set the configurations for the package manager.
|
# Set the configurations for the package manager.
|
||||||
nix.settings =
|
nix.settings = {
|
||||||
let
|
# Set several binary caches.
|
||||||
substituters = [
|
substituters = [
|
||||||
"https://nix-community.cachix.org"
|
"https://nix-community.cachix.org"
|
||||||
"https://foo-dogsquared.cachix.org"
|
"https://foo-dogsquared.cachix.org"
|
||||||
];
|
];
|
||||||
in
|
trusted-public-keys = [
|
||||||
{
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
# Set several binary caches.
|
"foo-dogsquared.cachix.org-1:/2fmqn/gLGvCs5EDeQmqwtus02TUmGy0ZlAEXqRE70E="
|
||||||
inherit substituters;
|
];
|
||||||
trusted-substituters = substituters;
|
|
||||||
trusted-public-keys = [
|
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
||||||
"foo-dogsquared.cachix.org-1:/2fmqn/gLGvCs5EDeQmqwtus02TUmGy0ZlAEXqRE70E="
|
|
||||||
];
|
|
||||||
|
|
||||||
# Sane config for the package manager.
|
# Sane config for the package manager.
|
||||||
# TODO: Remove this after nix-command and flakes has been considered
|
# TODO: Remove this after nix-command and flakes has been considered
|
||||||
# stable.
|
# stable.
|
||||||
#
|
#
|
||||||
# Since we're using flakes to make this possible, we need it. Plus, the
|
# Since we're using flakes to make this possible, we need it. Plus, the
|
||||||
# UX of Nix CLI is becoming closer to Guix's which is a nice bonus.
|
# UX of Nix CLI is becoming closer to Guix's which is a nice bonus.
|
||||||
experimental-features = [ "nix-command" "flakes" "repl-flake" ];
|
experimental-features = [ "nix-command" "flakes" "repl-flake" ];
|
||||||
auto-optimise-store = lib.mkDefault true;
|
auto-optimise-store = lib.mkDefault true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Stallman-senpai will be disappointed.
|
# Stallman-senpai will be disappointed.
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
@ -392,7 +384,6 @@
|
|||||||
let
|
let
|
||||||
name = metadata.username or filename;
|
name = metadata.username or filename;
|
||||||
pkgs = import inputs.${metadata.nixpkgs-channel or "nixpkgs"} {};
|
pkgs = import inputs.${metadata.nixpkgs-channel or "nixpkgs"} {};
|
||||||
path = ./users/home-manager/${name};
|
|
||||||
extraModules = [
|
extraModules = [
|
||||||
({ lib, pkgs, config, ... }: {
|
({ lib, pkgs, config, ... }: {
|
||||||
# Don't create the user directories since they are assumed to
|
# Don't create the user directories since they are assumed to
|
||||||
@ -409,7 +400,7 @@
|
|||||||
})
|
})
|
||||||
userSharedConfig
|
userSharedConfig
|
||||||
nixSettingsSharedConfig
|
nixSettingsSharedConfig
|
||||||
path
|
./users/home-manager/${name}
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
mkHome {
|
mkHome {
|
||||||
|
Loading…
Reference in New Issue
Block a user