Add files

This commit is contained in:
lightly-toasted 2025-08-02 22:51:40 +09:00
parent 23878851bd
commit 74000547ea
19 changed files with 764 additions and 0 deletions

9
README.md Normal file
View file

@ -0,0 +1,9 @@
# nix-config
my personal NixOS and home-manager configurations
## Deploy
```sh
sudo nixos-rebuild switch --flake .#nixos
```

262
flake.lock generated Normal file
View file

@ -0,0 +1,262 @@
{
"nodes": {
"flake-compat": {
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"revCount": 69,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.1.0/01948eb7-9cba-704f-bbf3-3fa956735b52/source.tar.gz?rev=ff81ac966bb2cae68946d5ed5fc4994f96d0ffec&revCount=69"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1749398372,
"narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1753121425,
"narHash": "sha256-TVcTNvOeWWk1DXljFxVRp+E0tzG1LhrVjOGGoMHuXio=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "644e0fc48951a860279da645ba77fe4a6e814c5e",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1753829416,
"narHash": "sha256-Shx91k6pLdX8wK6LchsHRXWAWODvy6fHAbUqOmye43A=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "ab14805267c132c5e9ac66129ca5361abd592a3a",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"ixx": {
"inputs": {
"flake-utils": [
"nixvim",
"nuschtosSearch",
"flake-utils"
],
"nixpkgs": [
"nixvim",
"nuschtosSearch",
"nixpkgs"
]
},
"locked": {
"lastModified": 1748294338,
"narHash": "sha256-FVO01jdmUNArzBS7NmaktLdGA5qA3lUMJ4B7a05Iynw=",
"owner": "NuschtOS",
"repo": "ixx",
"rev": "cc5f390f7caf265461d4aab37e98d2292ebbdb85",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"ref": "v0.0.8",
"repo": "ixx",
"type": "github"
}
},
"nixcord": {
"inputs": {
"flake-compat": "flake-compat",
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1754013219,
"narHash": "sha256-tnpAiv6gx9SNMZHOpZ+kfzOPQR0iyUybcwzNB91fNgI=",
"owner": "kaylorben",
"repo": "nixcord",
"rev": "8ed848c550d1c9c3f2591da173814e2303ed00d6",
"type": "github"
},
"original": {
"owner": "kaylorben",
"repo": "nixcord",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1753939845,
"narHash": "sha256-K2ViRJfdVGE8tpJejs8Qpvvejks1+A4GQej/lBk5y7I=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "94def634a20494ee057c76998843c015909d6311",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1748740939,
"narHash": "sha256-rQaysilft1aVMwF14xIdGS3sj1yHlI6oKQNBRTF40cc=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "656a64127e9d791a334452c6b6606d17539476e2",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixvim": {
"inputs": {
"flake-parts": "flake-parts_2",
"nixpkgs": [
"nixpkgs"
],
"nuschtosSearch": "nuschtosSearch",
"systems": "systems_2"
},
"locked": {
"lastModified": 1753805595,
"narHash": "sha256-5m0FqObrj/0/nfoaKlgpye4+SZzj1nMPnlxGxlIxKNg=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "fe0bcc92c8c593d5e2b45ffb0d1253c3aa55eb72",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixvim",
"type": "github"
}
},
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils",
"ixx": "ixx",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1753450833,
"narHash": "sha256-Pmpke0JtLRzgdlwDC5a+aiLVZ11JPUO5Bcqkj0nHE/k=",
"owner": "NuschtOS",
"repo": "search",
"rev": "40987cc1a24feba378438d691f87c52819f7bd75",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"repo": "search",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixcord": "nixcord",
"nixpkgs": "nixpkgs",
"nixvim": "nixvim"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

36
flake.nix Normal file
View file

@ -0,0 +1,36 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
nixcord = {
url = "github:kaylorben/nixcord";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, home-manager, ... } @ inputs:
{
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [
./hosts/nixos/configuration.nix
];
};
homeConfigurations."toast@nixos" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit inputs; };
modules = [
./home/toast/home.nix
];
};
packages.x86_64-linux.default = self.homeConfigurations."toast@nixos".activationPackage;
};
}

28
home/toast/home.nix Normal file
View file

@ -0,0 +1,28 @@
{ config, pkgs, inputs, ... }:
{
imports = [
inputs.nixvim.homeManagerModules.nixvim
inputs.nixcord.homeModules.nixcord
./programs/kitty.nix
./programs/git.nix
./programs/nixvim.nix
./programs/fonts.nix
./programs/hyprland.nix
./programs/tofi.nix
./programs/wlogout.nix
./programs/zsh.nix
./programs/firefox.nix
./programs/yazi.nix
./programs/nixcord.nix
];
home = {
username = "toast";
homeDirectory = "/home/toast";
stateVersion = "24.11";
};
nixpkgs.config.allowUnfree = true;
systemd.user.startServices = "sd-switch";
}

View file

@ -0,0 +1,3 @@
{
programs.firefox.enable = true;
}

View file

@ -0,0 +1,21 @@
{ pkgs, ... }:
{
fonts.fontconfig.enable = true;
home.packages = with pkgs; [
noto-fonts
noto-fonts-cjk-sans
noto-fonts-emoji
dejavu_fonts
fira-code
font-awesome
liberation_ttf
xorg.fontutil
xorg.fontbh100dpi
xorg.fontbh75dpi
xorg.mkfontscale
nerd-fonts.jetbrains-mono
];
}

View file

@ -0,0 +1,10 @@
{
programs.git = {
enable = true;
userName = "lightly-toasted";
userEmail = "tooast@duck.com";
extraConfig = {
init.defaultBranch = "main";
};
};
}

View file

@ -0,0 +1,172 @@
{ pkgs, ... }: {
home.packages = [
pkgs.playerctl
pkgs.hyprshot
pkgs.tofi
];
wayland.windowManager.hyprland = {
enable = true;
package = pkgs.hyprland;
systemd.enable = false;
settings = {
exec-once = [ "uwsm app -- firefox" ];
"$terminal" = "uwsm app -- kitty";
"$fileManager" = "uwsm app -- kitty yazi";
"$menu" = "uwsm app -- $(tofi-drun)";
"$mod" = "SUPER";
env = [
"XCURSOR_SIZE,24"
"HYPRCURSOR_SIZE,24"
"LIBVA_DRIVER_NAME,nvidia"
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
"INPUT_METHOD,fcitx"
"QT_QPA_PLATFORM,wayland"
];
bind = [
"$mod, Q, exec, $terminal"
"$mod, C, killactive"
"$mod, M, exit"
"$mod, E, exec, $fileManager"
"$mod, R, exec, $menu"
"$mod, Y, togglesplit"
"$mod, F, fullscreen"
"$mod, left, movefocus, l"
"$mod, right, movefocus, r"
"$mod, up, movefocus, u"
"$mod, down, movefocus, d"
"$mod, H, movefocus, l"
"$mod, J, movefocus, d"
"$mod, K, movefocus, u"
"$mod, L, movefocus, r"
"$mod, 1, workspace, 1"
"$mod, 2, workspace, 2"
"$mod, 3, workspace, 3"
"$mod, 4, workspace, 4"
"$mod, 5, workspace, 5"
"$mod, 6, workspace, 6"
"$mod, 7, workspace, 7"
"$mod, 8, workspace, 8"
"$mod, 9, workspace, 9"
"$mod, 0, workspace, 10"
"$mod SHIFT, 1, movetoworkspace, 1"
"$mod SHIFT, 2, movetoworkspace, 2"
"$mod SHIFT, 3, movetoworkspace, 3"
"$mod SHIFT, 4, movetoworkspace, 4"
"$mod SHIFT, 5, movetoworkspace, 5"
"$mod SHIFT, 6, movetoworkspace, 6"
"$mod SHIFT, 7, movetoworkspace, 7"
"$mod SHIFT, 8, movetoworkspace, 8"
"$mod SHIFT, 9, movetoworkspace, 9"
"$mod SHIFT, 0, movetoworkspace, 10"
"$mod, mouse_down, workspace, e+1"
"$mod, mouse_up, workspace, e-1"
"$mod SHIFT, S, exec, env HYPRSHOT_DIR=/data/Backup/Screenshots hyprshot -m region"
"$mod SHIFT, E, exec, wlogout"
];
bindel = [
",XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"
",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
];
bindl = [
", XF86AudioNext, exec, playerctl next"
", XF86AudioPause, exec, playerctl play-pause"
", XF86AudioPlay, exec, playerctl play-pause"
", XF86AudioPrev, exec, playerctl previous"
", XF86Tools, exec, playerctl play-pause"
];
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
general = {
gaps_in = 5;
gaps_out = 20;
border_size = 2;
"col.active_border" = "rgba(ffffffaa)";
"col.inactive_border" = "rgba(595959aa)";
resize_on_border = false;
allow_tearing = false;
layout = "dwindle";
};
decoration = {
rounding = 10;
rounding_power = 2;
active_opacity = 1.0;
inactive_opacity = 1.0;
shadow = {
enabled = true;
range = 4;
render_power = 3;
color = "rgba(1a1a1aee)";
};
};
animations = {
enabled = true;
first_launch_animation = false;
bezier = [
"easeOutQuint,0.23,1,0.32,1"
"easeInOutCubic,0.65,0.05,0.36,1"
"linear,0,0,1,1"
"almostLinear,0.5,0.5,0.75,1.0"
"quick,0.15,0,0.1,1"
];
animation = [
"global,1,10,default"
"border,1,5.39,easeOutQuint"
"windows,1,4.79,easeOutQuint"
"windowsIn,1,4.1,easeOutQuint,popin 87%"
"windowsOut,1,1.49,linear,popin 87%"
"fadeIn,1,1.73,almostLinear"
"fadeOut,1,1.46,almostLinear"
"fade,1,3.03,quick"
"layers,1,3.81,easeOutQuint"
"layersIn,1,4,easeOutQuint,fade"
"layersOut,1,1.5,linear,fade"
"fadeLayersIn,1,1.79,almostLinear"
"fadeLayersOut,1,1.39,almostLinear"
"workspaces,1,1.94,almostLinear,fade"
"workspacesIn,1,1.21,almostLinear,fade"
"workspacesOut,1,1.94,almostLinear,fade"
];
};
dwindle = {
pseudotile = true;
preserve_split = true;
};
misc = {
force_default_wallpaper = 0;
disable_hyprland_logo = true;
};
input = {
sensitivity = -0.6;
};
windowrule = [
"suppressevent maximize, class:.*"
"nofocus,class:^%,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0"
];
};
};
}

View file

@ -0,0 +1,3 @@
{
programs.kitty.enable = true;
}

View file

@ -0,0 +1,34 @@
{
programs.nixcord = {
enable = true;
discord.enable = false;
vesktop.enable = true;
config = {
plugins = {
biggerStreamPreview.enable = true;
callTimer.enable = true;
experiments.enable = true;
fixSpotifyEmbeds.enable = true;
fixYoutubeEmbeds.enable = true;
forceOwnerCrown.enable = true;
friendsSince.enable = true;
gameActivityToggle.enable = true;
permissionsViewer.enable = true;
serverInfo.enable = true;
silentTyping.enable = true;
spotifyControls.enable = true;
spotifyCrack.enable = true;
summaries.enable = true;
typingIndicator.enable = true;
validReply.enable = true;
validUser.enable = true;
voiceChatDoubleClick.enable = true;
voiceMessages.enable = true;
volumeBooster.enable = true;
webKeybinds.enable = true;
webScreenShareFixes.enable = true;
youtubeAdblock.enable = true;
};
};
};
}

View file

@ -0,0 +1,11 @@
{
programs.nixvim = {
enable = true;
defaultEditor = true;
colorschemes.ayu.enable = true;
plugins = {
lualine.enable = true;
bufferline.enable = true;
};
};
}

View file

@ -0,0 +1,25 @@
{
programs.tofi = {
enable = true;
settings = {
font = "monospace";
font-size = 24;
background-color="000000D0";
text-color = "FFFFFF";
prompt-text = "run: ";
num-results = 7;
selection-color = "FF005F";
border-width = 0;
outline-width = 0;
result-spacing = 8;
anchor = "center";
width = "50%";
height = "50%";
padding-top = 32;
padding-bottom = 32;
padding-left = 32;
padding-right = 32;
terminal = "kitty";
};
};
}

View file

@ -0,0 +1,5 @@
{
programs.wlogout = {
enable = true;
};
}

View file

@ -0,0 +1,3 @@
{
programs.yazi.enable = true;
}

View file

@ -0,0 +1,13 @@
{ pkgs, ... }: {
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
shellAliases = {
update = "sudo nixos-rebuild switch --flake /home/toast/nix-config";
};
};
}

View file

@ -0,0 +1,83 @@
{ config, pkgs, nixvim, ... }:
{
imports =
[
./hardware-configuration.nix
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "nixos";
networking.networkmanager.enable = true;
time.timeZone = "Asia/Seoul";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "ko_KR.UTF-8";
LC_IDENTIFICATION = "ko_KR.UTF-8";
LC_MEASUREMENT = "ko_KR.UTF-8";
LC_MONETARY = "ko_KR.UTF-8";
LC_NAME = "ko_KR.UTF-8";
LC_NUMERIC = "ko_KR.UTF-8";
LC_PAPER = "ko_KR.UTF-8";
LC_TELEPHONE = "ko_KR.UTF-8";
LC_TIME = "ko_KR.UTF-8";
};
users.users.toast = {
isNormalUser = true;
description = "toast";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [];
shell = pkgs.zsh;
};
environment.systemPackages = with pkgs; [
vim
wget
];
nixpkgs.config.allowUnfree = true;
programs.zsh.enable = true;
programs.hyprland = {
enable = true;
withUWSM = true;
xwayland.enable = true;
};
services.xserver.xkb = {
layout = "us";
variant = "";
};
services.xserver.videoDrivers = [ "nvidia" ];
environment.sessionVariables = {
# WLR_NO_HARDWARE_CURSORS = "1";
NIXOS_OZONE_WL = "1";
};
hardware = {
graphics.enable = true;
nvidia = {
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = false;
open = false;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
};
services.greetd = {
enable = true;
settings = {
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --remember-session --sessions ${pkgs.hyprland}/share/wayland-sessions";
user = "greeter";
};
};
};
system.stateVersion = "25.05";
nix.settings.experimental-features = [ "nix-command" "flakes" ];
}

View file

@ -0,0 +1,36 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/6e70eaf8-d7ac-4832-a733-ee5818a73ff1";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/B0FD-22BA";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/data" =
{ device = "/dev/disk/by-uuid/7a421877-5b4e-4521-b284-67cba04d8dc0";
fsType = "ext4";
};
swapDevices = [ ];
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

1
nix-config Submodule

@ -0,0 +1 @@
Subproject commit 23878851bdf7b907912e302a46da2bdb0f3c9cd4

9
shell.nix Normal file
View file

@ -0,0 +1,9 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = with pkgs; [
nix
home-manager
git
];
}