Merge branch 'main' of ssh://mizuki.guru/imnyang/nix-flakes

This commit is contained in:
암냥 2026-07-16 08:54:59 +09:00
commit 19dd5454d6
19 changed files with 568 additions and 155 deletions

View file

@ -3,7 +3,11 @@
overlays,
}:
let
inherit (inputs) nixpkgs;
inherit (inputs)
nixpkgs
home-manager
plasma-manager
;
in
nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
@ -13,6 +17,18 @@ nixpkgs.lib.nixosSystem {
"${inputs.self}/modules/mizukios/base"
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.backupFileExtension = "backup";
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.users.nixos = import ./home.nix;
home-manager.sharedModules = [
plasma-manager.homeModules.plasma-manager
];
}
({ pkgs, ... }: {
environment.systemPackages = with pkgs; [
fastfetch
@ -27,6 +43,10 @@ nixpkgs.lib.nixosSystem {
security.sudo.enable = false;
users.users.nixos = {
shell = pkgs.fish;
};
environment.etc.flake.source = "${inputs.self}";
})
];

18
hosts/installer/home.nix Normal file
View file

@ -0,0 +1,18 @@
{ inputs, ... }:
{
xdg.enable = true;
home.stateVersion = "25.11";
home.username = "nixos";
home.homeDirectory = "/home/nixos";
imports = [
"${inputs.self}/modules/home/devtool/ghostty.nix"
"${inputs.self}/modules/home/devtool/zed.nix"
"${inputs.self}/modules/home/fastfetch.nix"
"${inputs.self}/modules/home/devtool/neovim.nix"
./plasma.nix
./shell.nix
];
}

View file

@ -0,0 +1,13 @@
{ inputs, lib, ... }:
let
assets = "${inputs.self}/assets";
in
{
imports = [ "${inputs.self}/modules/home/plasma.nix" ];
programs.plasma.workspace.cursor = {
theme = "pjsk-cursor-n25-mizuki-ani";
};
programs.plasma.workspace.colorScheme = lib.mkForce "Kawa";
}

54
hosts/installer/shell.nix Normal file
View file

@ -0,0 +1,54 @@
{
programs.fish = {
enable = true;
shellAliases = {
".." = "cd ..";
"..." = "cd ../..";
ls = "eza --icons=always";
ll = "eza --icons=always -l";
la = "eza --icons=always -a";
lla = "eza --icons=always -la";
cat = "bat --plain";
clean = "sudo nix-collect-garbage -d";
};
interactiveShellInit = ''
set -g fish_greeting ""
set -g fish_color_command blue
set -g fish_color_error red
set -g fish_color_param cyan
'';
};
programs.starship = {
enable = true;
settings = {
format = "🦔 $directory:$character";
add_newline = false;
# username = {
# style_user = "purple";
# style_root = "purple";
# format = "[$user]($style)";
# show_always = true;
# };
# hostname = {
# style = "green";
# format = "[$hostname]($style)";
# ssh_only = false;
# };
directory = {
style = "fg:#fbb6c4";
format = "[$path]($style)";
truncation_length = 3;
};
character = {
success_symbol = " 💕";
error_symbol = " ";
};
};
};
}

View file

@ -1,6 +1,7 @@
{
config,
pkgs,
lib,
inputs,
...
}:
@ -26,16 +27,14 @@
"${inputs.self}/modules/mizukios/features/remote/ssh.nix"
];
catppuccin.flavor = lib.mkForce "mocha";
networking = {
hostName = "ena";
networkmanager.enable = true;
firewall.enable = false;
};
networking.networkmanager.plugins = [
pkgs.networkmanager-ssh
];
services.printing.enable = true;
services.power-profiles-daemon.enable = true;
services.asusd.enable = true;

View file

@ -1,4 +1,4 @@
{ inputs, ... }:
{ inputs, lib, ... }:
let
assets = "${inputs.self}/assets";
in
@ -9,6 +9,8 @@ in
theme = "pjsk-cursor-n25-ena-ani";
};
programs.plasma.workspace.colorScheme = lib.mkForce "KawaDark";
programs.plasma.workspace.wallpaper = "${assets}/wallpaper/wallpaper1.jpg";
programs.plasma.kscreenlocker.appearance.wallpaper = "${assets}/wallpaper/wallpaper3.png";

View file

@ -20,17 +20,6 @@
xdg.configFile."fontconfig/conf.d/10-hm-fonts.conf".force = true;
programs.vicinae = {
enable = true;
systemd = {
enable = true;
autoStart = true;
environment = {
USE_LAYER_SHELL = 1;
};
};
};
imports = [
"${inputs.self}/modules/home/devtool/git.nix"
"${inputs.self}/modules/home/devtool/neovim.nix"
@ -40,6 +29,9 @@
"${inputs.self}/modules/home/discord/linux.nix"
"${inputs.self}/modules/home/devtool/vscode.nix"
"${inputs.self}/modules/home/devtool/ciscopackettracer.nix"
"${inputs.self}/modules/home/ssh.nix"
"${inputs.self}/modules/home/vicinae.nix"
./config/shell.nix
./config/plasma.nix
];

View file

@ -23,6 +23,19 @@
services.caddy = {
enable = true;
virtualHosts."broadcast.epc.mizuki.guru".extraConfig = ''
@authApi path /api/auth /api/auth/*
handle @authApi {
reverse_proxy 127.0.0.1:1234
}
@backendApi path /api /api/*
handle @backendApi {
reverse_proxy 127.0.0.1:1108
}
reverse_proxy 127.0.0.1:1234
'';
virtualHosts."http://broadcast.epc.mizuki.arpa".extraConfig = ''
@preflight method OPTIONS
@ -36,6 +49,19 @@
reverse_proxy 127.0.0.1:6769
'';
virtualHosts."https://broadcast.epc.mizuki.guru:30427".extraConfig = ''
@preflight method OPTIONS
header {
Access-Control-Allow-Origin *
Access-Control-Allow-Methods "GET, POST, PUT, PATCH, DELETE, OPTIONS"
Access-Control-Allow-Headers *
}
respond @preflight "" 204
reverse_proxy 127.0.0.1:6769
'';
virtualHosts."http://broadcast.epc.mizuki.arpa:8027".extraConfig = ''
@preflight method OPTIONS

View file

@ -18,30 +18,6 @@
VISUAL = "nvim";
};
programs.ssh = {
enable = true;
matchBlocks = {
"*" = {
forwardAgent = false;
identityAgent = "~/.1password/agent.sock";
setEnv = {
TERM = "xterm-256color";
};
extraOptions = {
ServerAliveInterval = "0";
ServerAliveCountMax = "3";
Compression = "no";
AddKeysToAgent = "no";
HashKnownHosts = "no";
UserKnownHostsFile = "~/.ssh/known_hosts";
ControlMaster = "no";
ControlPath = "~/.ssh/master-%r@%n:%p";
ControlPersist = "no";
};
};
};
};
xdg.configFile."fontconfig/conf.d/10-hm-fonts.conf".force = true;
imports = [
@ -58,5 +34,6 @@
"${inputs.self}/modules/home/obs-studio.nix"
"${inputs.self}/modules/home/devtool/vscode.nix"
"${inputs.self}/modules/home/devtool/ciscopackettracer.nix"
"${inputs.self}/modules/home/ssh.nix"
];
}