2023-05-04 19:09:45 +02:00
|
|
|
{
|
|
|
|
inputs = {
|
2023-05-08 19:39:54 +02:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2023-05-09 04:16:27 +02:00
|
|
|
home-manager.url = "github:nix-community/home-manager/master";
|
2023-05-04 19:09:45 +02:00
|
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
2023-05-10 04:31:23 +02:00
|
|
|
hyprland.url = "github:hyprwm/Hyprland";
|
2023-05-10 17:31:57 +02:00
|
|
|
stylix.url = "github:danth/stylix";
|
2023-05-11 04:43:11 +02:00
|
|
|
stylix.inputs.nixpkgs.follows = "nixpkgs";
|
2023-05-04 19:09:45 +02:00
|
|
|
};
|
|
|
|
|
2023-05-10 17:31:57 +02:00
|
|
|
outputs = { self, nixpkgs, home-manager, hyprland, stylix, ... }@attrs: {
|
2023-05-09 17:43:25 +02:00
|
|
|
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
|
2023-05-04 19:09:45 +02:00
|
|
|
system = "x86_64-linux";
|
2023-05-09 17:43:25 +02:00
|
|
|
specialArgs = attrs;
|
2023-05-04 19:09:45 +02:00
|
|
|
modules = [
|
|
|
|
./configuration.nix
|
2023-05-12 01:14:58 +02:00
|
|
|
./home.nix
|
2023-05-10 04:31:23 +02:00
|
|
|
hyprland.nixosModules.default
|
|
|
|
{
|
|
|
|
programs.hyprland.enable = true;
|
|
|
|
}
|
2023-05-10 17:31:57 +02:00
|
|
|
stylix.nixosModules.stylix
|
2023-05-09 17:43:25 +02:00
|
|
|
home-manager.nixosModules.home-manager
|
2023-05-09 06:45:59 +02:00
|
|
|
{
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
users.users.user = {
|
|
|
|
isNormalUser = true;
|
|
|
|
extraGroups = [ "wheel" "networkmanager" ];
|
|
|
|
};
|
|
|
|
home-manager.users.user = { pkgs, ... }: {
|
|
|
|
home.username = "user";
|
|
|
|
home.homeDirectory = "/home/user";
|
|
|
|
home.packages = [ pkgs.httpie ];
|
|
|
|
home.stateVersion = "22.11";
|
2023-05-11 06:05:11 +02:00
|
|
|
programs.mpv = {
|
|
|
|
enable = true;
|
|
|
|
config = {
|
|
|
|
screenshot-format = "png";
|
|
|
|
profile = "gpu-hq";
|
|
|
|
scale = "ewa_lanczossharp";
|
|
|
|
cscale = "ewa_lanczossharp";
|
|
|
|
video-sync = "display-resample";
|
|
|
|
interpolation = true;
|
|
|
|
tscale = "oversample";
|
|
|
|
sub-auto = "fuzzy";
|
|
|
|
sub-font = "Noto Sans CJK JP Medium";
|
|
|
|
sub-blur = 10;
|
|
|
|
sub-file-paths = "subs:subtitles:字幕";
|
|
|
|
fullscreen = "yes";
|
|
|
|
title = "\${filename} - mpv";
|
2023-05-11 13:30:41 +02:00
|
|
|
script-opts =
|
|
|
|
"osc-title=\${filename},osc-boxalpha=150,osc-showfullscreen=no,osc-boxvideo=yes";
|
2023-05-11 06:05:11 +02:00
|
|
|
osc = "no";
|
|
|
|
osd-on-seek = "no";
|
|
|
|
osd-bar = "no";
|
|
|
|
osd-bar-w = 30;
|
|
|
|
osd-bar-h = "0.2";
|
|
|
|
osd-duration = 750;
|
|
|
|
really-quiet = "yes";
|
|
|
|
};
|
|
|
|
scripts = [ pkgs.mpvScripts.thumbnail ];
|
|
|
|
};
|
2023-05-09 06:45:59 +02:00
|
|
|
programs.librewolf = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
"middlemouse.paste" = false;
|
|
|
|
"browser.download.useDownloadDir" = true;
|
|
|
|
"ui.use_activity_cursor" = true;
|
|
|
|
"browser.tabs.insertAfterCurrent" = true;
|
|
|
|
};
|
|
|
|
};
|
2023-05-11 13:30:41 +02:00
|
|
|
programs.chromium = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs."ungoogled-chromium";
|
|
|
|
commandLineArgs = [ "--ozone-platform-hint=auto" ];
|
|
|
|
extensions = [{ id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; }];
|
|
|
|
};
|
|
|
|
programs.git = {
|
|
|
|
enable = true;
|
|
|
|
extraConfig = {
|
2023-05-11 23:45:52 +02:00
|
|
|
include = { path = "~/.gituser"; };
|
2023-05-11 13:30:41 +02:00
|
|
|
commit = { gpgsign = true; };
|
|
|
|
core = {
|
|
|
|
editor = "nvim";
|
|
|
|
autocrlf = false;
|
|
|
|
quotePath = false;
|
|
|
|
};
|
|
|
|
web = { browser = "librewolf"; };
|
|
|
|
push = { default = "simple"; };
|
|
|
|
branch = { autosetuprebase = "always"; };
|
|
|
|
init = { defaultBranch = "master"; };
|
|
|
|
rerere = { enabled = true; };
|
|
|
|
color = { ui = true; };
|
|
|
|
alias = {
|
|
|
|
contrib = "shortlog -n -s";
|
|
|
|
remotes = "remote -v";
|
|
|
|
praise = "blame";
|
|
|
|
verify = "log --show-signature";
|
|
|
|
};
|
|
|
|
"color \"diff-highlight\"" = {
|
|
|
|
oldNormal = "red bold";
|
|
|
|
oldHighlight = "red bold";
|
|
|
|
newNormal = "green bold";
|
|
|
|
newHighlight = "green bold";
|
|
|
|
};
|
|
|
|
"color \"diff\"" = {
|
|
|
|
meta = "yellow";
|
|
|
|
frag = "magenta bold";
|
|
|
|
commit = "yellow bold";
|
|
|
|
old = "red bold";
|
|
|
|
new = "green bold";
|
|
|
|
whitespace = "red reverse";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
diff-so-fancy = { enable = true; };
|
|
|
|
};
|
2023-05-09 06:45:59 +02:00
|
|
|
programs.lf = { enable = true; };
|
|
|
|
services.udiskie.enable = true;
|
|
|
|
};
|
|
|
|
}
|
2023-05-04 19:09:45 +02:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|