mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 00:33: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",
|
||||
event = "BufReadPre",
|
||||
cmd = {
|
||||
"SessionSearch",
|
||||
"SessionSave",
|
||||
"AutoSession",
|
||||
},
|
||||
opts = {
|
||||
suppressed_dirs = { "~/", "~/Projects", "~/Downloads", "/" },
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>ps", "<Cmd>AutoSession search<CR>", desc = "List all sessions" },
|
||||
},
|
||||
},
|
||||
-- { import = "plugins.mod.nvim-tree" },
|
||||
-- { import = "plugins.mod.telescope" },
|
||||
|
|
@ -35,5 +37,5 @@ return {
|
|||
-- "Neogit",
|
||||
-- },
|
||||
-- },
|
||||
{ import = "plugins.mod.neo-tree" }
|
||||
{ import = "plugins.mod.neo-tree" },
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
local uuid = function()
|
||||
local template = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'
|
||||
return string.gsub(template, '[xy]', function(c)
|
||||
local v = (c == 'x') and math.random(0, 0xf) or math.random(8, 0xb)
|
||||
return string.format('%x', v)
|
||||
local template = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"
|
||||
return string.gsub(template, "[xy]", function(c)
|
||||
local v = (c == "x") and math.random(0, 0xf) or math.random(8, 0xb)
|
||||
return string.format("%x", v)
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
return {
|
||||
"obsidian-nvim/obsidian.nvim",
|
||||
version = "*", -- recommended, use latest release instead of latest commit
|
||||
|
|
@ -83,45 +82,47 @@ return {
|
|||
yesterday = function()
|
||||
return os.date("%Y-%m-%d", os.time() - 86400)
|
||||
end,
|
||||
uuid = uuid()
|
||||
uuid = uuid(),
|
||||
},
|
||||
},
|
||||
---@return table
|
||||
note_frontmatter_func = function(note)
|
||||
-- Add the title of the note as an alias.
|
||||
if note.title then
|
||||
note:add_alias(note.title)
|
||||
end
|
||||
|
||||
-- Force to use UUID as the note id.
|
||||
local note_id
|
||||
if note.metadata then
|
||||
note_id = note.id
|
||||
else
|
||||
note_id = uuid()
|
||||
end
|
||||
|
||||
local out = {
|
||||
id = note_id,
|
||||
aliases = note.aliases,
|
||||
tags = note.tags,
|
||||
title = note.id,
|
||||
date = os.date(
|
||||
"%Y-%m-%dT00:00:00"),
|
||||
}
|
||||
|
||||
-- `note.metadata` contains any manually added fields in the frontmatter.
|
||||
-- So here we just make sure those fields are kept in the frontmatter.
|
||||
if note.metadata ~= nil and not vim.tbl_isempty(note.metadata) then
|
||||
for k, v in pairs(note.metadata) do
|
||||
out[k] = v
|
||||
frontmatter = {
|
||||
func = function(note)
|
||||
-- Add the title of the note as an alias.
|
||||
if note.title then
|
||||
note:add_alias(note.title)
|
||||
end
|
||||
end
|
||||
|
||||
-- Force to update mtime.
|
||||
out.mtime = os.date("%Y-%m-%dT%H:%M:%S")
|
||||
return out
|
||||
end,
|
||||
-- Force to use UUID as the note id.
|
||||
local note_id = uuid()
|
||||
if note.metadata.id == nil then
|
||||
note_id = uuid()
|
||||
else
|
||||
note_id = note.metadata.id
|
||||
end
|
||||
|
||||
local out = {
|
||||
-- id = note_id,
|
||||
aliases = note.aliases,
|
||||
tags = note.tags,
|
||||
title = note.id,
|
||||
-- date = os.date("%Y-%m-%dT00:00:00"),
|
||||
-- mtime = os.date("%Y-%m-%dT%H:%M:%S"),
|
||||
}
|
||||
|
||||
-- `note.metadata` contains any manually added fields in the frontmatter.
|
||||
-- So here we just make sure those fields are kept in the frontmatter.
|
||||
if note.metadata ~= nil and not vim.tbl_isempty(note.metadata) then
|
||||
for k, v in pairs(note.metadata) do
|
||||
out[k] = v
|
||||
end
|
||||
end
|
||||
|
||||
-- Force to update mtime.
|
||||
out.mtime = os.date("%Y-%m-%dT%H:%M:%S")
|
||||
return out
|
||||
end,
|
||||
},
|
||||
daily_notes = {
|
||||
folder = "_Global/Periodic",
|
||||
date_format = "%Y-%m-%d",
|
||||
|
|
|
|||
|
|
@ -3,28 +3,29 @@ return {
|
|||
-- optional for icon support
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
cmd = "FzfLua",
|
||||
--stylua: ignore start
|
||||
keys = {
|
||||
{ "<leader><leader>", "<cmd>FzfLua files<CR>", desc = "Find Files" },
|
||||
{ "<leader>fc", "<cmd>FzfLua files cwd=~/.config/nvim<CR>", desc = "Edit configs" },
|
||||
{ "<leader>/", "<cmd>FzfLua live_grep<CR>", desc = "Grep Files" },
|
||||
{ "<leader>;", "<cmd>FzfLua<CR>", desc = "Show Telescope Commands" },
|
||||
{ "<leader>ui", "<cmd>FzfLua colorschemes<CR>", desc = "Change colorscheme" },
|
||||
-- find_files { "<leader>pp", "<cmd>FzfLua projects<CR>", desc = "Listfind_files all Projects" },
|
||||
{ "<leader>pd", "<cmd>FzfLua zoxide<CR>", desc = "List recent directories" },
|
||||
-- { "<leader>pg", "<cmd>FzfLua projects<CR>", desc = "List all Git Projects" },
|
||||
{ "<leader>ps", "<cmd>FzfLua session-lens<CR>", desc = "List all sessions" },
|
||||
{ "<leader>gs", "<cmd>FzfLua git_status<CR>", desc = "Git Status" },
|
||||
{ "<leader>gt", "<cmd>FzfLua git_branches<CR>", desc = "Git Branches" },
|
||||
{ "<leader>gc", "<cmd>FzfLua git_commits<CR>", desc = "Show commits" },
|
||||
{ "<leader>fb", "<cmd>FzfLua buffers<CR>", desc = "List Buffers" },
|
||||
{ "<leader>ff", "<cmd>FzfLua fd<CR>", desc = "Find Files" },
|
||||
{ "<leader>fh", "<cmd>FzfLua oldfiles<CR>", desc = "Recent Files" },
|
||||
{ "<leader>ce", "<cmd>FzfLua diagnostics<CR>", desc = "Navigate errors/warnings" },
|
||||
{ "<leader>cs", "<cmd>FzfLua treesitter<CR>", desc = "Search symbols" },
|
||||
{ "<leader>cS", "<cmd>FzfLua grep_string<CR>", desc = "Search current symbol" },
|
||||
{ "<leader>bB", "<cmd>FzfLua buffers<CR>", desc = "List Buffers" },
|
||||
{ "<leader>fl", "<cmd>FzfLua filetypes<CR>", desc = "Set Filetype/Lang to ..." },
|
||||
{ "<leader>R", "<cmd>FzfLua resume<CR>", desc = "Resume FzfLua" },
|
||||
{ "<leader><leader>", function() require("fzf-lua").files() end, desc = "Find Files" },
|
||||
{ "<leader>fc", function() require("fzf-lua").files({ cwd="~/.dotfiles/home/dot_config/nvim"}) end, desc = "Edit configs" },
|
||||
{ "<leader>/", function() require("fzf-lua").live_grep() end, desc = "Grep Files" },
|
||||
{ "<leader>;", function() require("fzf-lua").commands() end, desc = "Show Telescope Commands" },
|
||||
{ "<leader>ui", function() require("fzf-lua").colorschemes() end, desc = "Change colorscheme" },
|
||||
-- find_files { "<leader>pp", require("fzf-lua").projects, des c = "Listfind_files all Projects" },
|
||||
{ "<leader>pd", function() require("fzf-lua").zoxide() end, desc = "List recent directories" },
|
||||
-- { "<leader>pg", require("fzf-lua").projects, desc = "List all Git Projects" },
|
||||
{ "<leader>gs", function() require("fzf-lua").git_status() end, desc = "Git Status" },
|
||||
{ "<leader>gt", function() require("fzf-lua").git_branches() end, desc = "Git Branches" },
|
||||
{ "<leader>gc", function() require("fzf-lua").git_commits() end, desc = "Show commits" },
|
||||
{ "<leader>fb", function() require("fzf-lua").buffers() end, desc = "List Buffers" },
|
||||
{ "<leader>ff", function() require("fzf-lua").files() end, desc = "Find Files" },
|
||||
{ "<leader>fh", function() require("fzf-lua").oldfiles() end, desc = "Recent Files" },
|
||||
-- { "<leader>ce", require("fzf-lua").diagnostics(), desc = "Navi gate errors/warnings" },
|
||||
{ "<leader>cs", function() require("fzf-lua").treesitter() end, desc = "Search symbols" },
|
||||
{ "<leader>cS", function() require("fzf-lua").grep_visual() end, desc = "Search current symbol" },
|
||||
{ "<leader>bB", function() require("fzf-lua").buffers() end, desc = "List Buffers" },
|
||||
{ "<leader>fl", function() require("fzf-lua").filetypes() end, desc = "Set Filetype/Lang to ..." },
|
||||
{ "<leader>R", function() require("fzf-lua").resume() end, desc = "Resume FzfLua" },
|
||||
},
|
||||
--stylua: ignore end
|
||||
opts = {},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,15 +10,16 @@ return {
|
|||
dashboard = {
|
||||
enabled = true,
|
||||
preset = {
|
||||
-- stylua: ignore start
|
||||
keys = {
|
||||
-- { key = "p", icon = " ", desc = "查找项目", action = "<cmd>Telescope projects<CR>" },
|
||||
{ key = "h", icon = " ", desc = "历史文件", action = "<cmd>FzfLua oldfiles<CR>" },
|
||||
{ key = "l", icon = " ", desc = "加载会话", action = "<cmd>SessionSearch<CR>" },
|
||||
{ key = "h", icon = " ", desc = "历史文件", action = function () require("fzf-lua").oldfiles() end },
|
||||
{ key = "l", icon = " ", desc = "加载会话", action = "<cmd>AutoSession search<CR>" },
|
||||
{
|
||||
key = "c",
|
||||
icon = " ",
|
||||
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>" },
|
||||
},
|
||||
|
|
@ -69,19 +70,21 @@ return {
|
|||
{ section = "startup" },
|
||||
},
|
||||
},
|
||||
-- stylua: ignore end
|
||||
-- explorer = {
|
||||
-- },
|
||||
indent = { enabled = true },
|
||||
-- input = { enabled = true },
|
||||
input = { enabled = true },
|
||||
notifier = { enabled = true },
|
||||
-- quickfile = { enabled = true },
|
||||
quickfile = { enabled = true },
|
||||
scope = { enabled = true },
|
||||
-- scroll = { enabled = true },
|
||||
scroll = { enabled = true },
|
||||
statuscolumn = { enabled = true },
|
||||
-- words = { enabled = true },
|
||||
image = {
|
||||
enabled = true,
|
||||
img_dirs = { "90 - System/Assets" }
|
||||
-- See: ../lang/markdown/obsidian-nvim.lua
|
||||
img_dirs = { "90 - System/Assets" },
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
|
|
|
|||
|
|
@ -27,87 +27,95 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
nix-flatpak,
|
||||
nix-darwin,
|
||||
home-manager,
|
||||
plasma-manager,
|
||||
nur,
|
||||
winboat,
|
||||
caelestia-shell,
|
||||
...
|
||||
} @ inputs: let
|
||||
overlays = [
|
||||
nur.overlays.default
|
||||
(final: prev: {
|
||||
winboat = winboat.packages.x86_64-linux.winboat;
|
||||
caelestia-shell = caelestia-shell.packages.x86_64-linux.caelestia-shell;
|
||||
})
|
||||
];
|
||||
forSystem = system:
|
||||
import nixpkgs {
|
||||
inherit system overlays;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
specialArgs = {inherit inputs overlays;};
|
||||
nixosHosts = [
|
||||
"zp"
|
||||
"zephyrus"
|
||||
"nixvirt"
|
||||
];
|
||||
|
||||
mkNixosSystem = hostname:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
inherit specialArgs;
|
||||
modules = [./hosts/${hostname} {nixpkgs.overlays = overlays;}];
|
||||
};
|
||||
in {
|
||||
# This will automatically generate nixOS config for `nixosHosts'
|
||||
# Include the module ./hosts/${hostname} by default.
|
||||
nixosConfigurations = nixpkgs.lib.genAttrs nixosHosts mkNixosSystem;
|
||||
|
||||
darwinConfigurations."zen" = nix-darwin.lib.darwinSystem {
|
||||
system = "aarch64-darwin";
|
||||
inherit specialArgs;
|
||||
modules = [
|
||||
./hosts/zen
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
nix-flatpak,
|
||||
nix-darwin,
|
||||
home-manager,
|
||||
plasma-manager,
|
||||
nur,
|
||||
winboat,
|
||||
caelestia-shell,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
overlays = [
|
||||
nur.overlays.default
|
||||
(final: prev: {
|
||||
winboat = winboat.packages.x86_64-linux.winboat;
|
||||
caelestia-shell = caelestia-shell.packages.x86_64-linux.caelestia-shell;
|
||||
})
|
||||
];
|
||||
forSystem =
|
||||
system:
|
||||
import nixpkgs {
|
||||
inherit system overlays;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
specialArgs = { inherit inputs overlays; };
|
||||
nixosHosts = [
|
||||
"zp"
|
||||
"zephyrus"
|
||||
"nixvirt"
|
||||
];
|
||||
};
|
||||
|
||||
homeConfigurations = {
|
||||
js0ny = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = forSystem "x86_64-linux";
|
||||
extraSpecialArgs = specialArgs;
|
||||
mkNixosSystem =
|
||||
hostname:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
inherit specialArgs;
|
||||
modules = [
|
||||
./hosts/${hostname}
|
||||
{ nixpkgs.overlays = overlays; }
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
# This will automatically generate nixOS config for `nixosHosts'
|
||||
# Include the module ./hosts/${hostname} by default.
|
||||
nixosConfigurations = nixpkgs.lib.genAttrs nixosHosts mkNixosSystem;
|
||||
|
||||
darwinConfigurations."zen" = nix-darwin.lib.darwinSystem {
|
||||
system = "aarch64-darwin";
|
||||
inherit specialArgs;
|
||||
modules = [
|
||||
./users/js0ny
|
||||
./hosts/zen
|
||||
];
|
||||
};
|
||||
"js0ny@zephyrus" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = forSystem "x86_64-linux";
|
||||
extraSpecialArgs = specialArgs;
|
||||
modules = [
|
||||
./users/js0ny/zephyrus.nix
|
||||
plasma-manager.homeModules.plasma-manager
|
||||
nix-flatpak.homeManagerModules.nix-flatpak
|
||||
];
|
||||
};
|
||||
"js0ny@nixvirt" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = forSystem "x86_64-linux";
|
||||
extraSpecialArgs = specialArgs;
|
||||
modules = [
|
||||
./users/js0ny/nixvirt.nix
|
||||
];
|
||||
};
|
||||
"js0ny@zen" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = forSystem "aarch64-darwin";
|
||||
extraSpecialArgs = specialArgs;
|
||||
modules = [
|
||||
./users/js0ny/zen.nix
|
||||
];
|
||||
|
||||
homeConfigurations = {
|
||||
js0ny = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = forSystem "x86_64-linux";
|
||||
extraSpecialArgs = specialArgs;
|
||||
modules = [
|
||||
./users/js0ny
|
||||
];
|
||||
};
|
||||
"js0ny@zephyrus" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = forSystem "x86_64-linux";
|
||||
extraSpecialArgs = specialArgs;
|
||||
modules = [
|
||||
./users/js0ny/zephyrus.nix
|
||||
plasma-manager.homeModules.plasma-manager
|
||||
nix-flatpak.homeManagerModules.nix-flatpak
|
||||
];
|
||||
};
|
||||
"js0ny@nixvirt" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = forSystem "x86_64-linux";
|
||||
extraSpecialArgs = specialArgs;
|
||||
modules = [
|
||||
./users/js0ny/nixvirt.nix
|
||||
];
|
||||
};
|
||||
"js0ny@zen" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = forSystem "aarch64-darwin";
|
||||
extraSpecialArgs = specialArgs;
|
||||
modules = [
|
||||
./users/js0ny/zen.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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, ...}: {
|
||||
{...}: {
|
||||
imports = [
|
||||
../../modules/nixos
|
||||
../../modules/nixos/host-machine.nix
|
||||
|
|
@ -14,7 +14,9 @@
|
|||
../../modules/nixos/chromium.nix
|
||||
../../modules/nixos/obs-studio.nix
|
||||
../../modules/nixos/wine.nix
|
||||
../../modules/nixos/exp.nix
|
||||
../../modules/nixos/gnome-keyring.nix
|
||||
../../modules/nixos/udev/basys3.nix
|
||||
../../modules/nixos/desktop/kde.nix
|
||||
../../modules/nixos/desktop/hyprland.nix
|
||||
../../modules/nixos/display-manager/sddm.nix
|
||||
|
|
@ -25,14 +27,6 @@
|
|||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
networking.hostName = "zephyrus";
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [
|
||||
v4l2loopback
|
||||
];
|
||||
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";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,4 +3,8 @@
|
|||
gcc
|
||||
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 = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
};
|
||||
programs.fish.shellAbbrs = alias;
|
||||
programs.bash.shellAliases = alias;
|
||||
programs.zsh.shellAliases = alias;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{pkgs, ...}: {
|
||||
{...}: {
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
{pkgs, ...}: {
|
||||
{pkgs, ...}: let
|
||||
alias = {"c" = "codium";};
|
||||
in {
|
||||
programs.vscode = {
|
||||
package = pkgs.vscodium;
|
||||
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 = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = 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;
|
||||
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 = {
|
||||
enable = 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 = {
|
||||
enable = true;
|
||||
containers = {
|
||||
Xilinx = {
|
||||
# Container to run Xilinx Vivado Toolchain 2022.2
|
||||
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";
|
||||
init_hooks = [
|
||||
"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.mimeApps = {
|
||||
enable = true;
|
||||
|
|
@ -8,6 +9,12 @@
|
|||
"text/x-csrc" = "nvim-qt.desktop";
|
||||
"text/x-chdr" = "nvim-qt.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
|
||||
commonAliases = {
|
||||
v = "nvim";
|
||||
g = "lazygit";
|
||||
ni = "touch";
|
||||
cls = "clear";
|
||||
ii = "open";
|
||||
c = "code";
|
||||
aic = "aichat -s";
|
||||
aicc = "aichat -c";
|
||||
nrs = "sudo nixos-rebuild switch --flake ~/.dotfiles/nixcfgs";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
{pkgs, ...}: let
|
||||
alias = {"c" = "code";};
|
||||
in {
|
||||
programs.vscode = {
|
||||
package = pkgs.vscode;
|
||||
enable = true;
|
||||
|
|
@ -14,4 +16,7 @@
|
|||
vspacecode.whichkey
|
||||
];
|
||||
};
|
||||
programs.fish.shellAbbrs = alias;
|
||||
programs.bash.shellAliases = alias;
|
||||
programs.zsh.shellAliases = alias;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@
|
|||
./packages/fonts.nix
|
||||
./packages/catppuccin.nix
|
||||
./programs/chromium.nix
|
||||
./programs/gnome.nix
|
||||
./programs/emacs.nix
|
||||
# ./programs/gnome.nix
|
||||
./programs/plasma.nix
|
||||
./programs/shell.nix
|
||||
./programs/vscode.nix
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue