started modifing configuration structure

This commit is contained in:
2024-12-22 16:56:40 +09:00
parent 1030d3e37f
commit 87d132cb4f
37 changed files with 272 additions and 32 deletions

18
system/default.nix Normal file
View File

@@ -0,0 +1,18 @@
{ ... }: {
imports = [
./audio
./bluetooth
./inputMethods
./kernel
./locale
./network
./nix
./opengl
./time
./users
./services
./wm
./env.nix
./utils.nix
];
}

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ ... }:
{
environment.variables = {
EDITOR = "vim";

View File

@@ -1,4 +0,0 @@
{ ... }:
{
services.timesyncd.enable = true;
}

14
system/locale/default.nix Normal file
View File

@@ -0,0 +1,14 @@
{ systemSettings, ... }: {
i18n.defaultLocale = systemSettings.locale;
i18n.extraLocaleSettings = {
LC_ADDRESS = systemSettings.locale;
LC_IDENTIFICATION = systemSettings.locale;
LC_MEASUREMENT = systemSettings.locale;
LC_MONETARY = systemSettings.locale;
LC_NAME = systemSettings.locale;
LC_NUMERIC = systemSettings.locale;
LC_PAPER = systemSettings.locale;
LC_TELEPHONE = systemSettings.locale;
LC_TIME = systemSettings.locale;
};
}

View File

@@ -0,0 +1,9 @@
{ systemSettings, ... }:
{
networking = {
hostName = systemSettings.hostname;
networkmanager.enable = true;
firewall.enable = true;
};
systemd.network.wait-online.enable = false;
}

33
system/nix/default.nix Normal file
View File

@@ -0,0 +1,33 @@
{ ... }: {
nix = {
gc.automatic = false;
settings = {
auto-optimise-store = true;
builders-use-substitutes = true;
allowed-users = ["@wheel"];
trusted-users = ["@wheel"];
commit-lockfile-summary = "Update flake.lock";
accept-flake-config = true;
keep-derivations = true;
keep-outputs = true;
warn-dirty = false;
sandbox = true;
max-jobs = "auto";
log-lines = 30;
experimental-features = [ "nix-command" "flakes" ];
substituters = [
"https://cache.nixos.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
];
};
};
nixpkgs = {
config = {
allowUnfree = true;
};
};
}

View File

@@ -0,0 +1,12 @@
{ ... }: {
imports = [
./cups
./flatpak
./libvirtd
./podman
./polkit
./ssh
./steam
./tailscale
];
}

View File

@@ -1,5 +0,0 @@
{ ... }:
{
networking.networkmanager.enable = true;
systemd.network.wait-online.enable = false;
}

6
system/time/default.nix Normal file
View File

@@ -0,0 +1,6 @@
{ systemSettings, ... }:
{
time.timeZone = systemSettings.timezone;
services.timesyncd.enable = true;
}

21
system/users/default.nix Normal file
View File

@@ -0,0 +1,21 @@
{ pkgs, config, userSettings, ... }: {
users.users.${userSettings.username} = {
isNormalUser = true;
description = userSettings.name;
extraGroups = [
"networkmanager"
"wheel"
"docker"
"podman"
"input"
"flatpak"
"dialout"
"video"
"audio"
"libvirtd"
];
uid = 1000;
};
users.defaultUserShell = pkgs.bash;
}

11
system/wm/default.nix Normal file
View File

@@ -0,0 +1,11 @@
{ ... }: {
imports = [
./dbus
./fonts
./gnome-keyring
./plasma
./sddm
./sway
./xmonad
];
}

View File

@@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }:
{
imports = [
./dbus.nix
../dbus
];
services.desktopManager.plasma6.enable = true;

View File

@@ -1,12 +1,12 @@
{ config, pkgs, lib, ... }:
{
imports = [
./fonts.nix
./dbus.nix
./gnome-keyring.nix
./xmonad.nix
./sway.nix
./plasma.nix
../fonts
../dbus
../gnome-keyring
../xmonad
../sway
../plasma
];
environment.systemPackages = with pkgs; [

View File

@@ -1,8 +1,8 @@
{ pkgs, lib, config, ... }:
{
imports = [
./gnome-keyring.nix
./dbus.nix
../gnome-keyring
../dbus
];
programs.sway = {