add: more system modules
This commit is contained in:
parent
793cc3131c
commit
a545953c2d
5 changed files with 13 additions and 84 deletions
|
|
@ -1,31 +0,0 @@
|
||||||
{ config, inputs, pkgs, lib, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
inherit (config.networking) hostName;
|
|
||||||
isClean = inputs.self ? rev;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
system.autoUpgrade = {
|
|
||||||
enable = isClean;
|
|
||||||
dates = "hourly";
|
|
||||||
flags = [
|
|
||||||
"--refresh"
|
|
||||||
];
|
|
||||||
flake = "github:ooks-io/nix#${hostName};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Only run if current config (self) is older than the new one.
|
|
||||||
|
|
||||||
systemd.services.nixos-upgrade = lib.mkIf config.system.autoUpgrade.enable {
|
|
||||||
serviceConfig.ExecCondition = lib.getExe (
|
|
||||||
pkgs.writeShellScriptBin "check-date" ''
|
|
||||||
lastModified() {
|
|
||||||
nix flake metadata "$1" --refresh --json | ${lib.getExe pkgs.jq} '.lastModified'
|
|
||||||
}
|
|
||||||
test "$(lastModified "${config.system.autoUpgrade.flake}")" -gt "$(lastModified "self")"
|
|
||||||
''
|
|
||||||
);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
{ inputs, outputs, ... }: {
|
|
||||||
imports = [
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
./nix.nix
|
|
||||||
./fish.nix
|
|
||||||
./locale.nix
|
|
||||||
./security.nix
|
|
||||||
./systemdboot.nix
|
|
||||||
./pipewire.nix
|
|
||||||
# ./auto-upgrade.nix # still needs some work
|
|
||||||
];
|
|
||||||
|
|
||||||
home-manager.extraSpecialArgs = { inherit inputs outputs; };
|
|
||||||
|
|
||||||
#hardware.enableRedistibutableFirmware = true;
|
|
||||||
environment.enableAllTerminfo = true;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
hardware.pulseaudio.enable = false;
|
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
alsa.support32Bit = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
jack.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,17 +1,28 @@
|
||||||
{ lib, config, ... }:
|
{ inputs, outputs, lib, config, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.systemProfile.base;
|
cfg = config.systemProfile.base;
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
../modules
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
];
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
environment.systemPackages = [pkgs.git];
|
||||||
|
environment.enableAllTerminfo = true;
|
||||||
systemModules = {
|
systemModules = {
|
||||||
security.enable = true;
|
security.enable = true;
|
||||||
nixOptions.enable = true;
|
nixOptions.enable = true;
|
||||||
pipewire.enable = true;
|
pipewire.enable = true;
|
||||||
networking.enable = true;
|
networking.enable = true;
|
||||||
locale.enable = true;
|
locale.enable = true;
|
||||||
}
|
};
|
||||||
|
|
||||||
|
home-manager.extraSpecialArgs = { inherit inputs outputs; };
|
||||||
|
hardware.enableAllFirmware = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
{ pkgs, config, ... }:
|
|
||||||
let ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
users.users.ooks = {
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = [
|
|
||||||
"wheel"
|
|
||||||
"video"
|
|
||||||
"audio"
|
|
||||||
] ++ ifTheyExist [
|
|
||||||
"git"
|
|
||||||
"network"
|
|
||||||
"libvirtd"
|
|
||||||
"deluge"
|
|
||||||
];
|
|
||||||
|
|
||||||
packages = [ pkgs.home-manager ];
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager.users.ooks = import ../../../../home/user/ooks/${config.networking.hostName};
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue