Initial commit
Some checks failed
CI / check (push) Has been cancelled
CI / ida (push) Has been cancelled
CI / cpt (push) Has been cancelled
CI / build-nixos (ena) (push) Has been cancelled
CI / build-nixos (hako) (push) Has been cancelled
CI / build-nixos (kazusa) (push) Has been cancelled
CI / build-nixos (mizuki) (push) Has been cancelled

This commit is contained in:
암냥 2026-07-03 16:53:49 +09:00
commit 70284509f3
No known key found for this signature in database
144 changed files with 7061 additions and 0 deletions

View file

@ -0,0 +1,19 @@
{ pkgs, inputs, ... }:
let
system = pkgs.stdenv.hostPlatform.system;
pkgsPacketTracer8 = import inputs.nixpkgs-2511 {
inherit system;
config = {
allowUnfree = true;
permittedInsecurePackages = [
"ciscoPacketTracer8-8.2.2"
];
};
};
in
{
home.packages = [
pkgs.cisco-packet-tracer_9
pkgsPacketTracer8.ciscoPacketTracer8
];
}

View file

@ -0,0 +1,34 @@
{
pkgs,
inputs,
lib,
options,
...
}:
{
imports = [ inputs.nixcord.homeModules.nixcord ];
# imports = [ inputs.nixcord.nixosModules.nixcord ];
programs.nixcord = {
enable = true;
discord = {
branch = "canary";
vencord.enable = false;
equicord.enable = true;
krisp.enable = true;
};
vesktop.enable = true;
# equibop.enable = true;
config.plugins = import ./plugin.nix;
};
home.packages = with pkgs; [
discord-gamesdk
];
# home.activation.krispPatch = lib.mkIf (!pkgs.stdenv.isDarwin) (
# lib.hm.dag.entryAfter [ "writeBoundary" ] ''
# ${krisp-patcher}/bin/krisp-patcher $(${pkgs.findutils}/bin/find $HOME/.config/discord/ -name "discord_krisp.node" -path "*/modules/discord_krisp/*") || true
# ''
# );
}

View file

@ -0,0 +1,23 @@
# darwin-configuration.nix
{ inputs, pkgs, ... }:
{
imports = [ inputs.nixcord.darwinModules.nixcord ];
programs.nixcord = {
enable = true;
user = "imnyang"; # Needed for system-level config
discord = {
package = pkgs.discord-canary;
vencord.enable = false;
equicord.enable = true;
# krisp.enable = true;
};
equibop.enable = true;
config.plugins = import ./plugin.nix;
};
environment.systemPackages = [ pkgs.discord-gamesdk ];
}

View file

@ -0,0 +1,69 @@
{
alwaysAnimate.enable = true;
alwaysExpandRoles.enable = true;
blurNsfw.enable = true;
callTimer = {
enable = true;
format = "human";
};
crashHandler.enable = true;
disableCallIdle.enable = true;
dontRoundMyTimestamps.enable = true;
fixCodeblockGap.enable = true;
fixImagesQuality.enable = true;
fixYoutubeEmbeds.enable = true;
forceOwnerCrown.enable = true;
messageLogger = {
enable = true;
};
clientSideBlock = {
enable = true;
hideBlockedUsers = true;
hideBlockedMessages = true;
hideEmptyRoles = false;
hideVc = true;
blockedReplyDisplay = "hideReply";
};
serverListIndicators.enable = true;
showTimeoutDuration.enable = true;
# silentTyping.enable = true;
textReplace.enable = true;
textReplace.regexRules = [
{
find = "https?:\\/\\/(www\\.)?instagram\\.com\\/[^\\/]+\\/(p|reel)\\/([A-Za-z0-9-_]+)\\/?";
replace = "https://g.ddinstagram.com/$2/$3";
}
{
find = "https:\\/\\/x\\.com\\/([^\\/]+\\/status\\/[0-9]+)";
replace = "https://fixupx.com/$1";
}
{
find = "https:\\/\\/twitter\\.com\\/([^\\/]+\\/status\\/[0-9]+)";
replace = "https://fixupx.com/$1";
}
{
find = "https:\\/\\/(www\\.|old\\.)?reddit\\.com\\/(r\\/[a-zA-Z0-9_]+\\/comments\\/[a-zA-Z0-9_]+\\/[^\\s]*)";
replace = "https://vxreddit.com/$2";
}
{
find = "https:\\/\\/(www\\.)?pixiv\\.net\\/(.*)";
replace = "https://phixiv.net/$2";
}
{
find = "https:\\/\\/(?:www\\.|m\\.)?twitch\\.tv\\/twitch\\/clip\\/(.*)";
replace = "https://clips.fxtwitch.tv/$1";
}
{
find = "https:\\/\\/(?:www\\.)?youtube\\.com\\/(?:watch\\?v=|shorts\\/)([a-zA-Z0-9_-]+)";
replace = "https://youtu.be/$1";
}
];
translate.enable = true;
typingIndicator.enable = true;
typingTweaks.enable = true;
userVoiceShow.enable = true;
validReply.enable = true;
validUser.enable = true;
volumeBooster.enable = true;
spotifyCrack.enable = true;
}

29
modules/home/firefox.nix Normal file
View file

@ -0,0 +1,29 @@
{ pkgs, config, ... }:
{
programs.firefox = {
enable = true;
configPath = ".mozilla/firefox";
package = pkgs.firefox-devedition;
policies = {
Preferences = {
"widget.use-xdg-desktop-portal.file-picker" = {
Value = 1;
Status = "default";
};
"middlemouse.paste" = {
Value = false;
Status = "default";
};
};
ExtensionSettings = {
"figma-windows-ua-spoofer@imnyang.local" = {
installation_mode = "force_installed";
install_url = "https://git.mizuki.guru/imnyang/thisiswindowsfigma/releases/download/v1.0.0/d168a70cb6a24fe4a478-1.0.0.xpi";
};
};
};
};
home.file.".waterfox/native-messaging-hosts".source =
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.mozilla/native-messaging-hosts";
}

49
modules/home/ghostty.nix Normal file
View file

@ -0,0 +1,49 @@
{pkgs, ...}: {
programs.ghostty = {
enable = true;
package = if pkgs.stdenv.isDarwin then pkgs.ghostty-bin else pkgs.ghostty;
enableFishIntegration = true;
settings = {
background = "#fcf8f9";
foreground = "#191017";
cursor-color = "#301d23";
selection-background = "#f4ecee";
selection-foreground = "#191017";
palette = [
"0=#5c5f77"
"1=#d20f39"
"2=#40a02b"
"3=#df8e1d"
"4=#1e66f5"
"5=#ea76cb"
"6=#179299"
"7=#acb0be"
"8=#6c6f85"
"9=#d20f39"
"10=#40a02b"
"11=#df8e1d"
"12=#1e66f5"
"13=#ea76cb"
"14=#179299"
"15=#bcc0cc"
];
window-colorspace = "srgb";
window-theme = "ghostty";
window-subtitle = "working-directory";
font-family = "JetBrainsMono NFM Regular";
font-family-bold = "JetBrainsMono NFM Bold";
font-family-italic = "JetBrainsMono NFM Bold Italic";
font-family-bold-italic = "JetBrainsMono NFM Italic";
window-width = 100;
window-height = 30;
auto-update = "off";
};
};
}

26
modules/home/git.nix Normal file
View file

@ -0,0 +1,26 @@
{ pkgs, ... }:
{
programs.git = {
enable = true;
settings = {
user = {
name = "imnyang";
email = "imnyang@pm.me";
signingkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOHP3Z+AYrRh9f8TYyqChKfeyNm3lOe0F75AwRHTTaxD";
};
gpg = {
format = "ssh";
"ssh".program = "${pkgs._1password-gui}/bin/op-ssh-sign";
};
commit.gpgsign = true;
init.defaultBranch = "main";
pull.rebase = false;
includeIf."gitdir:~/workspaces/git/adofai.gg/" = {
path = builtins.toFile "gitconfig-adofaigg" ''
[user]
email = imnyang@adofai.gg
'';
};
};
};
}

23
modules/home/neovim.nix Normal file
View file

@ -0,0 +1,23 @@
{
pkgs,
config,
lib,
...
}:
{
programs.neovim = {
enable = true;
withRuby = true;
withPython3 = true;
viAlias = true;
vimAlias = true;
};
home.activation.nvimConfigRepo = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
target="${config.xdg.configHome}/nvim"
rm -rf "$target"
${pkgs.git}/bin/git clone https://git.pari.ng/imnyang/nvim-config.git "$target"
'';
}

View file

@ -0,0 +1,28 @@
{ pkgs, ... }:
let
obs-wrapped = (pkgs.obs-studio.override {
cudaSupport = true;
}).overrideAttrs (old: {
nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ pkgs.makeWrapper ];
postInstall = (old.postInstall or "") + ''
wrapProgram $out/bin/obs \
--set QT_QPA_PLATFORM xcb \
--set GS_DEVICE_TYPE opengl
'';
});
in
{
programs.obs-studio = {
enable = true;
package = obs-wrapped;
plugins = with pkgs.obs-studio-plugins; [
obs-backgroundremoval
obs-pipewire-audio-capture
obs-vaapi
obs-gstreamer
obs-vkcapture
obs-move-transition
];
};
}

103
modules/home/packages.nix Normal file
View file

@ -0,0 +1,103 @@
{
pkgs,
inputs,
}:
with pkgs;
[
nodejs
pnpm
yarn
python3
rustc
cargo
go
bun
virtualbox
bibata-cursors
xcursor-mizuki
pjsk-cursor.n25.ani
zed-editor
jetbrains.datagrip
# jetbrains.rider
jetbrains.idea
# inputs.vscode-nigo.packages.${stdenv.hostPlatform.system}.vscode-nigo
neovide
ripgrep
fd
bat
fzf
jq
fastfetch
eza
btop
gh
lazygit
thunderbird
mpv
prismlauncher
lunar-client
pkgs."libreoffice-fresh"
gimp
inkscape
gnome-disk-utility
antigravity
postman
burpsuite
krita
scrcpy
upscayl
signal-desktop
witr
vial
wireguard-go
corretto21
ghostty
remmina
codex
# waterfox-bin
unityhub
ida-free
(ghidra.withExtensions (
p: with p; [
ret-sync
ghidraninja-ghidra-scripts
]
))
inputs.notion-desktop.packages.${stdenv.hostPlatform.system}.default
inputs.notion-calendar-electron.packages.${stdenv.hostPlatform.system}.default
inputs.codex-app.packages.${stdenv.buildPlatform.system}.codex-desktop
proton-vpn
moonlight-qt
code-cursor
microsoft-edge
galaxy-buds-client
# another
]

38
modules/home/plasma.nix Normal file
View file

@ -0,0 +1,38 @@
{ inputs, ... }:
let
assets = "${inputs.self}/assets";
genericFonts = {
family = "Pretendard JP";
pointSize = 10;
};
in
{
home.file.".local/share/color-schemes/Kawa.colors".source = "${assets}/Kawa.colors";
home.file.".config/autostart/1password.desktop".source = "${assets}/1password.desktop";
programs.plasma = {
enable = true;
workspace = {
clickItemTo = "select";
enableMiddleClickPaste = false;
colorScheme = "Kawa";
};
fonts = {
fixedWidth = {
family = "NanumGothicCoding";
pointSize = 10;
};
general = genericFonts;
toolbar = genericFonts;
menu = genericFonts;
windowTitle = genericFonts;
small = genericFonts // {
pointSize = 8;
};
};
session.sessionRestore.restoreOpenApplicationsOnLogin = "startWithEmptySession";
};
}

View file

@ -0,0 +1,17 @@
{ config, pkgs, inputs, ... }:
{
programs.spicetify = let
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system};
in{
enable = true;
# Theme: catppuccin with mocha palette
theme = spicePkgs.themes.catppuccin;
colorScheme = "latte";
enabledExtensions = with spicePkgs.extensions; [
adblockify
hidePodcasts
];
};
}

38
modules/home/vicinae.nix Normal file
View file

@ -0,0 +1,38 @@
{ pkgs, inputs, ... }: {
programs.vicinae = {
enable = true; # default: false
systemd = {
enable = true; # default: false
autoStart = true; # default: false
environment = {
USE_LAYER_SHELL = 1;
};
};
settings = {
close_on_focus_loss = true;
consider_preedit = true;
launcher_window = {
opacity = 0.98;
};
font = {
normal = {
size = 10;
family = "SUIT";
};
};
};
extensions = with inputs.vicinae-extensions.packages.${pkgs.stdenv.hostPlatform.system}; [
bluetooth
nix
power-profile
kde-system-settings
npm
port-killer
pulseaudio
case-converter
zed-recents
vscode-recents
timer
];
};
}

51
modules/home/vscode.nix Normal file
View file

@ -0,0 +1,51 @@
{ pkgs, ... }:
let
styleScript = pkgs.writeText "inject.js" ''
;(() => {
const el = document.createElement('style')
el.innerText = `
.part.editor>.content .editor-group-container .editor-group-watermark .letterpress {
background-image: url("https://file.mizuki.guru/.tesiotjosaeifjpoeawsjfnpoiawsejfopieawjfopjakweopfjawieof/IN_VISUAL_STUDIO_CODE.webp") !important;
opacity: 1.0;
overflow: visible;
filter: none;
aspect-ratio: 16 / 9 !important;
max-height: fit-content !important;
}
`
document.head.appendChild(el)
})();
'';
in
{
programs.vscode = {
enable = true;
mutableExtensionsDir = true;
userSettings = {
"extensions.autoUpdate" = true;
};
package = (pkgs.vscode.override { isInsiders = true; }).overrideAttrs (oldAttrs: {
version = "latest";
src = builtins.fetchTarball {
url = "https://code.visualstudio.com/sha/download?build=insider&os=linux-x64";
sha256 = "1vzf897inlzxfwmnaykkj3gqg18wbh9zhv7lnh3if6agixv0v91b";
};
buildInputs = oldAttrs.buildInputs ++ [
pkgs.krb5
pkgs.libsoup_3
pkgs.webkitgtk_4_1
pkgs.libxtst
pkgs.libjpeg8
pkgs.pipewire
pkgs.libei
];
postFixup = ''
cat ${styleScript} >> $out/lib/vscode/resources/app/out/vs/code/electron-browser/workbench/workbench.js
''
+ (oldAttrs.postFixup or "");
});
};
}

75
modules/home/zed.nix Normal file
View file

@ -0,0 +1,75 @@
{ pkgs, ... }:
{
programs.zed-editor = {
enable = true;
package = if pkgs.stdenv.isDarwin then null else pkgs.zed-editor;
extensions = [
"nix"
"toml"
"rust"
"git-firefly"
];
userSettings = {
"autosave" = "on_focus_change";
"ui_font_size" = 16;
"buffer_font_size" = 15;
"theme" = {
"mode" = "light";
"light" = "One Light";
"dark" = "One Dark";
};
"theme_overrides" = {
"One Light" = {
"background" = "#FDF7F9";
"status_bar.background" = "#FDF7F9";
"title_bar.background" = "#FDF7F9";
"elevated_surface.background" = "#FDF7F9";
# 핵심: sidebar/project panel 쪽은 투명 제거
"surface.background" = "#FDF7F9";
"panel.background" = "#FDF7F9";
"editor.gutter.background" = "#FDF7F9";
"tab_bar.background" = "#FDF7F9";
"toolbar.background" = "#FDF7F9";
"terminal.background" = "#FDF7F9";
# editor만 투명 유지하고 싶으면 이건 남겨도 됨
"editor.background" = "#00000000";
"editor.line_number" = "#A38F96";
"border" = "#F2E6EA";
"hint.background" = "#F7EBEE";
"editor.active_line_number" = "#191013";
"tab.active_background" = "#8165701a";
"element.selected" = "#8165701a";
"tab.inactive_background" = "#FDF7F9";
"editor.indent_guide" = "#F2E6EA";
"editor.indent_guide_active" = "#E6D5DB";
"panel.indent_guide" = "#F2E6EA";
"panel.indent_guide_hover" = "#E6D5DB";
"panel.indent_guide_active" = "#D9C4CC";
"panel.focused_border" = "#00000000";
"element.active" = "#81657029";
"border.variant" = "#00000000";
"scrollbar.track.border" = "#00000000";
"editor.active_line.background" = "#8165700f";
"scrollbar.track.background" = "#00000000";
"scrollbar.thumb.background" = "#A38F9680";
"ghost_element.background" = "#00000000";
"element.hover" = "#8165700f";
"ghost_element.hover" = "#8165700f";
"ghost_element.active" = "#8165701a";
"ghost_element.selected" = "#81657024";
"drop_target.background" = "#8165701a";
"editor.highlighted_line.background" = "#8165701a";
};
};
};
};
}

View file

@ -0,0 +1,9 @@
{ ... }:
{
imports = [
./nix.nix
./user.nix
./i18n.nix
./packages.nix
];
}

View file

@ -0,0 +1,62 @@
{ pkgs, ... }:
{
# 시간대 설정
time.timeZone = "Asia/Seoul";
# 로케일 설정 (영어 기본 + 한국 로케일)
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
};
i18n.inputMethod = {
enable = true;
type = "fcitx5";
fcitx5 = {
settings.globalOptions = {
"Hotkey/TriggerKeys" = {
"0" = "Hangul";
};
"Hotkey/ActivateKeys" = {
"0" = "Hangul_Hanja";
};
"Hotkey/DeactivateKeys" = {
"0" = "Hangul_Romaja";
};
"Hotkey/EnumerateGroupForwardKeys" = {
"0" = "Super+space";
};
"Hotkey/PrevPage" = {
"0" = "Up";
};
"Hotkey/NextPage" = {
"0" = "Down";
};
"Hotkey" = {
"AltTriggerKeys" = "";
"EnumerateForwardKeys" = "";
"EnumerateBackwardKeys" = "";
};
};
};
fcitx5.addons = with pkgs; [
fcitx5-hangul
];
};
environment.sessionVariables = {
GTK_IM_MODULE = "fcitx";
QT_IM_MODULE = "fcitx";
XMODIFIERS = "@im=fcitx";
};
}

View file

@ -0,0 +1,46 @@
{ overlays, ... }:
{
# Apply overlays
nixpkgs.overlays = overlays;
nixpkgs.config.allowUnfree = true;
# Nix 설정
nix.settings = {
sandbox = false;
experimental-features = [
"nix-command"
"flakes"
];
auto-optimise-store = true;
};
nix.settings.trusted-users = [
"root"
"imnyang"
];
nix.settings = {
substituters = [
"https://cache.mizuki.guru/public"
"https://cache.mizuki.guru/imnyang"
"https://nix.mizuki.my/public"
"https://vicinae.cachix.org"
];
trusted-public-keys = [
"public:IgipakDD/clr0XbuaIejPYMT5UkTVGKVTxtWXcsbiAg="
"imnyang:x8Oex2DLzZUBxS/3VvkVptT3DiugjsCbQ23VjsxMT5c="
"public:SnHrtrxbCPcZujbJdgsKFeObTfRKQl5KhrI+LljtZUE="
"vicinae.cachix.org-1:1kDrfienkGHPYbkpNj1mWTr7Fm1+zcenzgTizIcI3oc="
];
};
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
nixpkgs.config.permittedInsecurePackages = [
"openssl-1.1.1w"
];
}

View file

@ -0,0 +1,31 @@
{ pkgs, ... }:
{
programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [
glib
stdenv.cc.cc
zlib
];
# Unfree 패키지 허용
nixpkgs.config.allowUnfree = true;
programs.direnv.enable = true;
# 기본 시스템 패키지
environment.systemPackages = with pkgs; [
eza
btop
vim
wget
curl
git
tree
unzip
zip
file
attic-client
direnv
devenv
];
}

View file

@ -0,0 +1,34 @@
{ pkgs, inputs, ... }:
{
users.users.imnyang = {
isNormalUser = true;
linger = true;
description = "@imnya.ng";
extraGroups = [
"imnyang"
"networkmanager"
"wheel"
"docker"
"libvirtd"
"podman"
];
shell = pkgs.fish;
};
security.sudo.extraRules = [
{
users = [ "imnyang" ];
commands = [
{
command = "ALL";
options = [ "NOPASSWD" ];
}
];
}
];
system.activationScripts.createIcon = "ln -sfn ${inputs.self}/assets/avatar.webp /var/lib/AccountsService/icons/imnyang";
programs.fish.enable = true;
}

View file

@ -0,0 +1,16 @@
{ ... }:
{
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
General = {
Experimental = true;
FastConnectable = true;
};
Policy = {
AutoEnable = true;
};
};
};
}

View file

@ -0,0 +1,32 @@
{ pkgs, ... }:
{
# boot.plymouth.enable = true;
boot.loader = {
grub = {
enable = true;
efiSupport = true;
useOSProber = true;
efiInstallAsRemovable = true;
device = "nodev";
enableCryptodisk = true;
# extraInstallCommands = ''
# mkdir -p /boot/EFI/BOOT
# cp -f /boot/EFI/NixOS-boot/grubx64.efi /boot/EFI/BOOT/BOOTX64.EFI
# '';
default = "saved";
extraConfig = ''
GRUB_SAVEDEFAULT=true
'';
};
# efi.canTouchEfiVariables = true;
efi.efiSysMountPoint = "/boot";
};
boot.initrd.systemd.enable = true;
boot.initrd.systemd.emergencyAccess = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
}

View file

@ -0,0 +1,18 @@
{ pkgs, ... }:
{
catppuccin.enable = true;
catppuccin.flavor = "latte";
catppuccin.autoEnable = false;
catppuccin = {
cache.enable = true;
cursors.enable = false;
fcitx5.enable = true;
forgejo.enable = false;
limine.enable = false;
gitea.enable = false;
grub.enable = true;
plymouth.enable = false;
sddm.enable = false;
tty.enable = true;
};
}

View file

@ -0,0 +1,26 @@
{ pkgs, ... }:
{
virtualisation.libvirtd = {
enable = true;
dbus.enable = true;
};
users.groups.libvirtd.members = [ "imnyang" ];
services.cockpit = {
enable = true;
plugins = with pkgs; [
cockpit-machines
cockpit-files
cockpit-podman
];
openFirewall = true;
allowed-origins = [ "*" ];
};
environment.systemPackages = with pkgs; [
libvirt-dbus
virt-manager
virt-viewer
];
}

View file

@ -0,0 +1,4 @@
{ ... }:
{
virtualisation.docker.enable = true;
}

View file

@ -0,0 +1,19 @@
{ pkgs, ... }: {
systemd.user.services.figma-agent = {
description = "Figma Agent for local font access";
wantedBy = [ "default.target" ];
serviceConfig = {
ExecStart = "${pkgs.figma-agent}/bin/figma-agent";
Restart = "on-failure";
};
};
systemd.user.sockets.figma-agent = {
description = "Figma Agent socket";
wantedBy = [ "default.target" ];
socketConfig = {
ListenStream = "127.0.0.1:44950";
NoDelay = true;
};
};
}

View file

@ -0,0 +1,70 @@
{ pkgs, ... }:
let
wantedSans = pkgs.stdenvNoCC.mkDerivation {
pname = "wanted-sans";
version = "1.0.3";
src = pkgs.fetchzip {
url = "https://github.com/wanteddev/wanted-sans/releases/download/v1.0.3/WantedSans-1.0.3.zip";
hash = "sha256-uksJ7Qmwv0kQw/mXyI179XaFHGMI8fuumcitD/XpA/w=";
stripRoot = false;
};
installPhase = ''
runHook preInstall
install -Dm644 variable/*.ttf -t $out/share/fonts/truetype
install -Dm644 otf/*.otf -t $out/share/fonts/opentype
runHook postInstall
'';
};
suit-font = pkgs.stdenvNoCC.mkDerivation {
pname = "suit-font";
version = "v2.0.5";
# name을 다르게 지정하여 unpack 시 충돌을 방지합니다.
srcs = [
(pkgs.fetchzip {
name = "suit-variable";
url = "https://github.com/sun-typeface/SUIT/releases/download/v2.0.5/SUIT-Variable-ttf.zip";
hash = "sha256-oRZGxT/v6jBa5cOsYWG8qHfdPIRBqPAyt6hjfBTD1jo=";
stripRoot = false;
})
(pkgs.fetchzip {
name = "suit-static";
url = "https://github.com/sun-typeface/SUIT/releases/download/v2.0.5/SUIT-otf.zip";
hash = "sha256-YDyBKU5P+tlMsK4L2dEn6ibOo6UxDK2B507rm/zy2FA=";
stripRoot = false;
})
];
sourceRoot = ".";
installPhase = ''
runHook preInstall
mkdir -p $out/share/fonts/truetype $out/share/fonts/opentype
# 각 소스가 suit-variable, suit-static 디렉토리에 풀려 있으므로 전체 탐색하여 복사
find . -name "__MACOSX" -prune -o -name "*.ttf" -exec cp {} $out/share/fonts/truetype/ \;
find . -name "__MACOSX" -prune -o -name "*.otf" -exec cp {} $out/share/fonts/opentype/ \;
runHook postInstall
'';
};
in
{
fonts = {
packages = with pkgs; [
liberation_ttf
fira-code
fira-code-symbols
dejavu_fonts
pretendard
pretendard-jp
nanum-gothic-coding
nerd-fonts.jetbrains-mono
wantedSans
suit-font
];
};
}

View file

@ -0,0 +1,7 @@
{ ... }:
{
hardware.graphics = {
enable = true;
enable32Bit = true;
};
}

View file

@ -0,0 +1,74 @@
{ pkgs, config, ... }:
{
environment.systemPackages = with pkgs; [
grub2_efi
];
system.activationScripts = {
# This, has to be the LAST GRUB script to run.
# The reason is that a standalone GRUB image takes with it
# the configuration too, apparently.
# "90-generate-standalone-grub" = {
# text = ''
# if [ "$NIXOS_ACTION" = "switch" ] || [ "$NIXOS_ACTION" = "boot" ]; then
# echo "Generating standalone GRUB EFI entry..."
# ESP="${config.boot.loader.efi.efiSysMountPoint}"
# OUT_DIR="$ESP/EFI/NixOS-boot"
# FALLBACK_DIR="$ESP/EFI/BOOT"
# mkdir -p "$OUT_DIR" "$FALLBACK_DIR"
# OUT="$OUT_DIR/grubx64.efi"
# FALLBACK="$FALLBACK_DIR/BOOTX64.EFI"
# # GPT-5 told me to add all those modules, idk.
# ${pkgs.grub2_efi}/bin/grub-mkstandalone -O x86_64-efi -o "$OUT" \
# "boot/grub/grub.cfg=${pkgs.writeText "grub-standalone-template.cfg" ''
# search --file --no-floppy --set=esp /EFI/NixOS-boot/grubx64.efi
# set prefix=($esp)/grub
# if [ -f ($esp)/grub/grubenv ]; then
# load_env ($esp)/grub/grubenv
# fi
# if [ -f ($esp)/grub/grub.cfg ]; then
# configfile ($esp)/grub/grub.cfg
# else
# echo "Error: ($esp)/grub/grub.cfg not found."
# sleep 5
# fi
# ''}" \
# --modules="part_gpt part_msdos fat normal search search_fs_uuid search_label configfile linux gzio efi_gop efi_uga all_video gfxterm gfxmenu png jpeg tga font" \
# --disable-shim-lock
# # It's so stupid but otherwise it won't boot:
# # https://wejn.org/2021/09/fixing-grub-verification-requested-nobody-cares/
# ${pkgs.gnused}/bin/sed -i 's/SecureBoot/SecureB00t/' "$OUT"
# cp -f "$OUT" "$FALLBACK"
# fi
# '';
# };
"99-sign-all" = {
text = ''
if [ "$NIXOS_ACTION" = "switch" ] || [ "$NIXOS_ACTION" = "boot" ]; then
echo "Signing all EFI binaries with sbctl..."
# 1. 파일이 존재하는지 먼저 확인하고,
# 2. 이미 등록되어 있다면 sign-all로 한 번에 처리하거나,
# 3. 개별 파일에 대해 에러가 나도 스크립트가 중단되지 않도록 || true를 붙입니다.
# 주요 바이너리들을 DB에 등록 (이미 등록되어 있으면 sbctl이 알아서 스킵하거나 에러를 낼 텐데, 그걸 무시합니다)
${pkgs.sbctl}/bin/sbctl sign -s /boot/EFI/NixOS-boot/grubx64.efi || true
${pkgs.sbctl}/bin/sbctl sign -s /boot/EFI/BOOT/BOOTX64.EFI || true
# Windows 부트로더 등 다른 파일들도 필요한 경우 추가
if [ -f /boot/EFI/Microsoft/Boot/bootmgfw.efi ]; then
${pkgs.sbctl}/bin/sbctl sign -s /boot/EFI/Microsoft/Boot/bootmgfw.efi || true
fi
# 4. 마지막으로 전체 서명 수행
${pkgs.sbctl}/bin/sbctl sign-all || echo "Some files failed to sign, but continuing..."
fi
'';
};
};
}

View file

@ -0,0 +1,77 @@
{
pkgs,
inputs,
...
}:
let
nr = import ./packages/nr.nix { inherit pkgs; };
nrr = import ./packages/nrr.nix { inherit pkgs; };
in
{
programs._1password.enable = true;
programs._1password-gui = {
enable = true;
polkitPolicyOwners = [ "imnyang" ];
};
environment.etc = {
"1password/custom_allowed_browsers" = {
text = ''
microsoft-edge
firefox-devedition
'';
mode = "0755";
};
};
# 시스템 전역 패키지 (데스크탑/개발용)
environment.systemPackages = with pkgs; [
nr
nrr
# 네트워크 도구
networkmanager
networkmanager-ssh
# 개발 도구
gcc
gnumake
nil
nixd
cockpit
libvirt
virt-manager
mono
msbuild
docker
docker-buildx
docker-compose
docker-client
uv
python3
openssl
pkg-config
mtr
glibc
gtk3
pango
librsvg
penelope
ntfs3g
_1password-cli
_1password-gui
inputs.muvel.packages.${pkgs.stdenv.hostPlatform.system}.muvel
sbctl
];
}

View file

@ -0,0 +1,44 @@
{ pkgs }:
pkgs.writeShellApplication {
name = "dr";
runtimeInputs = with pkgs; [
nix-output-monitor
coreutils
nix
attic-client
];
text = ''
set -e
TARGET_NAME="''${1:-$(hostname -s)}"
FLAKE_PATH="."
UPLOAD_CACHE=true
while [[ $# -gt 0 ]]; do
case "$1" in
--no-upload) UPLOAD_CACHE=false ;;
*) TARGET_NAME="$1" ;;
esac
shift
done
echo "macOS ... ($TARGET_NAME)"
BUILD_PATH=$(nom build "$FLAKE_PATH#darwinConfigurations.$TARGET_NAME.system" --print-out-paths --no-link)
echo " ..."
sudo nix-env --profile /nix/var/nix/profiles/system --set "$BUILD_PATH"
sudo "$BUILD_PATH/activate"
if [ "$UPLOAD_CACHE" = true ]; then
echo " ..."
attic push imnyang "$BUILD_PATH" || echo " "
fi
echo "nix-darwin !"
'';
}

View file

@ -0,0 +1,50 @@
{ pkgs }:
pkgs.writeShellApplication {
name = "nr";
runtimeInputs = with pkgs; [
nix-output-monitor
openssh
coreutils
nix
attic-client
];
text = ''
set -e
TARGET_NAME="''${1:-$(hostname)}"
FLAKE_PATH="."
UPLOAD_CACHE=true
while [[ $# -gt 0 ]]; do
case "$1" in
--no-upload) UPLOAD_CACHE=false ;;
*) TARGET_NAME="$1" ;;
esac
shift
done
EXTRA_BUILD_FLAGS=()
if [ "$TARGET_NAME" = "kazusa" ]; then
EXTRA_BUILD_FLAGS+=("--max-substituter-jobs" "2")
fi
echo " ... $TARGET_NAME"
# shellcheck disable=SC2086
BUILD_PATH=$(nom build "$FLAKE_PATH#nixosConfigurations.$TARGET_NAME.config.system.build.toplevel" \
"''${EXTRA_BUILD_FLAGS[@]}" \
--print-out-paths --no-link)
echo " ..."
sudo nix-env --profile /nix/var/nix/profiles/system --set "$BUILD_PATH"
sudo "$BUILD_PATH/bin/switch-to-configuration" switch
if [ "$UPLOAD_CACHE" = true ]; then
echo " ..."
attic push imnyang "$BUILD_PATH" || echo " "
fi
echo " !"
'';
}

View file

@ -0,0 +1,59 @@
{ pkgs }:
pkgs.writeShellApplication {
name = "nrr";
runtimeInputs = with pkgs; [
nix-output-monitor
openssh
coreutils
];
text = ''
set -e
TARGET_NAME=""
if [ $# -gt 0 ]; then
TARGET_NAME="$1"
fi
FLAKE_PATH="."
declare -A HOST_MAP
HOST_MAP["hikari"]="10.11.8.100"
HOST_MAP["hako"]="10.11.8.102"
HOST_MAP["kazusa"]="82.21.82.30"
HOST_MAP["natsu"]="natsu.icn.mizuki.guru"
HOST_MAP["mafuyu"]="10.20.30.101"
HOST_MAP["mizuki"]="10.20.30.103"
HOST_MAP["ena"]="10.20.30.104"
if [ -z "$TARGET_NAME" ]; then
echo "nrr - NixOS "
echo ": nrr <hostname>"
exit 1
fi
if [[ -v "HOST_MAP[$TARGET_NAME]" ]]; then
TARGET_IP=''${HOST_MAP[$TARGET_NAME]}
echo " : $TARGET_NAME -> $TARGET_IP"
else
echo " ."
exit 1
fi
echo " ..."
BUILD_PATH=$(nom build "$FLAKE_PATH#nixosConfigurations.$TARGET_NAME.config.system.build.toplevel" --print-out-paths --no-link --eval-cache --accept-flake-config)
echo " ... ($BUILD_PATH -> $TARGET_IP)"
nix copy --to "ssh://imnyang@$TARGET_IP" "$BUILD_PATH"
echo " ..."
# shellcheck disable=SC2029
ssh "imnyang@$TARGET_IP" "sudo nix-env --profile /nix/var/nix/profiles/system --set \"$BUILD_PATH\" && sudo $BUILD_PATH/bin/switch-to-configuration switch"
echo " ..."
attic push imnyang "$BUILD_PATH" || echo " "
echo " !"
'';
}

View file

@ -0,0 +1,22 @@
{ pkgs, ... }:
{
services.xserver = {
enable = true;
xkb = {
layout = "us";
variant = "";
};
};
services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;
xdg.portal = {
enable = true;
extraPortals = with pkgs; [ kdePackages.xdg-desktop-portal-kde ];
config.common.default = "kde";
};
system.nixos.variant_id = "mizuki";
system.nixos.variantName = "Mizuki";
}

View file

@ -0,0 +1,29 @@
{
config,
lib,
pkgs,
...
}:
{
virtualisation = {
containers.enable = true;
podman = {
enable = true;
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true; # Required for containers under podman-compose to be able to talk to each other.
};
};
environment.systemPackages = with pkgs; [
podman-compose
podman
podman-tui
];
users.users.imnyang = {
extraGroups = [
"podman"
];
};
}

View file

@ -0,0 +1,37 @@
{ pkgs, config, ... }:
{
environment.systemPackages = with pkgs; [
sbctl
];
# The 99 here ensures that this runs AFTER the grub activation scripts.
system.activationScripts."99-sign-all" = {
text = ''
if [ "$NIXOS_ACTION" = "switch" ] || [ "$NIXOS_ACTION" = "boot" ]; then
# `sbctl verify --json` returns "null" if there is an error,
# empty string if there are no files in the database.
if [ "$(${pkgs.sbctl}/bin/sbctl verify --json)" != "null" ]; then
echo "Signing all EFI binaries with sbctl..."
ESP="${config.boot.loader.efi.efiSysMountPoint}"
readarray -t files < <(find "$ESP" -type f -iname "*.efi" -o -iname "*bzImage")
# Removing all the files first.
for file in "${"$"}{files[@]}"; do
echo "Removing from sbctl: $file"
# The `|| true` part is because otherwise some files might not exist and
# the script would return an error.
${pkgs.sbctl}/bin/sbctl remove-file "$file" >/dev/null 2>&1 || true
done
for file in "${"$"}{files[@]}"; do
echo "Signing with sbctl: $file"
${pkgs.sbctl}/bin/sbctl sign -s "$file" >/dev/null 2>&1
done
fi
fi
'';
};
}

View file

@ -0,0 +1,12 @@
{ ... }:
{
# 사운드
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
}

View file

@ -0,0 +1,9 @@
{ ... }:
{
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "prohibit-password";
};
};
}

View file

@ -0,0 +1,23 @@
{ pkgs, ... }:
{
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
gamescopeSession.enable = true;
package = pkgs.millennium-steam;
extraCompatPackages = with pkgs; [
proton-ge-bin
];
};
hardware.steam-hardware.enable = true;
environment.systemPackages = with pkgs; [
steam-run
sgdboop
mangohud
protontricks
];
}

View file

@ -0,0 +1,16 @@
{
...
}:
{
services.sunshine = {
enable = true;
autoStart = true;
capSysAdmin = true; # only needed for Wayland -- omit this when using with Xorg
openFirewall = true;
};
users.users.imnyang = {
extraGroups = [ "uinput" ];
};
hardware.uinput.enable = true;
}

View file

@ -0,0 +1,23 @@
{ pkgs, ... }:
{
virtualisation.docker = {
enable = true;
};
virtualisation.libvirtd = {
enable = true;
qemu = {
package = pkgs.qemu_kvm;
runAsRoot = true;
swtpm.enable = true;
};
};
# Override the virt-secret-init-encryption service to use correct shell path
systemd.services.virt-secret-init-encryption = {
serviceConfig.ExecStart = [
""
"${pkgs.bash}/bin/bash -c 'umask 0077 && (${pkgs.coreutils}/bin/dd if=/dev/urandom status=none bs=32 count=1 | ${pkgs.systemd}/bin/systemd-creds encrypt --name=secrets-encryption-key - /var/lib/libvirt/secrets/secrets-encryption-key)'"
];
};
}