This commit is contained in:
dusk 2022-06-29 03:31:55 +03:00
parent 4e07055e40
commit ba080f0998
Signed by: dusk
GPG Key ID: 1D8F8FAF2294D6EA
10 changed files with 135 additions and 151 deletions

View File

@ -135,11 +135,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1655895714,
"narHash": "sha256-Q9NOnh+4Tqjf1O0fBDWYiJGoxsXG5DUe3GT9BR1JHdk=",
"lastModified": 1656263093,
"narHash": "sha256-gYWCKE0XrXB+Sc/MB90XuSTin+R+mlEqG9TIThJ6R18=",
"owner": "helix-editor",
"repo": "helix",
"rev": "b365f2d6143c7a73de703425e00b32b8184d6a02",
"rev": "24351c20d41c26df0c695940e6790525858ab1c1",
"type": "github"
},
"original": {
@ -159,11 +159,11 @@
"utils": "utils"
},
"locked": {
"lastModified": 1655858799,
"narHash": "sha256-Ws6BKlVuEVO29Ab3OEUfVLbWTECv/5Ax3yOMq/UeY0E=",
"lastModified": 1656272360,
"narHash": "sha256-ceFmGObEq5GjObuZ3rI5PUad/OI6yulvsa6mMPciaic=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "06bb67ab24bd6e6c6d2bc97ecbcddd6c8b07ac18",
"rev": "0434f8e4cab4f200c9b4d3741a9e5d89705e6754",
"type": "github"
},
"original": {
@ -202,11 +202,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1655789751,
"narHash": "sha256-DbL2gn7YwkuX10OdlWfZ/A7zEJztwHh9NMeau1JMTdk=",
"lastModified": 1656241064,
"narHash": "sha256-+jWwBt515aFGukeX8WSafg9CM3Ju3FD0XrF+X4ph0mU=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "f9d8dff4e621f2d7f2b84d9e84bc6359715f971c",
"rev": "99e33a57149916ebede78ec13edd9ba310c10f2f",
"type": "github"
},
"original": {
@ -232,11 +232,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1655624069,
"narHash": "sha256-7g1zwTdp35GMTERnSzZMWJ7PG3QdDE8VOX3WsnOkAtM=",
"lastModified": 1656239181,
"narHash": "sha256-wW1xRFBn376yGloXZ4QzBE4hjipMawpV18Lshd9QSPw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "0d68d7c857fe301d49cdcd56130e0beea4ecd5aa",
"rev": "f2537a505d45c31fe5d9c27ea9829b6f4c4e6ac5",
"type": "github"
},
"original": {

View File

@ -110,9 +110,23 @@ in {
driSupport = true;
driSupport32Bit = true;
enable = true;
extraPackages = with pkgs; [amdvlk libvdpau-va-gl vaapiVdpau libva vulkan-loader];
extraPackages = with pkgs; [
libvdpau-va-gl
vaapiVdpau
libva
vulkan-loader
amdvlk
];
extraPackages32 = with pkgs.pkgsi686Linux;
[libvdpau-va-gl vaapiVdpau libva vulkan-loader] ++ [pkgs.driversi686Linux.amdvlk];
[
libvdpau-va-gl
vaapiVdpau
libva
vulkan-loader
]
++ [
pkgs.driversi686Linux.amdvlk
];
};
pulseaudio = {
enable = false;

View File

@ -1,18 +0,0 @@
_: prev: let
cliArgs = let
flags = [
"--flag-switches-begin"
"--enable-features=WebUIDarkMode,UseOzonePlatform,WebRTCPipeWireCapturer"
"--disable-features=IgnoreGPUBlocklist"
"--flag-switches-end"
"--ozone-platform=wayland"
"--enable-webrtc-pipewire-capturer"
"--ignore-gpu-blocklist"
"--enable-gpu-rasterization"
"--enable-zero-copy"
"--disable-gpu-driver-bug-workarounds"
"--force-dark-mode"
];
in
prev.lib.concatStringsSep " " flags;
in {chromium = prev.chromium.override {commandLineArgs = cliArgs;};}

View File

@ -0,0 +1,20 @@
_: prev: let
flags = [
"--ignore-gpu-blocklist"
"--disable-gpu-driver-bug-workarounds"
"--enable-features=WebUIDarkMode"
"--enable-gpu-rasterization"
"--enable-zero-copy"
"--force-dark-mode"
"--enable-features=VaapiVideoDecoder"
"--use-gl=egl"
"--disable-features=UseChromeOSDirectVideoDecoder"
"--disable-features=UseSkiaRenderer"
"--enable-webrtc-pipewire-capturer"
"--ozone-platform-hint=auto"
"--enable-raw-draw"
];
mkCliArgs = flags: prev.lib.concatStringsSep " " flags;
in {
chromium = prev.chromium.override {commandLineArgs = mkCliArgs flags;};
}

View File

@ -0,0 +1,57 @@
{
inputs,
pkgs,
...
}: {
programs.helix = {
enable = true;
languages = [
{
name = "dockerfile";
roots = ["Dockerfile" "Containerfile"];
file-types = ["Dockerfile" "Containerfile" "dockerfile" "containerfile"];
}
{
name = "nix";
language-server = {command = "${pkgs.rnix-lsp}/bin/rnix-lsp";};
}
{
name = "rust";
language-server = {command = "${pkgs.rust-analyzer}/bin/rust-analyzer";};
}
];
settings = {
theme = "catppuccin_mocha";
editor = {
line-number = "relative";
middle-click-paste = false;
true-color = true;
whitespace.render = "all";
cursor-shape.insert = "bar";
lsp.display-messages = true;
indent-guides = {
render = true;
character = "|";
};
auto-pairs = {
"(" = ")";
"{" = "}";
"[" = "]";
"\"" = "\"";
"'" = "'";
"<" = ">";
};
};
};
themes = {
catppuccin_mocha = builtins.fromTOML (
builtins.readFile (
builtins.fetchurl {
url = "https://raw.githubusercontent.com/catppuccin/helix/47710cbb38a5462973a484283a749543914c73e9/italics/catppuccin_mocha.toml";
sha256 = "sha256:1bv07mmi6hz7igd2pz7brcgs154989hnq8jmxy8px9d1jpx753di";
}
)
);
};
};
}

View File

@ -1,23 +0,0 @@
{...}: ''
theme = "mytheme"
[editor]
line-number = "relative"
middle-click-paste = false
true-color = true
whitespace.render = "all"
[editor.cursor-shape]
insert = "bar"
[editor.auto-pairs]
'(' = ')'
'{' = '}'
'[' = ']'
'"' = '"'
"'" = "'"
'<' = '>'
[editor.lsp]
display-messages = true
''

View File

@ -1,6 +0,0 @@
{pkgBin, ...}: ''
[[language]]
name = "dockerfile"
roots = ["Dockerfile", "Containerfile"]
file-types = ["Dockerfile", "Containerfile", "dockerfile", "containerfile"]
''

View File

@ -1,80 +0,0 @@
{...}: ''
"ui.background" = { bg = "base" }
"ui.menu" = { fg = "text", bg = "overlay" }
"ui.menu.selected" = { fg = "iris", bg = "surface" }
"ui.linenr" = {fg = "subtle" }
"ui.liner.selected" = "highlightOverlay"
"ui.selection" = { bg = "highlight" }
"comment" = { fg = "subtle" }
"ui.statusline" = {fg = "foam", bg = "surface" }
"ui.statusline.inactive" = { fg = "iris", bg = "surface" }
"ui.help" = { fg = "foam", bg = "surface" }
"ui.cursor" = { fg = "rose", modifiers = ["reversed"] }
"ui.text" = { fg = "text" }
"ui.text.focus" = { fg = "foam", modifiers = ["bold"]}
"ui.text.info" = {fg = "pine", modifiers = ["bold"]}
"ui.virtual" = "highlight"
"operator" = "rose"
"variable" = "text"
"constant.numeric" = "iris"
"constant" = "gold"
"attributes" = "gold"
"type" = "foam"
"ui.cursor.match" = { fg = "gold", modifiers = ["underlined"] }
"string" = "gold"
"property" = "foam"
"constant.character.escape" = "subtle"
"function" = "rose"
"function.builtin" = "rose"
"function.method" = "foam"
"constructor" = "gold"
"special" = "gold"
"keyword" = "pine"
"label" = "iris"
"namespace" = "pine"
"ui.popup" = { bg = "surface" }
"ui.popup.info" = { bg = "surface" }
"ui.window" = { bg = "base" }
"ui.help" = { bg = "overlay", fg = "foam" }
"text" = "text"
"diff.plus" = "foam"
"diff.delta" = "rose"
"diff.minus" = "love"
"info" = "gold"
"hint" = "gold"
"debug" = "rose"
"diagnostic" = "rose"
"error" = "love"
"markup.heading.marker" = "subtle"
"markup.heading.1" = { fg = "love", modifiers = ["bold"] }
"markup.heading.2" = { fg = "gold", modifiers = ["bold"] }
"markup.heading.3" = { fg = "rose", modifiers = ["bold"] }
"markup.heading.4" = { fg = "pine", modifiers = ["bold"] }
"markup.heading.5" = { fg = "form", modifiers = ["bold"] }
"markup.heading.6" = { fg = "fg", modifiers = ["bold"] }
"markup.list" = { fg = "love" }
"markup.bold" = { fg = "gold", modifiers = ["bold"] }
"markup.italic" = { fg = "iris", modifiers = ["italic"] }
"markup.link.url" = { fg = "pine", modifiers = ["underlined"]}
"markup.link.text" = { fg = "foam" }
"markup.quote" = { fg = "rose" }
"markup.raw" = { fg = "foam" }
[palette]
base = "#171423"
surface = "#2d283f"
overlay = "#26233a"
inactive = "#555169"
subtle = "#6e6a86"
text = "#9f9fa1"
love = "#eb6f92"
gold = "#f6c177"
rose = "#ebbcba"
pine = "#31748f"
foam = "#9ccfd8"
iris = "#c4a7e7"
highlight = "#493d70"
highlightOverlay = "#3a384a"
''

View File

@ -1,12 +1,24 @@
{font, ...}: ''
local wezterm = require 'wezterm';
local catppuccin = require("colors/catppuccin").setup {
-- whether or not to sync with the system's theme
sync = true,
-- the flavours to switch between when syncing
-- available flavours: "latte" | "frappe" | "macchiato" | "mocha"
sync_flavours = {
light = "latte",
dark = "mocha"
},
-- the default/fallback flavour, when syncing is disabled
flavour = "mocha"
}
return {
font = wezterm.font("${font.name}"),
font_size = ${builtins.toJSON font.size},
color_scheme = "Grape",
default_cursor_style = "BlinkingBar",
enable_wayland = true,
enable_tab_bar = false
enable_tab_bar = false,
colors = catppuccin
}
''

View File

@ -9,6 +9,7 @@
pkgBin = tlib.pkgBin pkgs;
nixosConfig = globalAttrs.config;
useWayland = false;
in {
users.users.patriot = {
isNormalUser = true;
@ -23,14 +24,14 @@ in {
hashedPassword = "$6$spzqhAyJfhHy$iHgLBlhjGn1l8PnbjJdWTn1GPvcjMqYNKUzdCe/7IrX6sHNgETSr/Nfpdmq9FCXLhrAfwHOd/q/8SvfeIeNX4/";
};
environment = {
systemPackages = [pkgs.qt5.qtwayland];
systemPackages = lib.optional useWayland pkgs.qt5.qtwayland;
shells = with pkgs; [bashInteractive zsh];
};
xdg.portal = {
enable = true;
wlr.enable = true;
wlr.enable = useWayland;
gtkUsePortal = false;
extraPortals = with pkgs; [xdg-desktop-portal-wlr];
extraPortals = lib.optional useWayland pkgs.xdg-desktop-portal-wlr;
};
programs = {
fuse.userAllowOther = true;
@ -79,7 +80,7 @@ in {
};
gdm = {
enable = true;
wayland = true;
wayland = useWayland;
};
startx.enable = false;
};
@ -122,6 +123,7 @@ in {
../modules/direnv
../modules/git
../modules/starship
../modules/helix
# ../modules/smos
inputs.nixos-persistence.nixosModules.home-manager.impermanence
];
@ -154,6 +156,7 @@ in {
"backgrounds"
"keyrings"
"lutris"
"PolyMC"
]
++ mkPaths ".config" [
"dconf"
@ -194,6 +197,7 @@ in {
mupdf
xdg_utils
wl-clipboard
xclip
rust-analyzer
# polymc
cloudflared
@ -212,7 +216,10 @@ in {
nixosConfig.programs.command-not-found.enable;
chromium = {
enable = true;
package = pkgs.chromium;
package =
if useWayland
then pkgs.chromium-wayland
else pkgs.chromium;
extensions = [
# https everywhere
"gcbommkclmclpchllfjekcdonpmejbdp"
@ -325,9 +332,10 @@ in {
enable = true;
configFile = {
"wezterm/wezterm.lua".text = import ./config/wezterm/cfg.nix {inherit font;};
"helix/themes/mytheme.toml".text = import ./config/helix/mytheme.nix {};
"helix/config.toml".text = import ./config/helix/cfg.nix {};
"helix/languages.toml".text = import ./config/helix/languages.nix {inherit pkgBin;};
"wezterm/colors/catppuccin.lua".source = builtins.fetchurl {
url = "https://raw.githubusercontent.com/catppuccin/wezterm/65078e846c8751e9b4837a575deb0745f0c0512f/catppuccin.lua";
sha256 = "sha256:0cm8kjjga9k1fzgb7nqjwd1jdjqjrkkqaxcavfxdkl3mw7qiy1ib";
};
};
};
};