Compare commits
No commits in common. "8b88bc178a07584ef547db2a95cbdda37fb90d34" and "fb680669fd71eac536d0a3517fb6d2ae8f3a86e6" have entirely different histories.
8b88bc178a
...
fb680669fd
32
flake.lock
generated
32
flake.lock
generated
@ -7,43 +7,26 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1706981411,
|
"lastModified": 1709204054,
|
||||||
"narHash": "sha256-cLbLPTL1CDmETVh4p0nQtvoF+FSEjsnJTFpTxhXywhQ=",
|
"narHash": "sha256-U1idK0JHs1XOfSI1APYuXi4AEADf+B+ZU4Wifc0pBHk=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "652fda4ca6dafeb090943422c34ae9145787af37",
|
"rev": "2f3367769a93b226c467551315e9e270c3f78b15",
|
||||||
"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": 1709569716,
|
"lastModified": 1709150264,
|
||||||
"narHash": "sha256-iOR44RU4jQ+YPGrn+uQeYAp7Xo7Z/+gT+wXJoGxxLTY=",
|
"narHash": "sha256-HofykKuisObPUfj0E9CJVfaMhawXkYx3G8UIFR/XQ38=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "617579a787259b9a6419492eaac670a5f7663917",
|
"rev": "9099616b93301d5cf84274b184a3a5ec69e94e08",
|
||||||
"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": {
|
||||||
@ -56,8 +39,7 @@
|
|||||||
"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,45 +2,34 @@
|
|||||||
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?ref=release-23.11";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, nixpkgs-unstable, ... }@inputs:
|
outputs = { self, nixpkgs, ... }@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 {
|
||||||
inherit system;
|
system = "x86_64-linux";
|
||||||
specialArgs = { inherit inputs self user; };
|
specialArgs = { inherit inputs self user; };
|
||||||
modules = [ ./hosts/prismo ];
|
modules = [ ./hosts/prismo ];
|
||||||
};
|
};
|
||||||
magicman = nixpkgs.lib.nixosSystem {
|
magicman = nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
system = "x86_64-linux";
|
||||||
specialArgs = { inherit inputs self user; };
|
specialArgs = { inherit inputs self user; };
|
||||||
modules = [ ./hosts/magicman ];
|
modules = [ ./hosts/magicman ];
|
||||||
};
|
};
|
||||||
gunter = nixpkgs.lib.nixosSystem {
|
gunter = nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
system = "x86_64-linux";
|
||||||
specialArgs = { inherit inputs self user; };
|
specialArgs = { inherit inputs self user; };
|
||||||
modules = [
|
modules = [ ./hosts/gunter ];
|
||||||
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
|
|
||||||
./hosts/gunter
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -9,16 +9,9 @@
|
|||||||
./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,14 +14,8 @@
|
|||||||
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
|
||||||
@ -49,10 +43,8 @@
|
|||||||
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,26 +3,11 @@
|
|||||||
-- 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.on_attach(function(_, bufnr)
|
lsp_zero.default_keymaps({buffer = bufnr})
|
||||||
lsp_zero.default_keymaps({ buffer = bufnr })
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
lsp_zero.format_on_save({
|
require('lspconfig').gopls.setup({
|
||||||
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 = {
|
||||||
@ -34,69 +19,25 @@ lspconfig.gopls.setup({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
lspconfig.nil_ls.setup({
|
-- Cmp
|
||||||
autostart = true,
|
local cmp = require('cmp')
|
||||||
settings = {
|
local cmp_action = lsp_zero.cmp_action()
|
||||||
['nil'] = {
|
|
||||||
formatting = {
|
|
||||||
command = { "nixpkgs-fmt" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
lspconfig.lua_ls.setup({
|
cmp.setup({
|
||||||
on_init = function(client)
|
mapping = cmp.mapping.preset.insert({
|
||||||
local path = client.workspace_folders[1].name
|
-- Enter to confirm completion
|
||||||
if vim.loop.fs_stat(path .. '/.luarc.json') or vim.loop.fs_stat(path .. '/.luarc.jsonc') then
|
['<CR>'] = cmp.mapping.confirm({select = false}),
|
||||||
return
|
-- Ctrl+Space to open completion menu
|
||||||
end
|
['<C-Space>'] = cmp.mapping.complete(),
|
||||||
|
-- Move between snippet placeholders
|
||||||
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
|
['<C-f>'] = cmp_action.luasnip_jump_forward(),
|
||||||
runtime = {
|
['<C-b>'] = cmp_action.luasnip_jump_backward(),
|
||||||
-- Tell the language server which version of Lua you're using
|
-- Scroll in completion docs
|
||||||
-- (most likely LuaJIT in the case of Neovim)
|
['<C-k>'] = cmp.mapping.scroll_docs(-4),
|
||||||
version = 'LuaJIT'
|
['<C-j>'] = cmp.mapping.scroll_docs(4),
|
||||||
},
|
|
||||||
-- 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 = {
|
||||||
@ -114,7 +55,7 @@ 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,
|
||||||
@ -169,51 +110,8 @@ 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"
|
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
{ 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 ./xdg.nix ./cursor.nix ]; }
|
{ imports = [ ./hyprland.nix ./waybar.nix ./xdg.nix ]; }
|
||||||
|
@ -1,60 +1,20 @@
|
|||||||
{ 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; [
|
home.packages = with pkgs; [ swww wl-clipboard cliphist hyprpaper hyprlock ];
|
||||||
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";
|
||||||
"$shiftMainMod" = "SUPER_SHIFT";
|
"$term" = "alacritty";
|
||||||
"$term" = "kitty";
|
|
||||||
|
|
||||||
# monitors
|
monitor = [ "eDP-1,1920x1080@60,0x0,1" ];
|
||||||
"$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;
|
||||||
@ -95,37 +55,14 @@
|
|||||||
misc.force_default_wallpaper = -1;
|
misc.force_default_wallpaper = -1;
|
||||||
|
|
||||||
windowrulev2 = [
|
windowrulev2 = [
|
||||||
"opacity 0.95 override 0.7 override,class:^(Alacritty)$"
|
"opacity 0.95 override 0.5 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-launcher"
|
"$mainMod,D,exec,rofi -show drun"
|
||||||
"$mainMod,P,exec,rofi-rbw"
|
|
||||||
|
|
||||||
# hyprland
|
# hyprland
|
||||||
"$mainMod,Q,killactive,"
|
"$mainMod,Q,killactive,"
|
||||||
"CTRLALT,Delete,exit,"
|
"CTRLALT,Delete,exit,"
|
||||||
@ -143,29 +80,16 @@
|
|||||||
"$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
|
||||||
# Force opacity
|
(x:
|
||||||
"$shiftMainMod,o,exec, hl-no-opacity"
|
let
|
||||||
|
ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10));
|
||||||
# mumble ptt click
|
in
|
||||||
# ",code:202,exec,mumble rpc starttalking"
|
[
|
||||||
",code:202,exec,pamixer --default-source -u"
|
"$mainMod, ${ws}, workspace, ${toString (x + 1)}"
|
||||||
|
"ALT, ${ws}, workspace, ${toString (x + 1)}"
|
||||||
# worspace switching
|
]) 10));
|
||||||
"$mainMod,1,workspace,name:main 1"
|
exec-once = [ "waybar & hyprpaper" ];
|
||||||
"$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 +1,3 @@
|
|||||||
|
preload = ~/pics/wallpapers/1.jpg
|
||||||
|
wallpaper = eDP-1,~/pics/wallpapers/1.jpg
|
||||||
splash = false
|
splash = false
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
};
|
};
|
||||||
style = ''
|
style = ''
|
||||||
* {
|
* {
|
||||||
font-family: "FiraCodeNerdFont-Regular";
|
font-family: "Fira Code", "Font Awesome 6 Free";
|
||||||
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" = "{:%H:%M %A %b %d}";
|
"format" = "{:%I:%M %p %A %b %d}";
|
||||||
"tooltip" = true;
|
"tooltip" = true;
|
||||||
};
|
};
|
||||||
"memory" = {
|
"memory" = {
|
@ -1,195 +0,0 @@
|
|||||||
{ 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;
|
|
||||||
};
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
{ 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
|
||||||
unstable.btop
|
btop
|
||||||
bzip2
|
bzip2
|
||||||
croc
|
croc
|
||||||
easyeffects
|
easyeffects
|
||||||
@ -11,36 +11,20 @@
|
|||||||
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
|
||||||
@ -50,11 +34,6 @@
|
|||||||
delve
|
delve
|
||||||
gopls
|
gopls
|
||||||
|
|
||||||
# js/ts
|
|
||||||
nodejs
|
|
||||||
nodePackages.pnpm
|
|
||||||
typescript
|
|
||||||
|
|
||||||
# Py stuff
|
# Py stuff
|
||||||
python3
|
python3
|
||||||
poetry
|
poetry
|
||||||
|
@ -1,76 +0,0 @@
|
|||||||
{ 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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,24 +0,0 @@
|
|||||||
{ 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";
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
# 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
|
|
@ -1,8 +0,0 @@
|
|||||||
{ pkgs, ... }: {
|
|
||||||
programs.obs-studio = {
|
|
||||||
enable = true;
|
|
||||||
plugins = with pkgs.obs-studio-plugins; [
|
|
||||||
obs-backgroundremoval
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
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"
|
|
@ -1,24 +0,0 @@
|
|||||||
{ 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";
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
{ 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;
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
#!/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
|
|
@ -1,31 +0,0 @@
|
|||||||
#!/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
|
|
@ -1,8 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
rofi \
|
|
||||||
-show drun \
|
|
||||||
-modi run,drun,ssh \
|
|
||||||
-scroll-method 0 \
|
|
||||||
-drun-match-fields all \
|
|
||||||
-drun-display-format "{name}" \
|
|
||||||
-terminal kitty
|
|
@ -1,79 +0,0 @@
|
|||||||
{ 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 +0,0 @@
|
|||||||
{ imports = [ ./gunter.nix ]; }
|
|
@ -1,15 +0,0 @@
|
|||||||
{ 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";
|
nrebuild = "sudo nixos-rebuild switch --flake /home/${user}/nixos#prismo";
|
||||||
};
|
};
|
||||||
initExtra = ''
|
initExtra = ''
|
||||||
bindkey -v
|
bindkey -v
|
||||||
|
@ -9,20 +9,9 @@
|
|||||||
"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;
|
||||||
@ -31,45 +20,18 @@
|
|||||||
time.timeZone = "Europe/Oslo";
|
time.timeZone = "Europe/Oslo";
|
||||||
|
|
||||||
# Enable opengl
|
# Enable opengl
|
||||||
hardware.opengl = {
|
# hardware.opengl = {
|
||||||
enable = true;
|
# enable = true;
|
||||||
driSupport = true;
|
# extraPackages = with pkgs; [
|
||||||
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.unstable.xdg-desktop-portal-hyprland;
|
portalPackage = pkgs.xdg-desktop-portal-hyprland;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Setup common XDG env vars
|
# Setup common XDG env vars
|
||||||
@ -87,7 +49,7 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
xdgOpenUsePortal = true;
|
xdgOpenUsePortal = true;
|
||||||
extraPortals = (with pkgs; [
|
extraPortals = (with pkgs; [
|
||||||
# unstable.xdg-desktop-portal-hyprland
|
xdg-desktop-portal-hyprland
|
||||||
xdg-desktop-portal-gtk
|
xdg-desktop-portal-gtk
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
@ -98,20 +60,10 @@
|
|||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
# Install system-wide packages
|
# Install system-wide packages
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
curl
|
|
||||||
git
|
|
||||||
libnotify
|
|
||||||
usbutils
|
|
||||||
vim
|
vim
|
||||||
wget
|
wget
|
||||||
v4l-utils
|
curl
|
||||||
|
git
|
||||||
# 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,8 +2,6 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./steamuser.nix
|
|
||||||
./nfs.nix
|
|
||||||
../../system
|
../../system
|
||||||
../../home
|
../../home
|
||||||
];
|
];
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
# 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;
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
{ 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";
|
|
||||||
}];
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
{ 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,12 +3,10 @@
|
|||||||
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,6 +14,13 @@
|
|||||||
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