I don't know what the heck im doing, but I reshuffled some stuff in my systems dir
This commit is contained in:
parent
5f178ffdb2
commit
b61e532095
12 changed files with 149 additions and 197 deletions
26
system/common/global/default.nix
Normal file
26
system/common/global/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ inputs, outputs, ... }: {
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
./nix.nix
|
||||
./fish.nix
|
||||
./locale.nix
|
||||
./security.nix
|
||||
./systemdboot.nix
|
||||
./pipewire.nix
|
||||
] ++ (builtins.attrValues outputs.nixosModules);
|
||||
|
||||
home-manager.extraSpecialArgs = { inherit inputs outputs; };
|
||||
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
permittedInsecurePackages = [
|
||||
"openssl-1.1.1u"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
hardware.enableRedistibutableFirmware = true;
|
||||
|
||||
|
||||
}
|
||||
10
system/common/global/fish.nix
Normal file
10
system/common/global/fish.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
vendor = {
|
||||
completions.enable = true;
|
||||
config.enable = true;
|
||||
functions.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
10
system/common/global/locale.nix
Normal file
10
system/common/global/locale.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ lib, ... }: {
|
||||
i18n = {
|
||||
defaultLocale = lib.mkDefault "en_US.UTF-8";
|
||||
};
|
||||
supportedLocales = lib.mkDefault [
|
||||
"en_US.UTF-8/UTF-8"
|
||||
];
|
||||
};
|
||||
time.timeZone = lib.mkDefault "Pacific/Auckland";
|
||||
}
|
||||
26
system/common/global/nix.nix
Normal file
26
system/common/global/nix.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ inputs, lib, ... }:
|
||||
{
|
||||
nix = {
|
||||
settings = {
|
||||
trusted-users = [ "root" "@wheel" ];
|
||||
auto-optimise-store = lib.mkDefault true;
|
||||
experimental-features = [ "nix-command" "flakes" "repl-flake" ];
|
||||
warn-dirty = false;
|
||||
system-features = [ "kvm" "big-parallel" "nixos-test" ];
|
||||
flake-registry = "";
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 2d";
|
||||
};
|
||||
|
||||
# Add each flake input as a registry
|
||||
# To make nix3 commands consistent with the flake
|
||||
registry = lib.mapAttrs (_: value: { flake = value; }) inputs;
|
||||
|
||||
# Add nixpkgs input to NIX_PATH
|
||||
# This lets nix2 commands still use <nixpkgs>
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs.outPath}" ];
|
||||
};
|
||||
}
|
||||
11
system/common/global/pipewire.nix
Normal file
11
system/common/global/pipewire.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
security.rtkit.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
}
|
||||
43
system/common/global/security.nix
Normal file
43
system/common/global/security.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
|
||||
|
||||
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
|
||||
{
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
security = {
|
||||
polkit = {
|
||||
enable = true;
|
||||
};
|
||||
sudo = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
ooks ALL=(ALL) NOPASSWD:ALL
|
||||
'';
|
||||
}
|
||||
};
|
||||
|
||||
systemd = {
|
||||
user.services.polkit-gnome-authentication-agent-1 = {
|
||||
description = "polkit-gnome-authentication-agent-1";
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
wants = [ "graphical-session.target" ];
|
||||
after = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
TimeoutStopSec = 10;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
8
system/common/global/systemdboot.nix
Normal file
8
system/common/global/systemdboot.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
boot.loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
};
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue