First working version of NixOS intall
This commit is contained in:
commit
5ab67429b2
47 changed files with 1801 additions and 0 deletions
18
README.md
Normal file
18
README.md
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
My NixOS configuration
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
My configurations for NixOS using flakes. For now only my desktop computer is
|
||||||
|
configured with this system.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
```
|
||||||
|
doas nixos-rebuild switch --flake ".#mrmeeseeks"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Update the flakes.lock
|
||||||
|
|
||||||
|
```
|
||||||
|
nix flake update
|
||||||
|
doas nixos-rebuild switch --flake ".#mrmeeseeks"
|
||||||
|
```
|
10
common/flakes.nix
Normal file
10
common/flakes.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
nix = {
|
||||||
|
package = pkgs.nixUnstable;
|
||||||
|
extraOptions = ''
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
6
common/locales.nix
Normal file
6
common/locales.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
|
time.timeZone = "Europe/Paris";
|
||||||
|
# English locale with YYY/MM/DD date format
|
||||||
|
i18n.defaultLocale = "en_DK.UTF-8";
|
||||||
|
}
|
24
common/user.nix
Normal file
24
common/user.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
# Services
|
||||||
|
services.pcscd.enable = true;
|
||||||
|
|
||||||
|
# Programs
|
||||||
|
programs.ssh.startAgent = true;
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
# programs.dconf.enable = true;
|
||||||
|
|
||||||
|
# Configs
|
||||||
|
fonts.fontconfig.enable = true;
|
||||||
|
|
||||||
|
users.users.ephase = {
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [ "video" "wheel" ];
|
||||||
|
home = "/home/ephase";
|
||||||
|
packages = with pkgs; [
|
||||||
|
remmina
|
||||||
|
gcc
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
47
flake.lock
generated
Normal file
47
flake.lock
generated
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1690027126,
|
||||||
|
"narHash": "sha256-DeUhQQxbu41Qn0uHyNazPBiTJ0lNsf26ThFopWBRRnM=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "76dd6c66190db0d46ac6b3ca816cc17b581df42c",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1690031011,
|
||||||
|
"narHash": "sha256-kzK0P4Smt7CL53YCdZCBbt9uBFFhE0iNvCki20etAf4=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "12303c652b881435065a98729eb7278313041e49",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
21
flake.nix
Normal file
21
flake.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
description = "My systems installation";
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||||
|
home-manager = {
|
||||||
|
url = "github:nix-community/home-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
outputs = { self, nixpkgs, home-manager, ... }@inputs: {
|
||||||
|
nixosConfigurations = {
|
||||||
|
mrmeeseeks = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [
|
||||||
|
./hosts/mrmeeseeks/configuration.nix
|
||||||
|
home-manager.nixosModule
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
72
hosts/mrmeeseeks/configuration.nix
Normal file
72
hosts/mrmeeseeks/configuration.nix
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ # Include the results of the hardware scan.
|
||||||
|
./hardware-configuration.nix
|
||||||
|
../../common/locales.nix
|
||||||
|
../../common/flakes.nix
|
||||||
|
../../common/user.nix
|
||||||
|
../../modules/nixos/pipewire.nix
|
||||||
|
../../modules/nixos/steam.nix
|
||||||
|
../../modules/nixos/xdg-portal.nix
|
||||||
|
../../modules/nixos/doas.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
# Use the systemd-boot EFI boot loader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
#CPU
|
||||||
|
hardware.cpu.amd.updateMicrocode = true;
|
||||||
|
# GPU
|
||||||
|
hardware.opengl.driSupport = true;
|
||||||
|
hardware.opengl.driSupport32Bit = true;
|
||||||
|
|
||||||
|
# Bluetooth
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
hardware.xpadneo.enable = true;
|
||||||
|
networking.hostName = "mrmeeseeks";
|
||||||
|
|
||||||
|
console = {
|
||||||
|
earlySetup = true;
|
||||||
|
font = "${pkgs.terminus_font}/share/consolefonts/ter-132n.psf.gz";
|
||||||
|
packages = with pkgs; [terminus_font];
|
||||||
|
# keyMap = "us";
|
||||||
|
useXkbConfig = true; # use xkbOptions in tty.
|
||||||
|
};
|
||||||
|
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
security.pam.services.swaylock = {};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
git
|
||||||
|
zsh
|
||||||
|
lvm2_dmeventd
|
||||||
|
];
|
||||||
|
|
||||||
|
services.lvm.enable = true;
|
||||||
|
services.lvm.dmeventd.enable = true;
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
users.ephase = {
|
||||||
|
home.stateVersion = "23.05";
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
imports = [
|
||||||
|
../../modules/home/desktop
|
||||||
|
../../modules/home/cli
|
||||||
|
../../modules/home/firefox
|
||||||
|
../../modules/home/foot.nix
|
||||||
|
../../modules/home/lutris.nix
|
||||||
|
../../modules/home/zathura.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "23.05";
|
||||||
|
}
|
67
hosts/mrmeeseeks/hardware-configuration.nix
Normal file
67
hosts/mrmeeseeks/hardware-configuration.nix
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
# 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"
|
||||||
|
"amdgpu"
|
||||||
|
];
|
||||||
|
boot.initrd.kernelModules = [
|
||||||
|
"dm-cache-default"
|
||||||
|
];
|
||||||
|
boot.kernelModules = [
|
||||||
|
"kvm-amd"
|
||||||
|
"amdgpu"
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
boot.initrd.luks.devices."nixos".device = "/dev/disk/by-uuid/ea7fa60d-35e5-48b8-95d7-142f37b262cd";
|
||||||
|
boot.initrd.luks.devices."nixos".preLVM = true;
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/9d1e5022-0265-4ce7-824e-282ee550d52d";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@root" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/home" =
|
||||||
|
{ device = "/dev/disk/by-uuid/9d1e5022-0265-4ce7-824e-282ee550d52d";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@home" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/F027-F53F";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/mnt/gamelib" =
|
||||||
|
{ device = "/dev/mapper/tank-gamelib";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
# 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.enp34s0.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.wlp37s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
services.lvm.boot.thin.enable = true;
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
10
modules/home/cli/default.nix
Normal file
10
modules/home/cli/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./zsh.nix
|
||||||
|
./git.nix
|
||||||
|
./pass.nix
|
||||||
|
./gnupg.nix
|
||||||
|
./neovim.nix
|
||||||
|
];
|
||||||
|
}
|
9
modules/home/cli/git.nix
Normal file
9
modules/home/cli/git.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.gitFull;
|
||||||
|
userName = "Yorick Barbanneau";
|
||||||
|
userEmail = "ephase@xieme-art.org";
|
||||||
|
};
|
||||||
|
}
|
20
modules/home/cli/gnupg.nix
Normal file
20
modules/home/cli/gnupg.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
pinentry-gnome
|
||||||
|
pkgs.gcr
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.gpg = {
|
||||||
|
enable = true;
|
||||||
|
scdaemonSettings = {
|
||||||
|
disable-ccid = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.gpg-agent = {
|
||||||
|
enable = true;
|
||||||
|
enableScDaemon = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
pinentryFlavor = "gnome3";
|
||||||
|
};
|
||||||
|
}
|
382
modules/home/cli/neovim.nix
Normal file
382
modules/home/cli/neovim.nix
Normal file
|
@ -0,0 +1,382 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.neovim = {
|
||||||
|
enable = true;
|
||||||
|
defaultEditor = true;
|
||||||
|
vimAlias = true;
|
||||||
|
withNodeJs = true;
|
||||||
|
withPython3 = true;
|
||||||
|
extraLuaConfig = ''
|
||||||
|
-- General Option
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
vim.g.maplocalleader = " "
|
||||||
|
|
||||||
|
vim.opt.autoindent = true
|
||||||
|
vim.opt.background = 'dark'
|
||||||
|
vim.opt.backupdir = os.getenv("HOME") .. '/.local/tmp/nvim'
|
||||||
|
vim.opt.clipboard = 'unnamedplus' --Use system clipboard
|
||||||
|
vim.opt.colorcolumn = '80'
|
||||||
|
vim.opt.directory = os.getenv("HOME") .. '/.local/tmp/nvim'
|
||||||
|
vim.opt.expandtab = true
|
||||||
|
vim.opt.foldmethod = 'syntax'
|
||||||
|
vim.opt.gdefault = true -- search: all occurrences by default
|
||||||
|
vim.opt.hlsearch = true -- search: hightlight terms
|
||||||
|
vim.opt.ignorecase = true
|
||||||
|
vim.opt.incsearch = true
|
||||||
|
vim.opt.laststatus = 1
|
||||||
|
-- show special character
|
||||||
|
vim.opt.listchars = {tab = '→ ', trail = '␣', eol = '', extends = '…' }
|
||||||
|
|
||||||
|
vim.opt.signcolumn = "yes" -- alway show sign column
|
||||||
|
vim.opt.number = true
|
||||||
|
vim.opt.relativenumber = true
|
||||||
|
vim.opt.cursorline = true -- highlight current line
|
||||||
|
vim.opt.shiftwidth = 4
|
||||||
|
vim.opt.showmatch = true
|
||||||
|
vim.opt.smartcase = true -- search: try :to be smart about cases
|
||||||
|
vim.opt.smartindent = true
|
||||||
|
vim.opt.tabstop = 4
|
||||||
|
vim.opt.termguicolors = true -- 24 bits color support
|
||||||
|
vim.opt.wildmenu = true -- activate enhanced user menu
|
||||||
|
vim.opt.wildmode = 'lastused:full,list' -- enhance menu
|
||||||
|
vim.opt.pumheight = 10
|
||||||
|
vim.opt.pumwidth = 50
|
||||||
|
vim.opt.pumblend = 10
|
||||||
|
|
||||||
|
-- Options than need vim.cmd
|
||||||
|
-- vim.cmd('syntax on')
|
||||||
|
|
||||||
|
-- -- Code Fold
|
||||||
|
-- "Load and save view atomatocally (save and restore fold)
|
||||||
|
vim.cmd('au BufWinLeave *.* mkview')
|
||||||
|
vim.cmd('au BufWinEnter *.* silent! loadview')
|
||||||
|
|
||||||
|
|
||||||
|
-- Diagnostic settings
|
||||||
|
--
|
||||||
|
-- diagnostic windows must be float
|
||||||
|
vim.diagnostic.config {
|
||||||
|
virtual_text = false,
|
||||||
|
signs = true,
|
||||||
|
underline = true,
|
||||||
|
}
|
||||||
|
|
||||||
|
local signs = { Error = "", Warn = "", Hint = "", Info = "" }
|
||||||
|
for type, icon in pairs(signs) do
|
||||||
|
local hl = "DiagnosticSign" .. type
|
||||||
|
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
||||||
|
end
|
||||||
|
|
||||||
|
-- You will likely want to reduce updatetime which affects CursorHold
|
||||||
|
-- note: this setting is global and should be set only once
|
||||||
|
vim.o.updatetime = 250
|
||||||
|
vim.cmd [[autocmd! CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {scope='cursor', header = "", prefix = "", focus=false})]]
|
||||||
|
|
||||||
|
-- Autotype
|
||||||
|
vim.cmd('au BufRead,BufNewFile *.md setlocal textwidth=80')
|
||||||
|
vim.cmd('au BufRead,BufNewFile *.tex setlocal textwidth=80')
|
||||||
|
vim.cmd('au BufRead,BufNewFile *.nix setlocal tabstop=2 shiftwidth=2 ')
|
||||||
|
vim.cmd('au BufNewFile,BufRead /tmp/neomutt* set tw=72 fo=awq comments+=nb:> noautoindent filetype=mail')
|
||||||
|
|
||||||
|
-- Ignore these filenames during enhanced command line completion.
|
||||||
|
vim.opt.wildignore = {
|
||||||
|
'*.bak',
|
||||||
|
'*.class',
|
||||||
|
'*.aux',
|
||||||
|
'*.out',
|
||||||
|
'*.toc',
|
||||||
|
'*.jpg',
|
||||||
|
'*.bmp',
|
||||||
|
'*.gif',
|
||||||
|
'*.png',
|
||||||
|
'*.luac',
|
||||||
|
'*.o',
|
||||||
|
'*.obj',
|
||||||
|
'*.exe',
|
||||||
|
'*.dll',
|
||||||
|
'*.manifest',
|
||||||
|
'*.pyc',
|
||||||
|
'*.spl',
|
||||||
|
'*.sw?'
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Key biding
|
||||||
|
-- " ----------
|
||||||
|
local opts = { noremap = true, silent = true}
|
||||||
|
|
||||||
|
vim.api.nvim_set_keymap('n', '<leader>/', ':nohlsearch<CR>', opts)
|
||||||
|
|
||||||
|
-- Move tabs with \[ and \]
|
||||||
|
vim.api.nvim_set_keymap('n', '<Leader>]', ':tabnext<CR>', opts)
|
||||||
|
vim.api.nvim_set_keymap('n', '<Leader>[', ':tabprev<CR>', opts)
|
||||||
|
vim.api.nvim_set_keymap('n', '<leader>l', ':set list!<CR>', {silent = true})
|
||||||
|
'';
|
||||||
|
plugins = with pkgs.vimPlugins; [
|
||||||
|
{
|
||||||
|
plugin = nvim-autopairs;
|
||||||
|
type = "lua";
|
||||||
|
config = ''
|
||||||
|
local autopair = require("nvim-autopairs").setup {}
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
{
|
||||||
|
plugin = nvim-base16;
|
||||||
|
type = "lua";
|
||||||
|
config = ''
|
||||||
|
vim.cmd.colorscheme 'base16-default-dark'
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
{
|
||||||
|
plugin = nvim-cmp;
|
||||||
|
type = "lua";
|
||||||
|
config = ''
|
||||||
|
local has_words_before = function()
|
||||||
|
unpack = unpack or table.unpack
|
||||||
|
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||||
|
return col ~= 0 and vim.api.nvim_buf_get_lines(
|
||||||
|
0,
|
||||||
|
line - 1,
|
||||||
|
line,
|
||||||
|
true
|
||||||
|
)[1]:sub(col, col):match('%s') == nil
|
||||||
|
end
|
||||||
|
-- Add additional capabilities supported by nvim-cmp
|
||||||
|
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||||
|
local luasnip = require("luasnip")
|
||||||
|
local kind_icons = {
|
||||||
|
Text = "",
|
||||||
|
Method = "",
|
||||||
|
Function = "",
|
||||||
|
Constructor = "",
|
||||||
|
Field = "",
|
||||||
|
Variable = "",
|
||||||
|
Class = "",
|
||||||
|
Interface = "",
|
||||||
|
Module = "",
|
||||||
|
Property = "",
|
||||||
|
Unit = "",
|
||||||
|
Value = "",
|
||||||
|
Enum = "",
|
||||||
|
Keyword = "",
|
||||||
|
Snippet = "",
|
||||||
|
Color = "",
|
||||||
|
File = "",
|
||||||
|
Reference = "",
|
||||||
|
Folder = "",
|
||||||
|
EnumMember = "",
|
||||||
|
Constant = "",
|
||||||
|
Struct = "",
|
||||||
|
Event = "",
|
||||||
|
Operator = "",
|
||||||
|
TypeParameter = "",
|
||||||
|
}
|
||||||
|
-- nvim-cmp setup
|
||||||
|
local cmp = require 'cmp'
|
||||||
|
cmp.setup {
|
||||||
|
mapping = {
|
||||||
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_next_item()
|
||||||
|
-- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
|
||||||
|
-- they way you will only jump inside the snippet region
|
||||||
|
elseif luasnip.expand_or_jumpable() then
|
||||||
|
luasnip.expand_or_jump()
|
||||||
|
elseif has_words_before() then
|
||||||
|
cmp.complete()
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { "i", "s" }),
|
||||||
|
|
||||||
|
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_prev_item()
|
||||||
|
elseif luasnip.jumpable(-1) then
|
||||||
|
luasnip.jump(-1)
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { "i", "s" }),
|
||||||
|
},
|
||||||
|
formatting = {
|
||||||
|
format = function(_, vim_item)
|
||||||
|
vim_item.kind = string.format('%s %s', kind_icons[vim_item.kind], vim_item.kind)
|
||||||
|
return vim_item
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
sources = {
|
||||||
|
{ name = 'nvim_lsp' },
|
||||||
|
{ name = 'luasnip' },
|
||||||
|
{ name = 'path' },
|
||||||
|
{ name = 'buffer' },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
cmp-buffer
|
||||||
|
cmp-nvim-lsp
|
||||||
|
cmp-path
|
||||||
|
cmp-cmdline
|
||||||
|
cmp_luasnip
|
||||||
|
{
|
||||||
|
plugin = gitsigns-nvim;
|
||||||
|
type = "lua";
|
||||||
|
config = ''
|
||||||
|
require('gitsigns').setup {
|
||||||
|
on_attach = function(bufnr)
|
||||||
|
local gs = package.loaded.gitsigns
|
||||||
|
|
||||||
|
local function map(mode, l, r, opts)
|
||||||
|
opts = opts or {}
|
||||||
|
opts.buffer = bufnr
|
||||||
|
vim.keymap.set(mode, l, r, opts)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Navigation
|
||||||
|
map('n', '<leader>gn', function()
|
||||||
|
if vim.wo.diff then return ']c' end
|
||||||
|
vim.schedule(function() gs.next_hunk() end)
|
||||||
|
return '<Ignore>'
|
||||||
|
end, {expr=true})
|
||||||
|
|
||||||
|
map('n', '<leader>gN', function()
|
||||||
|
if vim.wo.diff then return '[c' end
|
||||||
|
vim.schedule(function() gs.prev_hunk() end)
|
||||||
|
return '<Ignore>'
|
||||||
|
end, {expr=true})
|
||||||
|
|
||||||
|
map('n', '<leader>gs', gs.stage_hunk)
|
||||||
|
map('n', '<leader>gr', gs.reset_hunk)
|
||||||
|
map('n', '<leader>gd', gs.diffthis)
|
||||||
|
map('n', '<leader>gd', function() gs.diffthis('~') end)
|
||||||
|
end
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
indent-blankline-nvim
|
||||||
|
{
|
||||||
|
plugin = nvim-lspconfig;
|
||||||
|
type = "lua";
|
||||||
|
config = ''
|
||||||
|
local lspconfig = require('lspconfig')
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
{
|
||||||
|
plugin = lualine-nvim;
|
||||||
|
type = "lua";
|
||||||
|
config = ''
|
||||||
|
|
||||||
|
require('lualine').setup {
|
||||||
|
options = {
|
||||||
|
icons_enabled = true,
|
||||||
|
theme = 'base16',
|
||||||
|
component_separators = { left = '|', right = '|'},
|
||||||
|
section_separators = { left = "", right = ""},
|
||||||
|
disabled_filetypes = {},
|
||||||
|
always_divide_middle = true,
|
||||||
|
globalstatus = true,
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
lualine_a = {'mode'},
|
||||||
|
lualine_b = {'branch', 'diff', 'diagnostics'},
|
||||||
|
lualine_c = {'filename'},
|
||||||
|
lualine_x = {'encoding', 'fileformat', 'filetype'},
|
||||||
|
lualine_y = {'progress'},
|
||||||
|
lualine_z = {'location'}
|
||||||
|
},
|
||||||
|
inactive_sections = {
|
||||||
|
lualine_a = {},
|
||||||
|
lualine_b = {},
|
||||||
|
lualine_c = {'filename'},
|
||||||
|
lualine_x = {'location'},
|
||||||
|
lualine_y = {},
|
||||||
|
lualine_z = {}
|
||||||
|
},
|
||||||
|
tabline = {},
|
||||||
|
extensions = {}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
mason-lspconfig-nvim
|
||||||
|
{
|
||||||
|
plugin = mason-nvim;
|
||||||
|
type = "lua";
|
||||||
|
config = ''
|
||||||
|
local mason = require("mason").setup{
|
||||||
|
ensure_installed= {
|
||||||
|
'shellcheck',
|
||||||
|
'shfmt'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
local mason_lspconfig = require("mason-lspconfig").setup{
|
||||||
|
ensure_installed={
|
||||||
|
'ansiblels',
|
||||||
|
'bashls'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
require("mason-lspconfig").setup_handlers({
|
||||||
|
-- The first entry (without a key) will be the default handler
|
||||||
|
-- and will be called for each installed server that doesn't have
|
||||||
|
-- a dedicated handler.
|
||||||
|
function (server_name) -- default handler (optional)
|
||||||
|
require("lspconfig")[server_name].setup {}
|
||||||
|
end,
|
||||||
|
-- Next, you can provide targeted overrides for specific servers.
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
{
|
||||||
|
plugin = neo-tree-nvim;
|
||||||
|
type = "lua";
|
||||||
|
config = ''
|
||||||
|
local neotree = require 'neo-tree'
|
||||||
|
neotree.setup({
|
||||||
|
event_handlers = {
|
||||||
|
{
|
||||||
|
event = "file_opened",
|
||||||
|
handler = function(file_path)
|
||||||
|
-- auto close
|
||||||
|
require("neo-tree.command").execute({action = "close"})
|
||||||
|
end
|
||||||
|
},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
vim.api.nvim_set_keymap('n', '<leader>fm',
|
||||||
|
':Neotree toggle<CR>',
|
||||||
|
{ table.unpack(opts), desc = 'Toggle NeoTree' }
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
nui-nvim
|
||||||
|
plenary-nvim
|
||||||
|
{
|
||||||
|
plugin = (nvim-treesitter.withPlugins (p: [
|
||||||
|
p.bash p.c p.cmake p.dockerfile p.latex p.lua p.markdown
|
||||||
|
p.markdown_inline p.python p.vim p.yaml
|
||||||
|
])
|
||||||
|
);
|
||||||
|
type = "lua";
|
||||||
|
config = ''
|
||||||
|
-- Tree sitter
|
||||||
|
local ts = require 'nvim-treesitter.configs'
|
||||||
|
|
||||||
|
ts.setup {
|
||||||
|
sync_install = false,
|
||||||
|
highlight = {
|
||||||
|
enable = true,
|
||||||
|
additional_vim_regex_highlighting = false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
{
|
||||||
|
plugin = which-key-nvim;
|
||||||
|
type = "lua";
|
||||||
|
config = ''
|
||||||
|
local wk = require 'which-key'
|
||||||
|
wk.register()
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
6
modules/home/cli/pass.nix
Normal file
6
modules/home/cli/pass.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.password-store = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
68
modules/home/cli/zsh.nix
Normal file
68
modules/home/cli/zsh.nix
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
dotDir = ".config/zsh";
|
||||||
|
defaultKeymap = "viins";
|
||||||
|
enableCompletion = true;
|
||||||
|
history = {
|
||||||
|
expireDuplicatesFirst = true;
|
||||||
|
save = 10000;
|
||||||
|
share = true;
|
||||||
|
path = ".local/share/zsh/history";
|
||||||
|
};
|
||||||
|
historySubstringSearch = {
|
||||||
|
enable = true;
|
||||||
|
searchDownKey = "^[OB";
|
||||||
|
searchUpKey = "^[OA";
|
||||||
|
};
|
||||||
|
completionInit = ''
|
||||||
|
autoload -Uz compinit
|
||||||
|
for dump in ''${ZDOTDIR}/.zcompdump(N.mh+24); do
|
||||||
|
compinit
|
||||||
|
done
|
||||||
|
compinit -C
|
||||||
|
|
||||||
|
'';
|
||||||
|
plugins = [
|
||||||
|
{
|
||||||
|
name = "pure";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "sindresorhus";
|
||||||
|
repo = "pure";
|
||||||
|
rev = "v1.21.0";
|
||||||
|
hash = "sha256-YfasTKCABvMtncrfoWR1Su9QxzCqPED18/BTXaJHttg=";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "base16-shell";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "chriskempson";
|
||||||
|
repo = "base16-shell";
|
||||||
|
rev = "588691ba71b47e75793ed9edfcfaa058326a6f41";
|
||||||
|
hash = "sha256-X89FsG9QICDw3jZvOCB/KsPBVOLUeE7xN3VCtf0DD3E=";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "fast-syntax-highlighting";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "zdharma-continuum";
|
||||||
|
repo = "fast-syntax-highlighting";
|
||||||
|
rev = "v1.55";
|
||||||
|
hash = "sha256-DWVFBoICroKaKgByLmDEo4O+xo6eA8YO792g8t8R7kA=";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "history-search-multi-word";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "zdharma-continuum";
|
||||||
|
repo = "history-search-multi-word";
|
||||||
|
rev = "c4dcddc1cd17e7e0909471703f3526170db0f475";
|
||||||
|
hash = "sha256-KgKm9qzFnwXDXwmTruPgC0tjmiTY5AiGdrWW4zDWUF4=";
|
||||||
|
};
|
||||||
|
}];
|
||||||
|
localVariables = {
|
||||||
|
BASE16_THEME = "$HOME/.config/zsh/plugins/base16";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
16
modules/home/desktop/default.nix
Normal file
16
modules/home/desktop/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
emojione
|
||||||
|
(pkgs.nerdfonts.override { fonts = ["FiraCode"];})
|
||||||
|
|
||||||
|
libnotify
|
||||||
|
wl-clipboard
|
||||||
|
];
|
||||||
|
imports = [
|
||||||
|
./sway
|
||||||
|
./qt.nix
|
||||||
|
./gtk.nix
|
||||||
|
./xdg.nix
|
||||||
|
];
|
||||||
|
}
|
11
modules/home/desktop/fonts.nix
Normal file
11
modules/home/desktop/fonts.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{pkgs, ...}:
|
||||||
|
{
|
||||||
|
fonts.fonts = with pkgs; [
|
||||||
|
font-awesome
|
||||||
|
(nerdfonts.override {
|
||||||
|
fonts = [
|
||||||
|
"FiraCode"
|
||||||
|
];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
29
modules/home/desktop/gtk.nix
Normal file
29
modules/home/desktop/gtk.nix
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
name = "Arc-Darker";
|
||||||
|
package = pkgs.arc-theme;
|
||||||
|
};
|
||||||
|
iconTheme = {
|
||||||
|
name = "Papirus";
|
||||||
|
package = pkgs.papirus-icon-theme;
|
||||||
|
};
|
||||||
|
font = {
|
||||||
|
name = "Deja Vu Sans";
|
||||||
|
package = "${pkgs.dejavu_fonts}";
|
||||||
|
size = 10;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.pointerCursor = {
|
||||||
|
name = "Adwaita";
|
||||||
|
package = pkgs.gnome.adwaita-icon-theme;
|
||||||
|
size = 24;
|
||||||
|
x11 = {
|
||||||
|
enable = true;
|
||||||
|
defaultCursor = "Adwaita";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
8
modules/home/desktop/qt.nix
Normal file
8
modules/home/desktop/qt.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
qt = {
|
||||||
|
enable = true;
|
||||||
|
platformTheme = "gnome";
|
||||||
|
style.name = "adwaita-dark";
|
||||||
|
};
|
||||||
|
}
|
11
modules/home/desktop/sway/default.nix
Normal file
11
modules/home/desktop/sway/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./sway.nix
|
||||||
|
./mako.nix
|
||||||
|
./waybar.nix
|
||||||
|
./swaylock.nix
|
||||||
|
./swayidle.nix
|
||||||
|
./fuzzel.nix
|
||||||
|
];
|
||||||
|
}
|
27
modules/home/desktop/sway/fuzzel.nix
Normal file
27
modules/home/desktop/sway/fuzzel.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.fuzzel = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
main = {
|
||||||
|
font = "Fira Code Nerd Font Mono:size=9";
|
||||||
|
icon-theme = "Papirus-Dark";
|
||||||
|
width = 60;
|
||||||
|
show-actions = "yes";
|
||||||
|
launch-prefix = "swaymsg exec --";
|
||||||
|
};
|
||||||
|
border = {
|
||||||
|
radius = 0;
|
||||||
|
width = 1;
|
||||||
|
};
|
||||||
|
colors = {
|
||||||
|
border = "f268b3ff";
|
||||||
|
background = "121212ff";
|
||||||
|
text = "ccccccff";
|
||||||
|
selection = "323232ff";
|
||||||
|
selection-text = "ccccccff";
|
||||||
|
match = "f268b3ff";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
37
modules/home/desktop/sway/mako.nix
Normal file
37
modules/home/desktop/sway/mako.nix
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
|
||||||
|
systemd.user.services.mako = {
|
||||||
|
Service = {
|
||||||
|
ExecStart = "${pkgs.mako}/bin/mako";
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
After = [ "sway-session.target" ];
|
||||||
|
WantedBy = [ "sway-session.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.mako = {
|
||||||
|
enable = true;
|
||||||
|
font = "Fira Code 10";
|
||||||
|
backgroundColor = "#353535FF";
|
||||||
|
borderColor = "#1CD180";
|
||||||
|
progressColor = "over #5566AAFF";
|
||||||
|
textColor = "#FDFDFD";
|
||||||
|
width = 300;
|
||||||
|
height = 100;
|
||||||
|
borderRadius = 0;
|
||||||
|
borderSize = 2;
|
||||||
|
icons = true;
|
||||||
|
maxIconSize = 64;
|
||||||
|
layer = "overlay";
|
||||||
|
anchor = "top-right";
|
||||||
|
extraConfig = ''
|
||||||
|
[urgency="high"]
|
||||||
|
border-color=#F268b3
|
||||||
|
|
||||||
|
[app-name="cmus"]
|
||||||
|
border-color=#00000000
|
||||||
|
default-timeout=10000
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
198
modules/home/desktop/sway/sway.nix
Normal file
198
modules/home/desktop/sway/sway.nix
Normal file
|
@ -0,0 +1,198 @@
|
||||||
|
{ pkgs, config, ...}:
|
||||||
|
{
|
||||||
|
wayland.windowManager.sway = {
|
||||||
|
enable = true;
|
||||||
|
wrapperFeatures.gtk = true;
|
||||||
|
systemd.enable = true;
|
||||||
|
config = {
|
||||||
|
modifier = "Mod4";
|
||||||
|
terminal = "${pkgs.foot}/bin/foot";
|
||||||
|
left = "h";
|
||||||
|
down = "j";
|
||||||
|
up = "k";
|
||||||
|
right = "l";
|
||||||
|
input = {
|
||||||
|
"*" = {
|
||||||
|
xkb_layout = "us";
|
||||||
|
xkb_variant = "altgr-intl";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
output = {
|
||||||
|
"Iiyama North America PL2792UH 1166310803122" = {
|
||||||
|
mode = "3840x2160@60Hz";
|
||||||
|
position = "0,0";
|
||||||
|
scale = "2";
|
||||||
|
};
|
||||||
|
"Iiyama North America PL2792UH 1176923201598" = {
|
||||||
|
mode = "3840x2160@60Hz";
|
||||||
|
position = "1920,0";
|
||||||
|
scale = "2";
|
||||||
|
transform = "90";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
bars= [];
|
||||||
|
keybindings = let
|
||||||
|
mod = config.wayland.windowManager.sway.config.modifier;
|
||||||
|
inherit (config.wayland.windowManager.sway.config)
|
||||||
|
left down up right terminal;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
"${mod}+1" = "workspace $ws1";
|
||||||
|
"${mod}+Shift+1" = "move container to workspace $ws1";
|
||||||
|
"${mod}+2" = "workspace $ws2";
|
||||||
|
"${mod}+Shift+2" = "move container to workspace $ws2";
|
||||||
|
"${mod}+3" = "workspace $ws3";
|
||||||
|
"${mod}+Shift+3" = "move container to workspace $ws3";
|
||||||
|
"${mod}+4" = "workspace $ws4";
|
||||||
|
"${mod}+Shift+4" = "move container to workspace $ws4";
|
||||||
|
"${mod}+5" = "workspace $ws5";
|
||||||
|
"${mod}+Shift+5" = "move container to workspace $ws5";
|
||||||
|
"${mod}+6" = "workspace $ws6";
|
||||||
|
"${mod}+Shift+6" = "move container to workspace $ws6";
|
||||||
|
"${mod}+7" = "workspace $ws7";
|
||||||
|
"${mod}+Shift+7" = "move container to workspace $ws7";
|
||||||
|
"${mod}+8" = "workspace $ws8";
|
||||||
|
"${mod}+Shift+8" = "move container to workspace $ws8";
|
||||||
|
"${mod}+9" = "workspace $ws9";
|
||||||
|
"${mod}+Shift+9" = "move container to workspace $ws9";
|
||||||
|
"${mod}+0" = "workspace $ws0";
|
||||||
|
"${mod}+Shift+0" = "move container to workspace $ws0";
|
||||||
|
"${mod}+Return" = "exec ${terminal}";
|
||||||
|
"${mod}+Shift+q" = "kill";
|
||||||
|
"${mod}+d" = "exec ${pkgs.fuzzel}/bin/fuzzel";
|
||||||
|
"${mod}+Shift+c" = "reload";
|
||||||
|
"${mod}+Alt+l" = "exec ${pkgs.swaylock}/bin/swaylock";
|
||||||
|
"${mod}+${left} focus" = "left";
|
||||||
|
"${mod}+${down} focus" = "down";
|
||||||
|
"${mod}+${up} focus" = "up";
|
||||||
|
"${mod}+${right} focus" = "right";
|
||||||
|
"${mod}+Left" = "focus left";
|
||||||
|
"${mod}+Down" = "focus down";
|
||||||
|
"${mod}+Up" = "focus up";
|
||||||
|
"${mod}+Right" = "focus right";
|
||||||
|
"${mod}+Shift+${left} move" = "left";
|
||||||
|
"${mod}+Shift+${down} move" = "down";
|
||||||
|
"${mod}+Shift+${up} move" = "up";
|
||||||
|
"${mod}+Shift+${right} move" = "right";
|
||||||
|
"${mod}+Shift+Left" = "move left";
|
||||||
|
"${mod}+Shift+Down" = "move down";
|
||||||
|
"${mod}+Shift+Up" = "move up";
|
||||||
|
"${mod}+Shift+Right" = "move right";
|
||||||
|
"${mod}+b" = "splith";
|
||||||
|
"${mod}+v" = "splitv";
|
||||||
|
"${mod}+s" = "layout stacking";
|
||||||
|
"${mod}+w" = "layout tabbed";
|
||||||
|
"${mod}+e" = "layout toggle split";
|
||||||
|
"${mod}+f" = "fullscreen";
|
||||||
|
"${mod}+Shift+space" = "floating toggle";
|
||||||
|
"${mod}+space" = "focus mode_toggle";
|
||||||
|
"${mod}+a" = "focus parent";
|
||||||
|
"${mod}+Shift+p" = "move scratchpad";
|
||||||
|
"${mod}+p" = "scratchpad show";
|
||||||
|
"${mod}+F1" = "exec brightnessctl s 1%-";
|
||||||
|
"${mod}+F2" = "exec brightnessctl s +1%";
|
||||||
|
"${mod}+F3" = "exec pactl set-sink-volume @DEFAULT_SINK@ -5%";
|
||||||
|
"${mod}+F4" = "exec pactl set-sink-volume @DEFAULT_SINK@ +5%";
|
||||||
|
"${mod}+F5" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||||
|
"${mod}+m" = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||||
|
"${mod}+r" = "mode resize";
|
||||||
|
"${mod}+n" = "exec makoctl dismiss";
|
||||||
|
"${mod}+shift+n" = "exec makoctl dismiss -a";
|
||||||
|
"${mod}+alt+n" = "mode notification";
|
||||||
|
};
|
||||||
|
modes =
|
||||||
|
let
|
||||||
|
inherit (config.wayland.windowManager.sway.config)
|
||||||
|
left down up right;
|
||||||
|
in {
|
||||||
|
"resize" = {
|
||||||
|
"${left}" = "resize shrink width 10 px or 10 ppt";
|
||||||
|
"${down}" = "resize grow height 10 px or 10 ppt";
|
||||||
|
"${up}" = "resize shrink height 10 px or 10 ppt";
|
||||||
|
"${right}" = "resize grow width 10 px or 10 ppt";
|
||||||
|
"Return" = "mode default";
|
||||||
|
"Escape" = "mode default";
|
||||||
|
};
|
||||||
|
"notification" = {
|
||||||
|
"r" = "exec ${pkgs.mako}/bin/makoctl restore";
|
||||||
|
"Escape" = "mode default";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
colors = {
|
||||||
|
focused = {
|
||||||
|
border = "#f268b3";
|
||||||
|
background = "#f268b3";
|
||||||
|
text = "#000000";
|
||||||
|
indicator = "#1cd180";
|
||||||
|
childBorder = "#f268b3";
|
||||||
|
};
|
||||||
|
focusedInactive = {
|
||||||
|
border = "#323232";
|
||||||
|
background = "#323232";
|
||||||
|
text = "#f268b3";
|
||||||
|
indicator = "#1cd180";
|
||||||
|
childBorder = "#323232";
|
||||||
|
};
|
||||||
|
unfocused = {
|
||||||
|
border = "#323232";
|
||||||
|
background = "#323232";
|
||||||
|
text = "#cccccc";
|
||||||
|
indicator = "#1cd180";
|
||||||
|
childBorder = "#323232";
|
||||||
|
};
|
||||||
|
urgent = {
|
||||||
|
border = "#2f343a";
|
||||||
|
background = "#900000";
|
||||||
|
text = "#cccccc";
|
||||||
|
indicator = "#900000";
|
||||||
|
childBorder = "#900000" ;
|
||||||
|
};
|
||||||
|
#focused_tab_title = {
|
||||||
|
# boder = "#2f343a";
|
||||||
|
# background = "#2f343a";
|
||||||
|
# text = "#ffffff";
|
||||||
|
#};
|
||||||
|
};
|
||||||
|
window = {
|
||||||
|
border = 1;
|
||||||
|
titlebar = false;
|
||||||
|
commands = [
|
||||||
|
{
|
||||||
|
command = "inhibit_idle fullscreen";
|
||||||
|
criteria = {
|
||||||
|
title = "^.*";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "inhibit_idle fullscreen";
|
||||||
|
criteria = {
|
||||||
|
app_id = "^.*";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
gaps = {
|
||||||
|
smartGaps = true;
|
||||||
|
smartBorders = "on";
|
||||||
|
inner = 2;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
extraConfigEarly = ''
|
||||||
|
set $ws1 1:
|
||||||
|
set $ws2 2:
|
||||||
|
set $ws3 3:
|
||||||
|
set $ws4 4:
|
||||||
|
set $ws5 5:
|
||||||
|
set $ws6 6:
|
||||||
|
set $ws7 7:
|
||||||
|
set $ws8 8:
|
||||||
|
set $ws9 9:
|
||||||
|
set $ws0 10:
|
||||||
|
default_orientation auto
|
||||||
|
workspace_layout default
|
||||||
|
font pango:Fira Code Nerd Font Mono 10
|
||||||
|
default_border pixel 1
|
||||||
|
title_align right
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
27
modules/home/desktop/sway/swayidle.nix
Normal file
27
modules/home/desktop/sway/swayidle.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
services.swayidle = {
|
||||||
|
enable = true;
|
||||||
|
timeouts = [
|
||||||
|
{
|
||||||
|
timeout = 300;
|
||||||
|
command = "${pkgs.swaylock}/bin/swaylock -f";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 600;
|
||||||
|
command = "swaymsg 'output * dpms off'";
|
||||||
|
resumeCommand = "swaymsg 'output * dpms on";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
events = [
|
||||||
|
{
|
||||||
|
event = "before-sleep";
|
||||||
|
command = "${pkgs.swaylock}/bin/swaylock -f";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
event = "lock";
|
||||||
|
command = "${pkgs.swaylock}/bin/swaylock -f";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
30
modules/home/desktop/sway/swaylock.nix
Normal file
30
modules/home/desktop/sway/swaylock.nix
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.swaylock = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
image = "~/medias/images/wallpapers/lockscreen.png";
|
||||||
|
scaling = "center";
|
||||||
|
color = "000000";
|
||||||
|
indicator-radius = 70;
|
||||||
|
indicator-y-position = 150;
|
||||||
|
font = "Fira Code Nerd Font Mono";
|
||||||
|
font-size = "14";
|
||||||
|
inside-color = "00000000";
|
||||||
|
ring-color = "323232";
|
||||||
|
ring-ver-color = "1cd180";
|
||||||
|
inside-ver-color = "1cd180cc";
|
||||||
|
ring-wrong-color = "f268b3";
|
||||||
|
inside-wrong-color = "f268b3cc";
|
||||||
|
key-hl-color = "1cd180";
|
||||||
|
caps-lock-key-hl-color = "1cd180";
|
||||||
|
caps-lock-bs-hl-color = "f268b3";
|
||||||
|
bs-hl-color = "f268b3ff";
|
||||||
|
separator-color = "00000000";
|
||||||
|
ignore-empty-password = true;
|
||||||
|
show-failed-attempts = true;
|
||||||
|
daemonize = true;
|
||||||
|
line-uses-inside = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
10
modules/home/desktop/sway/waybar.nix
Normal file
10
modules/home/desktop/sway/waybar.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ pkgs, config, ...}:
|
||||||
|
{
|
||||||
|
programs.waybar = {
|
||||||
|
enable = true;
|
||||||
|
systemd = {
|
||||||
|
enable = true;
|
||||||
|
target = "sway-session.target";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
14
modules/home/desktop/xdg.nix
Normal file
14
modules/home/desktop/xdg.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
xdg = {
|
||||||
|
enable = true;
|
||||||
|
userDirs = {
|
||||||
|
enable = true;
|
||||||
|
documents = "documents";
|
||||||
|
download = "downloads";
|
||||||
|
music = "medias/music";
|
||||||
|
pictures = "medias/images";
|
||||||
|
videos = "medias/video";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
7
modules/home/firefox/conf/doh.nix
Normal file
7
modules/home/firefox/conf/doh.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
# DNS over HTTP (DoH), aka. Trusted Recursive Resolver (TRR)
|
||||||
|
# (https://wiki.mozilla.org/Trusted_Recursive_Resolver), uses a server run by
|
||||||
|
# Cloudflare to resolve hostnames, even when the system uses another (normal) DNS
|
||||||
|
# server. This setting disables it and sets the mode to explicit opt-out (5).
|
||||||
|
"network.trr.mode" = 5;
|
||||||
|
}
|
12
modules/home/firefox/conf/drm.nix
Normal file
12
modules/home/firefox/conf/drm.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
# Disables playback of DRM-controlled HTML5 content
|
||||||
|
# if enabled, automatically downloads the Widevine Content Decryption Module
|
||||||
|
# provided by Google Inc. Details
|
||||||
|
# (https://support.mozilla.org/en-US/kb/enable-drm#w_opt-out-of-cdm-playback-uninstall-cdms-and-stop-all-cdm-downloads)
|
||||||
|
"media.eme.enabled" = false;
|
||||||
|
|
||||||
|
# Disables the Widevine Content Decryption Module provided by Google Inc.
|
||||||
|
# Used for the playback of DRM-controlled HTML5 content Details
|
||||||
|
# (https://support.mozilla.org/en-US/kb/enable-drm#w_disable-the-google-widevine-cdm-without-uninstalling)
|
||||||
|
"media.gmp-widevinecdm.enabled" = false;
|
||||||
|
}
|
21
modules/home/firefox/conf/experiments.nix
Normal file
21
modules/home/firefox/conf/experiments.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
|
||||||
|
# Disable shield studies
|
||||||
|
# Mozilla shield studies (https://wiki.mozilla.org/Firefox/Shield) is a feature
|
||||||
|
# which allows mozilla to remotely install experimental addons.
|
||||||
|
"app.normandy.enabled" = false;
|
||||||
|
"app.normandy.api_url" = "";
|
||||||
|
"app.shield.optoutstudies.enabled" = false;
|
||||||
|
"extensions.shield-recipe-client.enabled" = false;
|
||||||
|
"extensions.shield-recipe-client.api_url" = "";
|
||||||
|
|
||||||
|
# Disable experiments
|
||||||
|
# Telemetry Experiments (https://wiki.mozilla.org/Telemetry/Experiments) is a
|
||||||
|
# feature that allows Firefox to automatically download and run specially-designed
|
||||||
|
# restartless addons based on certain conditions.
|
||||||
|
"experiments.enabled" = false;
|
||||||
|
"experiments.manifest.uri" = "";
|
||||||
|
"experiments.supported" = false;
|
||||||
|
"experiments.activeExperiment" = false;
|
||||||
|
"network.allow-experiments" = false;
|
||||||
|
}
|
11
modules/home/firefox/conf/extensions.nix
Normal file
11
modules/home/firefox/conf/extensions.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
# Firefox sends data about installed addons as metadata updates
|
||||||
|
# (https://blog.mozilla.org/addons/how-to-opt-out-of-add-on-metadata-updates/), so
|
||||||
|
# Mozilla is able to recommend you other addons.
|
||||||
|
"extensions.getAddons.cache.enabled" = false;
|
||||||
|
|
||||||
|
# Disable about:addons' Get Add-ons panel
|
||||||
|
# The start page with recommended addons uses google analytics.
|
||||||
|
"extensions.getAddons.showPane" = false;
|
||||||
|
"extensions.webservice.discoverURL" = "";
|
||||||
|
}
|
28
modules/home/firefox/conf/preferences.nix
Normal file
28
modules/home/firefox/conf/preferences.nix
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{
|
||||||
|
|
||||||
|
"browser.sessionstore.enabled" = true;
|
||||||
|
"browser.sessionstore.restore_hidden_tabs" = true;
|
||||||
|
"browser.sessionstore.restore_pinned_tabs_on_demand" = true;
|
||||||
|
"browser.sessionstore.resume_after_os_start" = true;
|
||||||
|
|
||||||
|
# use blank page for new tabs
|
||||||
|
"browser.newtabpage.enabled" = false;
|
||||||
|
|
||||||
|
# Disable preloading of the new tab page.
|
||||||
|
# By default Firefox preloads the new tab page (with website thumbnails) in the
|
||||||
|
# background before it is even opened.
|
||||||
|
"browser.newtab.preload" = false;
|
||||||
|
|
||||||
|
|
||||||
|
# Disable check for captive portal.
|
||||||
|
# By default, Firefox checks for the presence of a captive portal on every
|
||||||
|
# startup. This involves traffic to Akamai
|
||||||
|
# (https://support.mozilla.org/questions/1169302).
|
||||||
|
"network.captive-portal-service.enabled" = false;
|
||||||
|
|
||||||
|
|
||||||
|
# Disable Javascript in PDF viewer
|
||||||
|
# Disables executing of JavaScript in the PDF form viewer. It is possible that
|
||||||
|
# some PDFs are not rendered correctly due to missing functions.
|
||||||
|
"pdfjs.enableScripting" = true;
|
||||||
|
}
|
119
modules/home/firefox/conf/privacy.nix
Normal file
119
modules/home/firefox/conf/privacy.nix
Normal file
|
@ -0,0 +1,119 @@
|
||||||
|
{
|
||||||
|
# Disable access to device sensor data
|
||||||
|
# Disallow websites to access sensor data (ambient light, motion, device
|
||||||
|
# orientation and proximity data).
|
||||||
|
"device.sensors.ambientLight.enabled" = false;
|
||||||
|
"device.sensors.enabled" = false;
|
||||||
|
"device.sensors.motion.enabled" = false;
|
||||||
|
"device.sensors.orientation.enabled" = false;
|
||||||
|
"device.sensors.proximity.enabled" = false;
|
||||||
|
|
||||||
|
# Using a popular useragent string
|
||||||
|
# (https://techblog.willshouse.com/2012/01/03/most-common-user-agents/) avoids
|
||||||
|
# attracting attention i.e. with an Iceweasel UA. (keep blank to use the default)
|
||||||
|
|
||||||
|
# Block Cookies
|
||||||
|
# Block 3rd-Party cookies or even all cookies.
|
||||||
|
"network.cookie.cookieBehavior" = 1;
|
||||||
|
|
||||||
|
# Block Referer
|
||||||
|
# Firefox tells a website, from which site you're coming (the so called RefControl
|
||||||
|
# (http://kb.mozillazine.org/Network.http.sendRefererHeader">referer</a>). You can
|
||||||
|
# find more detailed settings in this <a
|
||||||
|
# href="http://www.ghacks.net/2015/01/22/improve-online-privacy-by-controlling-referrer-information/">ghacks
|
||||||
|
# article</a> or install the <a
|
||||||
|
# href="https://addons.mozilla.org/firefox/addon/refcontrol/) extension for per
|
||||||
|
# domain settings.
|
||||||
|
"network.http.referer.spoofSource" = true;
|
||||||
|
|
||||||
|
# Disable DOM storage
|
||||||
|
# Disables DOM storage, which enables so called "supercookies". Some modern sites
|
||||||
|
# will not work (i.e. missing "save" functions).
|
||||||
|
"dom.storage.enabled" = true;
|
||||||
|
|
||||||
|
# Disable IndexedDB (breaks things)
|
||||||
|
# abused for tracking (http://www.w3.org/TR/IndexedDB/">IndexedDB</a> is a way,
|
||||||
|
# websites can store structured data. This can be <a
|
||||||
|
# href="http://arstechnica.com/apple/2010/09/rldguid-tracking-cookies-in-safari-database-form/),
|
||||||
|
# too. Disabling causes problems when sites depend on it like Tweetdeck or Reddit
|
||||||
|
# and extensions that use it to store their data. Some users reported crashing
|
||||||
|
# tabs when IndexedDB is disabled. Only disable it, when you know what you're
|
||||||
|
# doing.
|
||||||
|
"dom.indexedDB.enabled" = true;
|
||||||
|
|
||||||
|
# Disable the Offline Cache.
|
||||||
|
# Websites can store up to 500 MB of data in an offline cache
|
||||||
|
# (http://kb.mozillazine.org/Browser.cache.offline.enable), to be able to run even
|
||||||
|
# when there is no working internet connection. This could possibly be used to
|
||||||
|
# store an user id.
|
||||||
|
"browser.cache.offline.enable" = false;
|
||||||
|
|
||||||
|
# Sessionstore Privacy
|
||||||
|
# This preference controls when to store extra information about a session:
|
||||||
|
# contents of forms, scrollbar positions, cookies, and POST data.
|
||||||
|
"browser.sessionstore.privacy_level" = 2;
|
||||||
|
|
||||||
|
# Disable Link Prefetching
|
||||||
|
# Firefox prefetches the next site on some links, so the site is loaded even when
|
||||||
|
# you never click.
|
||||||
|
"network.prefetch-next" = false;
|
||||||
|
"network.dns.disablePrefetch" = true;
|
||||||
|
"network.dns.disablePrefetchFromHTTPS" = true;
|
||||||
|
"network.predictor.enabled" = false;
|
||||||
|
"network.predictor.enable-prefetch" = false;
|
||||||
|
|
||||||
|
# Disable speculative website loading.
|
||||||
|
# In some situations Firefox already starts loading web pages when the mouse
|
||||||
|
# pointer is over a link, i. e. before you actually click. This is to speed up the
|
||||||
|
# loading of web pages by a few milliseconds.
|
||||||
|
"network.http.speculative-parallel-limit" = 0;
|
||||||
|
"browser.urlbar.speculativeConnect.enabled" = false;
|
||||||
|
|
||||||
|
# Use a private container for new tab page thumbnails
|
||||||
|
# Load the pages displayed on the new tab page in a private container when
|
||||||
|
# creating thumbnails.
|
||||||
|
"privacy.usercontext.about_newtab_segregation.enabled" = true;
|
||||||
|
|
||||||
|
# Disable WebGL
|
||||||
|
# Disables the WebGL function, to prevent (ab)use the full power of the graphics
|
||||||
|
# card (http://www.uniquemachine.org/">fingerprinting with WebGL</a>. Another
|
||||||
|
# issue is, that websites can <a
|
||||||
|
# href="https://isc.sans.edu/forums/diary/Time+to+disable+WebGL/10867). WebGL is
|
||||||
|
# part of some fingerprinting scripts used in the wild. Some interactive websites
|
||||||
|
# will not work, which are mostly games.
|
||||||
|
"webgl.disabled" = true;
|
||||||
|
|
||||||
|
# Override graphics card vendor and model strings in the WebGL API
|
||||||
|
# Websites can read the graphics card vendor and model using a WebGL API. This
|
||||||
|
# setting overrides both with " " without disabling WebGL.
|
||||||
|
"webgl.renderer-string-override" = " ";
|
||||||
|
"webgl.vendor-string-override" = " ";
|
||||||
|
|
||||||
|
# Disable WebRTC
|
||||||
|
# Disables the WebRTC function, which gives away your local ips. Some addons like
|
||||||
|
# uBlock origin provide settings to prevent WebRTC from exposing local ips without
|
||||||
|
# disabling WebRTC.
|
||||||
|
"media.peerconnection.enabled" = false;
|
||||||
|
|
||||||
|
# Disable the clipboardevents.
|
||||||
|
# Disable that websites can get notifications if you copy, paste, or cut something
|
||||||
|
# from a web page, and it lets them know which part of the page had been selected.
|
||||||
|
"dom.event.clipboardevents.enabled" = false;
|
||||||
|
|
||||||
|
# Disable Search Suggestions
|
||||||
|
# Firefox suggests search terms in the search field. This will send everything
|
||||||
|
# typed or pasted in the search field to the chosen search engine, even when you
|
||||||
|
# did not press enter.
|
||||||
|
|
||||||
|
"browser.search.suggest.enabled" = true;
|
||||||
|
# Disable Search Keyword
|
||||||
|
# When you mistype some url, Firefox starts a search even from urlbar. This
|
||||||
|
# feature is useful for quick searching, but may harm your privacy, when it's
|
||||||
|
# unintended.
|
||||||
|
|
||||||
|
"keyword.enabled" = true;
|
||||||
|
# Disable Fixup URLs
|
||||||
|
# When you type "something" in the urlbar and press enter, Firefox tries
|
||||||
|
# "something.com", if Fixup URLs is enabled.
|
||||||
|
"browser.fixup.alternate.enabled" = true;
|
||||||
|
}
|
14
modules/home/firefox/conf/safebrowsing.nix
Normal file
14
modules/home/firefox/conf/safebrowsing.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
# Disable google safebrowsing
|
||||||
|
# Google safebrowsing can detect phishing and malware but it also sends
|
||||||
|
# informations to google together with an unique id called wrkey
|
||||||
|
# (http://electroholiker.de/?p=1594).
|
||||||
|
"browser.safebrowsing.enabled" = false;
|
||||||
|
"browser.safebrowsing.downloads.remote.url" = "";
|
||||||
|
"browser.safebrowsing.phishing.enabled" = false;
|
||||||
|
"browser.safebrowsing.blockedURIs.enabled" = false;
|
||||||
|
"browser.safebrowsing.downloads.enabled" = false;
|
||||||
|
"browser.safebrowsing.downloads.remote.enabled" = false;
|
||||||
|
"browser.safebrowsing.appRepURL" = "";
|
||||||
|
"browser.safebrowsing.malware.enabled" = false;
|
||||||
|
}
|
11
modules/home/firefox/conf/suggest.nix
Normal file
11
modules/home/firefox/conf/suggest.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
|
||||||
|
# Disable Firefox Suggest
|
||||||
|
# The Firefox Suggest
|
||||||
|
# (https://support.mozilla.org/en-US/kb/navigate-web-faster-firefox-suggest)
|
||||||
|
# feature allows Mozilla to provide search suggestions in the US, which uses your
|
||||||
|
# city location and search keywords to send suggestions. This is also used to
|
||||||
|
# serve advertisements.
|
||||||
|
"browser.urlbar.groupLabels.enabled" = false;
|
||||||
|
"browser.urlbar.quicksuggest.enabled" = false;
|
||||||
|
}
|
38
modules/home/firefox/conf/telemetry.nix
Normal file
38
modules/home/firefox/conf/telemetry.nix
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
{
|
||||||
|
|
||||||
|
# Disable Telemetry
|
||||||
|
# The telemetry feature
|
||||||
|
# (https://support.mozilla.org/kb/share-telemetry-data-mozilla-help-improve-firefox)
|
||||||
|
# sends data about the performance and responsiveness of Firefox to Mozilla.
|
||||||
|
"toolkit.telemetry.enabled" = false;
|
||||||
|
"toolkit.telemetry.archive.enabled" = false;
|
||||||
|
"toolkit.telemetry.rejected" = true;
|
||||||
|
"toolkit.telemetry.unified" = false;
|
||||||
|
"toolkit.telemetry.unifiedIsOptIn" = false;
|
||||||
|
"toolkit.telemetry.prompted" = 2;
|
||||||
|
"toolkit.telemetry.server" = "";
|
||||||
|
"toolkit.telemetry.cachedClientID" = "";
|
||||||
|
"toolkit.telemetry.newProfilePing.enabled" = false;
|
||||||
|
"toolkit.telemetry.shutdownPingSender.enabled" = false;
|
||||||
|
"toolkit.telemetry.updatePing.enabled" = false;
|
||||||
|
"toolkit.telemetry.bhrPing.enabled" = false;
|
||||||
|
"toolkit.telemetry.firstShutdownPing.enabled" = false;
|
||||||
|
"toolkit.telemetry.hybridContent.enabled" = false;
|
||||||
|
"toolkit.telemetry.reportingpolicy.firstRun" = false;
|
||||||
|
|
||||||
|
# Disable health report
|
||||||
|
# Disable sending Firefox health reports
|
||||||
|
# (https://www.mozilla.org/privacy/firefox/#health-report) to Mozilla
|
||||||
|
"datareporting.healthreport.uploadEnabled" = false;
|
||||||
|
"datareporting.policy.dataSubmissionEnabled" = false;
|
||||||
|
"datareporting.healthreport.service.enabled" = false;
|
||||||
|
|
||||||
|
# Disable Crash Reports
|
||||||
|
# The crash report (https://www.mozilla.org/privacy/firefox/#crash-reporter) may
|
||||||
|
# contain data that identifies you or is otherwise sensitive to you.
|
||||||
|
"breakpad.reportURL" = "";
|
||||||
|
"browser.tabs.crashReporting.sendReport" = false;
|
||||||
|
"browser.crashReports.unsubmittedCheck.enabled" = false;
|
||||||
|
"browser.crashReports.unsubmittedCheck.autoSubmit" = false;
|
||||||
|
"browser.crashReports.unsubmittedCheck.autoSubmit2" = false;
|
||||||
|
}
|
4
modules/home/firefox/conf/theme.nix
Normal file
4
modules/home/firefox/conf/theme.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
|
||||||
|
"browser.uidensity" = 1;
|
||||||
|
}
|
82
modules/home/firefox/conf/tracking.nix
Normal file
82
modules/home/firefox/conf/tracking.nix
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
{
|
||||||
|
|
||||||
|
# Enable Do-not-Track
|
||||||
|
# With the do not track feature, you tell websites, that you do not want to be
|
||||||
|
# tracked. Most websites ignore this, so you need other privacy options as well.
|
||||||
|
"privacy.donottrackheader.enabled" = true;
|
||||||
|
"privacy.donottrackheader.value" = 1;
|
||||||
|
|
||||||
|
# Enable resistFingerprinting
|
||||||
|
# The <code>privacy.resistFingerprinting</code> setting coming from the
|
||||||
|
# tor-browser hides some system properties. See discussion in our bug tracker.
|
||||||
|
# (https://bugzilla.mozilla.org/show_bug.cgi?id=1308340">Bug #1308340</a> for more
|
||||||
|
# information. This option may interfere with other privacy related settings, see
|
||||||
|
# the <a
|
||||||
|
# href="https://github.com/allo-/firefox-profilemaker/issues/56#issuecomment-333397712)
|
||||||
|
"privacy.resistFingerprinting" = false;
|
||||||
|
|
||||||
|
# Enable Mozilla Trackingprotection
|
||||||
|
# Firefox has a builtin tracking protection
|
||||||
|
# (https://wiki.mozilla.org/Security/Tracking_protection), which blocks a list of
|
||||||
|
# known tracking sites.
|
||||||
|
"privacy.trackingprotection.pbmode.enabled" = true;
|
||||||
|
"privacy.trackingprotection.enabled" = true;
|
||||||
|
"privacy.trackingprotection.fingerprinting.enabled" = true;
|
||||||
|
"privacy.trackingprotection.cryptomining.enabled" = true;
|
||||||
|
|
||||||
|
# Enable firstparty isolation.
|
||||||
|
# FPI works by separating cookies on a per-domain basis. In this way tracking
|
||||||
|
# networks won't be able to locate the same cookie on different sites. Note that
|
||||||
|
# this might break third-party logins.
|
||||||
|
"privacy.firstparty.isolate" = false;
|
||||||
|
|
||||||
|
# Disable Browser Pings
|
||||||
|
# Firefox sends "ping" requests (http://kb.mozillazine.org/Browser.send_pings),
|
||||||
|
# when a website requests to be informed when a user clicks on a link.
|
||||||
|
"browser.send_pings" = false;
|
||||||
|
|
||||||
|
# Disable TLS session identifiers
|
||||||
|
# TLS allows for session identifiers, which speed up the session resumption when a
|
||||||
|
# connection was lost. These identifiers can be used for tracking
|
||||||
|
# (https://youbroketheinternet.org/trackedanyway).
|
||||||
|
"security.ssl.disable_session_identifiers" = true;
|
||||||
|
|
||||||
|
# Disable Beacons
|
||||||
|
# The Beacon (https://w3c.github.io/beacon/) feature allows websites to send
|
||||||
|
# tracking data after you left the website.
|
||||||
|
"beacon.enabled" = false;
|
||||||
|
|
||||||
|
# Disable the Battery API
|
||||||
|
# Firefox allows websites to read the charge level of the battery. This may be
|
||||||
|
# used for fingerprinting.
|
||||||
|
"dom.battery.enabled" = false;
|
||||||
|
|
||||||
|
# Disable media device queries
|
||||||
|
# Prevent websites from accessing information about webcam and microphone
|
||||||
|
# (https://developer.mozilla.org/docs/Web/API/MediaDevices/enumerateDevices)
|
||||||
|
# (possible fingerprinting).
|
||||||
|
|
||||||
|
"media.navigator.enabled" = false;
|
||||||
|
|
||||||
|
# Disable form autofill
|
||||||
|
# Automatically filled form fields are used for fingerprinting
|
||||||
|
# (https://freedom-to-tinker.com/2017/12/27/no-boundaries-for-user-identities-web-trackers-exploit-browser-login-managers/).
|
||||||
|
# This setting disables automatic form filling until you click on the field.
|
||||||
|
"signon.autofillForms" = false;
|
||||||
|
|
||||||
|
# Disable webaudio API
|
||||||
|
# Disable webaudio API to prevent browser fingerprinting. See Mozilla Bug #1288359
|
||||||
|
# (https://bugzilla.mozilla.org/show_bug.cgi?id=1288359). This can break web apps,
|
||||||
|
# like Discord, which rely on the API.
|
||||||
|
"dom.webaudio.enabled" = false;
|
||||||
|
|
||||||
|
# Disable video statistics
|
||||||
|
# Prevent websites from measuring video performance (possible fingerprinting). See
|
||||||
|
# Mozilla Bug 654550 (https://bugzilla.mozilla.org/show_bug.cgi?id=654550).
|
||||||
|
"media.video_stats.enabled" = false;
|
||||||
|
|
||||||
|
# Enable query parameter stripping
|
||||||
|
# Firefox 102 introduced query parameter stripping like utm_source. Enabled by
|
||||||
|
# default with Strict Enhanced Tracking Protection.
|
||||||
|
"privacy.query_stripping" = true;
|
||||||
|
}
|
154
modules/home/firefox/default.nix
Normal file
154
modules/home/firefox/default.nix
Normal file
|
@ -0,0 +1,154 @@
|
||||||
|
{ pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
merge = lib.foldr (a: b: a // b) { };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
programs.browserpass = {
|
||||||
|
enable = true;
|
||||||
|
browsers = ["firefox"];
|
||||||
|
};
|
||||||
|
programs.firefox = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
|
||||||
|
cfg = {
|
||||||
|
# Tridactyl native connector
|
||||||
|
enableTridactylNative = true;
|
||||||
|
enableBrowserpass = true;
|
||||||
|
};
|
||||||
|
extraPolicies = {
|
||||||
|
DontCheckDefaultBrowser = true;
|
||||||
|
DisablePocket = true;
|
||||||
|
DisableTelemetry = true;
|
||||||
|
DisplayBookmarksToolbar = "always";
|
||||||
|
EnableTrackingProtection = {
|
||||||
|
Value = true;
|
||||||
|
Locked = true;
|
||||||
|
Cryptomining = true;
|
||||||
|
};
|
||||||
|
FirefoxHome = {
|
||||||
|
Search = true;
|
||||||
|
TopSites = false;
|
||||||
|
SponsoredTopSites = false;
|
||||||
|
Highlights = false;
|
||||||
|
Pocket = false;
|
||||||
|
SponsoredPocket = false;
|
||||||
|
Snippets = false;
|
||||||
|
Locked = true;
|
||||||
|
};
|
||||||
|
UserMessaging = {
|
||||||
|
WhatsNew = false;
|
||||||
|
ExtensionRecommendations = false;
|
||||||
|
FeatureRecommendations = false;
|
||||||
|
UrlbarInterventions = false;
|
||||||
|
SkipOnboarding = true;
|
||||||
|
MoreFromMozilla = false;
|
||||||
|
};
|
||||||
|
NoDefaultBookmarks = true;
|
||||||
|
OfferToSaveLogins = false;
|
||||||
|
SearchSuggestEnabled = false;
|
||||||
|
OverrideFirstRunPage = "";
|
||||||
|
OverridePostUpdatePage = "";
|
||||||
|
ExtensionSettings = {
|
||||||
|
"uBlock0@raymondhill.net" = {
|
||||||
|
"allowed_types" = "extention";
|
||||||
|
"installation_mode" = "force_installed";
|
||||||
|
"install_url" = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
|
||||||
|
};
|
||||||
|
"addon@darkreader.org" = {
|
||||||
|
"allowed_types" = "extension";
|
||||||
|
"installation_mode" = "force_installed";
|
||||||
|
"install_url" = "https://addons.mozilla.org/firefox/downloads/latest/darkreader/latest.xpi";
|
||||||
|
};
|
||||||
|
"browserpass@maximbaz.com" = {
|
||||||
|
"allowed_types" = "extension";
|
||||||
|
"installation_mode" = "force_installed";
|
||||||
|
"install_url" = "https://addons.mozilla.org/firefox/downloads/latest/browserpass-ce/latest.xpi";
|
||||||
|
};
|
||||||
|
"gdpr@cavi.au.dk" = {
|
||||||
|
"allowed_types" = "extension";
|
||||||
|
"installation_mode" = "force_installed";
|
||||||
|
"install_url" = "https://addons.mozilla.org/firefox/downloads/latest/consent-o-matic/latest.xpi";
|
||||||
|
};
|
||||||
|
"jid1-BoFifL9Vbdl2zQ@jetpack" = {
|
||||||
|
"allowed_types" = "extension";
|
||||||
|
"installation_mode" = "force_installed";
|
||||||
|
"install_url" = "https://addons.mozilla.org/firefox/downloads/latest/decentraleyes/latest.xpi";
|
||||||
|
};
|
||||||
|
"CookieAutoDelete@kennydo.com" = {
|
||||||
|
"allowed_types" = "extension";
|
||||||
|
"installation_mode" = "force_installed";
|
||||||
|
"install_url" = "https://addons.mozilla.org/firefox/downloads/latest/cookie-autodelete/latest.xpi";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
Preferences = {
|
||||||
|
"browser.crashReports.unsubmittedCheck.autoSubmit2" = {
|
||||||
|
Value = false;
|
||||||
|
Status = "locked";
|
||||||
|
};
|
||||||
|
"browser.selfsupport.url" = {
|
||||||
|
Value = "";
|
||||||
|
Status = "locked";
|
||||||
|
};
|
||||||
|
"browser.aboutConfig.showWarning" = {
|
||||||
|
Value = false;
|
||||||
|
Status = "locked";
|
||||||
|
};
|
||||||
|
"browser.aboutHomeSnippets.updateUrl" = {
|
||||||
|
Value = "";
|
||||||
|
Status = "locked";
|
||||||
|
};
|
||||||
|
"browser.startup.homepage_override.mstone" = {
|
||||||
|
Value = "ignore";
|
||||||
|
Status = "locked";
|
||||||
|
};
|
||||||
|
"browser.startup.homepage_override.buildID" = {
|
||||||
|
Value = "";
|
||||||
|
Status = "locked";
|
||||||
|
};
|
||||||
|
"browser.tabs.firefox-view" = {
|
||||||
|
Value = false;
|
||||||
|
Status = "locked";
|
||||||
|
};
|
||||||
|
"dom.security.https_only_mode" = {
|
||||||
|
Value = true;
|
||||||
|
Status = "locked";
|
||||||
|
};
|
||||||
|
"extensions.htmlaboutaddons.recommendations.enabled" = {
|
||||||
|
Value = false;
|
||||||
|
Status = "locked";
|
||||||
|
};
|
||||||
|
"extensions.recommendations.themeRecommendationUrl" = {
|
||||||
|
Value = "";
|
||||||
|
Status = "locked";
|
||||||
|
};
|
||||||
|
"network.IDN_show_punycode" = {
|
||||||
|
Value = true;
|
||||||
|
# Status = "locked";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
profiles.ephase = {
|
||||||
|
id = 0;
|
||||||
|
name = "ephase";
|
||||||
|
isDefault = true;
|
||||||
|
search = {
|
||||||
|
force = true;
|
||||||
|
default = "DuckDuckGo";
|
||||||
|
};
|
||||||
|
settings = merge [
|
||||||
|
(import ./conf/doh.nix)
|
||||||
|
(import ./conf/drm.nix)
|
||||||
|
(import ./conf/experiments.nix)
|
||||||
|
(import ./conf/extensions.nix)
|
||||||
|
(import ./conf/preferences.nix)
|
||||||
|
(import ./conf/privacy.nix)
|
||||||
|
(import ./conf/safebrowsing.nix)
|
||||||
|
(import ./conf/suggest.nix)
|
||||||
|
(import ./conf/telemetry.nix)
|
||||||
|
(import ./conf/theme.nix)
|
||||||
|
(import ./conf/tracking.nix)
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
47
modules/home/foot.nix
Normal file
47
modules/home/foot.nix
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
{ pkgs, ...}:
|
||||||
|
{
|
||||||
|
programs.foot = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
main = {
|
||||||
|
dpi-aware = "yes";
|
||||||
|
font = "Fira Code Nerd Font Mono:size=10";
|
||||||
|
};
|
||||||
|
mouse = {
|
||||||
|
hide-when-typing = "yes";
|
||||||
|
};
|
||||||
|
colors = {
|
||||||
|
|
||||||
|
background = "181818";
|
||||||
|
foreground = "d8d8d8";
|
||||||
|
regular0 = "181818";
|
||||||
|
regular1 = "ab4642";
|
||||||
|
regular2 = "a1b56c";
|
||||||
|
regular3 = "f7ca88";
|
||||||
|
regular4 = "7cafc2";
|
||||||
|
regular5 = "ba8baf";
|
||||||
|
regular6 = "86c1b9";
|
||||||
|
regular7 = "d8d8d8";
|
||||||
|
bright0 = "585858";
|
||||||
|
bright1 = "dc9656";
|
||||||
|
bright2 = "282828";
|
||||||
|
bright3 = "383838";
|
||||||
|
bright4 = "b8b8b8";
|
||||||
|
bright5 = "e8e8e8";
|
||||||
|
bright6 = "a16946";
|
||||||
|
bright7 = "f8f8f8";
|
||||||
|
"16" = "dc9656";
|
||||||
|
"17" = "a16946";
|
||||||
|
"18" = "282828";
|
||||||
|
"19" = "383838";
|
||||||
|
"20" = "b8b8b8";
|
||||||
|
"21" = "e8e8e8";
|
||||||
|
selection-background = "d8d8d8";
|
||||||
|
selection-foreground = "181818";
|
||||||
|
urls = "b8b8b8";
|
||||||
|
jump-labels = "181818 f7ca88";
|
||||||
|
scrollback-indicator= "181818 b8b8b8";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
20
modules/home/lutris.nix
Normal file
20
modules/home/lutris.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
( lutris.override {
|
||||||
|
extraLibraries = pkgs: [
|
||||||
|
wine
|
||||||
|
xorg.libXcursor
|
||||||
|
xorg.libXi
|
||||||
|
xorg.libXinerama
|
||||||
|
xorg.libXScrnSaver
|
||||||
|
libpng
|
||||||
|
libpulseaudio
|
||||||
|
libvorbis
|
||||||
|
stdenv.cc.cc.lib
|
||||||
|
libkrb5
|
||||||
|
keyutils
|
||||||
|
];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
11
modules/home/zathura.nix
Normal file
11
modules/home/zathura.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.zathura = {
|
||||||
|
enable = true;
|
||||||
|
options = {
|
||||||
|
selection-clipboard = "clipboard";
|
||||||
|
font = "Fira Sans 12";
|
||||||
|
recolor = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
5
modules/nixos/doas.nix
Normal file
5
modules/nixos/doas.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{ config, ...}:
|
||||||
|
{
|
||||||
|
security.doas.enable = true;
|
||||||
|
security.sudo.enable = false;
|
||||||
|
}
|
13
modules/nixos/neovim.nix
Normal file
13
modules/nixos/neovim.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{ config, pkgs, ...}:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
neovim
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.neovim = {
|
||||||
|
enable = true;
|
||||||
|
defaultEditor = true;
|
||||||
|
viAlias = true;
|
||||||
|
vimAlias = true;
|
||||||
|
};
|
||||||
|
}
|
9
modules/nixos/pipewire.nix
Normal file
9
modules/nixos/pipewire.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{ config, pkgs, ...}:
|
||||||
|
{
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
|
}
|
7
modules/nixos/steam.nix
Normal file
7
modules/nixos/steam.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.steam = {
|
||||||
|
enable = true;
|
||||||
|
gamescopeSession.enable = true;
|
||||||
|
};
|
||||||
|
}
|
9
modules/nixos/xdg-portal.nix
Normal file
9
modules/nixos/xdg-portal.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{ config, pkgs, ...}:
|
||||||
|
{
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
wlr.enable = true;
|
||||||
|
# gtk portal needed to make gtk apps happy
|
||||||
|
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||||
|
};
|
||||||
|
}
|
1
result
Symbolic link
1
result
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
/nix/store/ji0qfqr4rl5dx5dl55jqafkvknyhpznd-nixos-system-mrmeeseeks-23.11.20230722.12303c6
|
Loading…
Add table
Add a link
Reference in a new issue