mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
minor refractor
This commit is contained in:
parent
679f5bea9d
commit
1b99070718
22 changed files with 248 additions and 298 deletions
|
|
@ -3,12 +3,14 @@ return {
|
||||||
"rmagatti/auto-session",
|
"rmagatti/auto-session",
|
||||||
event = "BufReadPre",
|
event = "BufReadPre",
|
||||||
cmd = {
|
cmd = {
|
||||||
"SessionSearch",
|
"AutoSession",
|
||||||
"SessionSave",
|
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
suppressed_dirs = { "~/", "~/Projects", "~/Downloads", "/" },
|
suppressed_dirs = { "~/", "~/Projects", "~/Downloads", "/" },
|
||||||
},
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<leader>ps", "<Cmd>AutoSession search<CR>", desc = "List all sessions" },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
-- { import = "plugins.mod.nvim-tree" },
|
-- { import = "plugins.mod.nvim-tree" },
|
||||||
-- { import = "plugins.mod.telescope" },
|
-- { import = "plugins.mod.telescope" },
|
||||||
|
|
@ -35,5 +37,5 @@ return {
|
||||||
-- "Neogit",
|
-- "Neogit",
|
||||||
-- },
|
-- },
|
||||||
-- },
|
-- },
|
||||||
{ import = "plugins.mod.neo-tree" }
|
{ import = "plugins.mod.neo-tree" },
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,11 @@
|
||||||
local uuid = function()
|
local uuid = function()
|
||||||
local template = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'
|
local template = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"
|
||||||
return string.gsub(template, '[xy]', function(c)
|
return string.gsub(template, "[xy]", function(c)
|
||||||
local v = (c == 'x') and math.random(0, 0xf) or math.random(8, 0xb)
|
local v = (c == "x") and math.random(0, 0xf) or math.random(8, 0xb)
|
||||||
return string.format('%x', v)
|
return string.format("%x", v)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"obsidian-nvim/obsidian.nvim",
|
"obsidian-nvim/obsidian.nvim",
|
||||||
version = "*", -- recommended, use latest release instead of latest commit
|
version = "*", -- recommended, use latest release instead of latest commit
|
||||||
|
|
@ -83,31 +82,32 @@ return {
|
||||||
yesterday = function()
|
yesterday = function()
|
||||||
return os.date("%Y-%m-%d", os.time() - 86400)
|
return os.date("%Y-%m-%d", os.time() - 86400)
|
||||||
end,
|
end,
|
||||||
uuid = uuid()
|
uuid = uuid(),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
---@return table
|
---@return table
|
||||||
note_frontmatter_func = function(note)
|
frontmatter = {
|
||||||
|
func = function(note)
|
||||||
-- Add the title of the note as an alias.
|
-- Add the title of the note as an alias.
|
||||||
if note.title then
|
if note.title then
|
||||||
note:add_alias(note.title)
|
note:add_alias(note.title)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Force to use UUID as the note id.
|
-- Force to use UUID as the note id.
|
||||||
local note_id
|
local note_id = uuid()
|
||||||
if note.metadata then
|
if note.metadata.id == nil then
|
||||||
note_id = note.id
|
|
||||||
else
|
|
||||||
note_id = uuid()
|
note_id = uuid()
|
||||||
|
else
|
||||||
|
note_id = note.metadata.id
|
||||||
end
|
end
|
||||||
|
|
||||||
local out = {
|
local out = {
|
||||||
id = note_id,
|
-- id = note_id,
|
||||||
aliases = note.aliases,
|
aliases = note.aliases,
|
||||||
tags = note.tags,
|
tags = note.tags,
|
||||||
title = note.id,
|
title = note.id,
|
||||||
date = os.date(
|
-- date = os.date("%Y-%m-%dT00:00:00"),
|
||||||
"%Y-%m-%dT00:00:00"),
|
-- mtime = os.date("%Y-%m-%dT%H:%M:%S"),
|
||||||
}
|
}
|
||||||
|
|
||||||
-- `note.metadata` contains any manually added fields in the frontmatter.
|
-- `note.metadata` contains any manually added fields in the frontmatter.
|
||||||
|
|
@ -122,6 +122,7 @@ return {
|
||||||
out.mtime = os.date("%Y-%m-%dT%H:%M:%S")
|
out.mtime = os.date("%Y-%m-%dT%H:%M:%S")
|
||||||
return out
|
return out
|
||||||
end,
|
end,
|
||||||
|
},
|
||||||
daily_notes = {
|
daily_notes = {
|
||||||
folder = "_Global/Periodic",
|
folder = "_Global/Periodic",
|
||||||
date_format = "%Y-%m-%d",
|
date_format = "%Y-%m-%d",
|
||||||
|
|
|
||||||
|
|
@ -3,28 +3,29 @@ return {
|
||||||
-- optional for icon support
|
-- optional for icon support
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
cmd = "FzfLua",
|
cmd = "FzfLua",
|
||||||
|
--stylua: ignore start
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader><leader>", "<cmd>FzfLua files<CR>", desc = "Find Files" },
|
{ "<leader><leader>", function() require("fzf-lua").files() end, desc = "Find Files" },
|
||||||
{ "<leader>fc", "<cmd>FzfLua files cwd=~/.config/nvim<CR>", desc = "Edit configs" },
|
{ "<leader>fc", function() require("fzf-lua").files({ cwd="~/.dotfiles/home/dot_config/nvim"}) end, desc = "Edit configs" },
|
||||||
{ "<leader>/", "<cmd>FzfLua live_grep<CR>", desc = "Grep Files" },
|
{ "<leader>/", function() require("fzf-lua").live_grep() end, desc = "Grep Files" },
|
||||||
{ "<leader>;", "<cmd>FzfLua<CR>", desc = "Show Telescope Commands" },
|
{ "<leader>;", function() require("fzf-lua").commands() end, desc = "Show Telescope Commands" },
|
||||||
{ "<leader>ui", "<cmd>FzfLua colorschemes<CR>", desc = "Change colorscheme" },
|
{ "<leader>ui", function() require("fzf-lua").colorschemes() end, desc = "Change colorscheme" },
|
||||||
-- find_files { "<leader>pp", "<cmd>FzfLua projects<CR>", desc = "Listfind_files all Projects" },
|
-- find_files { "<leader>pp", require("fzf-lua").projects, des c = "Listfind_files all Projects" },
|
||||||
{ "<leader>pd", "<cmd>FzfLua zoxide<CR>", desc = "List recent directories" },
|
{ "<leader>pd", function() require("fzf-lua").zoxide() end, desc = "List recent directories" },
|
||||||
-- { "<leader>pg", "<cmd>FzfLua projects<CR>", desc = "List all Git Projects" },
|
-- { "<leader>pg", require("fzf-lua").projects, desc = "List all Git Projects" },
|
||||||
{ "<leader>ps", "<cmd>FzfLua session-lens<CR>", desc = "List all sessions" },
|
{ "<leader>gs", function() require("fzf-lua").git_status() end, desc = "Git Status" },
|
||||||
{ "<leader>gs", "<cmd>FzfLua git_status<CR>", desc = "Git Status" },
|
{ "<leader>gt", function() require("fzf-lua").git_branches() end, desc = "Git Branches" },
|
||||||
{ "<leader>gt", "<cmd>FzfLua git_branches<CR>", desc = "Git Branches" },
|
{ "<leader>gc", function() require("fzf-lua").git_commits() end, desc = "Show commits" },
|
||||||
{ "<leader>gc", "<cmd>FzfLua git_commits<CR>", desc = "Show commits" },
|
{ "<leader>fb", function() require("fzf-lua").buffers() end, desc = "List Buffers" },
|
||||||
{ "<leader>fb", "<cmd>FzfLua buffers<CR>", desc = "List Buffers" },
|
{ "<leader>ff", function() require("fzf-lua").files() end, desc = "Find Files" },
|
||||||
{ "<leader>ff", "<cmd>FzfLua fd<CR>", desc = "Find Files" },
|
{ "<leader>fh", function() require("fzf-lua").oldfiles() end, desc = "Recent Files" },
|
||||||
{ "<leader>fh", "<cmd>FzfLua oldfiles<CR>", desc = "Recent Files" },
|
-- { "<leader>ce", require("fzf-lua").diagnostics(), desc = "Navi gate errors/warnings" },
|
||||||
{ "<leader>ce", "<cmd>FzfLua diagnostics<CR>", desc = "Navigate errors/warnings" },
|
{ "<leader>cs", function() require("fzf-lua").treesitter() end, desc = "Search symbols" },
|
||||||
{ "<leader>cs", "<cmd>FzfLua treesitter<CR>", desc = "Search symbols" },
|
{ "<leader>cS", function() require("fzf-lua").grep_visual() end, desc = "Search current symbol" },
|
||||||
{ "<leader>cS", "<cmd>FzfLua grep_string<CR>", desc = "Search current symbol" },
|
{ "<leader>bB", function() require("fzf-lua").buffers() end, desc = "List Buffers" },
|
||||||
{ "<leader>bB", "<cmd>FzfLua buffers<CR>", desc = "List Buffers" },
|
{ "<leader>fl", function() require("fzf-lua").filetypes() end, desc = "Set Filetype/Lang to ..." },
|
||||||
{ "<leader>fl", "<cmd>FzfLua filetypes<CR>", desc = "Set Filetype/Lang to ..." },
|
{ "<leader>R", function() require("fzf-lua").resume() end, desc = "Resume FzfLua" },
|
||||||
{ "<leader>R", "<cmd>FzfLua resume<CR>", desc = "Resume FzfLua" },
|
|
||||||
},
|
},
|
||||||
|
--stylua: ignore end
|
||||||
opts = {},
|
opts = {},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,15 +10,16 @@ return {
|
||||||
dashboard = {
|
dashboard = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
preset = {
|
preset = {
|
||||||
|
-- stylua: ignore start
|
||||||
keys = {
|
keys = {
|
||||||
-- { key = "p", icon = " ", desc = "查找项目", action = "<cmd>Telescope projects<CR>" },
|
-- { key = "p", icon = " ", desc = "查找项目", action = "<cmd>Telescope projects<CR>" },
|
||||||
{ key = "h", icon = " ", desc = "历史文件", action = "<cmd>FzfLua oldfiles<CR>" },
|
{ key = "h", icon = " ", desc = "历史文件", action = function () require("fzf-lua").oldfiles() end },
|
||||||
{ key = "l", icon = " ", desc = "加载会话", action = "<cmd>SessionSearch<CR>" },
|
{ key = "l", icon = " ", desc = "加载会话", action = "<cmd>AutoSession search<CR>" },
|
||||||
{
|
{
|
||||||
key = "c",
|
key = "c",
|
||||||
icon = " ",
|
icon = " ",
|
||||||
desc = "转到设置",
|
desc = "转到设置",
|
||||||
action = "<cmd>FzfLua files cwd=~/.config/nvim<CR>",
|
action = function() require("fzf-lua").files({ cwd = "~/.dotfiles/home/dot_config/nvim" }) end,
|
||||||
},
|
},
|
||||||
{ key = "q", icon = " ", desc = "退出", action = "<cmd>qa<CR>" },
|
{ key = "q", icon = " ", desc = "退出", action = "<cmd>qa<CR>" },
|
||||||
},
|
},
|
||||||
|
|
@ -69,19 +70,21 @@ return {
|
||||||
{ section = "startup" },
|
{ section = "startup" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
-- stylua: ignore end
|
||||||
-- explorer = {
|
-- explorer = {
|
||||||
-- },
|
-- },
|
||||||
indent = { enabled = true },
|
indent = { enabled = true },
|
||||||
-- input = { enabled = true },
|
input = { enabled = true },
|
||||||
notifier = { enabled = true },
|
notifier = { enabled = true },
|
||||||
-- quickfile = { enabled = true },
|
quickfile = { enabled = true },
|
||||||
scope = { enabled = true },
|
scope = { enabled = true },
|
||||||
-- scroll = { enabled = true },
|
scroll = { enabled = true },
|
||||||
statuscolumn = { enabled = true },
|
statuscolumn = { enabled = true },
|
||||||
-- words = { enabled = true },
|
-- words = { enabled = true },
|
||||||
image = {
|
image = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
img_dirs = { "90 - System/Assets" }
|
-- See: ../lang/markdown/obsidian-nvim.lua
|
||||||
|
img_dirs = { "90 - System/Assets" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,8 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs =
|
||||||
|
{
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
nix-flatpak,
|
nix-flatpak,
|
||||||
|
|
@ -38,7 +39,8 @@
|
||||||
winboat,
|
winboat,
|
||||||
caelestia-shell,
|
caelestia-shell,
|
||||||
...
|
...
|
||||||
} @ inputs: let
|
}@inputs:
|
||||||
|
let
|
||||||
overlays = [
|
overlays = [
|
||||||
nur.overlays.default
|
nur.overlays.default
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
|
|
@ -46,7 +48,8 @@
|
||||||
caelestia-shell = caelestia-shell.packages.x86_64-linux.caelestia-shell;
|
caelestia-shell = caelestia-shell.packages.x86_64-linux.caelestia-shell;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
forSystem = system:
|
forSystem =
|
||||||
|
system:
|
||||||
import nixpkgs {
|
import nixpkgs {
|
||||||
inherit system overlays;
|
inherit system overlays;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
|
|
@ -58,13 +61,18 @@
|
||||||
"nixvirt"
|
"nixvirt"
|
||||||
];
|
];
|
||||||
|
|
||||||
mkNixosSystem = hostname:
|
mkNixosSystem =
|
||||||
|
hostname:
|
||||||
nixpkgs.lib.nixosSystem {
|
nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
inherit specialArgs;
|
inherit specialArgs;
|
||||||
modules = [./hosts/${hostname} {nixpkgs.overlays = overlays;}];
|
modules = [
|
||||||
|
./hosts/${hostname}
|
||||||
|
{ nixpkgs.overlays = overlays; }
|
||||||
|
];
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
# This will automatically generate nixOS config for `nixosHosts'
|
# This will automatically generate nixOS config for `nixosHosts'
|
||||||
# Include the module ./hosts/${hostname} by default.
|
# Include the module ./hosts/${hostname} by default.
|
||||||
nixosConfigurations = nixpkgs.lib.genAttrs nixosHosts mkNixosSystem;
|
nixosConfigurations = nixpkgs.lib.genAttrs nixosHosts mkNixosSystem;
|
||||||
|
|
|
||||||
|
|
@ -1,126 +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, on
|
|
||||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[ # Include the results of the hardware scan.
|
|
||||||
./hardware-configuration.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
|
|
||||||
# Use latest kernel.
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
|
||||||
|
|
||||||
# networking.hostName = "nixos"; # Define your hostname.
|
|
||||||
# Pick only one of the below networking options.
|
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|
||||||
# networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "Europe/London";
|
|
||||||
|
|
||||||
# Configure network proxy if necessary
|
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
# console = {
|
|
||||||
# font = "Lat2-Terminus16";
|
|
||||||
# keyMap = "us";
|
|
||||||
# useXkbConfig = true; # use xkb.options in tty.
|
|
||||||
# };
|
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
|
||||||
# services.xserver.enable = true;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
# services.xserver.xkb.layout = "us";
|
|
||||||
# services.xserver.xkb.options = "eurosign:e,caps:escape";
|
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
|
||||||
# services.printing.enable = true;
|
|
||||||
|
|
||||||
# Enable sound.
|
|
||||||
# services.pulseaudio.enable = true;
|
|
||||||
# OR
|
|
||||||
# services.pipewire = {
|
|
||||||
# enable = true;
|
|
||||||
# pulse.enable = true;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# Enable touchpad support (enabled default in most desktopManager).
|
|
||||||
# services.libinput.enable = true;
|
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
||||||
users.users.js0ny = {
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
|
||||||
packages = with pkgs; [
|
|
||||||
tree
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# programs.firefox.enable = true;
|
|
||||||
|
|
||||||
# List packages installed in system profile.
|
|
||||||
# You can use https://search.nixos.org/ to find more packages (and options).
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
|
||||||
wget
|
|
||||||
];
|
|
||||||
|
|
||||||
# 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;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# List services that you want to enable:
|
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
|
||||||
# services.openssh.enable = true;
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
||||||
# Or disable the firewall altogether.
|
|
||||||
# networking.firewall.enable = false;
|
|
||||||
|
|
||||||
# Copy the NixOS configuration file and link it from the resulting system
|
|
||||||
# (/run/current-system/configuration.nix). This is useful in case you
|
|
||||||
# accidentally delete configuration.nix.
|
|
||||||
# system.copySystemConfiguration = true;
|
|
||||||
|
|
||||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
|
||||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
|
||||||
#
|
|
||||||
# Most users should NEVER change this value after the initial install, for any reason,
|
|
||||||
# even if you've upgraded your system to a new NixOS release.
|
|
||||||
#
|
|
||||||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
|
||||||
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
|
||||||
# to actually do that.
|
|
||||||
#
|
|
||||||
# This value being lower than the current NixOS release does NOT mean your system is
|
|
||||||
# out of date, out of support, or vulnerable.
|
|
||||||
#
|
|
||||||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
|
||||||
# and migrated your data accordingly.
|
|
||||||
#
|
|
||||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
|
||||||
system.stateVersion = "25.05"; # Did you read the comment?
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
# ~/.config/nixcfgs/hosts/zephyrus/default.nix
|
# ~/.config/nixcfgs/hosts/zephyrus/default.nix
|
||||||
{config, ...}: {
|
{...}: {
|
||||||
imports = [
|
imports = [
|
||||||
../../modules/nixos
|
../../modules/nixos
|
||||||
../../modules/nixos/host-machine.nix
|
../../modules/nixos/host-machine.nix
|
||||||
|
|
@ -14,7 +14,9 @@
|
||||||
../../modules/nixos/chromium.nix
|
../../modules/nixos/chromium.nix
|
||||||
../../modules/nixos/obs-studio.nix
|
../../modules/nixos/obs-studio.nix
|
||||||
../../modules/nixos/wine.nix
|
../../modules/nixos/wine.nix
|
||||||
|
../../modules/nixos/exp.nix
|
||||||
../../modules/nixos/gnome-keyring.nix
|
../../modules/nixos/gnome-keyring.nix
|
||||||
|
../../modules/nixos/udev/basys3.nix
|
||||||
../../modules/nixos/desktop/kde.nix
|
../../modules/nixos/desktop/kde.nix
|
||||||
../../modules/nixos/desktop/hyprland.nix
|
../../modules/nixos/desktop/hyprland.nix
|
||||||
../../modules/nixos/display-manager/sddm.nix
|
../../modules/nixos/display-manager/sddm.nix
|
||||||
|
|
@ -25,14 +27,6 @@
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
networking.hostName = "zephyrus";
|
networking.hostName = "zephyrus";
|
||||||
hardware.enableRedistributableFirmware = true;
|
|
||||||
boot.extraModulePackages = with config.boot.kernelPackages; [
|
|
||||||
v4l2loopback
|
|
||||||
];
|
|
||||||
networking.modemmanager.enable = false;
|
networking.modemmanager.enable = false;
|
||||||
# Xilinx Artix-7 Basys 3
|
|
||||||
services.udev.extraRules = ''
|
|
||||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="0660", GROUP="dialout", SYMLINK+="basys3"
|
|
||||||
'';
|
|
||||||
system.stateVersion = "25.05";
|
system.stateVersion = "25.05";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,4 +3,8 @@
|
||||||
gcc
|
gcc
|
||||||
llvmPackages_21.clang-tools # clangd
|
llvmPackages_21.clang-tools # clangd
|
||||||
];
|
];
|
||||||
|
|
||||||
|
programs.vscode.profiles.default.extensions = with pkgs.vscode-extensions; [
|
||||||
|
llvm-vs-code-extensions.vscode-clangd
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,11 @@
|
||||||
{pkgs, ...}: {
|
{...}: let
|
||||||
|
alias = {"v" = "nvim";};
|
||||||
|
in {
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
};
|
};
|
||||||
|
programs.fish.shellAbbrs = alias;
|
||||||
|
programs.bash.shellAliases = alias;
|
||||||
|
programs.zsh.shellAliases = alias;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{pkgs, ...}: {
|
{...}: {
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableBashIntegration = true;
|
enableBashIntegration = true;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,11 @@
|
||||||
{pkgs, ...}: {
|
{pkgs, ...}: let
|
||||||
|
alias = {"c" = "codium";};
|
||||||
|
in {
|
||||||
programs.vscode = {
|
programs.vscode = {
|
||||||
package = pkgs.vscodium;
|
package = pkgs.vscodium;
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
programs.fish.shellAbbrs = alias;
|
||||||
|
programs.bash.shellAliases = alias;
|
||||||
|
programs.zsh.shellAliases = alias;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,19 @@
|
||||||
{pkgs, ...}: {
|
{...}: let
|
||||||
|
zoxideAliases = {
|
||||||
|
".." = "z ..";
|
||||||
|
"..." = "z ../..";
|
||||||
|
"...." = "z ../../..";
|
||||||
|
"....." = "z ../../../..";
|
||||||
|
"......" = "z ../../../../..";
|
||||||
|
};
|
||||||
|
in {
|
||||||
programs.zoxide = {
|
programs.zoxide = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableBashIntegration = true;
|
enableBashIntegration = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
enableFishIntegration = true;
|
enableFishIntegration = true;
|
||||||
};
|
};
|
||||||
|
programs.fish.shellAliases = zoxideAliases;
|
||||||
|
programs.bash.shellAliases = zoxideAliases;
|
||||||
|
programs.zsh.shellAliases = zoxideAliases;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
{ config, pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
services.desktopManager.plasma6.enable = true;
|
services.desktopManager.plasma6.enable = true;
|
||||||
|
environment.systemPackages = with pkgs.kdePackages; [
|
||||||
|
akonadi
|
||||||
|
korganizer
|
||||||
|
kdepim-addons
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
5
nixcfgs/modules/nixos/exp.nix
Normal file
5
nixcfgs/modules/nixos/exp.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{...}: {
|
||||||
|
# services.forgejo.enable = true;
|
||||||
|
services.syncthing.enable = true;
|
||||||
|
services.tailscale.enable = true;
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
{ pkgs, ... }:
|
{config, ...}: {
|
||||||
{
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
boot.extraModulePackages = with config.boot.kernelPackages; [
|
||||||
|
v4l2loopback
|
||||||
|
];
|
||||||
programs.obs-studio = {
|
programs.obs-studio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableVirtualCamera = true;
|
enableVirtualCamera = true;
|
||||||
|
|
|
||||||
6
nixcfgs/modules/nixos/udev/basys3.nix
Normal file
6
nixcfgs/modules/nixos/udev/basys3.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{...}: {
|
||||||
|
# Xilinx Artix-7 Basys 3
|
||||||
|
services.udev.extraRules = ''
|
||||||
|
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="0660", GROUP="dialout", SYMLINK+="basys3"
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
@ -1,12 +1,11 @@
|
||||||
{ config, ... }:
|
{config, ...}: {
|
||||||
{
|
|
||||||
programs.distrobox = {
|
programs.distrobox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
containers = {
|
containers = {
|
||||||
Xilinx = {
|
Xilinx = {
|
||||||
# Container to run Xilinx Vivado Toolchain 2022.2
|
# Container to run Xilinx Vivado Toolchain 2022.2
|
||||||
image = "ubuntu:22.04";
|
image = "ubuntu:22.04";
|
||||||
additional_packages = "libncurses5-dev libtinfo5 ncurses-compat-libs lsb-release graphviz openssl xscreensaver gcc c++ xvfb xorg-dev libwebkit2gtk-4.0-37 libgtk-3-dev libgtk-4-dev libgvfsdbus gvfs libwayland-client0 libwayland-cursor0";
|
additional_packages = "libncurses5-dev libtinfo5 ncurses-compat-libs lsb-release graphviz openssl xscreensaver gcc c++ xvfb xorg-dev libwebkit2gtk-4.0-37 libgtk-3-dev libgtk-4-dev libgvfsdbus gvfs libwayland-client0 libwayland-cursor0 x11-utils";
|
||||||
home = "${config.home.homeDirectory}/.local/distrobox/Xilinx";
|
home = "${config.home.homeDirectory}/.local/distrobox/Xilinx";
|
||||||
init_hooks = [
|
init_hooks = [
|
||||||
"sudo chown $USER:$USER /opt"
|
"sudo chown $USER:$USER /opt"
|
||||||
|
|
|
||||||
16
nixcfgs/users/js0ny/programs/emacs.nix
Normal file
16
nixcfgs/users/js0ny/programs/emacs.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
programs.emacs = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.emacs-pgtk;
|
||||||
|
extraPackages = epkgs:
|
||||||
|
with epkgs; [
|
||||||
|
evil
|
||||||
|
telega
|
||||||
|
beancount
|
||||||
|
counsel
|
||||||
|
];
|
||||||
|
};
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
tdlib
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
xdg.configFile."mimeapps.list".force = true;
|
||||||
xdg.mime.enable = true;
|
xdg.mime.enable = true;
|
||||||
xdg.mimeApps = {
|
xdg.mimeApps = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -8,6 +9,12 @@
|
||||||
"text/x-csrc" = "nvim-qt.desktop";
|
"text/x-csrc" = "nvim-qt.desktop";
|
||||||
"text/x-chdr" = "nvim-qt.desktop";
|
"text/x-chdr" = "nvim-qt.desktop";
|
||||||
"inode/directory" = "org.kde.dolphin.desktop";
|
"inode/directory" = "org.kde.dolphin.desktop";
|
||||||
|
"x-scheme-handler/tg" = "org.telegram.desktop.desktop";
|
||||||
|
"x-scheme-handler/tonsite" = "org.telegram.desktop.desktop";
|
||||||
|
};
|
||||||
|
associations.added = {
|
||||||
|
"x-scheme-handler/tg" = "org.telegram.desktop.desktop";
|
||||||
|
"x-scheme-handler/tonsite" = "org.telegram.desktop.desktop";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
{config, ...}: let
|
{config, ...}: let
|
||||||
commonAliases = {
|
commonAliases = {
|
||||||
v = "nvim";
|
|
||||||
g = "lazygit";
|
g = "lazygit";
|
||||||
ni = "touch";
|
ni = "touch";
|
||||||
cls = "clear";
|
cls = "clear";
|
||||||
ii = "open";
|
ii = "open";
|
||||||
c = "code";
|
|
||||||
aic = "aichat -s";
|
aic = "aichat -s";
|
||||||
aicc = "aichat -c";
|
aicc = "aichat -c";
|
||||||
nrs = "sudo nixos-rebuild switch --flake ~/.dotfiles/nixcfgs";
|
nrs = "sudo nixos-rebuild switch --flake ~/.dotfiles/nixcfgs";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
{pkgs, ...}: {
|
{pkgs, ...}: let
|
||||||
|
alias = {"c" = "code";};
|
||||||
|
in {
|
||||||
programs.vscode = {
|
programs.vscode = {
|
||||||
package = pkgs.vscode;
|
package = pkgs.vscode;
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -14,4 +16,7 @@
|
||||||
vspacecode.whichkey
|
vspacecode.whichkey
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
programs.fish.shellAbbrs = alias;
|
||||||
|
programs.bash.shellAliases = alias;
|
||||||
|
programs.zsh.shellAliases = alias;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,8 @@
|
||||||
./packages/fonts.nix
|
./packages/fonts.nix
|
||||||
./packages/catppuccin.nix
|
./packages/catppuccin.nix
|
||||||
./programs/chromium.nix
|
./programs/chromium.nix
|
||||||
./programs/gnome.nix
|
./programs/emacs.nix
|
||||||
|
# ./programs/gnome.nix
|
||||||
./programs/plasma.nix
|
./programs/plasma.nix
|
||||||
./programs/shell.nix
|
./programs/shell.nix
|
||||||
./programs/vscode.nix
|
./programs/vscode.nix
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue