Compare commits
43 Commits
fb680669fd
...
8b88bc178a
Author | SHA1 | Date | |
---|---|---|---|
8b88bc178a | |||
01a47497db | |||
d375bf295a | |||
0360a994c9 | |||
ad9656072c | |||
e0e927edb1 | |||
405080b22d | |||
89362838dc | |||
e2f45ccc42 | |||
f54d519ab1 | |||
ef1843801f | |||
ffc6e57b23 | |||
03cbf084e0 | |||
5f48a0ab51 | |||
fc677c6270 | |||
13d8a1b162 | |||
74311f01f8 | |||
3d533cd90f | |||
f07853ac05 | |||
8e46ecdb3a | |||
71dcf157a5 | |||
d32656069a | |||
eba67abc2a | |||
705c9ba011 | |||
c11bc57eb2 | |||
08ad72c933 | |||
bb9bb49940 | |||
70d37cc0e1 | |||
f0538e191d | |||
40332b46df | |||
9cc4631fa6 | |||
3c0f25d61f | |||
87ff39bb86 | |||
70cec6f3c6 | |||
1fbed0bf8a | |||
9b7ce0260c | |||
f79aec6f00 | |||
ce1ea8959f | |||
35ada16dcb | |||
9f5f770409 | |||
c0479068ed | |||
f0842bf343 | |||
b3423e8472 |
32
flake.lock
generated
32
flake.lock
generated
@ -7,26 +7,43 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1709204054,
|
"lastModified": 1706981411,
|
||||||
"narHash": "sha256-U1idK0JHs1XOfSI1APYuXi4AEADf+B+ZU4Wifc0pBHk=",
|
"narHash": "sha256-cLbLPTL1CDmETVh4p0nQtvoF+FSEjsnJTFpTxhXywhQ=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "2f3367769a93b226c467551315e9e270c3f78b15",
|
"rev": "652fda4ca6dafeb090943422c34ae9145787af37",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
|
"ref": "release-23.11",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1709150264,
|
"lastModified": 1709569716,
|
||||||
"narHash": "sha256-HofykKuisObPUfj0E9CJVfaMhawXkYx3G8UIFR/XQ38=",
|
"narHash": "sha256-iOR44RU4jQ+YPGrn+uQeYAp7Xo7Z/+gT+wXJoGxxLTY=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "9099616b93301d5cf84274b184a3a5ec69e94e08",
|
"rev": "617579a787259b9a6419492eaac670a5f7663917",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-23.11",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-unstable": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1709479366,
|
||||||
|
"narHash": "sha256-n6F0n8UV6lnTZbYPl1A9q1BS0p4hduAv1mGAP17CVd0=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "b8697e57f10292a6165a20f03d2f42920dfaf973",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -39,7 +56,8 @@
|
|||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs",
|
||||||
|
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
25
flake.nix
25
flake.nix
@ -2,34 +2,45 @@
|
|||||||
description = "Torjus nixos config flake";
|
description = "Torjus nixos config flake";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
# nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-23.11";
|
||||||
|
nixpkgs-unstable.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager?ref=release-23.11";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, ... }@inputs:
|
outputs = { self, nixpkgs, nixpkgs-unstable, ... }@inputs:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
user = "torjus";
|
user = "torjus";
|
||||||
|
overlay-unstable = final: prev: {
|
||||||
|
unstable = import nixpkgs-unstable {
|
||||||
|
inherit system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
prismo = nixpkgs.lib.nixosSystem {
|
prismo = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
inherit system;
|
||||||
specialArgs = { inherit inputs self user; };
|
specialArgs = { inherit inputs self user; };
|
||||||
modules = [ ./hosts/prismo ];
|
modules = [ ./hosts/prismo ];
|
||||||
};
|
};
|
||||||
magicman = nixpkgs.lib.nixosSystem {
|
magicman = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
inherit system;
|
||||||
specialArgs = { inherit inputs self user; };
|
specialArgs = { inherit inputs self user; };
|
||||||
modules = [ ./hosts/magicman ];
|
modules = [ ./hosts/magicman ];
|
||||||
};
|
};
|
||||||
gunter = nixpkgs.lib.nixosSystem {
|
gunter = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
inherit system;
|
||||||
specialArgs = { inherit inputs self user; };
|
specialArgs = { inherit inputs self user; };
|
||||||
modules = [ ./hosts/gunter ];
|
modules = [
|
||||||
|
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
|
||||||
|
./hosts/gunter
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -9,9 +9,16 @@
|
|||||||
./editor/neovim
|
./editor/neovim
|
||||||
./programs/firefox
|
./programs/firefox
|
||||||
./programs/tmux
|
./programs/tmux
|
||||||
|
./programs/dunst
|
||||||
|
./programs/kitty
|
||||||
|
./programs/rofi
|
||||||
|
./programs/obs-studio
|
||||||
|
./scripts
|
||||||
./zsh
|
./zsh
|
||||||
./packages
|
./packages
|
||||||
./hyprland
|
./hyprland
|
||||||
|
./ssh
|
||||||
|
./services/backup-home.nix
|
||||||
];
|
];
|
||||||
firefox.enable = true;
|
firefox.enable = true;
|
||||||
tmux.enable = true;
|
tmux.enable = true;
|
||||||
|
@ -14,8 +14,14 @@
|
|||||||
lsp-zero-nvim
|
lsp-zero-nvim
|
||||||
vim-floaterm
|
vim-floaterm
|
||||||
luasnip
|
luasnip
|
||||||
|
cmp_luasnip
|
||||||
lualine-nvim
|
lualine-nvim
|
||||||
vim-sleuth
|
vim-sleuth
|
||||||
|
copilot-lua
|
||||||
|
copilot-cmp
|
||||||
|
cmp-cmdline
|
||||||
|
cmp-buffer
|
||||||
|
catppuccin-nvim
|
||||||
(nvim-treesitter.withPlugins (p: [
|
(nvim-treesitter.withPlugins (p: [
|
||||||
p.tree-sitter-yaml
|
p.tree-sitter-yaml
|
||||||
p.tree-sitter-nix
|
p.tree-sitter-nix
|
||||||
@ -43,8 +49,10 @@
|
|||||||
gopls
|
gopls
|
||||||
nodePackages.pyright
|
nodePackages.pyright
|
||||||
nodePackages.typescript-language-server
|
nodePackages.typescript-language-server
|
||||||
|
nodePackages.typescript
|
||||||
nil
|
nil
|
||||||
yaml-language-server
|
yaml-language-server
|
||||||
|
lua-language-server
|
||||||
];
|
];
|
||||||
home.sessionVariables.EDITOR = "nvim";
|
home.sessionVariables.EDITOR = "nvim";
|
||||||
}
|
}
|
||||||
|
@ -3,11 +3,26 @@
|
|||||||
-- LSP stuff
|
-- LSP stuff
|
||||||
local lsp_zero = require('lsp-zero')
|
local lsp_zero = require('lsp-zero')
|
||||||
|
|
||||||
lsp_zero.on_attach(function(client, bufnr)
|
|
||||||
lsp_zero.default_keymaps({buffer = bufnr})
|
lsp_zero.on_attach(function(_, bufnr)
|
||||||
|
lsp_zero.default_keymaps({ buffer = bufnr })
|
||||||
end)
|
end)
|
||||||
|
|
||||||
require('lspconfig').gopls.setup({
|
lsp_zero.format_on_save({
|
||||||
|
format_opts = {
|
||||||
|
async = false,
|
||||||
|
timeout_ms = 10000,
|
||||||
|
},
|
||||||
|
servers = {
|
||||||
|
['gopls'] = { 'go' },
|
||||||
|
['nil_ls'] = { 'nix' },
|
||||||
|
['lua_ls'] = { 'lua' },
|
||||||
|
['tsserver'] = { 'typescript', 'javascript' },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
local lspconfig = require('lspconfig')
|
||||||
|
lspconfig.gopls.setup({
|
||||||
settings = {
|
settings = {
|
||||||
gopls = {
|
gopls = {
|
||||||
analyses = {
|
analyses = {
|
||||||
@ -19,25 +34,69 @@ require('lspconfig').gopls.setup({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Cmp
|
lspconfig.nil_ls.setup({
|
||||||
local cmp = require('cmp')
|
autostart = true,
|
||||||
local cmp_action = lsp_zero.cmp_action()
|
settings = {
|
||||||
|
['nil'] = {
|
||||||
cmp.setup({
|
formatting = {
|
||||||
mapping = cmp.mapping.preset.insert({
|
command = { "nixpkgs-fmt" },
|
||||||
-- Enter to confirm completion
|
},
|
||||||
['<CR>'] = cmp.mapping.confirm({select = false}),
|
},
|
||||||
-- Ctrl+Space to open completion menu
|
},
|
||||||
['<C-Space>'] = cmp.mapping.complete(),
|
|
||||||
-- Move between snippet placeholders
|
|
||||||
['<C-f>'] = cmp_action.luasnip_jump_forward(),
|
|
||||||
['<C-b>'] = cmp_action.luasnip_jump_backward(),
|
|
||||||
-- Scroll in completion docs
|
|
||||||
['<C-k>'] = cmp.mapping.scroll_docs(-4),
|
|
||||||
['<C-j>'] = cmp.mapping.scroll_docs(4),
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
lspconfig.lua_ls.setup({
|
||||||
|
on_init = function(client)
|
||||||
|
local path = client.workspace_folders[1].name
|
||||||
|
if vim.loop.fs_stat(path .. '/.luarc.json') or vim.loop.fs_stat(path .. '/.luarc.jsonc') then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
|
||||||
|
runtime = {
|
||||||
|
-- Tell the language server which version of Lua you're using
|
||||||
|
-- (most likely LuaJIT in the case of Neovim)
|
||||||
|
version = 'LuaJIT'
|
||||||
|
},
|
||||||
|
-- Make the server aware of Neovim runtime files
|
||||||
|
workspace = {
|
||||||
|
checkThirdParty = false,
|
||||||
|
library = {
|
||||||
|
vim.env.VIMRUNTIME
|
||||||
|
-- Depending on the usage, you might want to add additional paths here.
|
||||||
|
-- "${3rd}/luv/library"
|
||||||
|
-- "${3rd}/busted/library",
|
||||||
|
}
|
||||||
|
-- or pull in all of 'runtimepath'. NOTE: this is a lot slower
|
||||||
|
-- library = vim.api.nvim_get_runtime_file("", true)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
format = {
|
||||||
|
enable = true,
|
||||||
|
defaultConfig = {
|
||||||
|
indent_style = "space",
|
||||||
|
indent_size = "2",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
lspconfig.tsserver.setup({
|
||||||
|
init_options = {
|
||||||
|
plugins = {
|
||||||
|
},
|
||||||
|
},
|
||||||
|
filetypes = {
|
||||||
|
"typescript",
|
||||||
|
"javascript",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
-- Telescope
|
-- Telescope
|
||||||
require('telescope').setup({
|
require('telescope').setup({
|
||||||
extensions = {
|
extensions = {
|
||||||
@ -52,35 +111,35 @@ require('telescope').setup({
|
|||||||
|
|
||||||
-- Tresitter stuff
|
-- Tresitter stuff
|
||||||
require('nvim-treesitter.configs').setup {
|
require('nvim-treesitter.configs').setup {
|
||||||
ensure_installed = {},
|
ensure_installed = {},
|
||||||
auto_install = false,
|
auto_install = false,
|
||||||
highlight = { enable = true },
|
highlight = { enable = true },
|
||||||
indent = { enable = true},
|
indent = { enable = true },
|
||||||
|
|
||||||
incremental_selection = {
|
incremental_selection = {
|
||||||
enable = true,
|
enable = true,
|
||||||
keymaps = {
|
keymaps = {
|
||||||
init_selection = '<c-space>',
|
init_selection = '<c-space>',
|
||||||
node_incremental = '<c-space>',
|
node_incremental = '<c-space>',
|
||||||
scope_incremental = '<c-s>',
|
scope_incremental = '<c-s>',
|
||||||
node_decremental = '<M-space>',
|
node_decremental = '<M-space>',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
textobjects = {
|
textobjects = {
|
||||||
select = {
|
select = {
|
||||||
enable = true,
|
enable = true,
|
||||||
lookahead = true,
|
lookahead = true,
|
||||||
|
|
||||||
keymaps = {
|
keymaps = {
|
||||||
['aa'] = '@parameter.outer',
|
['aa'] = '@parameter.outer',
|
||||||
['ia'] = '@parameter.inner',
|
['ia'] = '@parameter.inner',
|
||||||
['af'] = '@function.outer',
|
['af'] = '@function.outer',
|
||||||
['if'] = '@function.inner',
|
['if'] = '@function.inner',
|
||||||
['ac'] = '@class.outer',
|
['ac'] = '@class.outer',
|
||||||
['ic'] = '@class.inner',
|
['ic'] = '@class.inner',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Lualine
|
-- Lualine
|
||||||
@ -110,8 +169,51 @@ require('lualine').setup({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
lualine_x = {'encoding', 'fileformat', 'filetype'},
|
lualine_x = { 'encoding', 'fileformat', 'filetype' },
|
||||||
lualine_y = { 'progress' },
|
lualine_y = { 'progress' },
|
||||||
lualine_z = { 'location' }
|
lualine_z = { 'location' }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Copilot
|
||||||
|
require('copilot').setup({
|
||||||
|
suggestions = { enabled = false },
|
||||||
|
panel = { enabled = false },
|
||||||
|
})
|
||||||
|
require('copilot_cmp').setup()
|
||||||
|
|
||||||
|
-- Cmp
|
||||||
|
local cmp = require('cmp')
|
||||||
|
local cmp_action = lsp_zero.cmp_action()
|
||||||
|
|
||||||
|
cmp.setup({
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
require('luasnip').lsp_expand(args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
mapping = cmp.mapping.preset.insert({
|
||||||
|
-- Enter to confirm completion
|
||||||
|
['<CR>'] = cmp.mapping.confirm({ select = false }),
|
||||||
|
-- Ctrl+Space to open completion menu
|
||||||
|
['<C-Space>'] = cmp.mapping.complete(),
|
||||||
|
-- Move between snippet placeholders
|
||||||
|
['<C-f>'] = cmp_action.luasnip_jump_forward(),
|
||||||
|
['<C-b>'] = cmp_action.luasnip_jump_backward(),
|
||||||
|
-- Scroll in completion docs
|
||||||
|
['<C-k>'] = cmp.mapping.scroll_docs(-4),
|
||||||
|
['<C-j>'] = cmp.mapping.scroll_docs(4),
|
||||||
|
}),
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
}, {
|
||||||
|
{ name = "copilot", group_index = 2 },
|
||||||
|
{ name = "luasnip" },
|
||||||
|
{ name = "buffer" },
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
-- Colorscheme
|
||||||
|
require('catppuccin').setup({
|
||||||
|
})
|
||||||
|
vim.cmd.colorscheme "catppuccin"
|
||||||
|
11
home/hyprland/cursor.nix
Normal file
11
home/hyprland/cursor.nix
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
home.pointerCursor = {
|
||||||
|
gtk.enable = true;
|
||||||
|
# x11.enable = true;
|
||||||
|
package = pkgs.catppuccin-cursors.macchiatoLavender;
|
||||||
|
name = "Catppuccin-Macchiato-Lavender-Cursors";
|
||||||
|
size = 32;
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk.enable = true;
|
||||||
|
}
|
@ -1 +1 @@
|
|||||||
{ imports = [ ./hyprland.nix ./waybar.nix ./xdg.nix ]; }
|
{ imports = [ ./hyprland.nix ./waybar ./xdg.nix ./cursor.nix ]; }
|
||||||
|
@ -1,20 +1,60 @@
|
|||||||
{ inputs, pkgs, lib, config, ... }: {
|
{ inputs, pkgs, lib, config, ... }: {
|
||||||
options.hyprland.enable = lib.mkEnableOption "Hyprland";
|
options.hyprland.enable = lib.mkEnableOption "Hyprland";
|
||||||
config = {
|
config = {
|
||||||
home.packages = with pkgs; [ swww wl-clipboard cliphist hyprpaper hyprlock ];
|
home.packages = with pkgs; [
|
||||||
|
cliphist
|
||||||
|
dunst
|
||||||
|
# hyprlock
|
||||||
|
hyprpaper
|
||||||
|
rofi-wayland
|
||||||
|
slurp
|
||||||
|
swww
|
||||||
|
waybar
|
||||||
|
wl-clipboard
|
||||||
|
catppuccin-cursors.macchiatoLavender
|
||||||
|
bibata-cursors
|
||||||
|
# For potentially fixing some issues
|
||||||
|
libsForQt5.qt5.qtwayland
|
||||||
|
libsForQt5.qt5ct
|
||||||
|
];
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = pkgs.unstable.hyprland;
|
||||||
settings = {
|
settings = {
|
||||||
"$mainMod" = "SUPER";
|
"$mainMod" = "SUPER";
|
||||||
"$term" = "alacritty";
|
"$shiftMainMod" = "SUPER_SHIFT";
|
||||||
|
"$term" = "kitty";
|
||||||
|
|
||||||
monitor = [ "eDP-1,1920x1080@60,0x0,1" ];
|
# monitors
|
||||||
|
"$mon_top" = "desc:BNQ G2420HDBL T2B04424SL000";
|
||||||
|
"$mon_left" = "desc:Samsung Electric Company LS27A600U HNMT502389";
|
||||||
|
"$mon_center" = "desc:Acer Technologies XB271HU #ASPVEKfgZ8Dd";
|
||||||
|
"$mon_right" = "desc:Samsung Electric Company LS27A600U HNMT502390";
|
||||||
|
|
||||||
|
monitor = [
|
||||||
|
# "$mon_top,1920x1080@60,2560x0,1" # top T2B04424SL000
|
||||||
|
"DP-6,1920x1080@60,2560x0,1" # top T2B04424SL000 60
|
||||||
|
# "$mon_left,2560x1440@75,0x1080,1" # left
|
||||||
|
"DP-8,2560x1440@75,0x1080,1" # left 75hz
|
||||||
|
# "$mon_center,2560x1440@120,2560x1080,1" # main #ASPVEKfgZ8Dd
|
||||||
|
"DP-5,2560x1440@120,2560x1080,1" # main #ASPVEKfgZ8Dd 120hz
|
||||||
|
# "$mon_right,2560x1440@75,5120x1080,1" # right
|
||||||
|
"DP-7,2560x1440@75,5120x1080,1" # right 75hz
|
||||||
|
];
|
||||||
input = {
|
input = {
|
||||||
kb_layout = "no";
|
kb_layout = "no";
|
||||||
follow_mouse = 1;
|
follow_mouse = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
env = [
|
||||||
|
"LIBVA_DRIVER_NAME,nvidia"
|
||||||
|
"XDG_SESSION_TYPE,wayland"
|
||||||
|
"GBM_BACKEND,nvidia-drm"
|
||||||
|
# "__GLX_VENDOR_LIBRARY_NAME,nvidia"
|
||||||
|
"WLR_NO_HARDWARE_CURSORS,1"
|
||||||
|
];
|
||||||
|
|
||||||
decoration = {
|
decoration = {
|
||||||
rounding = 0;
|
rounding = 0;
|
||||||
drop_shadow = true;
|
drop_shadow = true;
|
||||||
@ -55,14 +95,37 @@
|
|||||||
misc.force_default_wallpaper = -1;
|
misc.force_default_wallpaper = -1;
|
||||||
|
|
||||||
windowrulev2 = [
|
windowrulev2 = [
|
||||||
"opacity 0.95 override 0.5 override,class:^(Alacritty)$"
|
"opacity 0.95 override 0.7 override,class:^(Alacritty)$"
|
||||||
|
"opacity 0.95 override 0.7 override,class:^(kitty)$"
|
||||||
|
];
|
||||||
|
|
||||||
|
workspace = [
|
||||||
|
"name:mumble, monitor:$mon_top, persistent:true, default:true"
|
||||||
|
"name:left, monitor:$mon_left, persistent:true, default:true"
|
||||||
|
"name:right, monitor:$mon_right, persistent:true, default:true"
|
||||||
|
"name:main 1, monitor:$mon_center, persistent:true, default:true"
|
||||||
|
"name:main 2, monitor:$mon_center, persistent:true, default:true"
|
||||||
|
];
|
||||||
|
|
||||||
|
bindm = [
|
||||||
|
"ALT,mouse:272,movewindow"
|
||||||
|
];
|
||||||
|
|
||||||
|
bindr = [
|
||||||
|
# mumble ptt release
|
||||||
|
# ",code:202,exec,mumble rpc stoptalking"
|
||||||
|
# ",code:202,exec,pamixer --source 63 -m"
|
||||||
|
",code:202,exec,pamixer --default-source -m"
|
||||||
];
|
];
|
||||||
|
|
||||||
bind = [
|
bind = [
|
||||||
# term
|
# term
|
||||||
"$mainMod,Return,exec,$term"
|
"$mainMod,Return,exec,$term"
|
||||||
|
|
||||||
# rofi
|
# rofi
|
||||||
"$mainMod,D,exec,rofi -show drun"
|
"$mainMod,D,exec,rofi-launcher"
|
||||||
|
"$mainMod,P,exec,rofi-rbw"
|
||||||
|
|
||||||
# hyprland
|
# hyprland
|
||||||
"$mainMod,Q,killactive,"
|
"$mainMod,Q,killactive,"
|
||||||
"CTRLALT,Delete,exit,"
|
"CTRLALT,Delete,exit,"
|
||||||
@ -80,16 +143,29 @@
|
|||||||
"$mainMod,l,movewindow,r"
|
"$mainMod,l,movewindow,r"
|
||||||
"$mainMod,k,movewindow,u"
|
"$mainMod,k,movewindow,u"
|
||||||
"$mainMod,j,movewindow,d"
|
"$mainMod,j,movewindow,d"
|
||||||
] ++ (builtins.concatLists (builtins.genList
|
|
||||||
(x:
|
# Force opacity
|
||||||
let
|
"$shiftMainMod,o,exec, hl-no-opacity"
|
||||||
ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10));
|
|
||||||
in
|
# mumble ptt click
|
||||||
[
|
# ",code:202,exec,mumble rpc starttalking"
|
||||||
"$mainMod, ${ws}, workspace, ${toString (x + 1)}"
|
",code:202,exec,pamixer --default-source -u"
|
||||||
"ALT, ${ws}, workspace, ${toString (x + 1)}"
|
|
||||||
]) 10));
|
# worspace switching
|
||||||
exec-once = [ "waybar & hyprpaper" ];
|
"$mainMod,1,workspace,name:main 1"
|
||||||
|
"$mainMod,2,workspace,name:main 2"
|
||||||
|
"$mainMod,3,workspace,3"
|
||||||
|
"$mainMod,4,workspace,4"
|
||||||
|
"$mainMod,5,workspace,5"
|
||||||
|
"$mainMod,6,workspace,6"
|
||||||
|
];
|
||||||
|
|
||||||
|
exec-once = [
|
||||||
|
"waybar"
|
||||||
|
"hyprpaper & sleep 2 && randomwp"
|
||||||
|
"easyeffects --gapplication-service"
|
||||||
|
# "dunst"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,3 +1 @@
|
|||||||
preload = ~/pics/wallpapers/1.jpg
|
|
||||||
wallpaper = eDP-1,~/pics/wallpapers/1.jpg
|
|
||||||
splash = false
|
splash = false
|
||||||
|
195
home/hyprland/waybar/default.nix
Normal file
195
home/hyprland/waybar/default.nix
Normal file
@ -0,0 +1,195 @@
|
|||||||
|
{ pkgs, lib, ... }: {
|
||||||
|
xdg.configFile."waybar/macchiato.css" = {
|
||||||
|
source = pkgs.fetchFromGitHub
|
||||||
|
{
|
||||||
|
owner = "catppuccin";
|
||||||
|
repo = "waybar";
|
||||||
|
rev = "f74ab1eecf2dcaf22569b396eed53b2b2fbe8aff";
|
||||||
|
sha256 = "WLJMA2X20E5PCPg0ZPtSop0bfmu+pLImP9t8A8V4QK8=";
|
||||||
|
} + "/themes/machiatto.css";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.waybar = {
|
||||||
|
enable = true;
|
||||||
|
systemd = {
|
||||||
|
enable = false; # disable it,autostart it in hyprland conf
|
||||||
|
target = "graphical-session.target";
|
||||||
|
};
|
||||||
|
style = ''
|
||||||
|
* {
|
||||||
|
font-family: "FiraCodeNerdFont-Regular";
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
border-radius: 0px;
|
||||||
|
transition-property: background-color;
|
||||||
|
transition-duration: 0.5s;
|
||||||
|
}
|
||||||
|
@keyframes blink_red {
|
||||||
|
to {
|
||||||
|
background-color: rgb(242, 143, 173);
|
||||||
|
color: rgb(26, 24, 38);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.warning,
|
||||||
|
.critical,
|
||||||
|
.urgent {
|
||||||
|
animation-name: blink_red;
|
||||||
|
animation-duration: 1s;
|
||||||
|
animation-timing-function: linear;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-direction: alternate;
|
||||||
|
}
|
||||||
|
window#waybar {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
window > box {
|
||||||
|
margin-left: 0px;
|
||||||
|
margin-right: 0px;
|
||||||
|
margin-top: 0px;
|
||||||
|
border-bottom: 2px solid @color1;
|
||||||
|
background-color: @background;
|
||||||
|
}
|
||||||
|
#workspaces {
|
||||||
|
padding-left: 0px;
|
||||||
|
padding-right: 4px;
|
||||||
|
}
|
||||||
|
#workspaces button {
|
||||||
|
padding-top: 5px;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
padding-left: 6px;
|
||||||
|
padding-right: 6px;
|
||||||
|
color: @color1;
|
||||||
|
}
|
||||||
|
#workspaces button.active {
|
||||||
|
background-color: @color1;
|
||||||
|
color: rgb(26, 24, 38);
|
||||||
|
}
|
||||||
|
#workspaces button.urgent {
|
||||||
|
color: rgb(26, 24, 38);
|
||||||
|
}
|
||||||
|
#workspaces button:hover {
|
||||||
|
background-color: #b38dac;
|
||||||
|
color: rgb(26, 24, 38);
|
||||||
|
}
|
||||||
|
tooltip {
|
||||||
|
background: #3b4253;
|
||||||
|
}
|
||||||
|
tooltip label {
|
||||||
|
color: #e4e8ef;
|
||||||
|
}
|
||||||
|
#custom-launcher {
|
||||||
|
font-size: 20px;
|
||||||
|
padding-left: 8px;
|
||||||
|
padding-right: 6px;
|
||||||
|
color: #7ebae4;
|
||||||
|
}
|
||||||
|
#mode,
|
||||||
|
#clock,
|
||||||
|
#memory,
|
||||||
|
#temperature,
|
||||||
|
#cpu,
|
||||||
|
#mpd,
|
||||||
|
#custom-wall,
|
||||||
|
#temperature,
|
||||||
|
#backlight,
|
||||||
|
#pulseaudio,
|
||||||
|
#network,
|
||||||
|
#battery,
|
||||||
|
#custom-powermenu,
|
||||||
|
#custom-cava-internal {
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
color: @color1;
|
||||||
|
}
|
||||||
|
#network.disconnected {
|
||||||
|
color: #cccccc;
|
||||||
|
}
|
||||||
|
#battery.charging,
|
||||||
|
#battery.full,
|
||||||
|
#battery.discharging {
|
||||||
|
color: #cf876f;
|
||||||
|
}
|
||||||
|
#battery.critical:not(.charging) {
|
||||||
|
color: #d6dce7;
|
||||||
|
}
|
||||||
|
#custom-powermenu {
|
||||||
|
color: #bd6069;
|
||||||
|
}
|
||||||
|
#tray {
|
||||||
|
padding-right: 8px;
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
#tray menu {
|
||||||
|
background: #3b4252;
|
||||||
|
color: #dee2ea;
|
||||||
|
}
|
||||||
|
#mpd.paused {
|
||||||
|
color: rgb(192, 202, 245);
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
#mpd.stopped {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
#mpd {
|
||||||
|
color: #e4e8ef;
|
||||||
|
}
|
||||||
|
#custom-cava-internal {
|
||||||
|
font-family: "Hack Nerd Font";
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
settings = [{
|
||||||
|
"layer" = "top";
|
||||||
|
"position" = "top";
|
||||||
|
modules-left = [ "custom/launcher" "hyprland/workspaces" ];
|
||||||
|
modules-center = [ "clock" ];
|
||||||
|
modules-right =
|
||||||
|
[ "pulseaudio" "pulseaudio#microphone" "memory" "cpu" "tray" ];
|
||||||
|
"custom/launcher" = {
|
||||||
|
"format" = " ";
|
||||||
|
"on-click" = "pkill rofi || ~/.config/rofi/launcher.sh";
|
||||||
|
"tooltip" = false;
|
||||||
|
};
|
||||||
|
"hyprland/workspaces" = {
|
||||||
|
"format" = "{name}";
|
||||||
|
"on-click" = "activate";
|
||||||
|
"on-scroll-up" = "hyprctl dispatch workspace e+1";
|
||||||
|
"on-scroll-down" = "hyprctl dispatch workspace e-1";
|
||||||
|
};
|
||||||
|
"pulseaudio" = {
|
||||||
|
"scroll-step" = 5;
|
||||||
|
"format" = "{icon} {volume}%";
|
||||||
|
"format-muted" = "";
|
||||||
|
"format-icons" = { "default" = [ "" "" "" ]; };
|
||||||
|
"on-click" = "pamixer -t";
|
||||||
|
};
|
||||||
|
"pulseaudio#microphone" = {
|
||||||
|
"format" = "{format_source}";
|
||||||
|
"format-source" = " {volume}%";
|
||||||
|
"format-source-muted" = "";
|
||||||
|
"on-click" = "pamixer --default-source -t";
|
||||||
|
"on-scroll-up" = "pamixer --default-source -i 5";
|
||||||
|
"on-scroll-down" = "pamixer --default-source -d 5";
|
||||||
|
"scroll-step" = 5;
|
||||||
|
"on-click-right" = "pavucontrol";
|
||||||
|
};
|
||||||
|
"clock" = {
|
||||||
|
"interval" = 1;
|
||||||
|
"format" = "{:%H:%M %A %b %d}";
|
||||||
|
"tooltip" = true;
|
||||||
|
};
|
||||||
|
"memory" = {
|
||||||
|
"interval" = 3;
|
||||||
|
"format" = " {percentage}%";
|
||||||
|
"states" = { "warning" = 85; };
|
||||||
|
};
|
||||||
|
"cpu" = {
|
||||||
|
"interval" = 3;
|
||||||
|
"format" = " {usage}%";
|
||||||
|
};
|
||||||
|
"tray" = {
|
||||||
|
"icon-size" = 15;
|
||||||
|
"spacing" = 6;
|
||||||
|
};
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
}
|
@ -7,7 +7,7 @@
|
|||||||
};
|
};
|
||||||
style = ''
|
style = ''
|
||||||
* {
|
* {
|
||||||
font-family: "Fira Code", "Font Awesome 6 Free";
|
font-family: "FiraCodeNerdFont-Regular";
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
@ -164,7 +164,7 @@
|
|||||||
};
|
};
|
||||||
"clock" = {
|
"clock" = {
|
||||||
"interval" = 1;
|
"interval" = 1;
|
||||||
"format" = "{:%I:%M %p %A %b %d}";
|
"format" = "{:%H:%M %A %b %d}";
|
||||||
"tooltip" = true;
|
"tooltip" = true;
|
||||||
};
|
};
|
||||||
"memory" = {
|
"memory" = {
|
32
home/i3/default.nix
Normal file
32
home/i3/default.nix
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
mod = "Mod4";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
xsession.windowManager.i3 = {
|
||||||
|
enable = true;
|
||||||
|
config = {
|
||||||
|
modifier = mod;
|
||||||
|
|
||||||
|
keybindings = lib.mkOptionDefault {
|
||||||
|
"${mod}+Enter" = "exec kitty";
|
||||||
|
|
||||||
|
# Focus
|
||||||
|
"${mod}+j" = "focus left";
|
||||||
|
"${mod}+k" = "focus down";
|
||||||
|
"${mod}+l" = "focus up";
|
||||||
|
"${mod}+semicolon" = "focus right";
|
||||||
|
|
||||||
|
# Move
|
||||||
|
"${mod}+Shift+j" = "move left";
|
||||||
|
"${mod}+Shift+k" = "move down";
|
||||||
|
"${mod}+Shift+l" = "move up";
|
||||||
|
"${mod}+Shift+semicolon" = "move right";
|
||||||
|
|
||||||
|
# My multi monitor setup
|
||||||
|
"${mod}+m" = "move workspace to output DP-2";
|
||||||
|
"${mod}+Shift+m" = "move workspace to output DP-5";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -3,7 +3,7 @@
|
|||||||
# Generic tools
|
# Generic tools
|
||||||
age
|
age
|
||||||
alacritty
|
alacritty
|
||||||
btop
|
unstable.btop
|
||||||
bzip2
|
bzip2
|
||||||
croc
|
croc
|
||||||
easyeffects
|
easyeffects
|
||||||
@ -11,20 +11,36 @@
|
|||||||
ffmpeg
|
ffmpeg
|
||||||
file
|
file
|
||||||
go-task
|
go-task
|
||||||
|
glib
|
||||||
jq
|
jq
|
||||||
|
kitty
|
||||||
|
kubectl
|
||||||
ncdu
|
ncdu
|
||||||
|
nwg-look
|
||||||
mumble
|
mumble
|
||||||
|
mpv
|
||||||
pamixer
|
pamixer
|
||||||
pinentry
|
pinentry
|
||||||
pre-commit
|
pre-commit
|
||||||
|
pulseaudio
|
||||||
pulsemixer
|
pulsemixer
|
||||||
rbw
|
rbw
|
||||||
restic
|
restic
|
||||||
ripgrep
|
ripgrep
|
||||||
rofi-rbw-wayland
|
rofi-rbw-wayland
|
||||||
|
spotify
|
||||||
|
spicetify-cli
|
||||||
|
sshfs
|
||||||
|
talosctl
|
||||||
|
|
||||||
|
# steam
|
||||||
|
# steam-run
|
||||||
|
# steamcmd
|
||||||
|
# gamescope
|
||||||
tokei
|
tokei
|
||||||
unzip
|
unzip
|
||||||
yt-dlp
|
yt-dlp
|
||||||
|
unstable.zoom-us
|
||||||
|
|
||||||
# Editors
|
# Editors
|
||||||
vscode
|
vscode
|
||||||
@ -34,6 +50,11 @@
|
|||||||
delve
|
delve
|
||||||
gopls
|
gopls
|
||||||
|
|
||||||
|
# js/ts
|
||||||
|
nodejs
|
||||||
|
nodePackages.pnpm
|
||||||
|
typescript
|
||||||
|
|
||||||
# Py stuff
|
# Py stuff
|
||||||
python3
|
python3
|
||||||
poetry
|
poetry
|
||||||
|
76
home/programs/dunst/default.nix
Normal file
76
home/programs/dunst/default.nix
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.dunst = {
|
||||||
|
enable = true;
|
||||||
|
iconTheme = {
|
||||||
|
name = "Papirus-Dark";
|
||||||
|
package = pkgs.papirus-icon-theme;
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
global = {
|
||||||
|
rounded = "yes";
|
||||||
|
origin = "top-right";
|
||||||
|
monitor = "3";
|
||||||
|
alignment = "left";
|
||||||
|
vertical_alignment = "center";
|
||||||
|
width = "400";
|
||||||
|
height = "400";
|
||||||
|
scale = 0;
|
||||||
|
gap_size = 0;
|
||||||
|
progress_bar = true;
|
||||||
|
transparency = 0;
|
||||||
|
text_icon_padding = 0;
|
||||||
|
separator_color = "frame";
|
||||||
|
sort = "yes";
|
||||||
|
idle_threshold = 120;
|
||||||
|
line_height = 0;
|
||||||
|
markup = "full";
|
||||||
|
show_age_threshold = 60;
|
||||||
|
ellipsize = "middle";
|
||||||
|
ignore_newline = "no";
|
||||||
|
stack_duplicates = true;
|
||||||
|
sticky_history = "yes";
|
||||||
|
history_length = 20;
|
||||||
|
always_run_script = true;
|
||||||
|
corner_radius = 10;
|
||||||
|
# follow = "mouse";
|
||||||
|
font = "Source Sans Pro 10";
|
||||||
|
format = "<b>%s</b>\\n%b"; #format = "<span foreground='#f3f4f5'><b>%s %p</b></span>\n%b"
|
||||||
|
frame_color = "#232323";
|
||||||
|
frame_width = 1;
|
||||||
|
offset = "15x15";
|
||||||
|
horizontal_padding = 10;
|
||||||
|
icon_position = "left";
|
||||||
|
indicate_hidden = "yes";
|
||||||
|
min_icon_size = 0;
|
||||||
|
max_icon_size = 64;
|
||||||
|
mouse_left_click = "do_action, close_current";
|
||||||
|
mouse_middle_click = "close_current";
|
||||||
|
mouse_right_click = "close_all";
|
||||||
|
padding = 10;
|
||||||
|
plain_text = "no";
|
||||||
|
separator_height = 2;
|
||||||
|
show_indicators = "yes";
|
||||||
|
shrink = "no";
|
||||||
|
word_wrap = "yes";
|
||||||
|
browser = "/usr/bin/env firefox -new-tab";
|
||||||
|
};
|
||||||
|
|
||||||
|
fullscreen_delay_everything = { fullscreen = "delay"; };
|
||||||
|
|
||||||
|
urgency_critical = {
|
||||||
|
background = "#d64e4e";
|
||||||
|
foreground = "#f0e0e0";
|
||||||
|
};
|
||||||
|
urgency_low = {
|
||||||
|
background = "#232323";
|
||||||
|
foreground = "#2596be";
|
||||||
|
};
|
||||||
|
urgency_normal = {
|
||||||
|
background = "#1e1e2a";
|
||||||
|
foreground = "#2596be";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
24
home/programs/kitty/default.nix
Normal file
24
home/programs/kitty/default.nix
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
{ config, pkgs, ... }: {
|
||||||
|
xdg.configFile."kitty/kitty.conf" = {
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink ./. + "/kitty.conf";
|
||||||
|
target = "kitty/kitty.conf";
|
||||||
|
};
|
||||||
|
xdg.configFile."kitty/themes/macchiato.conf" = {
|
||||||
|
source = pkgs.fetchFromGitHub
|
||||||
|
{
|
||||||
|
owner = "catppuccin";
|
||||||
|
repo = "kitty";
|
||||||
|
rev = "d7d61716a83cd135344cbb353af9d197c5d7cec1";
|
||||||
|
sha256 = "mRFa+40fuJCUrR1o4zMi7AlgjRtFmii4fNsQyD8hIjM=";
|
||||||
|
} + "/themes/macchiato.conf";
|
||||||
|
};
|
||||||
|
xdg.configFile."kitty/themes/latte.conf" = {
|
||||||
|
source = pkgs.fetchFromGitHub
|
||||||
|
{
|
||||||
|
owner = "catppuccin";
|
||||||
|
repo = "kitty";
|
||||||
|
rev = "d7d61716a83cd135344cbb353af9d197c5d7cec1";
|
||||||
|
sha256 = "mRFa+40fuJCUrR1o4zMi7AlgjRtFmii4fNsQyD8hIjM=";
|
||||||
|
} + "/themes/latte.conf";
|
||||||
|
};
|
||||||
|
}
|
23
home/programs/kitty/kitty.conf
Normal file
23
home/programs/kitty/kitty.conf
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# shell
|
||||||
|
shell .
|
||||||
|
|
||||||
|
# mute bell
|
||||||
|
enable_audio_bell no
|
||||||
|
|
||||||
|
# Remove close window confirm
|
||||||
|
confirm_os_window_close 0
|
||||||
|
|
||||||
|
# Font config
|
||||||
|
font_family Fira Code
|
||||||
|
bold_font Fira Code
|
||||||
|
italic_font Fira Code
|
||||||
|
bold_italic_font Fira Code
|
||||||
|
|
||||||
|
# Emoji font
|
||||||
|
# Symbols Nerd Font Mono
|
||||||
|
font_size 14.0
|
||||||
|
|
||||||
|
# Window padding
|
||||||
|
window_padding_width 10
|
||||||
|
|
||||||
|
include themes/macchiato.conf
|
8
home/programs/obs-studio/default.nix
Normal file
8
home/programs/obs-studio/default.nix
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
programs.obs-studio = {
|
||||||
|
enable = true;
|
||||||
|
plugins = with pkgs.obs-studio-plugins; [
|
||||||
|
obs-backgroundremoval
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
17
home/programs/rofi/config.rasi
Normal file
17
home/programs/rofi/config.rasi
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
configuration{
|
||||||
|
modi: "run,drun,window";
|
||||||
|
icon-theme: "Oranchelo";
|
||||||
|
show-icons: true;
|
||||||
|
terminal: "alacritty";
|
||||||
|
drun-display-format: "{icon} {name}";
|
||||||
|
location: 0;
|
||||||
|
disable-history: false;
|
||||||
|
hide-scrollbar: true;
|
||||||
|
display-drun: " Apps ";
|
||||||
|
display-run: " Run ";
|
||||||
|
display-window: " Window";
|
||||||
|
display-Network: " Network";
|
||||||
|
sidebar-mode: true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@theme "latte"
|
24
home/programs/rofi/default.nix
Normal file
24
home/programs/rofi/default.nix
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
{ config, pkgs, ... }: {
|
||||||
|
xdg.configFile."rofi/config.rasi" = {
|
||||||
|
source = ./config.rasi;
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.configFile."rofi/macchiato.rasi" = {
|
||||||
|
source = pkgs.fetchFromGitHub
|
||||||
|
{
|
||||||
|
owner = "catppuccin";
|
||||||
|
repo = "rofi";
|
||||||
|
rev = "5350da41a11814f950c3354f090b90d4674a95ce";
|
||||||
|
sha256 = "DNorfyl3C4RBclF2KDgwvQQwixpTwSRu7fIvihPN8JY=";
|
||||||
|
} + "/basic/.local/share/rofi/themes/catppuccin-macchiato.rasi";
|
||||||
|
};
|
||||||
|
xdg.configFile."rofi/latte.rasi" = {
|
||||||
|
source = pkgs.fetchFromGitHub
|
||||||
|
{
|
||||||
|
owner = "catppuccin";
|
||||||
|
repo = "rofi";
|
||||||
|
rev = "5350da41a11814f950c3354f090b90d4674a95ce";
|
||||||
|
sha256 = "DNorfyl3C4RBclF2KDgwvQQwixpTwSRu7fIvihPN8JY=";
|
||||||
|
} + "/basic/.local/share/rofi/themes/catppuccin-latte.rasi";
|
||||||
|
};
|
||||||
|
}
|
14
home/scripts/default.nix
Normal file
14
home/scripts/default.nix
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{ pkgs, config, ... }: {
|
||||||
|
home.file.".local/bin/hl-no-opacity" = {
|
||||||
|
source = ./hl-no-opacity.sh;
|
||||||
|
executable = true;
|
||||||
|
};
|
||||||
|
home.file.".local/bin/rofi-launcher" = {
|
||||||
|
source = ./rofi-launcher.sh;
|
||||||
|
executable = true;
|
||||||
|
};
|
||||||
|
home.file.".local/bin/randomwp" = {
|
||||||
|
source = ./randomwp.sh;
|
||||||
|
executable = true;
|
||||||
|
};
|
||||||
|
}
|
5
home/scripts/hl-no-opacity.sh
Normal file
5
home/scripts/hl-no-opacity.sh
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
addr=$(hyprctl activewindow -j|jq -r .address)
|
||||||
|
hyprctl setprop "address:$addr" alpha 1 lock
|
||||||
|
hyprctl setprop "address:$addr" alphainactive 1 lock
|
31
home/scripts/randomwp.sh
Normal file
31
home/scripts/randomwp.sh
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -eo pipefail
|
||||||
|
|
||||||
|
if [ -z "${WALLPAPER_DIR}" ]; then
|
||||||
|
WALLPAPER_DIR="${HOME}/wallpapers"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! [ -d "$WALLPAPER_DIR" ]; then
|
||||||
|
echo "Wallpaper dir is not a directory"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
wallpaper_path=$(find "$WALLPAPER_DIR" -mindepth 1 | sort -R | tail -n 1)
|
||||||
|
|
||||||
|
if [ -z "$wallpaper_path" ]; then
|
||||||
|
echo "Unable to find wallpaper"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! command -v hyprpaper &> /dev/null; then
|
||||||
|
echo "Could not find hyprpaper command"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "setting $wallpaper_path as wallpaper"
|
||||||
|
hyprctl hyprpaper unload all
|
||||||
|
hyprctl hyprpaper preload "$wallpaper_path"
|
||||||
|
|
||||||
|
for monitor in $(hyprctl monitors | grep 'Monitor' | awk '{ print $2 }'); do
|
||||||
|
hyprctl hyprpaper wallpaper "$monitor,$wallpaper_path"
|
||||||
|
done
|
8
home/scripts/rofi-launcher.sh
Normal file
8
home/scripts/rofi-launcher.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
rofi \
|
||||||
|
-show drun \
|
||||||
|
-modi run,drun,ssh \
|
||||||
|
-scroll-method 0 \
|
||||||
|
-drun-match-fields all \
|
||||||
|
-drun-display-format "{name}" \
|
||||||
|
-terminal kitty
|
79
home/services/backup-home.nix
Normal file
79
home/services/backup-home.nix
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
# Backup home script
|
||||||
|
backup-home = pkgs.writeShellScriptBin "backup-home.sh"
|
||||||
|
''
|
||||||
|
export RESTIC_PASSWORD="gunter.home.2rjus.net"
|
||||||
|
export RESTIC_REPOSITORY="rest:http://10.69.12.52:8000/gunter.home.2rjus.net"
|
||||||
|
|
||||||
|
# Send start notification
|
||||||
|
${pkgs.libnotify}/bin/notify-send -e -t 3000 "Backup started" "Backup of /home/torjus started"
|
||||||
|
retval=$?
|
||||||
|
if [ $retval -ne 0 ]; then
|
||||||
|
echo "Failed to send notification"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Do the backup
|
||||||
|
SECONDS=0
|
||||||
|
${pkgs.restic}/bin/restic backup /home/torjus \
|
||||||
|
--exclude '/home/torjus/.cache' \
|
||||||
|
--exclude '/home/torjus/.local/share/Steam' \
|
||||||
|
--exclude '/home/torjus/git/nixpkgs'
|
||||||
|
retval=$?
|
||||||
|
if [ $retval -ne 0 ]; then
|
||||||
|
notify-send -u critical "Backup failed" "Backup of /home/torjus failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove old snapshots and prune
|
||||||
|
${pkgs.restic}/bin/restic forget -d 7 -w 4 -m 6 --keep-within 1d --prune
|
||||||
|
|
||||||
|
# Gather statistics
|
||||||
|
stats=$(${pkgs.restic}/bin/restic stats --json)
|
||||||
|
stats_raw=$(${pkgs.restic}/bin/restic stats --mode=raw-data --json)
|
||||||
|
|
||||||
|
raw_size=$(${pkgs.jq}/bin/jq -r '.total_size' <<< $stats_raw \
|
||||||
|
| ${pkgs.coreutils}/bin/numfmt --to=iec --suffix=B --format="%.2f")
|
||||||
|
total_size=$(${pkgs.jq}/bin/jq -r '.total_size' <<< $stats \
|
||||||
|
| ${pkgs.coreutils}/bin/numfmt --to=iec --suffix=B --format="%.2f")
|
||||||
|
total_files=$(${pkgs.jq}/bin/jq -r '.total_file_count' <<< $stats \
|
||||||
|
| ${pkgs.coreutils}/bin/numfmt --to=iec)
|
||||||
|
total_snapshots=$(${pkgs.jq}/bin/jq -r '.snapshots_count' <<< $stats)
|
||||||
|
message="$total_files files\n$total_snapshots snapshots\n$raw_size ($total_size)"
|
||||||
|
|
||||||
|
# Send completion notification
|
||||||
|
${pkgs.libnotify}/bin/notify-send -i checkmark -e -t 10000 \
|
||||||
|
"Backup of /home/torjus completed in ''${SECONDS}s" "$message"
|
||||||
|
retval=$?
|
||||||
|
if [ $retval -ne 0 ]; then
|
||||||
|
echo "Failed to send notification"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
systemd.user.services.backup-home = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Backup home directory";
|
||||||
|
After = [ "network.target" ];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = "${backup-home}/bin/backup-home.sh";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.user.timers.backup-home = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Backup home directory";
|
||||||
|
After = [ "network.target" ];
|
||||||
|
};
|
||||||
|
Timer = {
|
||||||
|
OnCalendar = "*-*-* *:00:00";
|
||||||
|
Persistent = true;
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "timers.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
1
home/ssh/default.nix
Normal file
1
home/ssh/default.nix
Normal file
@ -0,0 +1 @@
|
|||||||
|
{ imports = [ ./gunter.nix ]; }
|
15
home/ssh/gunter.nix
Normal file
15
home/ssh/gunter.nix
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
programs.ssh = {
|
||||||
|
enable = true;
|
||||||
|
controlMaster = "auto";
|
||||||
|
|
||||||
|
matchBlocks."bmo.uio.no" = {
|
||||||
|
setEnv = {
|
||||||
|
# TERM = "xterm-256color";
|
||||||
|
};
|
||||||
|
hostname = "bmo.uio.no";
|
||||||
|
forwardAgent = false;
|
||||||
|
proxyJump = "torjus@rlogin.uio.no";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -7,7 +7,7 @@
|
|||||||
enableCompletion = true;
|
enableCompletion = true;
|
||||||
syntaxHighlighting.enable = true;
|
syntaxHighlighting.enable = true;
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
nrebuild = "sudo nixos-rebuild switch --flake /home/${user}/nixos#prismo";
|
nrebuild = "sudo nixos-rebuild switch --flake /home/${user}/nixos";
|
||||||
};
|
};
|
||||||
initExtra = ''
|
initExtra = ''
|
||||||
bindkey -v
|
bindkey -v
|
||||||
|
@ -9,9 +9,20 @@
|
|||||||
"splash"
|
"splash"
|
||||||
"rd.systemd.show_status=false"
|
"rd.systemd.show_status=false"
|
||||||
];
|
];
|
||||||
boot.loader.systemd-boot = { enable = true; };
|
|
||||||
|
boot.loader.systemd-boot = {
|
||||||
|
enable = true;
|
||||||
|
configurationLimit = 10;
|
||||||
|
};
|
||||||
|
boot.supportedFilesystems = [ "nfs" ];
|
||||||
|
|
||||||
boot.loader.efi = { canTouchEfiVariables = true; };
|
boot.loader.efi = { canTouchEfiVariables = true; };
|
||||||
|
|
||||||
|
boot.extraModprobeConfig = ''
|
||||||
|
options nvidia NVreg_RegistryDwords="PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerLevel=0x3; PowerMizerDefault=0x3; PowerMizerDefaultAC=0x3"
|
||||||
|
options v4l2loopback exclusive_caps=1 card_label="Virtual Camera"
|
||||||
|
'';
|
||||||
|
|
||||||
# Networking stuff
|
# Networking stuff
|
||||||
networking.hostName = "gunter"; # Define your hostname.
|
networking.hostName = "gunter"; # Define your hostname.
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
@ -20,18 +31,45 @@
|
|||||||
time.timeZone = "Europe/Oslo";
|
time.timeZone = "Europe/Oslo";
|
||||||
|
|
||||||
# Enable opengl
|
# Enable opengl
|
||||||
# hardware.opengl = {
|
hardware.opengl = {
|
||||||
# enable = true;
|
enable = true;
|
||||||
# extraPackages = with pkgs; [
|
driSupport = true;
|
||||||
# ];
|
driSupport32Bit = true;
|
||||||
# };
|
extraPackages = with pkgs; [
|
||||||
|
vaapiVdpau
|
||||||
|
nvidia-vaapi-driver
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Nvidia stuff
|
||||||
|
hardware.nvidia = {
|
||||||
|
modesetting.enable = true;
|
||||||
|
powerManagement.enable = false;
|
||||||
|
powerManagement.finegrained = false;
|
||||||
|
open = false;
|
||||||
|
nvidiaSettings = true;
|
||||||
|
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
|
};
|
||||||
|
|
||||||
# Setup hyprland
|
# Setup hyprland
|
||||||
|
# nixpkgs.overlays = [
|
||||||
|
# (self: super: {
|
||||||
|
# hyprland = super.hyprland.override {
|
||||||
|
# debug = true;
|
||||||
|
# };
|
||||||
|
# })
|
||||||
|
# ];
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
services.xserver.displayManager.gdm.wayland = true;
|
||||||
|
services.xserver.displayManager.lightdm.enable = false;
|
||||||
|
services.xserver.displayManager.startx.enable = true;
|
||||||
|
services.xserver.windowManager.i3.enable = true;
|
||||||
programs.hyprland = {
|
programs.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
portalPackage = pkgs.xdg-desktop-portal-hyprland;
|
portalPackage = pkgs.unstable.xdg-desktop-portal-hyprland;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Setup common XDG env vars
|
# Setup common XDG env vars
|
||||||
@ -49,7 +87,7 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
xdgOpenUsePortal = true;
|
xdgOpenUsePortal = true;
|
||||||
extraPortals = (with pkgs; [
|
extraPortals = (with pkgs; [
|
||||||
xdg-desktop-portal-hyprland
|
# unstable.xdg-desktop-portal-hyprland
|
||||||
xdg-desktop-portal-gtk
|
xdg-desktop-portal-gtk
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
@ -60,10 +98,20 @@
|
|||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
# Install system-wide packages
|
# Install system-wide packages
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
vim
|
|
||||||
wget
|
|
||||||
curl
|
curl
|
||||||
git
|
git
|
||||||
|
libnotify
|
||||||
|
usbutils
|
||||||
|
vim
|
||||||
|
wget
|
||||||
|
v4l-utils
|
||||||
|
|
||||||
|
# X shit
|
||||||
|
# xorg.xorgserver
|
||||||
|
# xorg.xinit
|
||||||
|
# xorg.xf86inputevdev
|
||||||
|
# xorg.xf86inputlibinput
|
||||||
|
# xorg.xinit
|
||||||
];
|
];
|
||||||
|
|
||||||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
./steamuser.nix
|
||||||
|
./nfs.nix
|
||||||
../../system
|
../../system
|
||||||
../../home
|
../../home
|
||||||
];
|
];
|
||||||
|
46
hosts/gunter/hardware-configuration.nix
Normal file
46
hosts/gunter/hardware-configuration.nix
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" "v4l2loopback" ];
|
||||||
|
boot.extraModulePackages = with config.boot.kernelPackages; [
|
||||||
|
v4l2loopback
|
||||||
|
];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{
|
||||||
|
device = "/dev/disk/by-uuid/a7d4b697-fffa-4bcb-9dd7-cbbd6121a50c";
|
||||||
|
fsType = "xfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/be82b184-3cc7-483b-9069-f7797f51c853";
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{
|
||||||
|
device = "/dev/disk/by-uuid/DC0C-AAB3";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices =
|
||||||
|
[{ device = "/dev/disk/by-uuid/2284e9c6-c168-4d4f-ba6a-d270f1ae245d"; }];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.enp12s0.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.wlp13s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
22
hosts/gunter/nfs.nix
Normal file
22
hosts/gunter/nfs.nix
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
nfs-utils
|
||||||
|
];
|
||||||
|
services.rpcbind.enable = true;
|
||||||
|
systemd.mounts = [{
|
||||||
|
type = "nfs";
|
||||||
|
mountConfig = {
|
||||||
|
Options = "rw,soft,noatime";
|
||||||
|
};
|
||||||
|
what = "nas.home.2rjus.net:/mnt/hdd-pool/media";
|
||||||
|
where = "/mnt/nas/media";
|
||||||
|
}];
|
||||||
|
|
||||||
|
systemd.automounts = [{
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
automountConfig = {
|
||||||
|
TimeoutIdleSec = "5min";
|
||||||
|
};
|
||||||
|
where = "/mnt/nas/media";
|
||||||
|
}];
|
||||||
|
}
|
22
hosts/gunter/steamuser.nix
Normal file
22
hosts/gunter/steamuser.nix
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
environment.shells = with pkgs; [ zsh ];
|
||||||
|
|
||||||
|
services.xserver.desktopManager.xfce.enable = true;
|
||||||
|
programs.steam.enable = true;
|
||||||
|
|
||||||
|
services.flatpak.enable = true;
|
||||||
|
|
||||||
|
users.users.steam = {
|
||||||
|
isNormalUser = true;
|
||||||
|
initialPassword = "steam";
|
||||||
|
home = "/home/steam";
|
||||||
|
description = "Steam user";
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
# Install some user packages
|
||||||
|
packages = with pkgs; [
|
||||||
|
firefox
|
||||||
|
mumble
|
||||||
|
easyeffects
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
@ -3,10 +3,12 @@
|
|||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
fira-code
|
fira-code
|
||||||
fira-code-symbols
|
fira-code-symbols
|
||||||
|
nerdfonts
|
||||||
noto-fonts
|
noto-fonts
|
||||||
noto-fonts-cjk
|
noto-fonts-cjk
|
||||||
noto-fonts-emoji
|
noto-fonts-emoji
|
||||||
noto-fonts-monochrome-emoji
|
noto-fonts-monochrome-emoji
|
||||||
|
source-sans-pro
|
||||||
twemoji-color-font
|
twemoji-color-font
|
||||||
font-awesome
|
font-awesome
|
||||||
];
|
];
|
||||||
|
@ -14,13 +14,6 @@
|
|||||||
extraGroups = [ "wheel" "networkmanager" ];
|
extraGroups = [ "wheel" "networkmanager" ];
|
||||||
# Install some user packages
|
# Install some user packages
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
# Hyprland stuff
|
|
||||||
rofi-wayland
|
|
||||||
swaylock
|
|
||||||
waybar
|
|
||||||
dunst
|
|
||||||
slurp
|
|
||||||
wpaperd
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user