feat!: move everything around to accomodate two system configurations in one repo

This commit is contained in:
Alexandre Cavalheiro 2024-09-16 18:45:39 -03:00
parent d735060641
commit 53a2609204
Signed by: wizardlink
GPG key ID: A5767B54367CFBDF
82 changed files with 1786 additions and 863 deletions

View file

@ -231,21 +231,6 @@
"type": "github"
}
},
"myneovim": {
"locked": {
"lastModified": 1726512068,
"narHash": "sha256-M9usJfu7CAZdnPPUOJ/OjbIznQ706LjnF1O/fTdZgsc=",
"ref": "refs/heads/main",
"rev": "4e9ec3b6fa70ab5d904aa294b61c1d808c70ce11",
"revCount": 32,
"type": "git",
"url": "https://git.thewizard.link/wizardlink/neovim"
},
"original": {
"type": "git",
"url": "https://git.thewizard.link/wizardlink/neovim"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1725983898,
@ -282,7 +267,6 @@
"inputs": {
"home-manager": "home-manager",
"hyprland": "hyprland",
"myneovim": "myneovim",
"nixpkgs": "nixpkgs_2",
"spicetify-nix": "spicetify-nix"
}

View file

@ -15,8 +15,6 @@
};
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
myneovim.url = "git+https://git.thewizard.link/wizardlink/neovim";
};
outputs =
@ -26,20 +24,45 @@
pkgs = nixpkgs.legacyPackages.${system};
in
{
nixosConfigurations.wizdesk =
let
specialArgs = inputs;
modules = [ ./nixos.nix ];
in
nixpkgs.lib.nixosSystem { inherit system specialArgs modules; };
nixosConfigurations = {
wizdesk =
let
specialArgs = inputs;
modules = [
./modules/nixos
./specific/wizdesk/nixos.nix
];
in
nixpkgs.lib.nixosSystem { inherit system specialArgs modules; };
wizlap =
let
specialArgs = inputs;
modules = [
./modules/nixos
./specific/wizlap/nixos.nix
];
in
nixpkgs.lib.nixosSystem { inherit system specialArgs modules; };
};
homeConfigurations.wizardlink = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = inputs;
modules = [ ./home-manager.nix ];
modules = [ ./specific/home-manager.nix ];
};
formatter."${system}" = pkgs.nixfmt-rfc-style;
homeManagerModules = {
emacs = import ./modules/home-manager/programs/emacs;
hyprlandConfig = import ./modules/home-manager/programs/hyprland;
neovim = import ./modules/home-manager/programs/neovim;
};
nixosModules = {
default = import ./modules/nixos;
};
};
}

View file

@ -1,324 +0,0 @@
{ pkgs, myneovim, ... }:
{
#
## HOME CONFIGURATION #
#
# Import configurations for better modularity.
imports = [
./programs/alacritty.nix
./programs/direnv
./programs/emacs
./programs/fish
./programs/git.nix
./programs/hyprland
./programs/mangohud.nix
./programs/obs-studio.nix
./programs/rofi
./programs/spotify
./programs/tmux
./programs/waybar.nix
./services/openttd.nix
myneovim.homeManagerModules.default
];
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = "wizardlink";
home.homeDirectory = "/home/wizardlink";
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "23.05"; # Please read the comment before changing.
# You can also manage environment variables but you will have to manually
# source
#
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# /etc/profiles/per-user/wizardlink/etc/profile.d/hm-session-vars.sh
# if you don't want to manage your shell through Home Manager.
home.sessionVariables = {
EDITOR = "nvim";
NIXOS_OZONE_WL = "1";
QT_QPA_PLATFORM = "wayland";
};
##
## PACKAGES #
##
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = with pkgs; [
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
## Tools
# Utilities
brightnessctl
fastfetch
firefox
pavucontrol
protonvpn-gui
qbittorrent
qdirstat
speedcrunch
vlc
yt-dlp
zathura
# Personal utilities
anki
ledger
vesktop
# Editing
libreoffice
# Creative work
blender
krita
lmms
orca-slicer
shotcut
vcv-rack
## Entertainment
jellyfin-media-player
# Gaming
protontricks
wineWowPackages.unstableFull
winetricks
# Games
openttd
prismlauncher
shattered-pixel-dungeon
xonotic
## Libraries
libsForQt5.kdegraphics-thumbnailers
libsForQt5.kio-extras
rnnoise-plugin
xwaylandvideobridge
## Development
beekeeper-studio
lazygit
## Desktop environment
cliphist
grim
libsForQt5.ark
mako
slurp
swww
# Mail client
thunderbird
## Theming
(nerdfonts.override {
fonts = [
"FantasqueSansMono"
"NerdFontsSymbolsOnly"
];
})
libsForQt5.qtstyleplugin-kvantum
libsForQt5.qtwayland
qt6Packages.qtstyleplugin-kvantum
qt6Packages.qtwayland
# Create an FHS environment using the command `fhs`, enabling the execution of non-NixOS packages in NixOS!
(
let
base = appimageTools.defaultFhsEnvArgs;
in
buildFHSUserEnv (
base
// {
name = "fhs";
targetPkgs =
pkgs:
(
# pkgs.buildFHSUserEnv provides only a minimal FHS environment,
# lacking many basic packages needed by most software.
# Therefore, we need to add them manually.
#
# pkgs.appimageTools provides basic packages required by most software.
(base.targetPkgs pkgs) ++ (with pkgs; [ nodejs ])
);
profile = "export FHS=1";
runScript = "bash";
extraOutputsToInstall = [ "dev" ];
}
)
)
];
#
## DOTFILES #
#
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file = {
# Cattpuccin theme for fish shell.
".config/fish/themes/Catppuccin-Frappe.theme".source = ./programs/fish/Catppuccin-Frappe.theme;
# Configuration for gamemode, for running games with optimizations.
".config/gamemode.ini".source = ./programs/gamemode.ini;
# Configuration for mako, a notification daemon.
".config/mako".source = ./programs/mako;
## Kvantum's theme configuration.
".config/Kvantum/Catppuccin-Frappe-Lavender" = {
source = "${
pkgs.catppuccin-kvantum.override {
accent = "Lavender";
variant = "Frappe";
}
}/share/Kvantum/Catppuccin-Frappe-Lavender";
};
".config/Kvantum/kvantum.kvconfig".text = ''
[General]
theme=Catppuccin-Frappe-Lavender
'';
##
## Themeing configuration for qt5 and qt6
".config/qt5ct/colors".source = ./theming/qt5ct;
".config/qt6ct/colors".source = ./theming/qt5ct; # We use the qt5ct because it's the SAME spec
##
# Configure pipewire for microphone noise supression.
".config/pipewire/pipewire.conf.d/99-input-denoising.conf".text = ''
context.modules = [
{ name = libpipewire-module-filter-chain
args = {
node.description = "Noise Canceling source"
media.name = "Noise Canceling source"
filter.graph = {
nodes = [
{
type = ladspa
name = rnnoise
plugin = ${pkgs.rnnoise-plugin}/lib/ladspa/librnnoise_ladspa.so
label = noise_suppressor_mono
control = {
"VAD Threshold (%)" = 60.0
"VAD Grace Period (ms)" = 175
"Retroactive VAD Grace (ms)" = 50
}
}
]
}
capture.props = {
node.name = "capture.rnnoise_source"
node.passive = true
audio.rate = 48000
}
playback.props = {
node.name = "rnnoise_source"
media.class = Audio/Source
audio.rate = 48000
}
}
}
]
'';
# Configure DXVK
".config/dxvk.conf".text = ''
dxgi.tearFree = True
dxvk.enableGraphicsPipelineLibrary = True
dxvk.enableAsync = True
'';
".local/share/SpeedCrunch/color-schemes/catppuccin-frappe.json" = {
recursive = true;
source = builtins.fetchurl {
url = "https://raw.githubusercontent.com/catppuccin/speedcrunch/34f2b382de0188d2fd85f59a8a366f313fc30a71/themes/catppuccin-frappe.json";
sha256 = "sha256:0imx5a53p3ls5kddplgr7mbpbidrmzl9qiwpv7r8jjmsf8yxs0i4";
};
};
# My utility scripts
".local/share/scripts" = {
source = ./scripts;
recursive = true;
};
};
#
## THEMING #
#
home.pointerCursor = {
package = pkgs.catppuccin-cursors.frappeLavender;
name = "catppuccin-frappe-lavender-cursors";
gtk.enable = true;
x11.enable = true;
};
# Configure GTK.
gtk = {
enable = true;
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = true;
};
gtk4.extraConfig = {
gtk-application-prefer-dark-theme = true;
};
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme.override { color = "violet"; };
};
};
# Configure QT
qt = {
enable = true;
platformTheme.name = "qtct";
};
# Configure XDG
xdg.mimeApps.defaultApplications = {
"inode/directory" = [ "thunar.desktop" ];
"text/html" = [ "firefox.desktop" ];
"video/mp4" = [ "vlc.desktop" ];
"video/x-matroska" = [ "vlc.desktop" ];
"x-scheme-handler/about" = [ "firefox.desktop" ];
"x-scheme-handler/http" = [ "firefox.desktop" ];
"x-scheme-handler/https" = [ "firefox.desktop" ];
"x-scheme-handler/unknown" = [ "firefox.desktop" ];
};
}

View file

@ -0,0 +1,79 @@
{ pkgs, ... }:
{
home.sessionVariables = {
NIXOS_OZONE_WL = "1";
QT_QPA_PLATFORM = "wayland";
};
home.file = {
# Configuration for gamemode, for running games with optimizations.
".config/gamemode.ini".source = ./programs/gamemode.ini;
# Configuration for mako, a notification daemon.
".config/mako".source = ./programs/mako;
# Configure pipewire for microphone noise supression.
".config/pipewire/pipewire.conf.d/99-input-denoising.conf".text = ''
context.modules = [
{ name = libpipewire-module-filter-chain
args = {
node.description = "Noise Canceling source"
media.name = "Noise Canceling source"
filter.graph = {
nodes = [
{
type = ladspa
name = rnnoise
plugin = ${pkgs.rnnoise-plugin}/lib/ladspa/librnnoise_ladspa.so
label = noise_suppressor_mono
control = {
"VAD Threshold (%)" = 60.0
"VAD Grace Period (ms)" = 175
"Retroactive VAD Grace (ms)" = 50
}
}
]
}
capture.props = {
node.name = "capture.rnnoise_source"
node.passive = true
audio.rate = 48000
}
playback.props = {
node.name = "rnnoise_source"
media.class = Audio/Source
audio.rate = 48000
}
}
}
]
'';
# Configure DXVK
".config/dxvk.conf".text = ''
dxgi.tearFree = True
dxvk.enableGraphicsPipelineLibrary = True
dxvk.enableAsync = True
'';
# My utility scripts
".local/share/scripts" = {
source = ./scripts;
recursive = true;
};
};
# Configure XDG
xdg.mimeApps.defaultApplications = {
"inode/directory" = [ "thunar.desktop" ];
"text/html" = [ "firefox.desktop" ];
"video/mp4" = [ "vlc.desktop" ];
"video/x-matroska" = [ "vlc.desktop" ];
"x-scheme-handler/about" = [ "firefox.desktop" ];
"x-scheme-handler/http" = [ "firefox.desktop" ];
"x-scheme-handler/https" = [ "firefox.desktop" ];
"x-scheme-handler/unknown" = [ "firefox.desktop" ];
};
}

View file

@ -0,0 +1,9 @@
{ ... }:
{
imports = [
./common.nix
./packages.nix
./theming.nix
];
}

View file

@ -0,0 +1,127 @@
{ pkgs, ... }:
{
imports = [
./programs
];
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = with pkgs; [
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
## Tools
# Utilities
brightnessctl
fastfetch
firefox
pavucontrol
protonvpn-gui
qbittorrent
qdirstat
speedcrunch
vlc
yt-dlp
zathura
# Personal utilities
anki
ledger
vesktop
# Editing
libreoffice
# Creative work
blender
krita
lmms
orca-slicer
shotcut
vcv-rack
## Entertainment
jellyfin-media-player
# Gaming
protontricks
wineWowPackages.unstableFull
winetricks
# Games
openttd
prismlauncher
shattered-pixel-dungeon
xonotic
## Libraries
libsForQt5.kdegraphics-thumbnailers
libsForQt5.kio-extras
rnnoise-plugin
xwaylandvideobridge
## Development
beekeeper-studio
lazygit
## Desktop environment
cliphist
grim
libsForQt5.ark
mako
slurp
swww
# Mail client
thunderbird
## Theming
(nerdfonts.override {
fonts = [
"FantasqueSansMono"
"NerdFontsSymbolsOnly"
];
})
libsForQt5.qtstyleplugin-kvantum
libsForQt5.qtwayland
qt6Packages.qtstyleplugin-kvantum
qt6Packages.qtwayland
# Create an FHS environment using the command `fhs`, enabling the execution of non-NixOS packages in NixOS!
(
let
base = appimageTools.defaultFhsEnvArgs;
in
buildFHSUserEnv (
base
// {
name = "fhs";
targetPkgs =
pkgs:
(
# pkgs.buildFHSUserEnv provides only a minimal FHS environment,
# lacking many basic packages needed by most software.
# Therefore, we need to add them manually.
#
# pkgs.appimageTools provides basic packages required by most software.
(base.targetPkgs pkgs) ++ (with pkgs; [ nodejs ])
);
profile = "export FHS=1";
runScript = "bash";
extraOutputsToInstall = [ "dev" ];
}
)
)
];
}

View file

@ -0,0 +1,19 @@
{ ... }:
{
imports = [
./alacritty.nix
./direnv
./emacs
./fish
./git.nix
./hyprland
./mangohud.nix
./obs-studio.nix
./rofi
./spotify
./tmux
./waybar.nix
./neovim
];
}

View file

@ -0,0 +1,73 @@
# My [Home Manager] module for neovim configuration
This is my personal configuration for _[neovim]_ using [Nix](https://nixos.org/), so this will not work outside of it - though it can be made to be.
In this case, I am outputting a [Home Manager] module to be used directly in your configuration, it currently barely has
any
options and is opinionated due to it being my personal configuration for daily use... But I plan to slowly add options
to make it usable by other people.
## Installing
First you add this repository as a flake input:
```nix
{
inputs = {
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
wizardlink-neovim.url = "git+https://git.thewizard.link/wizardlink/neovim";
};
outputs = { home-manager, ... }@inputs: {
homeConfigurations.YOURHOSTNAME = home-manager.lib.homeManagerConfiguration {
# ...
extraSPecialArgs = inputs;
};
};
}
```
Then in your [Home Manager] configuration you can just import it:
```nix
{ wizardlink-neovim }:
{
imports = [
wizardlink-neovim.homeManagerModules.default
];
}
```
## Configuring
### [nixd](https://github.com/nix-community/nixd/)
```nix
programs.neovim.flake = {
hostname = "nixos"; # Your hostname used to build your system.
location = "git+file:///home/wizardlink/.system"; # Where you store your flake.
};
```
## My neovim failed because of package X not existing
My configuration is based off of `nixos-unstable` so sometimes your package may not exist or have a different name, I
apologise for that but I don't plan on maintaining backwards compatibility. :(
## How it looks
Here's some screenshots of how it currently looks like:
![image](./docs/example_1.png)
![image](./docs/example_2.png)
![image](./docs/example_3.png)
The theme I'm using is [catppuccin](https://github.com/catppuccin) in case you're curious.
[neovim]: https://neovim.io/
[Home Manager]: https://github.com/nix-community/home-manager

View file

@ -0,0 +1,284 @@
{
config,
pkgs,
lib,
...
}:
let
inherit (lib) types mkOption;
ollamaPackage =
if config.programs.neovim.ollama.type == "amd" then pkgs.ollama-rocm else pkgs.ollama-cuda;
in
{
options.programs.neovim = {
flake = {
hostname = mkOption {
default = "wizdesk";
description = "Your NixOS hostname, needed for nixd lsp.";
example = "nixos";
type = types.str;
};
location = mkOption {
default = "git+file:///home/wizardlink/.system";
description = "Path to your flake location, prepend 'file:///' to it and 'git+' before that if using git.";
example = "git+file:///home/wizardlink/.system";
type = types.str;
};
};
ollama.type = mkOption {
default = "amd";
description = "The type of ollama package to install, AMD GPU accelerated or NVIDIA GPU accelerated.";
example = "amd";
type = types.enum [
"amd"
"nvidia"
];
};
};
config = {
programs.neovim = {
enable = true;
withNodeJs = true;
withPython3 = true;
extraLuaConfig = builtins.readFile ./init.lua;
extraPackages = with pkgs; [
# Needed by ollama.nvim
curl
ollamaPackage
# CMAKE
neocmakelsp
# C/C++
clang-tools
gcc # Needed for treesitter
# HTML/CSS/JSON
emmet-ls
vscode-langservers-extracted
# LUA
lua-language-server
stylua
# Markdown
markdownlint-cli
marksman
prettierd
# Nix
nixd
nixfmt-rfc-style
# TypeScript
typescript-language-server
# Rust
rust-analyzer
taplo
vscode-extensions.vadimcn.vscode-lldb.adapter
# Vue
vue-language-server
# Svelte
nodePackages.svelte-language-server
# YAML
yaml-language-server
];
};
xdg.configFile."nvim/lua" = {
recursive = true;
source = ./lua;
};
xdg.configFile."nvim/lua/plugins/astrolsp.lua".text =
let
hostname = config.programs.neovim.flake.hostname;
location = config.programs.neovim.flake.location;
in
#lua
''
-- AstroLSP allows you to customize the features in AstroNvim's LSP configuration engine
-- Configuration documentation can be found with `:h astrolsp`
-- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`)
-- as this provides autocomplete and documentation while editing
---@type LazySpec
return {
"AstroNvim/astrolsp",
---@type AstroLSPOpts
opts = {
-- Configuration table of features provided by AstroLSP
features = {
autoformat = true, -- enable or disable auto formatting on start
codelens = true, -- enable/disable codelens refresh on start
inlay_hints = false, -- enable/disable inlay hints on start
semantic_tokens = true, -- enable/disable semantic token highlighting
},
-- customize lsp formatting options
formatting = {
-- control auto formatting on save
format_on_save = {
enabled = true, -- enable or disable format on save globally
allow_filetypes = { -- enable format on save for specified filetypes only
-- "go",
"c",
"cpp",
"h",
"javascript",
"jsx",
"lua",
"nix",
"rust",
"svelte",
"tsx",
"typescript",
},
ignore_filetypes = { -- disable format on save for specified filetypes
-- "python",
},
},
disabled = { -- disable formatting capabilities for the listed language servers
-- disable lua_ls formatting capability if you want to use StyLua to format your lua code
-- "lua_ls",
},
timeout_ms = 1000, -- default format timeout
-- filter = function(client) -- fully override the default formatting function
-- return true
-- end
},
-- enable servers that you already have installed without mason
servers = {
-- "pyright"
"clangd",
"cmake",
"cssls",
"eslint",
"html",
"jsonls",
"lua_ls",
"marksman",
"nixd",
"rust_analyzer",
"svelte",
"taplo",
"tsserver",
"volar",
"yamlls",
},
-- customize language server configuration options passed to `lspconfig`
---@diagnostic disable: missing-fields
config = {
-- clangd = { capabilities = { offsetEncoding = "utf-8" } },
nixd = {
settings = {
nixd = {
options = {
nixos = {
expr = '(builtins.getFlake ("${location}")).nixosConfigurations.${hostname}.options',
},
home_manager = {
expr =
'(builtins.getFlake ("${location}")).homeConfigurations.${hostname}.options',
},
},
},
},
},
tsserver = {
init_options = {
plugins = {
{
name = "@vue/typescript-plugin",
location = "${pkgs.vue-language-server}/bin/vue-language-server",
languages = { "javascript", "typescript", "vue" },
},
},
},
filetypes = {
"javascript",
"typescript",
"vue",
},
},
},
-- customize how language servers are attached
handlers = {
-- a function without a key is simply the default handler, functions take two parameters, the server name and the configured options table for that server
-- function(server, opts) require("lspconfig")[server].setup(opts) end
-- the key is the server that is being setup with `lspconfig`
-- rust_analyzer = false, -- setting a handler to false will disable the set up of that language server
-- pyright = function(_, opts) require("lspconfig").pyright.setup(opts) end -- or a custom handler function can be passed
},
-- Configure buffer local auto commands to add when attaching a language server
autocmds = {
-- first key is the `augroup` to add the auto commands to (:h augroup)
lsp_document_highlight = {
-- Optional condition to create/delete auto command group
-- can either be a string of a client capability or a function of `fun(client, bufnr): boolean`
-- condition will be resolved for each client on each execution and if it ever fails for all clients,
-- the auto commands will be deleted for that buffer
cond = "textDocument/documentHighlight",
-- cond = function(client, bufnr) return client.name == "lua_ls" end,
-- list of auto commands to set
{
-- events to trigger
event = { "CursorHold", "CursorHoldI" },
-- the rest of the autocmd options (:h nvim_create_autocmd)
desc = "Document Highlighting",
callback = function()
vim.lsp.buf.document_highlight()
end,
},
{
event = { "CursorMoved", "CursorMovedI", "BufLeave" },
desc = "Document Highlighting Clear",
callback = function()
vim.lsp.buf.clear_references()
end,
},
},
},
-- mappings to be set up on attaching of a language server
mappings = {
n = {
gl = {
function()
vim.diagnostic.open_float()
end,
desc = "Hover diagnostics",
},
-- a `cond` key can provided as the string of a server capability to be required to attach, or a function with `client` and `bufnr` parameters from the `on_attach` that returns a boolean
-- gD = {
-- function() vim.lsp.buf.declaration() end,
-- desc = "Declaration of current symbol",
-- cond = "textDocument/declaration",
-- },
-- ["<Leader>uY"] = {
-- function() require("astrolsp.toggles").buffer_semantic_tokens() end,
-- desc = "Toggle LSP semantic highlight (buffer)",
-- cond = function(client) return client.server_capabilities.semanticTokensProvider and vim.lsp.semantic_tokens end,
-- },
},
},
-- A custom `on_attach` function to be run after the default `on_attach` function
-- takes two parameters `client` and `bufnr` (`:h lspconfig-setup`)
on_attach = function(client, bufnr)
-- this would disable semanticTokensProvider for all clients
-- client.server_capabilities.semanticTokensProvider = nil
end,
},
}
'';
};
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

View file

@ -0,0 +1,19 @@
-- This file simply bootstraps the installation of Lazy.nvim and then calls other files for execution
-- This file doesn't necessarily need to be touched, BE CAUTIOUS editing this file and proceed at your own risk.
local lazypath = vim.env.LAZY or vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
if not (vim.env.LAZY or (vim.uv or vim.loop).fs_stat(lazypath)) then
-- stylua: ignore
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
end
vim.opt.rtp:prepend(lazypath)
-- validate that lazy is available
if not pcall(require, "lazy") then
-- stylua: ignore
vim.api.nvim_echo({ { ("Unable to load lazy from: %s\n"):format(lazypath), "ErrorMsg" }, { "Press any key to exit...", "MoreMsg" } }, true, {})
vim.fn.getchar()
vim.cmd.quit()
end
require "lazy_setup"
require "polish"

View file

@ -0,0 +1,40 @@
-- AstroCommunity: import any community modules here
-- We import this file in `lazy_setup.lua` before the `plugins/` folder.
-- This guarantees that the specs are processed before any user plugins.
---@type LazySpec
return {
"AstroNvim/astrocommunity",
{ import = "astrocommunity.colorscheme.catppuccin" },
{
"catppuccin/nvim",
name = "catppuccin",
opts = function(_, config)
config.flavour = "frappe"
config.transparent_background = true
end,
},
{ import = "astrocommunity.editing-support.todo-comments-nvim" },
{ import = "astrocommunity.editing-support.zen-mode-nvim" },
{ import = "astrocommunity.motion.flash-nvim" },
{ import = "astrocommunity.motion.flit-nvim" },
{ import = "astrocommunity.motion.leap-nvim" },
{ import = "astrocommunity.motion.mini-ai" },
{ import = "astrocommunity.motion.mini-surround" },
{ import = "astrocommunity.pack.cmake" },
{ import = "astrocommunity.pack.cpp" },
{ import = "astrocommunity.pack.godot" },
{ import = "astrocommunity.pack.html-css" },
{ import = "astrocommunity.pack.json" },
{ import = "astrocommunity.pack.lua" },
{ import = "astrocommunity.pack.markdown" },
{ import = "astrocommunity.pack.nix" },
{ import = "astrocommunity.pack.rust" },
{ import = "astrocommunity.pack.toml" },
{ import = "astrocommunity.pack.typescript" },
{ import = "astrocommunity.pack.vue" },
{ import = "astrocommunity.pack.yaml" },
}

View file

@ -0,0 +1,31 @@
require("lazy").setup({
{
"AstroNvim/AstroNvim",
--version = "^4", -- Remove version tracking to elect for nighly AstroNvim
import = "astronvim.plugins",
opts = { -- AstroNvim options must be set here with the `import` key
mapleader = " ", -- This ensures the leader key must be configured before Lazy is set up
maplocalleader = ",", -- This ensures the localleader key must be configured before Lazy is set up
icons_enabled = true, -- Set to false to disable icons (if no Nerd Font is available)
pin_plugins = nil, -- Default will pin plugins when tracking `version` of AstroNvim, set to true/false to override
},
},
{ import = "community" },
{ import = "plugins" },
} --[[@as LazySpec]], {
-- Configure any other `lazy.nvim` configuration options here
install = { colorscheme = { "astrodark", "habamax" } },
ui = { backdrop = 100 },
performance = {
rtp = {
-- disable some rtp plugins, add more to your liking
disabled_plugins = {
"gzip",
"netrwPlugin",
"tarPlugin",
"tohtml",
"zipPlugin",
},
},
},
} --[[@as LazyConfig]])

View file

@ -0,0 +1,84 @@
-- AstroCore provides a central place to modify mappings, vim options, autocommands, and more!
-- Configuration documentation can be found with `:h astrocore`
-- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`)
-- as this provides autocomplete and documentation while editing
---@type LazySpec
return {
"AstroNvim/astrocore",
---@type AstroCoreOpts
opts = {
-- Configure core features of AstroNvim
features = {
large_buf = { size = 1024 * 500, lines = 10000 }, -- set global limits for large files for disabling features like treesitter
autopairs = true, -- enable autopairs at start
cmp = true, -- enable completion at start
diagnostics_mode = 3, -- diagnostic mode on start (0 = off, 1 = no signs/virtual text, 2 = no virtual text, 3 = on)
highlighturl = true, -- highlight URLs at start
notifications = true, -- enable notifications at start
},
-- Diagnostics configuration (for vim.diagnostics.config({...})) when diagnostics are on
diagnostics = {
virtual_text = true,
underline = true,
},
-- vim options can be configured here
options = {
opt = { -- vim.opt.<key>
autoindent = true, -- indents automatically based on context
expandtab = true, -- use spaces instead of tabs
grepprg = "rg --vimgrep", -- use ripgrep on grep actions
number = true, -- sets vim.opt.number
relativenumber = true, -- sets vim.opt.relativenumber
shiftwidth = 2, -- how many spaces after indentation
signcolumn = "auto", -- sets vim.opt.signcolumn to auto
smartindent = true, -- smartly indent
spell = false, -- sets vim.opt.spell
tabstop = 2, -- how many spaces to indent when pressing tab
wrap = false, -- sets vim.opt.wrap
},
g = { -- vim.g.<key>
-- configure global vim variables (vim.g)
-- NOTE: `mapleader` and `maplocalleader` must be set in the AstroNvim opts or before `lazy.setup`
-- This can be found in the `lua/lazy_setup.lua` file
},
},
-- Mappings can be configured through AstroCore as well.
-- NOTE: keycodes follow the casing in the vimdocs. For example, `<Leader>` must be capitalized
mappings = {
-- first key is the mode
n = {
-- second key is the lefthand side of the map
-- navigate buffer tabs with `H` and `L`
-- L = {
-- function() require("astrocore.buffer").nav(vim.v.count > 0 and vim.v.count or 1) end,
-- desc = "Next buffer",
-- },
-- H = {
-- function() require("astrocore.buffer").nav(-(vim.v.count > 0 and vim.v.count or 1)) end,
-- desc = "Previous buffer",
-- },
-- mappings seen under group name "Buffer"
["<Leader>bD"] = {
function()
require("astroui.status.heirline").buffer_picker(function(bufnr)
require("astrocore.buffer").close(bufnr)
end)
end,
desc = "Pick to close",
},
-- tables with just a `desc` key will be registered with which-key if it's installed
-- this is useful for naming menus
["<Leader>b"] = { desc = "Buffers" },
-- quick save
-- ["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command
},
t = {
-- setting a mapping to false will disable it
-- ["<esc>"] = false,
},
},
},
}

View file

@ -0,0 +1,37 @@
-- AstroUI provides the basis for configuring the AstroNvim User Interface
-- Configuration documentation can be found with `:h astroui`
-- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`)
-- as this provides autocomplete and documentation while editing
---@type LazySpec
return {
"AstroNvim/astroui",
---@type AstroUIOpts
opts = {
-- change colorscheme
colorscheme = "catppuccin",
-- AstroUI allows you to easily modify highlight groups easily for any and all colorschemes
highlights = {
init = { -- this table overrides highlights in all themes
-- Normal = { bg = "#000000" },
},
astrotheme = { -- a table of overrides/changes when applying the astrotheme theme
-- Normal = { bg = "#000000" },
},
},
-- Icons can be configured throughout the interface
icons = {
-- configure the loading of the lsp in the status line
LSPLoading1 = "",
LSPLoading2 = "",
LSPLoading3 = "",
LSPLoading4 = "",
LSPLoading5 = "",
LSPLoading6 = "",
LSPLoading7 = "",
LSPLoading8 = "",
LSPLoading9 = "",
LSPLoading10 = "",
},
},
}

View file

@ -0,0 +1,31 @@
-- Customize Mason plugins
---@type LazySpec
return {
-- use mason-lspconfig to configure LSP installations
{
"williamboman/mason-lspconfig.nvim",
-- overrides `require("mason-lspconfig").setup(...)`
opts = function(_, opts)
opts.ensure_installed = nil
opts.automatic_installation = false
end,
},
-- use mason-null-ls to configure Formatters/Linter installation for null-ls sources
{
"jay-babu/mason-null-ls.nvim",
-- overrides `require("mason-null-ls").setup(...)`
opts = function(_, opts)
opts.ensure_installed = nil
opts.automatic_installation = false
end,
},
{
"jay-babu/mason-nvim-dap.nvim",
-- overrides `require("mason-nvim-dap").setup(...)`
opts = function(_, opts)
opts.ensure_installed = nil
opts.automatic_installation = false
end,
},
}

View file

@ -0,0 +1,22 @@
-- Customize None-ls sources
---@type LazySpec
return {
"nvimtools/none-ls.nvim",
opts = function(_, config)
-- config variable is the default configuration table for the setup function call
local null_ls = require("null-ls")
-- Check supported formatters and linters
-- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/formatting
-- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
config.sources = {
-- Set a formatter
null_ls.builtins.formatting.clang_format,
null_ls.builtins.formatting.nixfmt,
null_ls.builtins.formatting.prettier,
null_ls.builtins.formatting.stylua,
}
return config -- return final config table
end,
}

View file

@ -0,0 +1,49 @@
-- Customize Treesitter
---@type LazySpec
return {
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
-- add more things to the ensure_installed table protecting against community packs modifying it
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, {
-- Programming
"c",
"cmake",
"cpp",
"css",
"gdscript",
"godot_resource",
"html",
"hyprlang",
"javascript",
"jsdoc",
"lua",
"nim",
"nim_format_string",
"objc",
"proto",
"python",
"svelte",
"tsx",
"typescript",
"vue",
-- Scripting
"bash",
"glsl",
-- Configuring
"dockerfile",
"json",
"jsonc",
"nix",
"yaml",
-- Misc
"cuda",
"markdown",
"markdown_inline",
"query",
-- VIM
"vim",
"vimdoc",
})
end,
}

View file

@ -0,0 +1,93 @@
-- You can also add or configure plugins by creating files in this `plugins/` folder
-- Here are some examples:
---@type LazySpec
return {
-- Discord presence
"andweeb/presence.nvim",
{
"ray-x/lsp_signature.nvim",
event = "BufRead",
config = function()
require("lsp_signature").setup()
end,
},
-- Customize alpha options
{
"goolord/alpha-nvim",
opts = function(_, opts)
-- customize the dashboard header
opts.section.header.val = {
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣠⣤⣶⣶⣾⣿⣿⣿⣿⣷⣶⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣶⣾⣿⣿⣿⣿⣷⣶⣶⣤⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⢀⣠⡴⠾⠟⠋⠉⠉⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠁⠀⠀⠀⠀⠀⠀⠀⠉⠉⠙⠛⠷⢦⣄⡀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠘⠋⠁⠀⠀⢀⣀⣤⣶⣖⣒⣒⡲⠶⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⠶⢖⣒⣒⣲⣶⣤⣀⡀⠀⠀⠈⠙⠂⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⣠⢖⣫⣷⣿⣿⣿⣿⣿⣿⣶⣤⡙⢦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡴⢋⣤⣾⣿⣿⣿⣿⣿⣿⣾⣝⡲⣄⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⣄⣀⣠⢿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠻⢿⣿⣿⣦⣳⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣟⣴⣿⣿⡿⠟⠻⢿⣿⣿⣿⣿⣿⣿⣿⡻⣄⣀⣤⠀⠀⠀",
"⠀⠀⠀⠈⠟⣿⣿⣿⡿⢻⣿⣿⣿⠃⠀⠀⠀⠀⠙⣿⣿⣿⠓⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠚⣿⣿⣿⠋⠀⠀⠀⠀⠘⣿⣿⣿⡟⢿⣿⣿⣟⠻⠁⠀⠀⠀",
"⠤⣤⣶⣶⣿⣿⣿⡟⠀⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⢻⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⡏⠀⠀⠀⠀⠀⠀⣹⣿⣿⣷⠈⢻⣿⣿⣿⣶⣦⣤⠤",
"⠀⠀⠀⠀⠀⢻⣟⠀⠀⣿⣿⣿⣿⡀⠀⠀⠀⠀⢀⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢻⣿⣿⡀⠀⠀⠀⠀⢀⣿⣿⣿⣿⠀⠀⣿⡟⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠻⣆⠀⢹⣿⠟⢿⣿⣦⣤⣤⣴⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⡿⢷⣤⣤⣤⣴⣿⣿⣿⣿⡇⠀⣰⠟⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠙⠂⠀⠙⢀⣀⣿⣿⣿⣿⣿⣿⣿⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠻⠁⠀⣻⣿⣿⣿⣿⣿⣿⠏⠀⠘⠃⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡈⠻⠿⣿⣿⣿⡿⠟⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠻⢿⣿⣿⣿⠿⠛⢁⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠚⠛⣶⣦⣤⣤⣤⡤⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠰⢤⣤⣤⣤⣶⣾⠛⠓⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
}
return opts
end,
},
-- Adds highlighting and lsp features for embedded code in documents.
{
"jmbuhr/otter.nvim",
dependencies = {
"hrsh7th/nvim-cmp",
"neovim/nvim-lspconfig",
"nvim-treesitter/nvim-treesitter",
},
},
-- Adds highlighting and custom commands for ledger files
{
"ledger/vim-ledger",
},
-- Better UI hooks
{
"stevearc/dressing.nvim",
},
-- Add Ollama support in-editor
{
"nomnivore/ollama.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
},
-- All the user commands added by the plugin
cmd = { "Ollama", "OllamaModel", "OllamaServe", "OllamaServeStop" },
keys = {
-- Sample keybind for prompt menu. Note that the <c-u> is important for selections to work properly.
{
"<leader>oo",
":<c-u>lua require('ollama').prompt()<cr>",
desc = "ollama prompt",
mode = { "n", "v" },
},
-- Sample keybind for direct prompting. Note that the <c-u> is important for selections to work properly.
{
"<leader>oG",
":<c-u>lua require('ollama').prompt('Generate_Code')<cr>",
desc = "ollama Generate Code",
mode = { "n", "v" },
},
},
---@type Ollama.Config
opts = {
-- your configuration overrides
},
},
}

View file

@ -0,0 +1,39 @@
-- This will run last in the setup process and is a good place to configure
-- things like custom filetypes. This just pure lua so anything that doesn't
-- fit in the normal config locations above can go here
-- Set up custom filetypes
vim.filetype.add {
extension = {
foo = "fooscript",
},
filename = {
["Foofile"] = "fooscript",
},
pattern = {
["~/%.config/foo/.*"] = "fooscript",
},
}
local dap = require "dap"
dap.adapters.codelldb = {
port = "${port}",
type = "server",
executable = {
command = "codelldb",
args = { "--port", "${port}" },
},
}
dap.configurations.rust = {
{
name = "Launch file",
type = "codelldb",
request = "launch",
program = function() return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file") end,
cwd = "${workspaceFolder}",
stopOnEntry = false,
},
}

View file

@ -0,0 +1,70 @@
{ pkgs, ... }:
{
home.file = {
# Cattpuccin theme for fish shell.
".config/fish/themes/Catppuccin-Frappe.theme".source = ./theming/Catppuccin-Frappe.theme;
## Kvantum's theme configuration.
".config/Kvantum/Catppuccin-Frappe-Lavender" = {
source = "${
pkgs.catppuccin-kvantum.override {
accent = "Lavender";
variant = "Frappe";
}
}/share/Kvantum/Catppuccin-Frappe-Lavender";
};
".config/Kvantum/kvantum.kvconfig".text = ''
[General]
theme=Catppuccin-Frappe-Lavender
'';
##
## Themeing configuration for qt5 and qt6
".config/qt5ct/colors".source = ./theming/qt5ct;
".config/qt6ct/colors".source = ./theming/qt5ct; # We use the qt5ct because it's the SAME spec
##
".local/share/SpeedCrunch/color-schemes/catppuccin-frappe.json" = {
recursive = true;
source = builtins.fetchurl {
url = "https://raw.githubusercontent.com/catppuccin/speedcrunch/34f2b382de0188d2fd85f59a8a366f313fc30a71/themes/catppuccin-frappe.json";
sha256 = "sha256:0imx5a53p3ls5kddplgr7mbpbidrmzl9qiwpv7r8jjmsf8yxs0i4";
};
};
};
home.pointerCursor = {
package = pkgs.catppuccin-cursors.frappeLavender;
name = "catppuccin-frappe-lavender-cursors";
gtk.enable = true;
x11.enable = true;
};
# Configure GTK.
gtk = {
enable = true;
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = true;
};
gtk4.extraConfig = {
gtk-application-prefer-dark-theme = true;
};
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme.override { color = "violet"; };
};
};
# Configure QT
qt = {
enable = true;
platformTheme.name = "qtct";
};
}

30
modules/nixos/common.nix Normal file
View file

@ -0,0 +1,30 @@
{ ... }:
{
# Enable experimental features
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# Enable nh, a bundle of CLI utilities for NixOS
programs.nh = {
enable = true;
# Enable automatic garbage collection.
clean.enable = true;
clean.extraArgs = "--keep-since 4d --keep 3";
flake = "/home/wizardlink/.system";
};
# Optimize storage
nix.optimise.automatic = true;
nix.settings.auto-optimise-store = true;
# Enable Hyprland's cachix
nix.settings.substituters = [ "https://hyprland.cachix.org" ];
nix.settings.trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
];
}

13
modules/nixos/default.nix Normal file
View file

@ -0,0 +1,13 @@
{ ... }:
{
imports = [
./common.nix
./desktop.nix
./hardware.nix
./packages.nix
./services.nix
./sound.nix
./system.nix
];
}

83
modules/nixos/desktop.nix Normal file
View file

@ -0,0 +1,83 @@
{ pkgs, hyprland, ... }:
let
hyprland-pkgs = hyprland.inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system};
in
{
environment.sessionVariables = {
# Set env for Fcitx5
QMODIFIERS = "@im=fcitx5";
};
# Enable SDDM.
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
theme = "catppuccin-frappe";
package = pkgs.kdePackages.sddm;
};
# Enable Hyprland
programs.hyprland = {
enable = true;
package = hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
portalPackage = pkgs.xdg-desktop-portal-wlr;
};
# Enable XDG Desktop Portals.
xdg.portal = {
enable = true;
config = {
common = {
default = [ "wlr" ];
};
};
};
# Needed for home-manager
environment.pathsToLink = [
"/share/xdg-desktop-portal"
"/share/applications"
];
# Enable OpenGL.
hardware.graphics = {
enable = true;
enable32Bit = true;
package = hyprland-pkgs.mesa.drivers;
package32 = hyprland-pkgs.pkgsi686Linux.mesa.drivers;
extraPackages = with pkgs; [
rocm-opencl-icd # OpenGL hwa
rocm-opencl-runtime
];
};
# Enable Thunar and it's dependencies
programs.thunar = {
enable = true;
plugins = with pkgs.xfce; [ thunar-archive-plugin ];
};
programs.xfconf.enable = true; # For configuring
services.gvfs.enable = true; # For mounting drives, trash, etc.
services.tumbler.enable = true; # Thumbnail support
# Enable the Fcitx5 IME
i18n.inputMethod = {
enable = true;
type = "fcitx5";
fcitx5 = {
addons = with pkgs; [
fcitx5-mozc
fcitx5-gtk
fcitx5-catppuccin
];
waylandFrontend = true;
};
};
}

View file

@ -0,0 +1,13 @@
{ ... }:
{
# Enable Bluetooth
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
services.blueman.enable = true;
# Enable fstrim for better ssd lifespan
services.fstrim.enable = true;
}

108
modules/nixos/packages.nix Normal file
View file

@ -0,0 +1,108 @@
{ pkgs, ... }:
{
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# Enable GPG.
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
# Enable fish system-wide to integrate with nixpkgs.
programs.fish.enable = true;
# Enable Steam.
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
# ^ Enables so we can transfer games to other computers in the network.
# Add Proton-GE to 'compatibilitytools.d'.
extraCompatPackages = with pkgs; [ proton-ge-bin ];
};
# Enable and configure gamemode.
programs.gamemode = {
enable = true;
enableRenice = true;
};
# Enable KDEConnect
programs.kdeconnect.enable = true;
# Enable Docker.
virtualisation.docker.enable = true;
# Enable virt-manager
programs.virt-manager.enable = true;
# Enable virtd and spice USB redirection
virtualisation.spiceUSBRedirection.enable = true;
virtualisation.libvirtd.enable = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
## Tools
# Utilities
bat
btrfs-progs
duf
fuseiso
lm_sensors
p7zip
tree
unrar
unzip
wget
zip
# File managing
sshfs
yazi
# Virtualization
docker-compose
quickemu
# Desktop
wl-clipboard
xclip
zoxide
(catppuccin-sddm.override # So SDDM finds the theme files.
{
flavor = "frappe";
font = "FantasqueSansM Nerd Font";
fontSize = "12";
background = "${./theming/sddm/Background.jpg}";
loginBackground = true;
}
)
# Networking
gping
nmap
# Processes
btop
killall
# Filter
fzf
ripgrep
## Libraries
libsForQt5.qt5.qtgraphicaleffects
libsForQt5.qt5.qtquickcontrols2
pkgsi686Linux.gperftools # Needed for TF2 rn :(
## Hardware specific
openrazer-daemon # Razor products back-end
polychromatic # and it's front-end
vial
];
}

View file

@ -0,0 +1,38 @@
{
pkgs,
lib,
config,
...
}:
{
# Enable polkit,
security.polkit.enable = true;
# install an agent to interface with it,
environment.systemPackages = with pkgs; [ polkit_gnome ];
# And enable GNOME keyring for registering keys.
services.gnome.gnome-keyring.enable = true;
services.postgresql = {
identMap = lib.mkIf config.services.postgresql.enable ''
# MAP_NAME SYSTEM_USER DB_USER
superuser_map root postgres
superuser_map postgres postgres
superuser_map /^(.*)$ \1
'';
authentication = lib.mkIf config.services.postgresql.enable (
lib.mkOverride 10 ''
# TYPE DATABASE USER ADDRESS METHOD MAP
local all all peer map=superuser_map
host all all 127.0.0.1/32 md5
host all all ::1/128 md5
local replication all peer map=superuser_map
host replication all 127.0.0.1/32 ident map=superuser_map
host replication all ::1/128 ident map=superuser_map
''
);
};
}

16
modules/nixos/sound.nix Normal file
View file

@ -0,0 +1,16 @@
{ ... }:
{
# Enable sound with pipewire.
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
audio.enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
}

54
modules/nixos/system.nix Normal file
View file

@ -0,0 +1,54 @@
{ pkgs, config, ... }:
{
# Kernel
boot.kernelPackages = pkgs.linuxPackages_zen;
# Add AMD drivers.
boot.initrd.kernelModules = [ "amdgpu" ];
boot.extraModulePackages = [
config.boot.kernelPackages.v4l2loopback
];
# Bootloader.
boot.loader = {
systemd-boot = {
enable = true;
configurationLimit = 10;
};
efi.canTouchEfiVariables = true;
};
# Enables zram.
zramSwap.enable = true;
# Enable networking
networking.networkmanager.enable = true;
# Enable WOL on my ethernet interface.
networking.interfaces.enp5s0.wakeOnLan.enable = true;
# Define variables that will be initialized in PAM.
environment.sessionVariables = {
# Set env for Fcitx5
QMODIFIERS = "@im=fcitx5";
};
# Set fish as the default shell for all users.
users.defaultUserShell = pkgs.fish;
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
PermitRootLogin = "no";
};
};
}

View file

Before

Width:  |  Height:  |  Size: 4.8 MiB

After

Width:  |  Height:  |  Size: 4.8 MiB

514
nixos.nix
View file

@ -1,514 +0,0 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{
config,
pkgs,
hyprland,
...
}:
let
hyprland-pkgs = hyprland.inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system};
in
{
##
## NIXOS ##
##
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
# Include service configuration
./services/archi.nix
./services/authentication.nix
./services/caddy.nix
./services/forgejo.nix
./services/jellyfin.nix
];
# Enable experimental features
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# Enable nh, a bundle of CLI utilities for NixOS
programs.nh = {
enable = true;
# Enable automatic garbage collection.
clean.enable = true;
clean.extraArgs = "--keep-since 4d --keep 3";
flake = "/home/wizardlink/.system";
};
# Optimize storage
nix.optimise.automatic = true;
nix.settings.auto-optimise-store = true;
# Enable Hyprland's cachix
nix.settings.substituters = [ "https://hyprland.cachix.org" ];
nix.settings.trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
];
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.05"; # Did you read the comment?
##
## SYSTEM ##
##
# Kernel
boot.kernelPackages = pkgs.linuxPackages_zen;
# Add AMD drivers.
boot.initrd.kernelModules = [ "amdgpu" ];
# TODO: FIX IT BEING BEING OVERWRITTEN
boot.extraModulePackages = [
config.boot.kernelPackages.v4l2loopback
(pkgs.callPackage ./kernel/zenergy.nix { kernel = pkgs.linux_zen; })
];
# Bootloader.
boot.loader = {
systemd-boot = {
enable = true;
configurationLimit = 10;
};
efi.canTouchEfiVariables = true;
};
# Configure options for mounted volumes.
fileSystems = {
"/".options = [ "compress=zstd" ];
"/home".options = [ "compress=zstd" ];
"/nix".options = [
"compress=zstd"
"noatime"
];
"/mnt/extra".options = [ "nofail" ];
"/mnt/internal".options = [ "nofail" ];
"/mnt/media".options = [ "nofail" ];
"/mnt/ssd".options = [ "nofail" ];
};
# Enable btrf's auto scrubbing of volumes.
services.btrfs.autoScrub = {
enable = true;
interval = "weekly";
fileSystems = [ "/" ];
};
# Enables zram.
zramSwap.enable = true;
networking.hostName = "wizdesk"; # Define your hostname.
# Enable networking
networking.networkmanager.enable = true;
# Enable WOL on my ethernet interface.
networking.interfaces.enp5s0.wakeOnLan.enable = true;
# Open ports in the firewall.
networking.firewall = {
allowedTCPPorts = [
443 # SSL
6567 # Mindustry
80 # HTTP
3979 # OpenTTD
];
allowedUDPPorts = [
2626 # Dolphin emulator
27015 # Source games
28910 # Heretic II
6567 # Mindustry
8211 # Palworld
3979 # OpenTTD
];
allowedTCPPortRanges = [
{
from = 1714;
to = 1764;
} # KDEConnect
];
allowedUDPPortRanges = [
{
from = 1714;
to = 1764;
} # KDEConnect
];
};
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Define system-wide variables.
environment.variables = { };
# Define variables that will be initialized in PAM.
environment.sessionVariables = {
# Set env for Fcitx5
QMODIFIERS = "@im=fcitx5";
};
# Set fish as the default shell for all users.
users.defaultUserShell = pkgs.fish;
# Define a user account. Don't forget to set a password with passwd.
users.users.wizardlink = {
createHome = true;
description = "Alexandre Cavalheiro";
extraGroups = [
"docker"
"gamemode"
"libvirtd"
"networkmanager"
"openrazer"
"postgresql"
"wheel"
];
initialPassword = "wizardlink";
isNormalUser = true;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDdGOyRbu6IOw9yqotxE6m7wCif7oP/2D0tlREa5Q6uo Alexandre Cavalheiro S. Tiago da Silva <contact@thewizard.link>"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIISfCUsZrnCMZapdrvkUCrdRiX+1xuZBdGrynNRzDI2v" # SpaceEEC
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPInBFp7zBLhFluoww65CZzcnMdhndTawBv8QYJ5s/Xt david.alejandro.rubio@gmail.com" # Kodehawa
];
};
# Set your time zone.
time.timeZone = "America/Sao_Paulo";
# Select internationalisation properties.
i18n = {
defaultLocale = "en_US.UTF-8";
supportedLocales = [
"C.UTF-8/UTF-8"
"en_GB.UTF-8/UTF-8"
"en_US.UTF-8/UTF-8"
"ja_JP.UTF-8/UTF-8"
"pt_BR.UTF-8/UTF-8"
];
extraLocaleSettings = {
LANGUAGE = "en_US.UTF-8";
LC_ADDRESS = "en_US.UTF-8";
LC_ALL = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "pt_BR.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "pt_BR.UTF-8";
LC_PAPER = "pt_BR.UTF-8";
LC_TELEPHONE = "pt_BR.UTF-8";
LC_TIME = "en_GB.UTF-8";
};
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
PermitRootLogin = "no";
};
};
##
## HARDWARE ##
##
# Enable Bluetooth
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
services.blueman.enable = true;
# Enable openrazer for managing Razer products' configuration
hardware.openrazer = {
enable = true;
users = [ "wizardlink" ];
};
services.udev = {
# Vial udev rule for Monsgeek M1
extraRules = ''
# Monsgeek M1
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="fffe", ATTRS{idProduct}=="0005", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
'';
# WB32 DFU rules - needed for flashing
packages = [ (pkgs.callPackage ./services/udev/wb32dfu.nix { }) ];
};
# enable a better driver for wireless xbox controllers.
hardware.xpadneo.enable = true;
# Enable fstrim for better ssd lifespan
services.fstrim.enable = true;
##
## DESKTOP ##
##
# Enable SDDM.
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
theme = "catppuccin-frappe";
package = pkgs.kdePackages.sddm;
};
# Enable Hyprland
programs.hyprland = {
enable = true;
package = hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
portalPackage = pkgs.xdg-desktop-portal-wlr;
};
# Enable XDG Desktop Portals.
xdg.portal = {
enable = true;
config = {
common = {
default = [ "wlr" ];
};
};
};
# Needed for home-manager
environment.pathsToLink = [
"/share/xdg-desktop-portal"
"/share/applications"
];
# Enable OpenGL.
hardware.graphics = {
enable = true;
enable32Bit = true;
package = hyprland-pkgs.mesa.drivers;
package32 = hyprland-pkgs.pkgsi686Linux.mesa.drivers;
extraPackages = with pkgs; [
rocm-opencl-icd # OpenGL hwa
rocm-opencl-runtime
];
};
# Enable Thunar and it's dependencies
programs.thunar = {
enable = true;
plugins = with pkgs.xfce; [ thunar-archive-plugin ];
};
programs.xfconf.enable = true; # For configuring
services.gvfs.enable = true; # For mounting drives, trash, etc.
services.tumbler.enable = true; # Thumbnail support
# Enable the Fcitx5 IME
i18n.inputMethod = {
enable = true;
type = "fcitx5";
fcitx5 = {
addons = with pkgs; [
fcitx5-mozc
fcitx5-gtk
fcitx5-catppuccin
];
waylandFrontend = true;
};
};
##
## SOUND #
##
# Enable sound with pipewire.
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
audio.enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
#jack.enable = true;
};
##
## PACKAGES ##
##
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# Enable GPG.
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
# Enable fish system-wide to integrate with nixpkgs.
programs.fish.enable = true;
# Enable Steam.
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
# ^ Enables so we can transfer games to other computers in the network.
# Add Proton-GE to 'compatibilitytools.d'.
extraCompatPackages = with pkgs; [ proton-ge-bin ];
};
# Enable and configure gamemode.
programs.gamemode = {
enable = true;
enableRenice = true;
};
# Enable KDEConnect
programs.kdeconnect.enable = true;
# Enable Docker.
virtualisation.docker.enable = true;
# Enable virt-manager
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
virtualisation.spiceUSBRedirection.enable = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
## Tools
# Utilities
bat
btrfs-progs
duf
fuseiso
lm_sensors
p7zip
tree
unrar
unzip
wget
zip
# File managing
sshfs
yazi
# Virtualization
docker-compose
quickemu
# Desktop
wl-clipboard
xclip
zoxide
(catppuccin-sddm.override # So SDDM finds the theme files.
{
flavor = "frappe";
font = "FantasqueSansM Nerd Font";
fontSize = "12";
background = "${./theming/sddm/Background.jpg}";
loginBackground = true;
}
)
# Networking
gping
nmap
# Processes
btop
killall
# Filter
fzf
ripgrep
## Libraries
libsForQt5.qt5.qtgraphicaleffects
libsForQt5.qt5.qtquickcontrols2
pkgsi686Linux.gperftools # Needed for TF2 rn :(
## Hardware specific
openrazer-daemon # Razor products back-end
polychromatic # and it's front-end
vial
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
##
## SERVICES #
##
# Enable flatpak
services.flatpak.enable = true;
# Enable and configure PostgreSQL.
services.postgresql = {
enable = true;
identMap = ''
# MAP_NAME SYSTEM_USER DB_USER
superuser_map root postgres
superuser_map postgres postgres
superuser_map /^(.*)$ \1
'';
authentication = pkgs.lib.mkOverride 10 ''
# TYPE DATABASE USER ADDRESS METHOD MAP
local all all peer map=superuser_map
host all all 127.0.0.1/32 md5
host all all ::1/128 md5
local replication all peer map=superuser_map
host replication all 127.0.0.1/32 ident map=superuser_map
host replication all ::1/128 ident map=superuser_map
'';
initialScript = pkgs.writeText "backend-initScript" ''
CREATE ROLE wizardlink WITH LOGIN SUPERUSER PASSWORD 'wizardlink' CREATEDB CREATEROLE REPLICATION;
CREATE DATABASE wizardlink;
GRANT ALL PRIVILEGES ON DATABASE wizardlink TO wizardlink;
'';
};
}

31
specific/home-manager.nix Normal file
View file

@ -0,0 +1,31 @@
{ pkgs, ... }:
{
#
## HOME CONFIGURATION #
#
# Import configurations for better modularity.
imports = [
../../modules/home-manager
../../modules/home-manager/services.nix
];
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = "wizardlink";
home.homeDirectory = "/home/wizardlink";
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "23.05"; # Please read the comment before changing.
home.sessionVariables = {
EDITOR = "nvim";
};
}

View file

@ -0,0 +1,28 @@
{ pkgs, ... }:
{
# Enable Zenergy
boot.extraModulePackages = [
(pkgs.callPackage ../kernel/zenergy.nix { kernel = pkgs.linux_zen; })
];
# Enable openrazer for managing Razer products' configuration
hardware.openrazer = {
enable = true;
users = [ "wizardlink" ];
};
services.udev = {
# Vial udev rule for Monsgeek M1
extraRules = ''
# Monsgeek M1
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="fffe", ATTRS{idProduct}=="0005", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
'';
# WB32 DFU rules - needed for flashing
packages = [ (pkgs.callPackage ./services/udev/wb32dfu.nix { }) ];
};
# enable a better driver for wireless xbox controllers.
hardware.xpadneo.enable = true;
}

125
specific/wizdesk/nixos.nix Normal file
View file

@ -0,0 +1,125 @@
{ ... }:
{
imports = [
./hardware-configuration.nix
./hardware.nix
./services.nix
];
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.05";
# Configure options for mounted volumes.
fileSystems = {
"/".options = [ "compress=zstd" ];
"/home".options = [ "compress=zstd" ];
"/nix".options = [
"compress=zstd"
"noatime"
];
"/mnt/extra".options = [ "nofail" ];
"/mnt/internal".options = [ "nofail" ];
"/mnt/media".options = [ "nofail" ];
"/mnt/ssd".options = [ "nofail" ];
};
# Enable btrf's auto scrubbing of volumes.
services.btrfs.autoScrub = {
enable = true;
interval = "weekly";
fileSystems = [ "/" ];
};
networking.hostName = "wizdesk"; # Define your hostname.
# Open ports in the firewall.
networking.firewall = {
allowedTCPPorts = [
443 # SSL
6567 # Mindustry
80 # HTTP
3979 # OpenTTD
];
allowedUDPPorts = [
2626 # Dolphin emulator
27015 # Source games
28910 # Heretic II
6567 # Mindustry
8211 # Palworld
3979 # OpenTTD
];
allowedTCPPortRanges = [
{
from = 1714;
to = 1764;
} # KDEConnect
];
allowedUDPPortRanges = [
{
from = 1714;
to = 1764;
} # KDEConnect
];
};
# Define a user account. Don't forget to set a password with passwd.
users.users.wizardlink = {
createHome = true;
description = "Alexandre Cavalheiro";
extraGroups = [
"docker"
"gamemode"
"libvirtd"
"networkmanager"
"openrazer"
"postgresql"
"wheel"
];
initialPassword = "wizardlink";
isNormalUser = true;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDdGOyRbu6IOw9yqotxE6m7wCif7oP/2D0tlREa5Q6uo Alexandre Cavalheiro S. Tiago da Silva <contact@thewizard.link>"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIISfCUsZrnCMZapdrvkUCrdRiX+1xuZBdGrynNRzDI2v" # SpaceEEC
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPInBFp7zBLhFluoww65CZzcnMdhndTawBv8QYJ5s/Xt david.alejandro.rubio@gmail.com" # Kodehawa
];
};
# Set your time zone.
time.timeZone = "America/Sao_Paulo";
# Select internationalisation properties.
i18n = {
defaultLocale = "en_US.UTF-8";
supportedLocales = [
"C.UTF-8/UTF-8"
"en_GB.UTF-8/UTF-8"
"en_US.UTF-8/UTF-8"
"ja_JP.UTF-8/UTF-8"
"pt_BR.UTF-8/UTF-8"
];
extraLocaleSettings = {
LANGUAGE = "en_US.UTF-8";
LC_ADDRESS = "en_US.UTF-8";
LC_ALL = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "pt_BR.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "pt_BR.UTF-8";
LC_PAPER = "pt_BR.UTF-8";
LC_TELEPHONE = "pt_BR.UTF-8";
LC_TIME = "en_GB.UTF-8";
};
};
}

View file

@ -0,0 +1,20 @@
{ pkgs, ... }:
{
imports = [
./services/archi.nix
./services/caddy.nix
./services/forgejo.nix
./services/jellyfin.nix
];
services.postgresql = {
enable = true;
initialScript = pkgs.writeText "backend-initScript" ''
CREATE ROLE wizardlink WITH LOGIN SUPERUSER PASSWORD 'wizardlink' CREATEDB CREATEROLE REPLICATION;
CREATE DATABASE wizardlink;
GRANT ALL PRIVILEGES ON DATABASE wizardlink TO wizardlink;
'';
};
}

View file

@ -0,0 +1,11 @@
{ pkgs, ... }:
{
# Enable Zenergy
boot.extraModulePackages = [
(pkgs.callPackage ../kernel/zenergy.nix { kernel = pkgs.linux_zen; })
];
# enable a better driver for wireless xbox controllers.
hardware.xpadneo.enable = true;
}

78
specific/wizlap/nixos.nix Normal file
View file

@ -0,0 +1,78 @@
{ ... }:
{
imports = [
./hardware.nix
];
networking.hostName = "wizlap"; # Define your hostname.
# Open ports in the firewall.
networking.firewall = {
allowedTCPPortRanges = [
{
from = 1714;
to = 1764;
} # KDEConnect
];
allowedUDPPortRanges = [
{
from = 1714;
to = 1764;
} # KDEConnect
];
};
# Define a user account. Don't forget to set a password with passwd.
users.users.wizardlink = {
createHome = true;
description = "Alexandre Cavalheiro";
extraGroups = [
"docker"
"gamemode"
"libvirtd"
"networkmanager"
"openrazer"
"postgresql"
"wheel"
];
initialPassword = "wizardlink";
isNormalUser = true;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDdGOyRbu6IOw9yqotxE6m7wCif7oP/2D0tlREa5Q6uo Alexandre Cavalheiro S. Tiago da Silva <contact@thewizard.link>"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIISfCUsZrnCMZapdrvkUCrdRiX+1xuZBdGrynNRzDI2v" # SpaceEEC
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPInBFp7zBLhFluoww65CZzcnMdhndTawBv8QYJ5s/Xt david.alejandro.rubio@gmail.com" # Kodehawa
];
};
# Set your time zone.
time.timeZone = "America/Sao_Paulo";
# Select internationalisation properties.
i18n = {
defaultLocale = "en_US.UTF-8";
supportedLocales = [
"C.UTF-8/UTF-8"
"en_GB.UTF-8/UTF-8"
"en_US.UTF-8/UTF-8"
"ja_JP.UTF-8/UTF-8"
"pt_BR.UTF-8/UTF-8"
];
extraLocaleSettings = {
LANGUAGE = "en_US.UTF-8";
LC_ADDRESS = "en_US.UTF-8";
LC_ALL = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "pt_BR.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "pt_BR.UTF-8";
LC_PAPER = "pt_BR.UTF-8";
LC_TELEPHONE = "pt_BR.UTF-8";
LC_TIME = "en_GB.UTF-8";
};
};
}