init: firstCommit

This commit is contained in:
2026-03-01 01:39:57 +09:00
commit 36c0a5a114
47 changed files with 1553 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
{ pkgs, ... }:
{
boot = {
supportedFilesystems = [ "ext4" "btrfs" "xfs" "vfat" "ntfs" ];
};
}
+13
View File
@@ -0,0 +1,13 @@
{
imports = [
./nix.nix
./boot.nix
./locale.nix
./network.nix
./fonts.nix
./sound.nix
./uwsm.nix
./greeter.nix
];
}
+18
View File
@@ -0,0 +1,18 @@
{ pkgs, ... }:
{
fonts = {
packages = with pkgs; [
noto-fonts
noto-fonts-cjk-sans
noto-fonts-color-emoji
ibm-plex
];
fontconfig = {
defaultFonts = {
serif = [ "Noto Serif" ];
sansSerif = [ "Noto Sans" ];
monospace = [ "IBM Plex Mono" ];
};
};
};
}
+77
View File
@@ -0,0 +1,77 @@
{ config, lib, pkgs, ... }:
let
rosePineHyprcursor = pkgs.callPackage ../../home-manager/hyprland/rose-pine-hyprcursor.nix { };
monitorConf = lib.concatMapStrings (m: "monitor = ${m}\n") config.cornflake.greeter.monitors;
hyprGreetConf = pkgs.writeText "hyprland-greetd.conf" ''
${monitorConf}
env = HYPRCURSOR_THEME,rose-pine-hyprcursor
env = HYPRCURSOR_SIZE,24
env = XCURSOR_SIZE,24
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
general {
border_size = 0
}
animations {
enabled = false
}
misc {
force_default_wallpaper = false
disable_hyprland_logo = true
disable_splash_rendering = true
}
exec-once = ${config.programs.regreet.package or pkgs.regreet}/bin/regreet; hyprctl dispatch exit
'';
in
{
options.cornflake.greeter.monitors = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
description = "greetd Hyprland monitor ";
};
config = {
services.greetd.enable = true;
services.greetd.settings.default_session = {
command = "${pkgs.hyprland}/bin/start-hyprland -- -c ${hyprGreetConf}";
user = "greeter";
};
environment.systemPackages = [
rosePineHyprcursor
];
programs.regreet = {
# greetd を Hyprland で動かす
enable = true;
theme.name = "Adwaita-dark";
iconTheme.name = "Papirus-Dark";
cursorTheme.name = "Bibata-Modern-Ice";
settings = {
appearance = {
greeting_msg = "Welcome back!";
};
widget = {
clock = {
format = "%H:%M";
resolution = "100ms";
timezone = "Asia/Tokyo";
label_width = 150;
};
};
GTK = {
application_prefer_dark_theme = true;
};
background = {
path = "/usr/share/wallpaper/arknights-image-01.png";
};
};
};
};
}
+5
View File
@@ -0,0 +1,5 @@
{
time.timeZone = "Asia/Tokyo";
i18n.defaultLocale = "en_US.UTF-8";
time.hardwareClockInLocalTime = true;
}
+13
View File
@@ -0,0 +1,13 @@
{ config, hostname, ... }:
{
networking = {
hostName = hostname;
networkmanager.enable = true;
firewall = {
enable = true;
};
};
# nixpkgs issue#180175
systemd.services.NetworkManager-wait-online.enable = false;
}
+17
View File
@@ -0,0 +1,17 @@
{
nix = {
settings = {
experimental-features = [
"nix-command"
"flakes"
];
};
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
};
nixpkgs.config.allowUnfree = true;
}
+17
View File
@@ -0,0 +1,17 @@
{
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
extraConfig.pipewire."92-low-latency" = {
context.properties = {
default.clock.rate = 48000;
default.clock.quantum = 128;
default.clock.min-quantum = 32;
default.clock.max-quantum = 1024;
};
};
};
}
+13
View File
@@ -0,0 +1,13 @@
{ pkgs, lib, ... }:
{
programs.uwsm = {
enable = true;
waylandCompositors = {
hyprland = {
prettyName = "Hyprland";
comment = "Hyprland compositor managed by UWSM";
binPath = "${pkgs.hyprland}/bin/start-hyprland";
};
};
};
}
+11
View File
@@ -0,0 +1,11 @@
{
imports = [
./theme-switcher.nix
];
home.activation = {
makedir = ''
mkdir -p ~/.config/cornflake
'';
};
}
+29
View File
@@ -0,0 +1,29 @@
{ pkgs, ... }:
let
apply-theme-script = pkgs.writeScript "apply-theme" ''
curr=$(cat ~/.config/cornflake/current-theme)
if [ "$curr" = "prefer-light" ]; then
dconf write /org/gnome/desktop/interface/color-scheme "'prefer-light'"
else
dconf write /org/gnome/desktop/interface/color-scheme "'prefer-dark'"
fi
'';
desktopEntry = {
name = "Toggle theme";
exec = ''${pkgs.writeScript "theme" ''
curr=$(cat ~/.config/cornflake/current-theme)
if [ "$curr" = "prefer-light" ]; then
echo 'prefer-dark' > ~/.config/cornflake/current-theme
else
echo 'prefer-light' > ~/.config/cornflake/current-theme
fi
${apply-theme-script}
''}'';
};
in
{
xdg.desktopEntries = {
theme-switcher = desktopEntry;
};
}