changed: core/configuration.nix, moving packages stuff to core/packages, and making easier to use it commonly across potential future configs uwu
This commit is contained in:
parent
7fd2751288
commit
a4744fc5bf
1 changed files with 21 additions and 63 deletions
|
|
@ -9,74 +9,23 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
|
||||
# home-manager
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
|
||||
# also split up configuration.nix and import pieces:
|
||||
## semi-modularised config
|
||||
./packages
|
||||
./display
|
||||
../home/users
|
||||
./packages.nix
|
||||
|
||||
];
|
||||
|
||||
security = {
|
||||
rtkit.enable = true;
|
||||
sudo.execWheelOnly = true;
|
||||
};
|
||||
|
||||
## locale is common across machines
|
||||
time.timeZone = "Australia/Brisbane";
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
|
||||
nixpkgs = {
|
||||
# add overlays here
|
||||
overlays = [
|
||||
# to use overlays exported from other flakes:
|
||||
# neovim-nightly-overlay.overlays.default
|
||||
|
||||
# or define it inline, for example:
|
||||
# (final: prev: {
|
||||
# hi = final.hello.overrideAttrs (oldAttrs: {
|
||||
# patches = [ ./change-hello-to-hi.patch ];
|
||||
# });
|
||||
# })
|
||||
];
|
||||
# configure nixpkgs instance
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
permittedInsecurePackages = [
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# This will add each flake input as a registry
|
||||
# To make nix3 commands consistent with your flake
|
||||
nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
|
||||
|
||||
# This will additionally add your inputs to the system's legacy channels
|
||||
# Making legacy nix commands consistent as well, awesome!
|
||||
nix.nixPath = ["/etc/nix/path"];
|
||||
environment.etc =
|
||||
lib.mapAttrs'
|
||||
(name: value: {
|
||||
name = "nix/path/${name}";
|
||||
value.source = value.flake;
|
||||
})
|
||||
config.nix.registry;
|
||||
|
||||
nix.settings = {
|
||||
cores = 0;
|
||||
auto-optimise-store = true;
|
||||
allowed-users = [ "@wheel" ];
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
};
|
||||
|
||||
## gotta have sound, this too is common
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
services.pipewire = {
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
jack.enable = true;
|
||||
pulse.enable = true;
|
||||
|
|
@ -85,18 +34,27 @@
|
|||
# lowLatency.enable = true;
|
||||
};
|
||||
|
||||
# disable these cuz they cause problems
|
||||
# see: https://github.com/NixOS/nixpkgs/issues/180175
|
||||
## genuinely dunno what these do hey, like isnt sudo
|
||||
## already restricted to @wheel only? & wut is rtkit
|
||||
security = {
|
||||
rtkit.enable = true;
|
||||
sudo.execWheelOnly = true;
|
||||
};
|
||||
|
||||
## disable these cuz they cause problems (thx sasha)
|
||||
## see: https://github.com/NixOS/nixpkgs/issues/180175
|
||||
systemd.services = {
|
||||
networkManager-wait-online.enable = lib.mkForce false;
|
||||
systemd-networkd-wait-online.enable = lib.mkForce false;
|
||||
};
|
||||
|
||||
|
||||
## autoupgrades ? disabled for now, need to read into
|
||||
# system.autoUpgrade = {
|
||||
# enable = true;
|
||||
# channel = "";
|
||||
# enable = true;
|
||||
# channel = "";
|
||||
# };
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
|
||||
## https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
system.stateVersion = "23.11";
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue