Compare commits

..

9 Commits

Author SHA1 Message Date
fb09434e89 Run nix flake update
All checks were successful
pre-commit / pre-commit (push) Successful in 2m11s
2024-03-01 09:38:59 +01:00
0e58043ef4 Add ffmpeg 2024-03-01 09:38:06 +01:00
6d6665b06f Change alacritty opacity 2024-02-29 12:39:51 +01:00
180aead234 Add xdg protal and opengl 2024-02-29 12:16:57 +01:00
e61a8f1d65 Update and add hyperpapr 2024-02-29 10:17:13 +01:00
e7d4580c6e Add hyprpaper 2024-02-29 09:27:26 +01:00
2ca92fb2a2 Less noise on boot 2024-02-28 14:35:11 +01:00
c5706f1cd8 Improve neovim config 2024-02-28 10:01:01 +01:00
f5c7448c8a Run nix flake update 2024-02-28 03:57:05 +01:00
13 changed files with 132 additions and 13 deletions

12
flake.lock generated
View File

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1708988456,
"narHash": "sha256-RCz7Xe64tN2zgWk+MVHkzg224znwqknJ1RnB7rVqUWw=",
"lastModified": 1709204054,
"narHash": "sha256-U1idK0JHs1XOfSI1APYuXi4AEADf+B+ZU4Wifc0pBHk=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "1d085ea4444d26aa52297758b333b449b2aa6fca",
"rev": "2f3367769a93b226c467551315e9e270c3f78b15",
"type": "github"
},
"original": {
@ -22,11 +22,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1708807242,
"narHash": "sha256-sRTRkhMD4delO/hPxxi+XwLqPn8BuUq6nnj4JqLwOu0=",
"lastModified": 1709150264,
"narHash": "sha256-HofykKuisObPUfj0E9CJVfaMhawXkYx3G8UIFR/XQ38=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "73de017ef2d18a04ac4bfd0c02650007ccb31c2a",
"rev": "9099616b93301d5cf84274b184a3a5ec69e94e08",
"type": "github"
},
"original": {

View File

@ -1,10 +1,10 @@
{ inputs, self, user, ... }: {
{ pkgs, inputs, self, user, ... }: {
imports = [ inputs.home-manager.nixosModules.home-manager ];
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
extraSpecialArgs = { inherit inputs user; };
users.${user} = {
extraSpecialArgs = { inherit pkgs inputs user; };
users.${user} = { pkgs, ... }: {
imports = [
./editor/neovim
./programs/firefox

View File

@ -14,9 +14,13 @@
lsp-zero-nvim
vim-floaterm
luasnip
lualine-nvim
vim-sleuth
(nvim-treesitter.withPlugins (p: [
p.tree-sitter-yaml
p.tree-sitter-nix
p.tree-sitter-go
p.tree-sitter-lua
p.tree-sitter-vim
p.tree-sitter-bash
p.tree-sitter-json

View File

@ -16,3 +16,7 @@ vim.keymap.set('n', '<leader>?', require('telescope.builtin').oldfiles,
{ desc = '[?] FInd recently opened files' })
vim.keymap.set('n', '<leader>ff', require('telescope.builtin').find_files,
{ desc = '[F]ind [F]iles' })
vim.keymap.set('n', '<leader>ff', require('telescope.builtin').find_files,
{ desc = '[F]ind [F]iles' })
vim.keymap.set('n', '<leader>fg', require('telescope.builtin').live_grep,
{ desc = '[F]ind by [G]rep' })

View File

@ -10,3 +10,4 @@ vim.o.relativenumber = true
vim.o.tabstop = 4
vim.o.shiftwidth = 4
vim.o.expandtab = true

View File

@ -49,3 +49,69 @@ require('telescope').setup({
}
},
})
-- Tresitter stuff
require('nvim-treesitter.configs').setup {
ensure_installed = {},
auto_install = false,
highlight = { enable = true },
indent = { enable = true},
incremental_selection = {
enable = true,
keymaps = {
init_selection = '<c-space>',
node_incremental = '<c-space>',
scope_incremental = '<c-s>',
node_decremental = '<M-space>',
},
},
textobjects = {
select = {
enable = true,
lookahead = true,
keymaps = {
['aa'] = '@parameter.outer',
['ia'] = '@parameter.inner',
['af'] = '@function.outer',
['if'] = '@function.inner',
['ac'] = '@class.outer',
['ic'] = '@class.inner',
}
}
}
}
-- Lualine
require('lualine').setup({
options = {
icons_enabled = false,
component_separators = '|',
disabled_filetypes = {},
always_divide_middle = true,
globalstatus = true,
},
sections = {
lualine_a = { 'mode' },
lualine_b = { 'branch', 'diff', 'diagnostics' },
lualine_c = {
{
'filename',
file_status = true,
newfile_status = true,
path = 3,
shorting_target = 30,
symbols = {
modified = '[+]',
readonly = '[-]',
unnamed = '[No name]',
newfile = '[New]'
}
}
},
lualine_x = {'encoding', 'fileformat', 'filetype'},
lualine_y = { 'progress' },
lualine_z = { 'location' }
}
})

View File

@ -1 +1 @@
{ imports = [ ./hyprland.nix ./waybar.nix ]; }
{ imports = [ ./hyprland.nix ./waybar.nix ./xdg.nix ]; }

View File

@ -1,7 +1,7 @@
{ inputs, pkgs, lib, ... }: {
{ inputs, pkgs, lib, config, ... }: {
options.hyprland.enable = lib.mkEnableOption "Hyprland";
config = {
home.packages = with pkgs; [ swww wl-clipboard cliphist ];
home.packages = with pkgs; [ swww wl-clipboard cliphist hyprpaper hyprlock ];
wayland.windowManager.hyprland = {
enable = true;
@ -54,6 +54,10 @@
master.new_is_master = true;
misc.force_default_wallpaper = -1;
windowrulev2 = [
"opacity 0.95 override 0.5 override,class:^(Alacritty)$"
];
bind = [
# term
"$mainMod,Return,exec,$term"
@ -85,7 +89,7 @@
"$mainMod, ${ws}, workspace, ${toString (x + 1)}"
"ALT, ${ws}, workspace, ${toString (x + 1)}"
]) 10));
exec-once = [ "waybar &" ];
exec-once = [ "waybar & hyprpaper" ];
};
};
};

View File

@ -0,0 +1,3 @@
preload = ~/pics/wallpapers/1.jpg
wallpaper = eDP-1,~/pics/wallpapers/1.jpg
splash = false

8
home/hyprland/xdg.nix Normal file
View File

@ -0,0 +1,8 @@
{ config, ... }: {
xdg.configFile = {
"hypr/hyprpaper.conf" = {
source = config.lib.file.mkOutOfStoreSymlink ./. + "/hyprpaper.conf";
target = "hypr/hyprpaper.conf";
};
};
}

View File

@ -6,6 +6,8 @@
btop
bzip2
croc
fd
ffmpeg
file
go-task
jq

View File

@ -4,6 +4,11 @@
imports = [ ./hardware-configuration.nix ];
# Bootloader stuff
boot.kernelParams = [
"quiet"
"splash"
"rd.systemd.show_status=false"
];
boot.loader.systemd-boot = { enable = true; };
boot.loader.efi = { canTouchEfiVariables = true; };
@ -14,11 +19,22 @@
# Set time stuff
time.timeZone = "Europe/Oslo";
# Enable opengl
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver
vaapiVdpau
libvdpau-va-gl
];
};
# Setup hyprland
services.xserver.enable = true;
programs.hyprland = {
enable = true;
xwayland.enable = true;
portalPackage = pkgs.xdg-desktop-portal-hyprland;
};
# Setup common XDG env vars
@ -31,6 +47,16 @@
PATH = [ "${XDG_BIN_HOME}" ];
};
# Setup xdg portal
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = (with pkgs; [
xdg-desktop-portal-hyprland
xdg-desktop-portal-gtk
]);
};
# Enable flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];

View File

@ -6,6 +6,7 @@
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
noto-fonts-monochrome-emoji
twemoji-color-font
font-awesome
];