20205-10-04

This commit is contained in:
Keisuke Hirata 2025-10-04 02:58:56 +09:00
parent 92bd37ab71
commit 9ac4e308f6
19 changed files with 253 additions and 55 deletions

View File

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1738448366,
"narHash": "sha256-4ATtQqBlgsGqkHTemta0ydY6f7JBRXz4Hf574NHQpkg=",
"lastModified": 1759261733,
"narHash": "sha256-G104PUPKBgJmcu4NWs0LUaPpSOTD4jiq4mamLWu3Oc0=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "18fa9f323d8adbb0b7b8b98a8488db308210ed93",
"rev": "5a21f4819ee1be645f46d6b255d49f4271ef6723",
"type": "github"
},
"original": {
@ -22,11 +22,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1738471961,
"narHash": "sha256-cgXDFrplNGs7bCVzXhRofjD8oJYqqXGcmUzXjHmip6Y=",
"lastModified": 1759261527,
"narHash": "sha256-wPd5oGvBBpUEzMF0kWnXge0WITNsITx/aGI9qLHgJ4g=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "537286c3c59b40311e5418a180b38034661d2536",
"rev": "e087756cf4abbe1a34f3544c480fc1034d68742f",
"type": "github"
},
"original": {
@ -37,11 +37,27 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1738410390,
"narHash": "sha256-xvTo0Aw0+veek7hvEVLzErmJyQkEcRk6PSR4zsRQFEc=",
"lastModified": 1759036355,
"narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1727348695,
"narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "3a228057f5b619feb3186e986dbe76278d707b6e",
"rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784",
"type": "github"
},
"original": {
@ -55,7 +71,26 @@
"inputs": {
"home-manager": "home-manager",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"zen-browser": "zen-browser"
}
},
"zen-browser": {
"inputs": {
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1754251351,
"narHash": "sha256-k9ZxAmwu7DfLGW6Z6910XsSyi5V9LEIdaYxe86PeEKE=",
"owner": "xaragon",
"repo": "zen-browser-flake",
"rev": "0db16223c3dc3e9337051e440c305a85b4bc3437",
"type": "github"
},
"original": {
"owner": "xaragon",
"repo": "zen-browser-flake",
"type": "github"
}
}
},

View File

@ -2,16 +2,18 @@
description = "my config flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nixos-hardware.url = "github:NixOS/nixos-hardware";
zen-browser.url = "github:xaragon/zen-browser-flake";
};
outputs = inputs: {
nixosConfigurations = (import ./hosts inputs).nixos;
homeConfigurations = (import ./hosts inputs).home-manager;
};
}
}

9
home-manager/blender.nix Normal file
View File

@ -0,0 +1,9 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
(pkgs.blender-hip.overrideAttrs (oldAttrs: {
# Workaround for this: https://github.com/NixOS/nixpkgs/pull/385913
cmakeFlags = oldAttrs.cmakeFlags ++ [ "-DWITH_ASSERT_ABORT=OFF" ];
}))
];
}

View File

@ -0,0 +1,6 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
code-cursor
];
}

View File

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
wayland.windowManager.hyprland = {
enable = true;
systemd.enable = false;
@ -23,6 +24,8 @@
"dconf write /org/gnome/desktop/interface/monospace-font-name 'Noto Sans Mono Medium 11'"
];
ecosystem.no_update_news = true;
input = {
kb_layout = "us";
kb_variant = "";
@ -41,10 +44,10 @@
};
general = {
gaps_in = 8;
gaps_out = 10;
border_size = 4;
"col.active_border" = "rgba(6e848cee) rgba(ffffffee) 45deg";
gaps_in = 4;
gaps_out = 7;
border_size = 3;
"col.active_border" = "rgba(6e848cee) rgba(eeeeffee) 90deg";
"col.inactive_border" = "rgba(595959aa)";
layout = "dwindle";
allow_tearing = true;
@ -101,6 +104,7 @@
"float,title:^(Picture.*)$"
"pin,title:^(Picture.*)$"
"immediate, class:^(Terraria)$"
"idleinhibit fullscreen, class:^(steam_app.*)$"
];
workspace = [
@ -184,9 +188,13 @@
plugins = [
];
};
home.packages = with pkgs; [
swww
eww
];
home.sessionVariables = {
HYPRCURSOR_THEME = "";
HYPRCURSOR_SIZE = "12";
HYPRCURSOR_THEME = "rose-pine-hyprcursor";
HYPRCURSOR_SIZE = "24";
XCURSOR_SIZE = "24";
GTK_BACKEND = "wayland";
QT_QPA_PLATFORM = "wayland;xcb";
@ -195,4 +203,25 @@
XDG_CURRENT_DESKTOP = "Hyprland";
XDG_SESSION_DESKTOP = "Hyprland";
};
services.fnott = {
enable = true;
settings = {
main = {
anchor = "bottom-right";
min-width = 400;
title-font = "Noto Sans Medium:size=12";
title-color = "ffffffff";
title-format = "<i>%a%A</i>";
summary-font = "Noto Sans Regular:size=16";
summary-color = "ffffffff";
summary-format = "%s\n";
body-font = "Noto Sans Regular:size=14";
body-color = "ffffffff";
body-format = "%b";
background = "1a1a1aee";
border-radius = 10;
};
};
};
}

11
home-manager/vscode.nix Normal file
View File

@ -0,0 +1,11 @@
{ pkgs, ... }:
{
programs.vscode = {
enable = true;
package = pkgs.vscode.fhs;
profiles.default = {
extensions = with pkgs.vscode-extensions; [
];
};
};
}

Binary file not shown.

View File

@ -2,8 +2,9 @@
wayland.windowManager.hyprland = {
settings = {
monitor = [
"DP-2, 2560x1440@144, 0x0, 1"
"DP-1, 1920x1080@120, -1920x180, 1"
"DP-1, 5120x2880@60, 0x0, 2"
"DP-2, 1920x1080@144, 2560x-240, 1, transform, 1"
"HDMI-A-1, 2560x1440@144, -1440x-240, 1, transform, 1"
];
};
};

View File

@ -43,7 +43,16 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.opengl = {
enable = true;
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [
mesa
libva
libvdpau-va-gl
vulkan-loader
vulkan-validation-layers
amdvlk # Optional: AMD's proprietary Vulkan driver
mesa.opencl # Enables Rusticl (OpenCL) support
];
};
}

View File

@ -1,17 +1,20 @@
{ conifg, pkgs, ... }:
{ pkgs, inputs, ... }:
{
home.stateVersion = "25.05";
imports = [
../../home-manager/hyprland.nix
./display.nix
../../home-manager/vscode.nix
../../home-manager/tofi.nix
../../home-manager/direnv.nix
../../home-manager/firefox.nix
../../home-manager/obs-studio.nix
../../home-manager/blender.nix
];
home.packages = with pkgs; [
vscode
vivaldi
google-chrome
discord
helvum
superfile
@ -21,13 +24,29 @@
scrcpy
tetrio-desktop
kicad
blender-hip
gimp
inkscape
obsidian
zed-editor
easyeffects
davinci-resolve
kdePackages.filelight
inputs.zen-browser.packages."${system}".default
(deno.overrideAttrs (oldAttrs: {
doCheck = false;
}))
nodejs_24
pnpm
godot
nixd
rust-analyzer
beeper
aseprite
zrythm
];
services.easyeffects = {
enable = true;
};
programs.git = {
enable = true;
userName = "Hare";

View File

@ -1,11 +1,13 @@
{
config,
pkgs,
username,
...
}:
let
config.boot.kernelPackages = pkgs.linuxPackages_latest;
in
{
system.stateVersion = "24.11";
system.stateVersion = "25.05";
imports = [
./hardware-configuration.nix
@ -21,9 +23,16 @@
../../programs/steam.nix
];
environment.systemPackages = with pkgs; [
deno
nodejs
pnpm
cargo
rustc
rustfmt
openssl
vulkan-tools
android-file-transfer
rocmPackages.rocm-runtime
rocmPackages.rocminfo
rocmPackages.clr
qemu
(pkgs.writeShellScriptBin "qemu-system-x86_64-uefi" ''
@ -31,15 +40,16 @@
-bios ${pkgs.OVMF.fd}/FV/OVMF.fd \
"$@"
'')
wineWowPackages.waylandFull
winetricks
bluez
bluez-tools
bluetuith
obexftp
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelModules = [ "v4l2loopback" ];
boot.extraModulePackages = [ pkgs.linuxPackages.v4l2loopback ];
environment.sessionVariables.NIXOS_OZONE_WL = "1";
users.users.${username} = {
extraGroups = [
@ -48,7 +58,9 @@
];
shell = pkgs.fish;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIfql/a6ZtxOPgBhFzOfgTO6HGcy0Se9mgMLmOa40vMF"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIW2Yrqwi4YjIrdI8mygX5pTHDPmrUgbmpZ4WxoTqORi keihi@Vostro-LapTop"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICi8Cciepfs1ikPdfyHjc9qJX5z2QLFF9jBszsyEvCMA nix-on-droid@localhost"
];
};
programs.adb.enable = true;
@ -56,12 +68,52 @@
services.openssh.enable = true;
services.udisks2.enable = true;
networking.firewall.allowedTCPPorts = [
8080
22
5173
8000
9001
11434
];
networking.firewall.allowedUDPPorts = [ ];
services.udev.extraRules = ''
ATTRS{idVendor}=="3151", ATTRS{idProduct}=="502d", MODE="0777"
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="input"
'';
hardware.bluetooth = {
enable = true;
package = pkgs.bluez;
powerOnBoot = true;
settings = {
General = {
ControllerMode = "dual";
Experimental = true;
KernelExperimental = true;
FastConnectable = true;
# セキュリティレベルを調整
Class = "0x000100";
# ペアリングタイムアウトを延長
PairableTimeout = 0;
};
Policy = {
AutoEnable = true;
};
};
};
boot.kernelPackages = config.boot.kernelPackages;
boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
boot.kernelModules = [
"v4l2loopback"
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.kernelModules = [ "amdgpu" ];
}

View File

@ -43,7 +43,6 @@ let
home = {
inherit username;
homeDirectory = "/home/${username}";
stateVersion = "24.11";
};
programs.home-manager.enable = true;
}

View File

@ -1,22 +1,34 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
"sr_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/e4eb343c-d88f-4d63-99aa-c2c41d8580db";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/e4eb343c-d88f-4d63-99aa-c2c41d8580db";
fsType = "ext4";
};
swapDevices = [ ];

View File

@ -1,5 +1,6 @@
{ conifg, pkgs, ... }:
{
home.stateVersion = "25.05";
imports = [
../../home-manager/direnv.nix
];

View File

@ -5,7 +5,7 @@
...
}:
{
system.stateVersion = "24.11";
system.stateVersion = "25.05";
imports = [
./hardware-configuration.nix

View File

@ -6,6 +6,8 @@
fcitx5.addons = with pkgs; [
fcitx5-mozc
fcitx5-gtk
fcitx5-rose-pine
];
fcitx5.waylandFrontend = true;
};
}

View File

@ -1,12 +1,15 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
tmux
zip
unzip
rar
ripgrep
btop-rocm
bat
wezterm
libsixel
nixfmt-rfc-style
];}
];
}

View File

@ -5,6 +5,6 @@
ffmpeg
];
boot.extraModprobeConfig = ''
options v4l2loopback devices=2 video_nr=0,1 card_label="Scrcpy Source","OBS VirtualCamera" exclusive_caps=1
options v4l2loopback devices=2 video_nr=0,1 card_label="Scrcpy Source,OBS VirtualCamera" exclusive_caps=1
'';
}

View File

@ -5,5 +5,13 @@
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;
};
};
};
}