Cleanup
This commit is contained in:
@@ -1,12 +1,16 @@
|
|||||||
{ lib, config, ... }: {
|
{ lib, config, pkgs, ... }: {
|
||||||
|
|
||||||
#environment.sessionVariables.SOPS_AGE_KEY_FILE = keyFilePath;
|
#environment.sessionVariables.SOPS_AGE_KEY_FILE = keyFilePath;
|
||||||
systemd.user.startServices = "sd-switch";
|
systemd.user.startServices = lib.mkIf pkgs.stdenv.isLinux "sd-switch";
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
username = "${config.usercfg.username}";
|
username = "${config.usercfg.username}";
|
||||||
homeDirectory = "/home/${config.usercfg.username}";
|
homeDirectory =
|
||||||
|
if pkgs.stdenv.isDarwin then
|
||||||
|
"/Users/${config.usercfg.username}"
|
||||||
|
else
|
||||||
|
"/home/${config.usercfg.username}";
|
||||||
|
|
||||||
stateVersion = "26.05";
|
stateVersion = "26.05";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
{ name, ... }:
|
||||||
|
throw "Container app `${name}` is not implemented yet."
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
{...}:{
|
{ name, ... }:
|
||||||
|
throw "Container app `${name}` is not implemented yet."
|
||||||
}
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ let
|
|||||||
};
|
};
|
||||||
in lib.recursiveUpdate base overrides;
|
in lib.recursiveUpdate base overrides;
|
||||||
vmBuilder = { name, vm }: ((import "${pkgs.path}/nixos/lib/eval-config.nix" {
|
vmBuilder = { name, vm }: ((import "${pkgs.path}/nixos/lib/eval-config.nix" {
|
||||||
system = "x86_64-linux";
|
system = pkgs.stdenv.hostPlatform.system;
|
||||||
modules = [ vm.cfg
|
modules = [ vm.cfg
|
||||||
({ config, lib, modulesPath, ... }: {
|
({ config, lib, modulesPath, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ let
|
|||||||
basePathConfigs =
|
basePathConfigs =
|
||||||
lib.mapAttrsToList (_: cfg: cfg) (lib.filterAttrs (name: _: name != "config" && name != "data") serverCfg.path);
|
lib.mapAttrsToList (_: cfg: cfg) (lib.filterAttrs (name: _: name != "config" && name != "data") serverCfg.path);
|
||||||
runtimePathConfigs = concatRuntimeLists "paths";
|
runtimePathConfigs = concatRuntimeLists "paths";
|
||||||
allSetupConfigs = map (app: ({ name = app.name; envFile = ""; } // app.runtime.setup)) appsList;
|
allSetupConfigs = builtins.filter
|
||||||
|
(setup: setup.script != null)
|
||||||
|
(map (app: ({ name = app.name; envFile = [ ]; } // app.runtime.setup)) appsList);
|
||||||
allCronsConfigs = concatRuntimeLists "cron";
|
allCronsConfigs = concatRuntimeLists "cron";
|
||||||
allVMConfigs = builtins.filter (app: app.runtime.vm != null) appsList;
|
allVMConfigs = builtins.filter (app: app.runtime.vm != null) appsList;
|
||||||
mkPathSetup = cfg:
|
mkPathSetup = cfg:
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
isCI = builtins.elem config.syscfg.hostname [ "ci" "sandbox" ];
|
isCI = builtins.elem config.syscfg.hostname [ "ci" "sandbox" ];
|
||||||
|
defaultUser = config.users.users.${config.syscfg.defaultUser} or { };
|
||||||
|
defaultGroup = if pkgs.stdenv.isDarwin then "staff" else "users";
|
||||||
keyFilePath = (if isCI then
|
keyFilePath = (if isCI then
|
||||||
"/var/lib/sops-nix/mock-key.txt"
|
"/var/lib/sops-nix/mock-key.txt"
|
||||||
else
|
else
|
||||||
@@ -8,7 +10,7 @@ let
|
|||||||
sopsFilePath = (if isCI then ./mock.yaml else ./common.yaml);
|
sopsFilePath = (if isCI then ./mock.yaml else ./common.yaml);
|
||||||
in {
|
in {
|
||||||
environment.systemPackages = with pkgs; [ sops ];
|
environment.systemPackages = with pkgs; [ sops ];
|
||||||
environment.sessionVariables.SOPS_AGE_KEY_FILE = keyFilePath;
|
environment.variables.SOPS_AGE_KEY_FILE = keyFilePath;
|
||||||
|
|
||||||
sops.defaultSopsFile = sopsFilePath;
|
sops.defaultSopsFile = sopsFilePath;
|
||||||
sops.age.keyFile = keyFilePath;
|
sops.age.keyFile = keyFilePath;
|
||||||
@@ -19,8 +21,8 @@ in {
|
|||||||
{
|
{
|
||||||
"${config.syscfg.hostname}_ssh_priv" = {
|
"${config.syscfg.hostname}_ssh_priv" = {
|
||||||
mode = "0400";
|
mode = "0400";
|
||||||
owner = config.users.users.${config.syscfg.defaultUser}.name;
|
owner = defaultUser.name or config.syscfg.defaultUser;
|
||||||
group = config.users.users.${config.syscfg.defaultUser}.group;
|
group = defaultUser.group or defaultGroup;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
(lib.mkIf config.syscfg.net.wlp.enable {
|
(lib.mkIf config.syscfg.net.wlp.enable {
|
||||||
|
|||||||
@@ -6,6 +6,6 @@ with lib; {
|
|||||||
domain = mkOption { type = types.str; default = ""; };
|
domain = mkOption { type = types.str; default = ""; };
|
||||||
port = mkOption { type = types.str; default = ""; };
|
port = mkOption { type = types.str; default = ""; };
|
||||||
noProxy = mkOption { type = types.str; default = ""; };
|
noProxy = mkOption { type = types.str; default = ""; };
|
||||||
cert = mkOption { type = types.path; default = null; };
|
cert = mkOption { type = types.nullOr types.path; default = null; };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -1,15 +1,8 @@
|
|||||||
{ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
amdgpu_top = pkgs.callPackage ./amdgpu_top { };
|
amdgpu_top = pkgs.callPackage ./amdgpu_top { };
|
||||||
simc = pkgs.qt6.callPackage ./simc { };
|
simc = pkgs.qt6.callPackage ./simc { };
|
||||||
repalette = pkgs.callPackage ./repalette { };
|
repalette = pkgs.callPackage ./repalette { };
|
||||||
|
|
||||||
vosk = pkgs.callPackage ./vosk { };
|
vosk = pkgs.callPackage ./vosk { };
|
||||||
|
|
||||||
pythonPackages = {
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
nodePackages = {
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,8 +12,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
fontDir.enable = true;
|
packages = with pkgs; [ ibm-plex openmoji-color material-design-icons ];
|
||||||
fonts = with pkgs; [ ibm-plex openmoji-color material-design-icons ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
@@ -33,8 +32,6 @@
|
|||||||
|
|
||||||
programs = { zsh.enable = true; };
|
programs = { zsh.enable = true; };
|
||||||
|
|
||||||
services = { nix-daemon.enable = true; };
|
|
||||||
|
|
||||||
homebrew = {
|
homebrew = {
|
||||||
enable = true;
|
enable = true;
|
||||||
onActivation = {
|
onActivation = {
|
||||||
@@ -54,7 +51,11 @@
|
|||||||
'';
|
'';
|
||||||
gc = {
|
gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
dates = "weekly";
|
interval = {
|
||||||
|
Weekday = 0;
|
||||||
|
Hour = 3;
|
||||||
|
Minute = 0;
|
||||||
|
};
|
||||||
options = "--delete-older-than 7d";
|
options = "--delete-older-than 7d";
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
@@ -67,6 +68,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
system = {
|
system = {
|
||||||
|
primaryUser = "sora";
|
||||||
defaults = {
|
defaults = {
|
||||||
NSGlobalDomain = {
|
NSGlobalDomain = {
|
||||||
KeyRepeat = 1;
|
KeyRepeat = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user