change directory structure

This commit is contained in:
2025-10-29 01:28:17 +09:00
parent 18f1ef1e20
commit 3dc7ef3d9d
35 changed files with 390 additions and 266 deletions
+7
View File
@@ -0,0 +1,7 @@
{ ... }:
{
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
}
+17
View File
@@ -0,0 +1,17 @@
{ ... }:
{
imports = [
./boot.nix
./environment.nix
./fonts.nix
./greetd.nix
./hardware.nix
./i18n.nix
./network.nix
./packages.nix
./services.nix
./system.nix
./user.nix
./xserver.nix
];
}
+7
View File
@@ -0,0 +1,7 @@
{ ... }:
{
environment.sessionVariables = {
ELECTRON_OZONE_PLATFORM_HINT = "wayland";
QT_QPA_PLATFORM = "wayland;xcb";
};
}
@@ -1,17 +1,15 @@
{ pkgs, ... }:
{
fonts = {
packages = (with pkgs;
[
packages = with pkgs; [
noto-fonts
noto-fonts-cjk-sans
noto-fonts-emoji
terminus_font
cantarell-fonts
font-awesome
]
);
];
fontDir.enable = true;
fontconfig = {
defaultFonts = {
@@ -27,4 +25,4 @@
};
};
};
}
}
+12
View File
@@ -0,0 +1,12 @@
{ pkgs, username, ... }: {
services.greetd = {
enable = true;
vt = 3;
settings = {
default_session = {
user = "greeter";
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland";
};
};
};
}
+16
View File
@@ -0,0 +1,16 @@
{ pkgs, ... }:
{
hardware = {
sane = {
enable = true;
extraBackends = [ pkgs.sane-airscan ];
disabledDefaultBackends = [ "escl" ];
};
graphics.enable = true;
enableRedistributableFirmware = true;
keyboard.qmk.enable = true;
bluetooth.enable = true;
bluetooth.powerOnBoot = true;
};
local.hardware-clock.enable = false;
}
+32
View File
@@ -0,0 +1,32 @@
{ ... }:
{
i18n.inputMethod = {
enable = true;
type = "fcitx5";
fcitx5 = {
addons = with pkgs; [
fcitx5-mozc
fcitx5-gtk
fcitx5-configtool
];
settings.inputMethod = {
GroupOrder = {
"0" = "Default";
};
"Groups/0" = {
Name = "Default";
"Default Layout" = "jp";
DefaultIM = "mozc";
};
"Groups/0/Items/0" = {
Name = "ja";
Layout = "";
};
"Groups/0/Items/1" = {
Name = "mozc";
Layout = "";
};
}
};
};
}
+7
View File
@@ -0,0 +1,7 @@
{ host, ... }:
{
networking = {
hostName = "${host}";
networkmanager.enable = true;
};
}
+37
View File
@@ -0,0 +1,37 @@
{ pkgs, inputs, ... }:
{
programs = {
hyprland = {
enable = true;
withUWSM = false;
};
dconf.enable = true;
seahorse.enable = true;
fuse.userAllowOther = true;
adb.enable = true;
hyprlock.enable = true;
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
zsh = {
enable = true;
}
};
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
greetd.tuigreet # The Login Manager (Sometimes Referred To As Display Manager)
htop # Simple Terminal Based System Monitor
unrar # Tool For Handling .rar Files
unzip # Tool For Handling .zip Files
uwsm # Universal Wayland Session Manager (optional must be enabled)
wget # Tool For Fetching Files With Links
curl # Tool For Fetching Files With Links
alacritty # A GPU Accelerated Terminal Emulator
fuzzel # A Simple And Lightweight Application Launcher
msedit # A Simple Text Editor Inspired By Windows Notepad
git # Version Control System
];
}
+27
View File
@@ -0,0 +1,27 @@
{ ... }: {
services = {
openssh = {
enable = false; # Enable SSH
settings = {
PermitRootLogin = "no"; # Prevent root from SSH login
PasswordAuthentication = false;
KbdInteractiveAuthentication = true;
};
ports = [ 22 ];
};
blueman.enable = true; # Bluetooth Support
tumbler.enable = true; # Image/video preview
gnome.gnome-keyring.enable = true;
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
};
}
+33
View File
@@ -0,0 +1,33 @@
{ ... }:
{
nix = {
settings = {
experimental-features = [ "nix-command" "flakes" ];
substituters = [ "https://vicinae.cachix.org" ];
trusted-public-keys = [ "vicinae.cachix.org-1:1kDrfienkGHPYbkpNj1mWTr7Fm1+zcenzgTizIcI3oc=" ];
};
};
# Localization settings
time.timeZone = "Asia/Tokyo";
i18n.defaultLocale = "ja_JP.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "ja_JP.UTF-8";
LC_IDENTIFICATION = "ja_JP.UTF-8";
LC_MEASUREMENT = "ja_JP.UTF-8";
LC_MONETARY = "ja_JP.UTF-8";
LC_NAME = "ja_JP.UTF-8";
LC_NUMERIC = "ja_JP.UTF-8";
LC_PAPER = "ja_JP.UTF-8";
LC_TELEPHONE = "ja_JP.UTF-8";
LC_TIME = "ja_JP.UTF-8";
};
environment.variables = {
NIXOS_OZONE_WL = "1";
};
console.keyMap = "jp106";
system.stateVersion = "25.05";
}
+37
View File
@@ -0,0 +1,37 @@
{ pkgs, inputs, username, host, profile, ...}:
{
imports = [ inputs.home-manager.nixosModules.home-manager ];
home-manager = {
enable = true;
useUserPackages = true;
useGlobalPkgs = false;
backupFileExtension = "backup";
extraSpecialArgs = { inherit inputs username host profile; };
users.moons = {
imports = [ ./../home ];
home = {
username = "moons";
homeDirectory = "/home/moons";
stateVersion = "25.05";
};
};
};
users.mutableUsers = true;
users.users.moons = {
isNormalUser = true;
description = "moons-14";
extraGroups = [
"adbusers"
"docker" #access to docker as non-root
"libvirtd" #Virt manager/QEMU access
"lp"
"networkmanager"
"scanner"
"wheel" #subdo access
"vboxusers" #Virtual Box
];
shell = pkgs.zsh;
ignoreShellProgramCheck = true;
};
nix.settings.allowed-users = [ "moons" ];
}
+13
View File
@@ -0,0 +1,13 @@
{ ... }:
{
services = {
xserver = {
enable = true;
xkb = {
layout = "jp";
variant = "";
options = "ctrl:nocaps";
};
};
};
}
+6
View File
@@ -0,0 +1,6 @@
{ ... }:
{
imports = [
./intel-drivers.nix
];
}
+21
View File
@@ -0,0 +1,21 @@
{ lib, pkgs, config, ... }:
with lib; let
cfg = config.drivers.intel;
in
{
options.drivers.intel = {
enable = mkEnableOption "Enable Intel Graphics Drivers";
};
config = mkIf cfg.enable {
# OpenGL
hardware.graphics = {
extraPackages = with pkgs; [
intel-media-driver
vaapiIntel
vaapiVdpau
libvdpau-va-gl
];
};
};
}
-16
View File
@@ -1,16 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
htop
git
];
programs.zsh.enable = true;
programs.git = {
enable = true;
userName = "moons-14";
userEmail = "moons@moons14.com";
extraConfig = { init.defaultBranch = "main"; };
};
}
-37
View File
@@ -1,37 +0,0 @@
{ pkgs, ... }:
{
programs.vscode = {
enable = true;
extensions = with pkgs.vscode-extensions; [
esbenp.prettier-vscode
];
userSettings = {
"editor.formatOnSave" = true;
};
};
# input method config
home.file.".config/fcitx5/config" = {
recursive = true;
source = ./fcitx5/config;
};
i18n.inputMethod.fcitx5.settings.inputMethod = {
GroupOrder = {
"0" = "Default";
};
"Groups/0" = {
Name = "Default";
"Default Layout" = "jp";
DefaultIM = "mozc";
};
"Groups/0/Items/0" = {
Name = "ja";
Layout = "";
};
"Groups/0/Items/1" = {
Name = "mozc";
Layout = "";
};
};
}
-19
View File
@@ -1,19 +0,0 @@
{ pkgs, ... }:
{
services.vicinae = {
enable = true;
autoStart = true;
settings = {
faviconService = "twenty";
font.size = 11;
popToRootOnClose = false;
rootSearch.searchFiles = false;
theme.name = "vicinae-dark";
window = {
csd = true;
opacity = 0.95;
rounding = 10;
};
};
};
}
+7
View File
@@ -0,0 +1,7 @@
{ ... }:
{
imports = [
./git.nix
./fcitx5
];
}
+7
View File
@@ -0,0 +1,7 @@
{ ... }:
{
home.file."~/.config/fcitx5/config" = {
recursive = true;
source = ./config;
};
}
+29
View File
@@ -0,0 +1,29 @@
{ host, ... }:
{
programs.git = {
enable = true;
userName = "moons-14";
userEmail = "moons@moons14.com";
extraConfig = {
push.default = "simple";
credential.helper = "cache --timeout=7200";
init.defaultBranch = "main";
log.decorate = "full"; # Show branch/tag info in git log
log.date = "iso"; # ISO 8601 date format
# Conflict resolution style for readable diffs
merge.conflictStyle = "diff3";
};
# Optional: FOSS-friendly Git aliases
aliases = {
br = "branch --sort=-committerdate";
co = "checkout";
df = "diff";
com = "commit -a";
gs = "stash";
gp = "pull";
lg = "log --graph --pretty=format:'%Cred%h%Creset - %C(yellow)%d%Creset %s %C(green)(%cr)%C(bold blue) <%an>%Creset' --abbrev-commit";
st = "status";
};
};
}
+14
View File
@@ -0,0 +1,14 @@
{ pkgs, ... }: {
nixpkgs.config.allowUnfree = true;
programs.vscode = {
enable = true;
profiles = {
default = {
extensions = with pkgs.vscode-extensions; [
esbenp.prettier-vscode
];
};
};
};
}
-28
View File
@@ -1,28 +0,0 @@
{ pkgs, lib, ... }:
{
nix.settings.experimental-features = [ "nix-command" "flakes" ];
time.timeZone = "Asia/Tokyo";
i18n.defaultLocale = "ja_JP.UTF-8";
services.xserver.xkb.layout = "jp";
services.xserver.xkb.variant = "";
services.xserver.xkb.options = "ctrl:nocaps";
console.keyMap = "jp106";
# common user
users.users.moons = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "docker" ];
shell = pkgs.zsh;
};
programs.zsh.enable = true;
services.openssh.enable = true;
# basic network setting
networking.networkmanager.enable = true;
nix.settings = {
extra-substituters = [ "https://vicinae.cachix.org" ];
extra-trusted-public-keys = [ "vicinae.cachix.org-1:1kDrfienkGHPYbkpNj1mWTr7Fm1+zcenzgTizIcI3oc=" ];
};
}
-8
View File
@@ -1,8 +0,0 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
git
htop
unzip wget curl
];
}
-65
View File
@@ -1,65 +0,0 @@
{ pkgs, lib, ... }:
{
nixpkgs.config = {
allowUnfreePredicate = pkg: lib.elem (lib.getName pkg) [
"google-chrome"
"vscode"
"1password"
"1password-gui"
"1password-cli"
];
};
services.xserver.enable = true;
programs.hyperland.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
jack.enable = true;
};
services.greetd ={
enable = true;
settings = {
default_session = {
command = "tuigreet --time --remember --cmd 'uwsm start -- niri'";
user = "greeter";
};
};
};
environment.systemPackages = with pkgs; [
greetd.tuigreet
alacritty
fuzzel
swaybg
xwayland-satellite
google-chrome
vscode
_1password-gui _1password
kitty
];
environment.sessionVariables = {
ELECTRON_OZONE_PLATFORM_HINT = "wayland";
QT_QPA_PLATFORM = "wayland;xcb";
};
i18n.inputMethod = {
enable = true;
type = "fcitx5";
fcitx5 = {
addons = with pkgs; [
fcitx5-mozc
fcitx5-gtk
fcitx5-configtool
];
};
};
programs._1password.enable = true;
programs._1password-gui.enable = true;
}
-5
View File
@@ -1,5 +0,0 @@
{ inputs, ... }:
{
imports = [ inputs.impermanence.nixosModules.impermanence ];
}
-7
View File
@@ -1,7 +0,0 @@
{ inputs, ... }:
{
imports = [ inputs.sops-nix.nixosModules.sops ];
# sops.age.sshKeyPaths = [];
# sops.defaultSopsFile = ../secrest/secrets.yaml;
}