initial setup
This commit is contained in:
parent
06f6f5f4a6
commit
a9207d6844
8 changed files with 58 additions and 82 deletions
|
@ -24,7 +24,7 @@ with lib;
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = with pkgs; [ fd ];
|
home.packages = with pkgs; [ fd ];
|
||||||
home.file.".config/nvim/lua".source = ./lua;
|
home.file.".config/nvim/lua".source = ./lua;
|
||||||
programs.nixvim = {
|
programs.nixvim = {helpers, ...}: {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.neovim-unwrapped;
|
package = pkgs.neovim-unwrapped;
|
||||||
vimAlias = true;
|
vimAlias = true;
|
||||||
|
@ -32,7 +32,7 @@ with lib;
|
||||||
|
|
||||||
globals.mapleader = " ";
|
globals.mapleader = " ";
|
||||||
|
|
||||||
options = {
|
opts = {
|
||||||
number = true;
|
number = true;
|
||||||
conceallevel = 2;
|
conceallevel = 2;
|
||||||
expandtab = true;
|
expandtab = true;
|
||||||
|
@ -44,7 +44,7 @@ with lib;
|
||||||
|
|
||||||
clipboard.providers.wl-copy.enable = true;
|
clipboard.providers.wl-copy.enable = true;
|
||||||
|
|
||||||
keymaps = [
|
keymaps = with helpers; [
|
||||||
# General
|
# General
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
|
@ -65,8 +65,7 @@ with lib;
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>fg";
|
key = "<leader>fg";
|
||||||
action = "require('telescope.builtin').live_grep";
|
action = mkRaw "require('telescope.builtin').live_grep";
|
||||||
lua = true;
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
|
@ -86,20 +85,18 @@ with lib;
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>ob";
|
key = "<leader>ob";
|
||||||
action = "require('obsidian_picker').obsidian_picker";
|
action = mkRaw "require('obsidian_picker').obsidian_picker";
|
||||||
lua = true;
|
|
||||||
}
|
}
|
||||||
# Commenting
|
# Commenting
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<C-/>";
|
key = "<C-/>";
|
||||||
action = "require('Comment.api').toggle.linewise.current";
|
action = mkRaw "require('Comment.api').toggle.linewise.current";
|
||||||
lua = true;
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "x";
|
mode = "x";
|
||||||
key = "<C-/>";
|
key = "<C-/>";
|
||||||
action = ''
|
action = mkRaw ''
|
||||||
function()
|
function()
|
||||||
local esc = vim.api.nvim_replace_termcodes(
|
local esc = vim.api.nvim_replace_termcodes(
|
||||||
'<ESC>', true, false, true
|
'<ESC>', true, false, true
|
||||||
|
@ -108,7 +105,6 @@ with lib;
|
||||||
require('Comment.api').toggle.linewise(vim.fn.visualmode())
|
require('Comment.api').toggle.linewise(vim.fn.visualmode())
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
lua = true;
|
|
||||||
}
|
}
|
||||||
# Float Term
|
# Float Term
|
||||||
{
|
{
|
||||||
|
@ -119,8 +115,7 @@ with lib;
|
||||||
{
|
{
|
||||||
mode = "t";
|
mode = "t";
|
||||||
key = "<ESC>";
|
key = "<ESC>";
|
||||||
action = "function() vim.cmd(':FloatermToggle myfloat') end";
|
action = mkRaw "function() vim.cmd(':FloatermToggle myfloat') end";
|
||||||
lua = true;
|
|
||||||
}
|
}
|
||||||
# Switch buffers
|
# Switch buffers
|
||||||
{
|
{
|
||||||
|
@ -163,26 +158,22 @@ with lib;
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>nr";
|
key = "<leader>nr";
|
||||||
lua = true;
|
action = mkRaw "require('neotest').run.run";
|
||||||
action = "require('neotest').run.run";
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>no";
|
key = "<leader>no";
|
||||||
lua = true;
|
action = mkRaw "require('neotest').output.open";
|
||||||
action = "require('neotest').output.open";
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>ns";
|
key = "<leader>ns";
|
||||||
lua = true;
|
action = mkRaw "require('neotest').run.stop";
|
||||||
action = "require('neotest').run.stop";
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>nf";
|
key = "<leader>nf";
|
||||||
lua = true;
|
action = mkRaw "function() require('neotest').run.run(vim.fn.expand('%')) end";
|
||||||
action = "function() require('neotest').run.run(vim.fn.expand('%')) end";
|
|
||||||
}
|
}
|
||||||
# LSP
|
# LSP
|
||||||
{
|
{
|
||||||
|
@ -205,7 +196,7 @@ with lib;
|
||||||
|
|
||||||
colorschemes.catppuccin = {
|
colorschemes.catppuccin = {
|
||||||
enable = true;
|
enable = true;
|
||||||
flavour = "frappe";
|
settings.flavour = "frappe";
|
||||||
};
|
};
|
||||||
|
|
||||||
plugins = {
|
plugins = {
|
||||||
|
@ -300,18 +291,19 @@ with lib;
|
||||||
|
|
||||||
telescope = {
|
telescope = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaults.preview.ls_short = true;
|
settings.defaults.preview.ls_short = true;
|
||||||
extensions.file-browser = {
|
extensions.file-browser = {
|
||||||
enable = true;
|
enable = true;
|
||||||
hijackNetrw = true;
|
settings = {
|
||||||
dirIcon = "";
|
hijack_netrw = true;
|
||||||
|
dir_icon = "";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
extensions.fzf-native.enable = true;
|
extensions.fzf-native.enable = true;
|
||||||
extensions.fzf-native.fuzzy = true;
|
extensions.fzf-native.settings.fuzzy = true;
|
||||||
extensions.frecency.enable = true;
|
extensions.frecency.enable = true;
|
||||||
extraOptions = { };
|
|
||||||
};
|
};
|
||||||
comment-nvim.enable = true;
|
comment.enable = true;
|
||||||
none-ls = {
|
none-ls = {
|
||||||
enable = true;
|
enable = true;
|
||||||
sources = {
|
sources = {
|
||||||
|
@ -341,7 +333,7 @@ with lib;
|
||||||
};
|
};
|
||||||
servers = {
|
servers = {
|
||||||
cssls.enable = true;
|
cssls.enable = true;
|
||||||
nil_ls.enable = true; #NixOS
|
nil-ls.enable = true; #NixOS
|
||||||
dockerls.enable = true;
|
dockerls.enable = true;
|
||||||
rust-analyzer = {
|
rust-analyzer = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -60,25 +60,25 @@ in
|
||||||
gnome-photos
|
gnome-photos
|
||||||
gnome-tour
|
gnome-tour
|
||||||
gnome-connections
|
gnome-connections
|
||||||
|
gnome-calendar
|
||||||
|
epiphany # web browser
|
||||||
|
geary # email reader
|
||||||
|
simple-scan # document scanner
|
||||||
|
totem # video player
|
||||||
|
gnome-terminal
|
||||||
])
|
])
|
||||||
++ (with pkgs.gnome; [
|
++ (with pkgs.gnome; [
|
||||||
atomix # puzzle game
|
atomix # puzzle game
|
||||||
epiphany # web browser
|
|
||||||
geary # email reader
|
|
||||||
pkgs.gedit # text editor
|
pkgs.gedit # text editor
|
||||||
gnome-calendar
|
|
||||||
gnome-clocks
|
gnome-clocks
|
||||||
gnome-contacts
|
gnome-contacts
|
||||||
gnome-maps
|
gnome-maps
|
||||||
gnome-music
|
gnome-music
|
||||||
gnome-notes
|
gnome-notes
|
||||||
gnome-terminal
|
|
||||||
gnome-weather
|
gnome-weather
|
||||||
hitori # sudoku game
|
hitori # sudoku game
|
||||||
iagno # go game
|
iagno # go game
|
||||||
simple-scan # document scanner
|
|
||||||
tali # poker game
|
tali # poker game
|
||||||
totem # video player
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
# Services required for gnome
|
# Services required for gnome
|
||||||
|
@ -86,7 +86,7 @@ in
|
||||||
|
|
||||||
# Extra gnome packages
|
# Extra gnome packages
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
gnome.gnome-tweaks
|
gnome-tweaks
|
||||||
gnome.gnome-boxes
|
gnome.gnome-boxes
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -160,6 +160,7 @@
|
||||||
jq
|
jq
|
||||||
fup-repl
|
fup-repl
|
||||||
nh
|
nh
|
||||||
|
nixfmt-rfc-style
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
# common container config
|
# common container config
|
||||||
{ lib, ... }: {
|
{ lib, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
# ../../../../common/modules
|
../../../../common
|
||||||
# home-manager.nixosModules.home-manager # TODO: I don't like this
|
|
||||||
];
|
];
|
||||||
# Workaround for bug https://github.com/NixOS/nixpkgs/issues/162686
|
# Workaround for bug https://github.com/NixOS/nixpkgs/issues/162686
|
||||||
networking.useHostResolvConf = lib.mkForce false;
|
networking.useHostResolvConf = lib.mkForce false;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, ... }:
|
{ config, lib, inputs, ... }:
|
||||||
let
|
let
|
||||||
hostAddress = "10.42.99.1";
|
hostAddress = "10.42.99.1";
|
||||||
hostAddress6 = "fc00::1";
|
hostAddress6 = "fc00::1";
|
||||||
|
@ -21,13 +21,28 @@ in {
|
||||||
# * fc00:x
|
# * fc00:x
|
||||||
|
|
||||||
containers = {
|
containers = {
|
||||||
# dns = {
|
dns = {
|
||||||
# autoStart = true;
|
autoStart = true;
|
||||||
# inherit hostAddress hostAddress6;
|
inherit hostAddress hostAddress6;
|
||||||
# localAddress = "10.42.99.1";
|
localAddress = "10.42.99.1";
|
||||||
# localAddress6 = "fc00::2";
|
localAddress6 = "fc00::2";
|
||||||
#
|
|
||||||
# config = ./dns.nix;
|
specialArgs = { inherit inputs; };
|
||||||
# };
|
|
||||||
|
config = {pkgs, ...}: {
|
||||||
|
imports = [
|
||||||
|
./common.nix
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
inputs.gnome-autounlock-keyring.nixosModules.default
|
||||||
|
inputs.catppuccin.nixosModules.catppuccin
|
||||||
|
];
|
||||||
|
|
||||||
|
services.v.dns = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
mode = "server";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
{ ... }: {
|
|
||||||
imports = [ ./common.nix ];
|
|
||||||
services.v.dns = {
|
|
||||||
enable = true;
|
|
||||||
openFirewall = true;
|
|
||||||
mode = "server";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -11,7 +11,7 @@
|
||||||
bluetooth.enable = true;
|
bluetooth.enable = true;
|
||||||
|
|
||||||
# OpenGL + Vulkan
|
# OpenGL + Vulkan
|
||||||
opengl = {
|
graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
amdvlk
|
amdvlk
|
||||||
|
|
|
@ -13,30 +13,8 @@ in
|
||||||
v.hyprland-workspaces
|
v.hyprland-workspaces
|
||||||
];
|
];
|
||||||
|
|
||||||
systemd.user.services.mako = {
|
services = {
|
||||||
Install = {
|
mako.enable = true;
|
||||||
WantedBy = [ "hyprland-session.target" ];
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
Type = "dbus";
|
|
||||||
BusName = "org.freedesktop.Notifications";
|
|
||||||
|
|
||||||
ExecCondition = ''
|
|
||||||
${pkgs.bash}/bin/bash -c '[ -n "$WAYLAND_DISPLAY" ]'
|
|
||||||
'';
|
|
||||||
|
|
||||||
ExecStart = ''
|
|
||||||
${pkgs.mako}/bin/mako
|
|
||||||
'';
|
|
||||||
|
|
||||||
ExecReload = ''
|
|
||||||
${pkgs.mako}/bin/makoctl reload
|
|
||||||
'';
|
|
||||||
|
|
||||||
Restart = "on-failure";
|
|
||||||
RestartSec = 1;
|
|
||||||
TimeoutStopSec = 10;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
|
@ -49,7 +27,6 @@ in
|
||||||
# configDir = ./eww;
|
# configDir = ./eww;
|
||||||
# };
|
# };
|
||||||
|
|
||||||
mako.enable = true;
|
|
||||||
|
|
||||||
waybar = {
|
waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -173,7 +150,7 @@ in
|
||||||
wpctl = "${pkgs.wireplumber}/bin/wpctl";
|
wpctl = "${pkgs.wireplumber}/bin/wpctl";
|
||||||
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
|
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
|
||||||
menu = "${config.programs.wofi.package}/bin/wofi --show run,drun";
|
menu = "${config.programs.wofi.package}/bin/wofi --show run,drun";
|
||||||
fileManager = "${pkgs.gnome.nautilus}/bin/nautilus";
|
fileManager = "${pkgs.nautilus}/bin/nautilus";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
"$mod" = "SUPER";
|
"$mod" = "SUPER";
|
||||||
|
|
Loading…
Add table
Reference in a new issue