refactor(system): flatten
This commit is contained in:
parent
8298fc375a
commit
33cbd9dfc7
12 changed files with 72 additions and 309 deletions
|
|
@ -6,7 +6,7 @@ in
|
|||
|
||||
{
|
||||
imports = [
|
||||
./systemd
|
||||
./systemd.nix
|
||||
# ./grub
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.systemModules.plymouth;
|
||||
cfg = config.systemModules.boot.plymouth;
|
||||
in
|
||||
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,14 +2,13 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
./gaming
|
||||
./shell
|
||||
./bootloader
|
||||
./boot
|
||||
./nix
|
||||
./programs
|
||||
./displayManager
|
||||
./networking
|
||||
./locale
|
||||
./locale.nix
|
||||
./virtualization
|
||||
./security
|
||||
./services
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./tuigreet
|
||||
./tuigreet.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,30 +0,0 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
tuigreet = "${pkgs.greetd.tuigreet}/bin/tuigreet";
|
||||
host = config.systemModules.host;
|
||||
in
|
||||
{
|
||||
config = mkIf (host.type != "phone") {
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "${tuigreet} --time --remember --cmd Hyprland"; # TODO: dont hardcode this
|
||||
user = "greeter";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.greetd.serviceConfig = {
|
||||
Type = "idle";
|
||||
StandardInput = "tty";
|
||||
StandardOutput = "tty";
|
||||
StandardError = "journal"; # Without this errors will spam on screen
|
||||
# Without these bootlogs will spam on screen
|
||||
TTYReset = true;
|
||||
TTYVHangup = true;
|
||||
TTYVTDisallocate = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
{ lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkDefault;
|
||||
in
|
||||
|
||||
{
|
||||
i18n = {
|
||||
defaultLocale = mkDefault "en_US.UTF-8";
|
||||
supportedLocales = mkDefault [
|
||||
"en_US.UTF-8/UTF-8"
|
||||
];
|
||||
};
|
||||
time.timeZone = mkDefault "Pacific/Auckland";
|
||||
location.provider = "geoclue2";
|
||||
services.geoclue2.enable = true;
|
||||
}
|
||||
|
|
@ -7,12 +7,12 @@ in
|
|||
|
||||
{
|
||||
imports = [
|
||||
./firewall
|
||||
./tools
|
||||
./ssh
|
||||
./tcp
|
||||
./resolved
|
||||
./tailscale
|
||||
./firewall.nix
|
||||
./tools.nix
|
||||
./ssh.nix
|
||||
./tcp.nix
|
||||
./resolved.nix
|
||||
./tailscale.nix
|
||||
];
|
||||
|
||||
config = mkIf (host.type != "phone") {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,49 @@
|
|||
{ lib, ... }:
|
||||
{ lib, config, pkgs, inputs, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkIf mapAttrs mapAttrsToList;
|
||||
host = config.systemModules.host;
|
||||
in
|
||||
|
||||
{
|
||||
imports = [
|
||||
./nh
|
||||
./nix
|
||||
./nixpkgs
|
||||
./subs
|
||||
./nh.nix
|
||||
./nixpkgs.nix
|
||||
./subs.nix
|
||||
];
|
||||
|
||||
config = mkIf (host.type != "phone") {
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
git
|
||||
deadnix
|
||||
statix
|
||||
];
|
||||
defaultPackages = [];
|
||||
etc = {
|
||||
"nix/flake-channels/nixpkgs".source = inputs.nixpkgs;
|
||||
"nix/flake-channels/home-manager".source = inputs.nixpkgs;
|
||||
};
|
||||
};
|
||||
nix = {
|
||||
registry = mapAttrs (_: v: {flake = v;}) inputs;
|
||||
nixPath = mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
|
||||
optimise = {
|
||||
automatic = true;
|
||||
dates = [ "18:00" ];
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "Sun *-*-* 17:00";
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
settings = {
|
||||
flake-registry = "etc/nix/registry.json";
|
||||
allowed-users = [ "root" "@wheel" ];
|
||||
trusted-users = [ "root" "@wheel" ];
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
builders-use-substitutes = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,10 +13,6 @@ in
|
|||
programs.nh = {
|
||||
enable = true;
|
||||
package = pkgs.nh;
|
||||
clean = {
|
||||
enable = true;
|
||||
extraArgs = "--keep-since 30d";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ in
|
|||
};
|
||||
overlays = [
|
||||
(final: prev: {
|
||||
waybar = inputs.nixpkgs-wayland.packages.${prev.system}.waybar;
|
||||
zjstatus = inputs.zjstatus.packages.${prev.system}.default;
|
||||
})
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue