mirror of
https://github.com/materusPL/nixos-config
synced 2026-07-04 13:26:42 +00:00
Compare commits
52 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
b7086ad070
|
|||
|
506c6844a8
|
|||
|
80f1b5e177
|
|||
|
9fcfab613d
|
|||
|
fb653eb0f4
|
|||
|
29adb6e6b0
|
|||
|
0c8f567a7e
|
|||
|
f89ff639c7
|
|||
|
1aa560a248
|
|||
|
9b7da5e109
|
|||
|
1035825618
|
|||
|
f40403e725
|
|||
|
481bfdde77
|
|||
|
ac43221eec
|
|||
|
a485b83e49
|
|||
|
6197a64c4a
|
|||
|
38afb1aa4f
|
|||
|
5a7e4a5020
|
|||
|
e37d2bb716
|
|||
|
76b54b8800
|
|||
|
33dcdb8c61
|
|||
|
640907f9e1
|
|||
|
5440b8aaf2
|
|||
|
65f9c1bb9d
|
|||
|
71710a3aa0
|
|||
|
0c4725063c
|
|||
|
1401ddc71c
|
|||
|
bc3fa6788b
|
|||
|
9afcf62bf3
|
|||
|
c159b6dfdd
|
|||
|
5f753f2050
|
|||
|
791e88e8a5
|
|||
|
9cc357c618
|
|||
|
4d38367fdb
|
|||
|
8f3b2266d3
|
|||
|
9292f61a3f
|
|||
|
3afafba3ce
|
|||
|
d51b13294c
|
|||
|
32e6adb6e3
|
|||
|
e916b8ca78
|
|||
|
7a2647d5ae
|
|||
|
ec3cac1c98
|
|||
|
8eb8d54d93
|
|||
|
bf522e0b25
|
|||
|
6db3e9995c
|
|||
|
a0af6e0844
|
|||
|
7111005253
|
|||
|
1cecb465c2
|
|||
|
8b9b884bc3
|
|||
|
576b955023
|
|||
|
bd10321f19
|
|||
|
e31a724c4b
|
Binary file not shown.
+2
-1
@@ -1,2 +1,3 @@
|
|||||||
\#*\#
|
\#*\#
|
||||||
.vscode
|
.vscode
|
||||||
|
.theia
|
||||||
-21
@@ -1,21 +0,0 @@
|
|||||||
#+TITLE: nixos-config
|
|
||||||
#+AUTHOR: materus
|
|
||||||
#+DESCRIPTION: NixOS config and dotfiles
|
|
||||||
#+OPTIONS: \n:t
|
|
||||||
My NixOS and home-manager configs.
|
|
||||||
Dotfiles and helper scripts.
|
|
||||||
|
|
||||||
Part of it is encrypted by git-crypt, mostly just ips and names. Secrets are managed by sops.
|
|
||||||
|
|
||||||
* Hosts
|
|
||||||
[[./configurations/host/materusPC/][materusPC]] - my main PC
|
|
||||||
|
|
||||||
[[./configurations/host/Old-materusPC/][Old-materusPC]] - my old PC, barely used
|
|
||||||
|
|
||||||
[[./configurations/host/flamaster/][flamaster]] - my laptop, used mostly as server for games.
|
|
||||||
|
|
||||||
[[./configurations/host/valkyrie/][valkyrie]] - VPS, my website and pleroma instance
|
|
||||||
|
|
||||||
[[./configurations/host/waffentrager/][waffentrager]] - raspberry pi4, home server
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
MATERUS = {}
|
||||||
|
require("materus")
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
vim.opt.number = true
|
||||||
|
vim.opt.expandtab = true
|
||||||
|
vim.opt.cursorline = true
|
||||||
|
vim.opt.shiftwidth = 2
|
||||||
|
vim.opt.softtabstop = 2
|
||||||
|
vim.opt.tabstop = 2
|
||||||
|
vim.opt.clipboard:append { 'unnamed', 'unnamedplus' }
|
||||||
|
|
||||||
|
|
||||||
|
--vim.g.cord_defer_startup = true
|
||||||
|
|
||||||
|
vim.pack.add({
|
||||||
|
"https://github.com/nvim-lua/plenary.nvim",
|
||||||
|
"https://github.com/muniftanjim/nui.nvim",
|
||||||
|
"https://github.com/nvim-tree/nvim-web-devicons",
|
||||||
|
"https://github.com/lewis6991/gitsigns.nvim",
|
||||||
|
"https://github.com/mofiqul/dracula.nvim",
|
||||||
|
"https://github.com/hrsh7th/nvim-cmp",
|
||||||
|
"https://github.com/neovim/nvim-lspconfig",
|
||||||
|
"https://github.com/stevearc/oil.nvim",
|
||||||
|
"https://github.com/nvim-mini/mini.icons",
|
||||||
|
"https://github.com/nvim-neo-tree/neo-tree.nvim",
|
||||||
|
"https://github.com/romgrk/barbar.nvim",
|
||||||
|
"https://github.com/nvim-telescope/telescope.nvim",
|
||||||
|
"https://github.com/lambdalisue/vim-suda",
|
||||||
|
"https://github.com/dstein64/nvim-scrollview",
|
||||||
|
"https://github.com/vyfor/cord.nvim"
|
||||||
|
})
|
||||||
|
vim.cmd.colorscheme("dracula")
|
||||||
|
|
||||||
|
if vim.fn.executable("tree-sitter") == 1 and MATERUS.NIXOS ~= 1 then
|
||||||
|
end
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
__HOME_ZPROFILE_SOURCED=1
|
||||||
|
[[ -f "$ZSH_DATA_DIR/nix_profile.sh" ]] && source "$ZSH_DATA_DIR/nix_profile.sh"
|
||||||
|
[[ -f "/etc/profile" ]] && emulate sh -c "source /etc/profile"
|
||||||
|
[[ -f "~/.profile" ]] && emulate sh -c "source ~/.profile"
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,141 @@
|
|||||||
|
__HOME_ZSHRC_SOURCED=1
|
||||||
|
|
||||||
|
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||||
|
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||||
|
fi
|
||||||
|
|
||||||
|
bindkey -e
|
||||||
|
if [ -n "$EAT_SHELL_INTEGRATION_DIR" ]; then
|
||||||
|
source "$EAT_SHELL_INTEGRATION_DIR/zsh";
|
||||||
|
fi
|
||||||
|
|
||||||
|
#Check if terminal is fullcolor
|
||||||
|
if zmodload zsh/terminfo && (( "$terminfo[colors]" >= "256" )); then
|
||||||
|
__MATERUS_ZSH_256COLORS="${__MATERUS_ZSH_256COLORS:-1}"; else
|
||||||
|
__MATERUS_ZSH_256COLORS="${__MATERUS_ZSH_256COLORS:-0}";
|
||||||
|
fi
|
||||||
|
|
||||||
|
#MSYS
|
||||||
|
if [[ "$(uname -s)" =~ ^MSYS_NT.* ]]; then
|
||||||
|
#Use windows symlink instead copy
|
||||||
|
MSYS=winsymlinks:nativestrict
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#region Plugins
|
||||||
|
# Clone plugins if not exists
|
||||||
|
[ -d $ZSH_DATA_DIR/plugins/powerlevel10k ] || git clone https://github.com/romkatv/powerlevel10k $ZSH_DATA_DIR/plugins/powerlevel10k
|
||||||
|
[ -d $ZSH_DATA_DIR/plugins/zsh-syntax-highlighting ] || git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_DATA_DIR/plugins/zsh-syntax-highlighting
|
||||||
|
[ -d $ZSH_DATA_DIR/plugins/zsh-history-substring-search ] || git clone https://github.com/zsh-users/zsh-history-substring-search.git $ZSH_DATA_DIR/plugins/zsh-history-substring-search
|
||||||
|
[ -d $ZSH_DATA_DIR/plugins/zsh-autosuggestions ] || git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_DATA_DIR/plugins/zsh-autosuggestions
|
||||||
|
|
||||||
|
source ${ZSH_DATA_DIR}/plugins/powerlevel10k/powerlevel10k.zsh-theme
|
||||||
|
|
||||||
|
source ${ZSH_DATA_DIR}/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||||
|
source ${ZSH_DATA_DIR}/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
|
||||||
|
source ${ZSH_DATA_DIR}/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region SUBSTRING SEARCH
|
||||||
|
history-substring-search-up-prefixed(){
|
||||||
|
HISTORY_SUBSTRING_SEARCH_PREFIXED=1 history-substring-search-up
|
||||||
|
}
|
||||||
|
history-substring-search-down-prefixed(){
|
||||||
|
HISTORY_SUBSTRING_SEARCH_PREFIXED=1 history-substring-search-down
|
||||||
|
}
|
||||||
|
|
||||||
|
zle -N history-substring-search-up-prefixed
|
||||||
|
zle -N history-substring-search-down-prefixed
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Init Variables
|
||||||
|
export SAVEHIST=100000
|
||||||
|
export HISTSIZE=$SAVEHIST
|
||||||
|
export ZSH_PRIVATE=${ZSH_PRIVATE:-0}
|
||||||
|
|
||||||
|
mkdir -p $ZSH_DATA_DIR
|
||||||
|
mkdir -p $ZSH_DATA_DIR/plugins
|
||||||
|
|
||||||
|
# Load config generated by nix
|
||||||
|
[[ -f "$ZSH_DATA_DIR/nix.sh" ]] && source "$ZSH_DATA_DIR/nix.sh"
|
||||||
|
|
||||||
|
setopt HIST_SAVE_NO_DUPS
|
||||||
|
setopt HIST_IGNORE_SPACE
|
||||||
|
setopt HIST_IGNORE_DUPS
|
||||||
|
setopt HIST_IGNORE_ALL_DUPS
|
||||||
|
setopt EXTENDED_HISTORY
|
||||||
|
|
||||||
|
# Private history mode
|
||||||
|
if [[ $ZSH_PRIVATE == 1 ]] then
|
||||||
|
export HISTFILE="/dev/null";
|
||||||
|
unsetopt SHARE_HISTORY;
|
||||||
|
else
|
||||||
|
export HISTFILE="$ZSH_DATA_DIR/zsh_history";
|
||||||
|
setopt SHARE_HISTORY;
|
||||||
|
fi
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region Bindings
|
||||||
|
source ${ZSH_CONFIG_DIR}/extra/zinputrc
|
||||||
|
|
||||||
|
bindkey -r "^["
|
||||||
|
bindkey "^[[1;5C" forward-word
|
||||||
|
bindkey "^[[1;5D" backward-word
|
||||||
|
bindkey "^[[1;5A" history-substring-search-up-prefixed
|
||||||
|
bindkey "^[[1;5B" history-substring-search-down-prefixed
|
||||||
|
bindkey "$key[Up]" history-substring-search-up
|
||||||
|
bindkey "$key[Down]" history-substring-search-down
|
||||||
|
bindkey '^[[3~' delete-char
|
||||||
|
bindkey '^[[3;2~' delete-word
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Completions
|
||||||
|
ZSH_COMPDIR="${ZSH_COMPDIR:-${XDG_CACHE_HOME:-${HOME}/.cache}/zsh}"
|
||||||
|
ZSH_COMPDUMP="${ZSH_COMPDUMP:-${ZSH_COMPDIR}/.zcompdump-${HOST}-${ZSH_VERSION}}"
|
||||||
|
if [[ ! -d ${ZSH_COMPDIR} ]]; then
|
||||||
|
command mkdir -p "${ZSH_COMPDIR}"
|
||||||
|
fi
|
||||||
|
autoload -U compinit && compinit -d $ZSH_COMPDUMP
|
||||||
|
source ${ZSH_CONFIG_DIR}/extra/zshcompletion.zsh
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Functions
|
||||||
|
zsh-private() {
|
||||||
|
ZSH_PRIVATE=1 zsh
|
||||||
|
}
|
||||||
|
|
||||||
|
myip() {
|
||||||
|
wget -qO- https://wtfismyip.com/text
|
||||||
|
}
|
||||||
|
|
||||||
|
speedtest() {
|
||||||
|
curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python3
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Aliases
|
||||||
|
if [[ "$TERM" = "xterm-kitty" ]]; then
|
||||||
|
alias ssh="kitty +kitten ssh"
|
||||||
|
fi
|
||||||
|
if [[ $(whence -p "nvim") ]]; then
|
||||||
|
EDITOR="${EDITOR:-nvim}"
|
||||||
|
alias vim="nvim"
|
||||||
|
alias vi="nvim"
|
||||||
|
alias vimdiff="nvim -d"
|
||||||
|
fi
|
||||||
|
if [[ $(whence -p "eza") ]]; then
|
||||||
|
alias l="eza -lahg --color=auto --hyperlink"
|
||||||
|
alias ll="eza -alF --color=auto --hyperlink"
|
||||||
|
alias ls="eza --color=auto"
|
||||||
|
else
|
||||||
|
alias l="ls -lah --color=auto"
|
||||||
|
alias ll="ls -alF --color=auto"
|
||||||
|
alias ls="ls --color=auto"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
if [[ "$__MATERUS_ZSH_256COLORS" = "1" ]] ; then [[ ! -f ${ZSH_CONFIG_DIR}/p10kcfg/fullcolor.zsh ]] || source ${ZSH_CONFIG_DIR}/p10kcfg/fullcolor.zsh;
|
||||||
|
else [[ ! -f ${ZSH_CONFIG_DIR}/p10kcfg/compatibility.zsh ]] || source ${ZSH_CONFIG_DIR}/p10kcfg/compatibility.zsh;
|
||||||
|
fi
|
||||||
@@ -140,12 +140,11 @@ function __zsh_compl () {
|
|||||||
# Some functions, like _apt and _dpkg, are very slow. We can use a cache in
|
# Some functions, like _apt and _dpkg, are very slow. We can use a cache in
|
||||||
# order to speed things up
|
# order to speed things up
|
||||||
if [[ ${__COMP_CACHING:-yes} == yes ]]; then
|
if [[ ${__COMP_CACHING:-yes} == yes ]]; then
|
||||||
__COMP_CACHE_DIR=${__COMP_CACHE_DIR:-${ZDOTDIR:-$HOME}/.cache}
|
if [[ ! -d ${ZSH_COMPDIR} ]]; then
|
||||||
if [[ ! -d ${__COMP_CACHE_DIR} ]]; then
|
command mkdir -p "${ZSH_COMPDIR}"
|
||||||
command mkdir -p "${__COMP_CACHE_DIR}"
|
|
||||||
fi
|
fi
|
||||||
zstyle ':completion:*' use-cache yes
|
zstyle ':completion:*' use-cache yes
|
||||||
zstyle ':completion:*:complete:*' cache-path "${__COMP_CACHE_DIR}"
|
zstyle ':completion:*:complete:*' cache-path "${ZSH_COMPDIR}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# host completion
|
# host completion
|
||||||
+1
-1
@@ -1577,7 +1577,7 @@
|
|||||||
p10k segment -f 2 -i '*' -t 'hello, %n'
|
p10k segment -f 2 -i '*' -t 'hello, %n'
|
||||||
}
|
}
|
||||||
function prompt_private() {
|
function prompt_private() {
|
||||||
if [ $__MATERUS_HM_ZSH_PRIVATE = "1" ]; then
|
if [ $ZSH_PRIVATE = "1" ]; then
|
||||||
p10k segment -f 5 -t 'PRIVATE'
|
p10k segment -f 5 -t 'PRIVATE'
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
+1
-1
@@ -1682,7 +1682,7 @@
|
|||||||
#
|
#
|
||||||
# Type `p10k help segment` for documentation and a more sophisticated example.
|
# Type `p10k help segment` for documentation and a more sophisticated example.
|
||||||
function prompt_private() {
|
function prompt_private() {
|
||||||
if [ $__MATERUS_HM_ZSH_PRIVATE = "1" ]; then
|
if [ $ZSH_PRIVATE = "1" ]; then
|
||||||
p10k segment -b 54 -f 11 -i '' -t 'PRIVATE'
|
p10k segment -b 54 -f 11 -i '' -t 'PRIVATE'
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#TODO: Set ZDOTDIR based on MKK_CONFIG_PATH
|
||||||
|
__HOME_ZSHENV_SOURCED=1
|
||||||
|
ZDOTDIR=${XDG_CONFIG_HOME:-"$HOME/.config"}/zsh/cfg
|
||||||
|
ZSH_DATA_DIR="${XDG_CONFIG_HOME:-"$HOME/.config"}/zsh/data"
|
||||||
|
ZSH_CONFIG_DIR="${XDG_CONFIG_HOME:-"$HOME/.config"}/zsh/cfg"
|
||||||
|
setopt no_global_rcs
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
local wezterm = require 'wezterm'
|
||||||
|
local config = wezterm.config_builder()
|
||||||
|
|
||||||
|
-- config.color_scheme = 'Duotone Dark'
|
||||||
|
|
||||||
|
config.enable_scroll_bar = true
|
||||||
|
config.scrollback_lines = 50000
|
||||||
|
|
||||||
|
return config
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
set -g history-limit 50000
|
||||||
|
set -g display-time 4000
|
||||||
|
set -g status-interval 5
|
||||||
|
set -g default-terminal "screen-256color"
|
||||||
|
set -g status-keys emacs
|
||||||
|
set -g focus-events on
|
||||||
|
setw -g aggressive-resize on
|
||||||
|
setw -g mouse on
|
||||||
|
setw -g clock-mode-style 24
|
||||||
|
|
||||||
|
set -ga terminal-overrides ',xterm*:smcup@:rmcup@'
|
||||||
|
set -g allow-passthrough on
|
||||||
@@ -1,363 +0,0 @@
|
|||||||
# Edit this configuration file to define what should be installed on
|
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
|
||||||
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
materusCfg,
|
|
||||||
materusArg,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
unstable = import materusCfg.materusFlake.inputs.nixpkgs {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
config = {
|
|
||||||
allowUnfree = true;
|
|
||||||
nvidia.acceptLicense = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
# Include the results of the hardware scan.
|
|
||||||
./hardware-configuration.nix
|
|
||||||
./network.nix
|
|
||||||
];
|
|
||||||
boot.supportedFilesystems = [ "ntfs" ];
|
|
||||||
nix.settings.experimental-features = [
|
|
||||||
"nix-command"
|
|
||||||
"flakes"
|
|
||||||
];
|
|
||||||
nix.settings.auto-optimise-store = true;
|
|
||||||
nix.settings.substituters = [
|
|
||||||
"https://nix-community.cachix.org"
|
|
||||||
"https://cache.nixos.org/"
|
|
||||||
];
|
|
||||||
nix.settings.trusted-public-keys = [
|
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
||||||
];
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
|
||||||
boot.loader.grub = {
|
|
||||||
enable = true;
|
|
||||||
efiSupport = true;
|
|
||||||
device = "nodev";
|
|
||||||
gfxmodeEfi = "1920x1080";
|
|
||||||
gfxmodeBios = "1920x1080";
|
|
||||||
useOSProber = true;
|
|
||||||
};
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
|
||||||
boot.kernelPackages = unstable.linuxPackages_zen;
|
|
||||||
boot.tmp.useTmpfs = true;
|
|
||||||
|
|
||||||
services.flatpak.enable = true;
|
|
||||||
services.gvfs.enable = true;
|
|
||||||
programs.kdeconnect.enable = true;
|
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "Europe/Warsaw";
|
|
||||||
|
|
||||||
services.syncthing = {
|
|
||||||
enable = true;
|
|
||||||
user = "materus";
|
|
||||||
dataDir = "/home/materus";
|
|
||||||
};
|
|
||||||
services.fstrim = {
|
|
||||||
enable = true;
|
|
||||||
interval = "weekly";
|
|
||||||
};
|
|
||||||
# Configure network proxy if necessary
|
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n.defaultLocale = "pl_PL.UTF-8";
|
|
||||||
console = {
|
|
||||||
font = "lat2-16";
|
|
||||||
# keyMap = "pl";
|
|
||||||
useXkbConfig = true; # use xkbOptions in tty.
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
# Enable the X11 windowing system.
|
|
||||||
services.xserver.enable = true;
|
|
||||||
|
|
||||||
hardware.opengl.enable = true;
|
|
||||||
hardware.opengl.driSupport32Bit = true;
|
|
||||||
|
|
||||||
materus.profile.steam.enable = false;
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
services.xserver.xkb.layout = "pl";
|
|
||||||
# services.xserver.xkbOptions = {
|
|
||||||
# "eurosign:e";
|
|
||||||
# "caps:escape" # map caps to escape.
|
|
||||||
# };
|
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
|
||||||
services.printing.enable = true;
|
|
||||||
|
|
||||||
# Enable sound.
|
|
||||||
#sound.enable = true;
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
alsa.support32Bit = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
systemWide = true;
|
|
||||||
# If you want to use JACK applications, uncomment this
|
|
||||||
jack.enable = true;
|
|
||||||
};
|
|
||||||
hardware.pulseaudio.enable = false;
|
|
||||||
services.udev = {
|
|
||||||
extraRules = ''
|
|
||||||
KERNEL=="rtc0", GROUP="audio"
|
|
||||||
KERNEL=="hpet", GROUP="audio"
|
|
||||||
DEVPATH=="/devices/virtual/misc/cpu_dma_latency", OWNER="root", GROUP="audio", MODE="0660"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
virtualisation.podman = {
|
|
||||||
enable = true;
|
|
||||||
dockerCompat = true;
|
|
||||||
dockerSocket.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users.materus = {
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = [
|
|
||||||
"wheel"
|
|
||||||
"networkmanager"
|
|
||||||
"kvm"
|
|
||||||
"input"
|
|
||||||
"libvirt"
|
|
||||||
"libvirtd"
|
|
||||||
"podman"
|
|
||||||
"audio"
|
|
||||||
"pipewire"
|
|
||||||
];
|
|
||||||
shell = pkgs.zsh;
|
|
||||||
description = "Mateusz Słodkowicz";
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
virtualisation.libvirtd = {
|
|
||||||
enable = true;
|
|
||||||
onBoot = "ignore";
|
|
||||||
onShutdown = "shutdown";
|
|
||||||
qemu.ovmf.enable = true;
|
|
||||||
qemu.ovmf.packages = [ pkgs.OVMFFull.fd ];
|
|
||||||
qemu.runAsRoot = true;
|
|
||||||
qemu.swtpm.enable = true;
|
|
||||||
qemu.package = pkgs.qemu_full;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.sessionVariables = rec {
|
|
||||||
XDG_CACHE_HOME = "\${HOME}/.cache";
|
|
||||||
XDG_CONFIG_HOME = "\${HOME}/.config";
|
|
||||||
XDG_BIN_HOME = "\${HOME}/.local/bin";
|
|
||||||
XDG_DATA_HOME = "\${HOME}/.local/share";
|
|
||||||
|
|
||||||
#SSH_ASKPASS_REQUIRE = "prefer";
|
|
||||||
|
|
||||||
STEAM_EXTRA_COMPAT_TOOLS_PATHS = "\${HOME}/.steam/root/compatibilitytools.d";
|
|
||||||
|
|
||||||
MOZ_USE_XINPUT2 = "1";
|
|
||||||
PATH = [ "\${XDG_BIN_HOME}" ];
|
|
||||||
};
|
|
||||||
environment.shellInit = ''
|
|
||||||
if ! [ -z "$DISPLAY" ]; then xhost +si:localuser:root &> /dev/null; fi;
|
|
||||||
if ! [ -z "$DISPLAY" ]; then xhost +si:localuser:$USER &> /dev/null; fi;
|
|
||||||
'';
|
|
||||||
# List packages installed in system profile. To search, run:
|
|
||||||
# $ nix search wget
|
|
||||||
|
|
||||||
i18n.inputMethod.enabled = "fcitx5";
|
|
||||||
i18n.inputMethod.fcitx5.addons = [
|
|
||||||
pkgs.fcitx5-configtool
|
|
||||||
pkgs.fcitx5-lua
|
|
||||||
pkgs.fcitx5-mozc
|
|
||||||
pkgs.libsForQt5.fcitx5-qt
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
|
|
||||||
(vivaldi.overrideAttrs
|
|
||||||
(oldAttrs: {
|
|
||||||
dontWrapQtApps = false;
|
|
||||||
dontPatchELF = true;
|
|
||||||
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [pkgs.kdePackages.wrapQtAppsHook];
|
|
||||||
}))
|
|
||||||
|
|
||||||
brave
|
|
||||||
|
|
||||||
glibc
|
|
||||||
patchelf
|
|
||||||
vim
|
|
||||||
wget
|
|
||||||
killall
|
|
||||||
xorg.xkill
|
|
||||||
xorg.xhost
|
|
||||||
nix-top
|
|
||||||
gitFull
|
|
||||||
curl
|
|
||||||
jdk
|
|
||||||
nss_latest
|
|
||||||
(aspellWithDicts (
|
|
||||||
ds: with ds; [
|
|
||||||
en
|
|
||||||
en-computers
|
|
||||||
en-science
|
|
||||||
pl
|
|
||||||
]
|
|
||||||
))
|
|
||||||
distrobox
|
|
||||||
p7zip
|
|
||||||
unrar
|
|
||||||
bzip2
|
|
||||||
rar
|
|
||||||
unzip
|
|
||||||
zstd
|
|
||||||
xz
|
|
||||||
zip
|
|
||||||
gzip
|
|
||||||
sops
|
|
||||||
|
|
||||||
tree
|
|
||||||
mc
|
|
||||||
lf
|
|
||||||
htop
|
|
||||||
nmon
|
|
||||||
iftop
|
|
||||||
iptraf-ng
|
|
||||||
mprocs
|
|
||||||
|
|
||||||
nix-du
|
|
||||||
git-crypt
|
|
||||||
|
|
||||||
wineWowPackages.stagingFull
|
|
||||||
winetricks
|
|
||||||
protontricks
|
|
||||||
openal
|
|
||||||
gnupg
|
|
||||||
ncurses
|
|
||||||
monkeysphere
|
|
||||||
gparted
|
|
||||||
|
|
||||||
inkscape
|
|
||||||
gimp
|
|
||||||
|
|
||||||
virt-manager
|
|
||||||
libguestfs
|
|
||||||
|
|
||||||
bubblewrap
|
|
||||||
bindfs
|
|
||||||
|
|
||||||
pulseaudio
|
|
||||||
|
|
||||||
binutils
|
|
||||||
|
|
||||||
];
|
|
||||||
|
|
||||||
fonts.fontDir.enable = true;
|
|
||||||
fonts.enableDefaultPackages = true;
|
|
||||||
fonts.packages = with pkgs; [
|
|
||||||
dejavu_fonts
|
|
||||||
hack-font
|
|
||||||
noto-fonts
|
|
||||||
noto-fonts-extra
|
|
||||||
noto-fonts-emoji
|
|
||||||
noto-fonts-cjk-sans
|
|
||||||
noto-fonts-cjk-serif
|
|
||||||
ubuntu_font_family
|
|
||||||
wqy_zenhei
|
|
||||||
monocraft
|
|
||||||
nerd-fonts.fira-code
|
|
||||||
nerd-fonts.droid-sans-mono
|
|
||||||
nerd-fonts.meslo-lg
|
|
||||||
nerd-fonts.profont
|
|
||||||
];
|
|
||||||
fonts.fontconfig.enable = true;
|
|
||||||
fonts.fontconfig.cache32Bit = true;
|
|
||||||
fonts.fontconfig.defaultFonts.sansSerif = [
|
|
||||||
"Noto Sans"
|
|
||||||
"DejaVu Sans"
|
|
||||||
"WenQuanYi Zen Hei"
|
|
||||||
"Noto Color Emoji"
|
|
||||||
];
|
|
||||||
fonts.fontconfig.defaultFonts.serif = [
|
|
||||||
"Noto Serif"
|
|
||||||
"DejaVu Serif"
|
|
||||||
"WenQuanYi Zen Hei"
|
|
||||||
"Noto Color Emoji"
|
|
||||||
];
|
|
||||||
fonts.fontconfig.defaultFonts.emoji = [
|
|
||||||
"Noto Color Emoji"
|
|
||||||
"OpenMoji Color"
|
|
||||||
];
|
|
||||||
fonts.fontconfig.defaultFonts.monospace = [
|
|
||||||
"Hack Nerd Font"
|
|
||||||
"Noto Sans Mono"
|
|
||||||
"WenQuanYi Zen Hei Mono"
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.enableAllTerminfo = true;
|
|
||||||
environment.pathsToLink = [ "/share/zsh" ];
|
|
||||||
environment.shells = with pkgs; [ zsh ];
|
|
||||||
programs = {
|
|
||||||
steam = {
|
|
||||||
enable = false;
|
|
||||||
dedicatedServer.openFirewall = true;
|
|
||||||
remotePlay.openFirewall = true;
|
|
||||||
};
|
|
||||||
fish.enable = true;
|
|
||||||
java.enable = true;
|
|
||||||
java.package = pkgs.graalvmPackages.graalvm-oracle;
|
|
||||||
command-not-found.enable = false;
|
|
||||||
dconf.enable = true;
|
|
||||||
};
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
|
||||||
# started in user sessions.
|
|
||||||
# programs.mtr.enable = true;
|
|
||||||
services.pcscd.enable = true;
|
|
||||||
|
|
||||||
/*
|
|
||||||
systemd.user.services.gpg-agent.serviceConfig.ExecStart = [
|
|
||||||
""
|
|
||||||
''
|
|
||||||
${pkgs.gnupg}/bin/gpg-agent --supervised \
|
|
||||||
--pinentry-program ${pkgs.kwalletcli}/bin/pinentry-kwallet
|
|
||||||
''
|
|
||||||
];
|
|
||||||
*/
|
|
||||||
|
|
||||||
programs.gnupg.agent = {
|
|
||||||
enable = true;
|
|
||||||
enableSSHSupport = false;
|
|
||||||
enableBrowserSocket = true;
|
|
||||||
};
|
|
||||||
programs.ssh.startAgent = true;
|
|
||||||
|
|
||||||
# List services that you want to enable:
|
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
|
||||||
services.openssh.enable = true;
|
|
||||||
|
|
||||||
# Copy the NixOS configuration file and link it from the resulting system
|
|
||||||
# (/run/current-system/configuration.nix). This is useful in case you
|
|
||||||
# accidentally delete configuration.nix.
|
|
||||||
system.copySystemConfiguration = false;
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
|
||||||
# settings for stateful data, like file locations and database versions
|
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
||||||
# this value at the release version of the first install of this system.
|
|
||||||
# Before changing this value read the documentation for this option
|
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
||||||
system.stateVersion = "23.11"; # Did you read the comment?
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
./secrets
|
|
||||||
./configuration.nix
|
|
||||||
./nvidia.nix
|
|
||||||
./plasma.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,152 +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 = [
|
|
||||||
"xhci_pci"
|
|
||||||
"ehci_pci"
|
|
||||||
"ahci"
|
|
||||||
"usbhid"
|
|
||||||
"usb_storage"
|
|
||||||
"sd_mod"
|
|
||||||
];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [
|
|
||||||
"kvm-intel"
|
|
||||||
"vfio-pci"
|
|
||||||
];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
boot.kernel.sysctl = {
|
|
||||||
"vm.swappiness" = 10;
|
|
||||||
};
|
|
||||||
boot.kernelParams = [
|
|
||||||
"ibt=off"
|
|
||||||
"intel_iommu=on"
|
|
||||||
"iommu=pt"
|
|
||||||
"pcie_acs_override=downstream,multifunction"
|
|
||||||
];
|
|
||||||
fileSystems."/" = {
|
|
||||||
device = "/dev/disk/by-label/NixOS_Root";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [
|
|
||||||
"subvol=@"
|
|
||||||
"noatime"
|
|
||||||
"ssd"
|
|
||||||
"space_cache=v2"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
|
||||||
device = "/dev/disk/by-label/NixOS_Root";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [
|
|
||||||
"subvol=@boot"
|
|
||||||
"ssd"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/materus" = {
|
|
||||||
device = "/dev/disk/by-label/NixOS_Root";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [
|
|
||||||
"subvol=@materus"
|
|
||||||
"noatime"
|
|
||||||
"compress=zstd"
|
|
||||||
"ssd"
|
|
||||||
"space_cache=v2"
|
|
||||||
];
|
|
||||||
neededForBoot = true;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/nix" = {
|
|
||||||
device = "/dev/disk/by-label/NixOS_Root";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [
|
|
||||||
"subvol=@nix"
|
|
||||||
"noatime"
|
|
||||||
"compress=zstd"
|
|
||||||
"ssd"
|
|
||||||
"space_cache=v2"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/home" = {
|
|
||||||
device = "/dev/disk/by-label/NixOS_Home";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [
|
|
||||||
"subvol=@home"
|
|
||||||
"nossd"
|
|
||||||
"noatime"
|
|
||||||
"compress=zstd"
|
|
||||||
"space_cache=v2"
|
|
||||||
"autodefrag"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/materus/data" = {
|
|
||||||
device = "/dev/disk/by-label/NixOS_Home";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [
|
|
||||||
"subvol=@data"
|
|
||||||
"nossd"
|
|
||||||
"noatime"
|
|
||||||
"compress=zstd"
|
|
||||||
"space_cache=v2"
|
|
||||||
"autodefrag"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot/efi" = {
|
|
||||||
device = "/dev/disk/by-uuid/A5C2-31D1";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
|
|
||||||
zramSwap = {
|
|
||||||
enable = true;
|
|
||||||
memoryPercent = 50;
|
|
||||||
priority = 10;
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [
|
|
||||||
{
|
|
||||||
device = "/var/lib/swapfile";
|
|
||||||
size = 32 * 1024;
|
|
||||||
priority = 5;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-label/NixOS_Swap";
|
|
||||||
priority = 0;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
fileSystems."/etc/nixos" = {
|
|
||||||
device = "/materus/config/nixos-config";
|
|
||||||
fsType = "none";
|
|
||||||
options = [ "bind" ];
|
|
||||||
depends = [ "/materus" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# 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.enp3s0.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlp6s0.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkForce true;
|
|
||||||
}
|
|
||||||
@@ -1,161 +0,0 @@
|
|||||||
{ config, pkgs, materusArg, materusCfg, lib, ... }:
|
|
||||||
{
|
|
||||||
home.stateVersion = "22.11";
|
|
||||||
home.homeDirectory = "/home/materus";
|
|
||||||
programs.wezterm.enable = true;
|
|
||||||
programs.git = {
|
|
||||||
userEmail = "materus@podkos.pl";
|
|
||||||
userName = "materus";
|
|
||||||
signing.signByDefault = true;
|
|
||||||
signing.key = "${materusArg.cfg.path}/extraFiles/keys/ssh/materus.pub";
|
|
||||||
extraConfig = {
|
|
||||||
commit.gpgsign = true;
|
|
||||||
gpg.format = "ssh";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.vscode.userSettings = {
|
|
||||||
"vscord.app.name" = "VSCodium";
|
|
||||||
"window.dialogStyle" = "custom";
|
|
||||||
"window.titleBarStyle" = "custom";
|
|
||||||
"editor.fontFamily" = "'Hack Nerd Font', 'monospace', monospace";
|
|
||||||
"workbench.colorTheme" = "Dracula Theme";
|
|
||||||
"workbench.productIconTheme" = "material-product-icons";
|
|
||||||
"workbench.iconTheme" = "material-icon-theme";
|
|
||||||
|
|
||||||
"d.aggressiveUpdate" = false;
|
|
||||||
"d.servedPath" = "${pkgs.serve-d}/bin/serve-d";
|
|
||||||
|
|
||||||
"direnv.path.executable" = "${pkgs.direnv}/bin/direnv";
|
|
||||||
|
|
||||||
"nix.enableLanguageServer" = true;
|
|
||||||
"nix.serverPath" = "${pkgs.nixd}/bin/nixd";
|
|
||||||
"nix.formatterPath" = "${pkgs.nixfmt-rfc-style}/bin/nixfmt";
|
|
||||||
|
|
||||||
"C_Cpp.clang_format_path" = "${pkgs.clang-tools}/bin/clang-format";
|
|
||||||
"C_Cpp.clang_format_fallbackStyle" = "Microsoft";
|
|
||||||
"clang-tidy.executable" = "${pkgs.clang-tools}/bin/clang-tidy";
|
|
||||||
|
|
||||||
"typescript.tsserver.maxTsServerMemory" = 1024 * 8;
|
|
||||||
"typescript.tsserver.nodePath"= lib.mkDefault "${pkgs.nodejs}/bin/node";
|
|
||||||
|
|
||||||
"python.defaultInterpreterPath" = "${pkgs.python3Full}/bin/python";
|
|
||||||
"[cpp]" = {
|
|
||||||
"editor.defaultFormatter" = "xaver.clang-format";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
materus.profile = {
|
|
||||||
fonts.enable = lib.mkDefault true;
|
|
||||||
nixpkgs.enable = lib.mkDefault false;
|
|
||||||
enableDesktop = lib.mkDefault true;
|
|
||||||
enableTerminal = lib.mkDefault true;
|
|
||||||
enableTerminalExtra = lib.mkDefault true;
|
|
||||||
enableNixDevel = lib.mkDefault true;
|
|
||||||
editor.code.fhs.enable = false;
|
|
||||||
|
|
||||||
editor.code.fhs.packages = (ps: with ps; let llvmpkgs = llvmPackages_16; in [
|
|
||||||
llvmpkgs.clang
|
|
||||||
llvmpkgs.llvm
|
|
||||||
llvmpkgs.bintools
|
|
||||||
llvmpkgs.lld
|
|
||||||
llvmpkgs.lldb
|
|
||||||
llvmpkgs.libllvm
|
|
||||||
llvmpkgs.libllvm.dev
|
|
||||||
|
|
||||||
|
|
||||||
gcc
|
|
||||||
gdb
|
|
||||||
|
|
||||||
cmake
|
|
||||||
gnumake
|
|
||||||
ninja
|
|
||||||
binutils
|
|
||||||
coreutils
|
|
||||||
util-linux
|
|
||||||
|
|
||||||
dotnet-sdk_8
|
|
||||||
mono
|
|
||||||
mold
|
|
||||||
python3
|
|
||||||
lua
|
|
||||||
gtk4.dev
|
|
||||||
gtk4
|
|
||||||
miniaudio
|
|
||||||
SDL2.dev
|
|
||||||
SDL2
|
|
||||||
freeglut.dev
|
|
||||||
freeglut
|
|
||||||
boost.dev
|
|
||||||
boost
|
|
||||||
glew.dev
|
|
||||||
libGL.dev
|
|
||||||
libGLU.dev
|
|
||||||
vulkan-loader.dev
|
|
||||||
|
|
||||||
jdk
|
|
||||||
|
|
||||||
|
|
||||||
ldc
|
|
||||||
dmd
|
|
||||||
dub
|
|
||||||
]);
|
|
||||||
|
|
||||||
editor.emacs.enable = true;
|
|
||||||
|
|
||||||
};
|
|
||||||
xdg.desktopEntries.brave-browser =
|
|
||||||
let
|
|
||||||
env = lib.concatStringsSep " " [
|
|
||||||
''__NV_PRIME_RENDER_OFFLOAD="1"''
|
|
||||||
''__NV_PRIME_RENDER_OFFLOAD_PROVIDER="NVIDIA-G0"''
|
|
||||||
''__GLX_VENDOR_LIBRARY_NAME="nvidia"''
|
|
||||||
''__VK_LAYER_NV_optimus="NVIDIA_only"''
|
|
||||||
''NIXOS_OZONE_WL="1"''
|
|
||||||
];
|
|
||||||
script = pkgs.writeShellScript "brave" ''
|
|
||||||
${env} brave "$@"
|
|
||||||
'';
|
|
||||||
|
|
||||||
in
|
|
||||||
{
|
|
||||||
name = "Brave Web Browser";
|
|
||||||
genericName = "Przeglądarka WWW";
|
|
||||||
comment = "Skorzystaj z internetu";
|
|
||||||
exec = "${script} %U";
|
|
||||||
icon = "brave-browser";
|
|
||||||
terminal = false;
|
|
||||||
categories = [ "Application" "Network" "WebBrowser" ];
|
|
||||||
mimeType = [
|
|
||||||
"application/pdf"
|
|
||||||
"application/rdf+xml"
|
|
||||||
"application/rss+xml"
|
|
||||||
"application/xhtml+xml"
|
|
||||||
"application/xhtml_xml"
|
|
||||||
"application/xml"
|
|
||||||
"image/gif"
|
|
||||||
"image/jpeg"
|
|
||||||
"image/png"
|
|
||||||
"image/webp"
|
|
||||||
"text/html"
|
|
||||||
"text/xml"
|
|
||||||
"x-scheme-handler/http"
|
|
||||||
"x-scheme-handler/https"
|
|
||||||
"x-scheme-handler/ipfs"
|
|
||||||
"x-scheme-handler/ipns"
|
|
||||||
];
|
|
||||||
actions.new-windows = {
|
|
||||||
exec = "${script}";
|
|
||||||
name = "Nowe okno";
|
|
||||||
};
|
|
||||||
actions.new-private-windows = {
|
|
||||||
exec = "${script} --incognito";
|
|
||||||
name = "Nowe okno incognito";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
home.packages = [
|
|
||||||
pkgs.papirus-icon-theme
|
|
||||||
(materusArg.pkgs.polymc.wrap { extraJDKs = [ pkgs.graalvmPackages.graalvm-oracle pkgs.graalvmPackages.graalvm-oracle_17]; })
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
{ config, pkgs, lib, materusArg, ... }:
|
|
||||||
{
|
|
||||||
sops.templates."networkmanager.env".content = ''
|
|
||||||
WIREGUARD_PRIVATEKEY="${config.sops.placeholder.wg-key}"
|
|
||||||
'';
|
|
||||||
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
networking.hostName = "Old-materusPC";
|
|
||||||
networking.wireless.iwd.enable = true;
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
# Open ports in the firewall.
|
|
||||||
networking.firewall.allowedTCPPorts = [ 24800 5900 5357 4656
|
|
||||||
22000 config.services.syncthing.relay.statusPort config.services.syncthing.relay.port # Syncthing
|
|
||||||
];
|
|
||||||
networking.firewall.allowedUDPPorts = [ 24800 5900 3702 4656
|
|
||||||
22000 21027 # Syncthing
|
|
||||||
];
|
|
||||||
# Or disable the firewall altogether.
|
|
||||||
networking.firewall.enable = true;
|
|
||||||
networking.networkmanager.settings = {
|
|
||||||
connectivity = {
|
|
||||||
uri = "http://nmcheck.gnome.org/check_network_status.txt";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.networkmanager.ensureProfiles.environmentFiles = [
|
|
||||||
config.sops.templates."networkmanager.env".path
|
|
||||||
];
|
|
||||||
networking.networkmanager.ensureProfiles.profiles = {
|
|
||||||
wg0 = {
|
|
||||||
connection = {
|
|
||||||
id = "wg0";
|
|
||||||
type = "wireguard";
|
|
||||||
interface-name = "wg0";
|
|
||||||
};
|
|
||||||
wireguard = {
|
|
||||||
private-key = "$WIREGUARD_PRIVATEKEY";
|
|
||||||
};
|
|
||||||
"wireguard-peer.${materusArg.wireguard.pubKeys.valkyrie}" = {
|
|
||||||
endpoint = "${materusArg.ips.valkyrie}:${materusArg.wireguard.port}";
|
|
||||||
allowed-ips = "${materusArg.ip-masks.wireguard.main};${materusArg.ip-masks.wireguard.guest};${materusArg.ip-masks.wireguard.asia};${materusArg.ips.wireguard.valkyrie}/32;";
|
|
||||||
persistent-keepalive = "20";
|
|
||||||
};
|
|
||||||
ipv4 = {
|
|
||||||
address1 = "${materusArg.ips.wireguard.Old-materusPC}/32";
|
|
||||||
dns = "${materusArg.ips.wireguard.valkyrie};";
|
|
||||||
method = "manual";
|
|
||||||
never-default = "true";
|
|
||||||
};
|
|
||||||
ipv6 = {
|
|
||||||
addr-gen-mode = "stable-privacy";
|
|
||||||
method = "disabled";
|
|
||||||
};
|
|
||||||
proxy = { };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
{ config, pkgs, ... }:
|
|
||||||
{
|
|
||||||
services.xserver.videoDrivers = [ "nvidia" ];
|
|
||||||
hardware.nvidia = {
|
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.latest;
|
|
||||||
modesetting.enable = true;
|
|
||||||
nvidiaSettings = true;
|
|
||||||
open = true;
|
|
||||||
|
|
||||||
};
|
|
||||||
hardware.opengl.extraPackages = with pkgs; [
|
|
||||||
vaapiVdpau
|
|
||||||
nvidia-vaapi-driver
|
|
||||||
libvdpau-va-gl
|
|
||||||
];
|
|
||||||
|
|
||||||
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [
|
|
||||||
vaapiVdpau
|
|
||||||
nvidia-vaapi-driver
|
|
||||||
libvdpau-va-gl
|
|
||||||
];
|
|
||||||
materus.profile.steam.extraEnv = {
|
|
||||||
VK_ICD_FILENAMES=''''$VK_ICD_FILENAMES:/run/opengl-driver/share/vulkan/icd.d/nvidia_icd.x86_64.json:/run/opengl-driver-32/share/vulkan/icd.d/nvidia_icd.i686.json'';
|
|
||||||
__NV_PRIME_RENDER_OFFLOAD="1";
|
|
||||||
__NV_PRIME_RENDER_OFFLOAD_PROVIDER="NVIDIA-G0";
|
|
||||||
__GLX_VENDOR_LIBRARY_NAME="nvidia";
|
|
||||||
__VK_LAYER_NV_optimus="NVIDIA_only";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
|
|
||||||
services.displayManager.sddm.enable = true;
|
|
||||||
services.displayManager.sddm.wayland.enable = true;
|
|
||||||
services.displayManager.sddm.settings = {
|
|
||||||
General = {
|
|
||||||
InputMethod = "";
|
|
||||||
};
|
|
||||||
Theme = {
|
|
||||||
CursorTheme = "breeze_cursors";
|
|
||||||
CursorSize = "24";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
environment.variables = {
|
|
||||||
QT_PLUGIN_PATH = [ "${pkgs.qt6.qtimageformats}/${pkgs.qt6.qtbase.qtPluginPrefix}" ];
|
|
||||||
XCURSOR_THEME = "breeze_cursors";
|
|
||||||
};
|
|
||||||
xdg.portal.enable = true;
|
|
||||||
xdg.portal.wlr.enable = true;
|
|
||||||
xdg.portal.xdgOpenUsePortal = true;
|
|
||||||
xdg.portal.extraPortals = [ pkgs.kdePackages.xdg-desktop-portal-kde ];
|
|
||||||
services.desktopManager.plasma6.enable = true;
|
|
||||||
services.desktopManager.plasma6.enableQt5Integration = true;
|
|
||||||
environment.plasma6.excludePackages = with pkgs.kdePackages; [ kwallet kwalletmanager kwallet-pam ];
|
|
||||||
environment.systemPackages = with pkgs.kdePackages; [
|
|
||||||
ark
|
|
||||||
kate
|
|
||||||
];
|
|
||||||
materus.profile.steam.extraPkgs = [ pkgs.kdePackages.breeze pkgs.kdePackages.breeze-gtk pkgs.kdePackages.dolphin ];
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
{ config, pkgs, lib, materusCfg, ... }:
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
|
|
||||||
] ++ (if (materusCfg.materusFlake.decrypted) then [ ./private ] else [ ]);
|
|
||||||
|
|
||||||
sops.age.generateKey = false;
|
|
||||||
sops.gnupg.home = null;
|
|
||||||
sops.gnupg.sshKeyPaths = [ ];
|
|
||||||
sops.defaultSopsFile = materusCfg.hostPath + "/secrets/secrets.yaml";
|
|
||||||
sops.secrets."wg-key" = { };
|
|
||||||
services.openssh.hostKeys = [
|
|
||||||
{
|
|
||||||
bits = 4096;
|
|
||||||
path = "/materus/root/ssh_host_rsa_key";
|
|
||||||
type = "rsa";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
path = "/materus/root/ssh_host_ed25519_key";
|
|
||||||
type = "ed25519";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
|
||||||
Binary file not shown.
@@ -1,33 +0,0 @@
|
|||||||
wg-key: ENC[AES256_GCM,data:+z+Xxq6A1h5ceCOZry9PSz871zVZpd9Y6vtqpfoAulHCN03DjzZ/PLmRvYQ=,iv:7hdjnUuaRk30hFJ8rv4zXxI8v42RWC1iQb64LMNgBnQ=,tag:eUSTVygR+u9ERPU9gfhYIw==,type:str]
|
|
||||||
sops:
|
|
||||||
kms: []
|
|
||||||
gcp_kms: []
|
|
||||||
azure_kv: []
|
|
||||||
hc_vault: []
|
|
||||||
age:
|
|
||||||
- recipient: age1el7zhjxkrlravpt7hw36fuac0xfgd42qkjjkvxzqmyl28u8csasqkd4a40
|
|
||||||
enc: |
|
|
||||||
-----BEGIN AGE ENCRYPTED FILE-----
|
|
||||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBsT2w4SCt2ZGdLYktHckMw
|
|
||||||
QVhza2tqU2M1Q3lsYnhld1dKcTdYUHcvSzFrCjMxT05yU01nUmFQK0FCUThUNDNN
|
|
||||||
V2EyTUhoVUNjNlNwTU9FeTlGRkxvVDgKLS0tIDBFYys1TmI0T0x0RnE2N3JCWWpq
|
|
||||||
VFVjMGUvRVBaY0JsR2lVcUFsdk4rYjQKEiiqEcTaQSVXSAm5c9uylaf2Tt/KJtPl
|
|
||||||
GDp+2YSBHHnVYjtYf7k9WqsIEe5/0AifDp3YA8jNhOXuZwZdvk+fLw==
|
|
||||||
-----END AGE ENCRYPTED FILE-----
|
|
||||||
lastmodified: "2024-03-30T18:21:12Z"
|
|
||||||
mac: ENC[AES256_GCM,data:0DMB+ukujc6PMU45n1QJGryGie25Bj2hXmia69QgYZNk2vgfO+nYmWSpmqK4Z00xXNtbsgejfDto5mrzU/OJ4FF3eOfwWfdIwxQLEQKoPF5U3niON3YO8FEA+JIn+/fNGF3fY1AgBfhberST5ikKnmff1Nwe5GOwQHSB3LU+CZE=,iv:V89EFUby3bwsoZKpoJRmJS9E/UheMBkKDq7j40IzBTA=,tag:aOJnFFGIuzQ3T7YrIFiWtw==,type:str]
|
|
||||||
pgp:
|
|
||||||
- created_at: "2024-03-30T18:20:23Z"
|
|
||||||
enc: |-
|
|
||||||
-----BEGIN PGP MESSAGE-----
|
|
||||||
|
|
||||||
hF4D5fSX77p80GYSAQdAnUVLGsgIKd3EtSAGTPyXqSlsz1T8RnDvAtBz/XaH0y0w
|
|
||||||
pkp84zTe85FRZDnTO8a44WkpNIrUih0CYQSPPCZqSi/qnIxPWgx67HTC1bPAO9Iw
|
|
||||||
1GgBCQIQNcrKr4YNKSP5XxJqMXOyZD7rZ4g02Xdw5XplZ/y34m9c83S44XRgHwg4
|
|
||||||
0obXI1UlsqyHf/ZnTM1pbXO/kdTdFomWvWbfbuKDgDvyiJJ18mJ48GOsv/SBBJjJ
|
|
||||||
3877O+Ia5I8Chg==
|
|
||||||
=q58P
|
|
||||||
-----END PGP MESSAGE-----
|
|
||||||
fp: 28D140BCA60B4FD1
|
|
||||||
unencrypted_suffix: _unencrypted
|
|
||||||
version: 3.8.1
|
|
||||||
Binary file not shown.
@@ -1,66 +0,0 @@
|
|||||||
{ inputs, materusFlake }:
|
|
||||||
|
|
||||||
let
|
|
||||||
profiles = import ../profile;
|
|
||||||
|
|
||||||
makeSystem = { host, arch ? "x86_64-linux", extraModules ? [ ], stable ? true, hmAsModule ? true, hmUsers ? [ "materus" ] }:
|
|
||||||
let
|
|
||||||
nixosSystem = if stable then inputs.nixpkgs-stable.lib.nixosSystem else inputs.nixpkgs.lib.nixosSystem;
|
|
||||||
hm = if stable then inputs.configInputs-stable.home-manager else inputs.configInputs.home-manager;
|
|
||||||
materusCfg = {
|
|
||||||
inherit stable;
|
|
||||||
inherit materusFlake;
|
|
||||||
inherit host;
|
|
||||||
inherit hm;
|
|
||||||
inherit hmAsModule;
|
|
||||||
inherit arch;
|
|
||||||
nixerus = if stable then inputs.configInputs-stable.nixerus else inputs.configInputs.nixerus;
|
|
||||||
configInputs = if stable then inputs.configInputs-stable else inputs.configInputs;
|
|
||||||
path = materusFlake.selfPath;
|
|
||||||
hostPath = materusFlake.selfPath + "/configurations/host/${host}";
|
|
||||||
isHm = false;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
(nixosSystem {
|
|
||||||
specialArgs = { inherit materusCfg; };
|
|
||||||
system = arch;
|
|
||||||
modules = [
|
|
||||||
./${host}
|
|
||||||
profiles.osProfile
|
|
||||||
materusCfg.configInputs.sops-nix.nixosModules.sops
|
|
||||||
(if hmAsModule then hm.nixosModules.home-manager else { })
|
|
||||||
(if hmAsModule then
|
|
||||||
{
|
|
||||||
home-manager.backupFileExtension = "hm-backup";
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.sharedModules = [
|
|
||||||
materusCfg.configInputs.plasma-manager.homeManagerModules.plasma-manager
|
|
||||||
materusCfg.configInputs.sops-nix.homeManagerModules.sops
|
|
||||||
];
|
|
||||||
home-manager.users = (builtins.foldl' (a: b: a // b) { } (builtins.map
|
|
||||||
(user: {
|
|
||||||
${user} = ({ ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
(materusFlake.selfPath + "/configurations/shared/home/${user}")
|
|
||||||
(materusFlake.selfPath + "/configurations/host/${host}/home/${user}")
|
|
||||||
profiles.homeProfile
|
|
||||||
];
|
|
||||||
});
|
|
||||||
})
|
|
||||||
hmUsers));
|
|
||||||
home-manager.extraSpecialArgs = { materusCfg = materusCfg // { isHm = true; }; };
|
|
||||||
} else { })
|
|
||||||
|
|
||||||
] ++ extraModules;
|
|
||||||
}) // { inherit materusCfg; };
|
|
||||||
in
|
|
||||||
{
|
|
||||||
materusPC = makeSystem { host = "materusPC"; stable = true; };
|
|
||||||
flamaster = makeSystem { host = "flamaster"; stable = true; };
|
|
||||||
valkyrie = makeSystem { host = "valkyrie"; stable = true; };
|
|
||||||
waffentrager = makeSystem { host = "waffentrager"; stable = true; arch = "aarch64-linux"; };
|
|
||||||
|
|
||||||
Old-materusPC = makeSystem { host = "Old-materusPC"; stable = true; };
|
|
||||||
}
|
|
||||||
@@ -1,196 +0,0 @@
|
|||||||
# Edit this configuration file to define what should be installed on
|
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
|
||||||
|
|
||||||
{ config, lib, pkgs, materusArg, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
# Include the results of the hardware scan.
|
|
||||||
./hardware-configuration.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
networking.wireless.iwd.enable = true;
|
|
||||||
services.logind.lidSwitch = "ignore";
|
|
||||||
services.logind.lidSwitchExternalPower = "ignore";
|
|
||||||
programs.steam = {
|
|
||||||
enable = true;
|
|
||||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
|
||||||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.tmux = {
|
|
||||||
enable = true;
|
|
||||||
clock24 = true;
|
|
||||||
};
|
|
||||||
programs.java = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.graalvm-ce;
|
|
||||||
binfmt = true;
|
|
||||||
};
|
|
||||||
# Bootloader.
|
|
||||||
boot.loader.grub = {
|
|
||||||
enable = true;
|
|
||||||
efiSupport = true;
|
|
||||||
device = "nodev";
|
|
||||||
useOSProber = true;
|
|
||||||
gfxmodeEfi = pkgs.lib.mkDefault "1920x1080";
|
|
||||||
gfxmodeBios = pkgs.lib.mkDefault "1920x1080";
|
|
||||||
#efiInstallAsRemovable = true;
|
|
||||||
};
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
|
||||||
|
|
||||||
networking.hostName = "flamaster"; # Define your hostname.
|
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|
||||||
|
|
||||||
# Configure network proxy if necessary
|
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
||||||
|
|
||||||
# Enable networking
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
networking.networkmanager.wifi.backend = "iwd";
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "Europe/Warsaw";
|
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n.defaultLocale = "pl_PL.UTF-8";
|
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
|
||||||
services.xserver.enable = true;
|
|
||||||
|
|
||||||
hardware.nvidia.open = false;
|
|
||||||
services.xserver.videoDrivers = [ "nvidia" ];
|
|
||||||
hardware.opengl.enable = true;
|
|
||||||
hardware.nvidia.prime = {
|
|
||||||
offload.enable = true;
|
|
||||||
|
|
||||||
# Bus ID of the Intel GPU. You can find it using lspci, either under 3D or VGA
|
|
||||||
intelBusId = "PCI:0:2:0";
|
|
||||||
|
|
||||||
# Bus ID of the NVIDIA GPU. You can find it using lspci, either under 3D or VGA
|
|
||||||
nvidiaBusId = "PCI:1:0:0";
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
# Enable the KDE Plasma Desktop Environment.
|
|
||||||
services.xserver.displayManager.sddm.enable = true;
|
|
||||||
services.xserver.desktopManager.plasma6.enable = true;
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
services.xserver = {
|
|
||||||
layout = "pl";
|
|
||||||
xkbVariant = "";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Configure console keymap
|
|
||||||
console.keyMap = "pl2";
|
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
|
||||||
services.printing.enable = true;
|
|
||||||
|
|
||||||
# Enable sound with pipewire.
|
|
||||||
#sound.enable = true;
|
|
||||||
hardware.pulseaudio.enable = false;
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
alsa.support32Bit = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
# If you want to use JACK applications, uncomment this
|
|
||||||
jack.enable = true;
|
|
||||||
|
|
||||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
|
||||||
# no need to redefine it in your config for now)
|
|
||||||
#media-session.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable touchpad support (enabled default in most desktopManager).
|
|
||||||
services.libinput.enable = true;
|
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
||||||
users.users.materus = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "Mateusz Słodkowicz";
|
|
||||||
extraGroups = [ "networkmanager" "wheel" ];
|
|
||||||
openssh.authorizedKeys.keyFiles = [ ("${materusArg.cfg.path}" + "/extraFiles/keys/ssh/materus.pub") ];
|
|
||||||
packages = with pkgs; [
|
|
||||||
kdePackages.kate
|
|
||||||
];
|
|
||||||
shell = pkgs.zsh;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Allow unfree packages
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
|
||||||
# $ nix search wget
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
|
||||||
wget
|
|
||||||
util-linux
|
|
||||||
killall
|
|
||||||
pciutils
|
|
||||||
lshw
|
|
||||||
steamcmd
|
|
||||||
distrobox
|
|
||||||
|
|
||||||
|
|
||||||
firefox
|
|
||||||
config.programs.java.package
|
|
||||||
|
|
||||||
|
|
||||||
];
|
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
|
||||||
# started in user sessions.
|
|
||||||
# programs.mtr.enable = true;
|
|
||||||
# programs.gnupg.agent = {
|
|
||||||
# enable = true;
|
|
||||||
# enableSSHSupport = true;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# List services that you want to enable:
|
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
|
||||||
services.openssh.enable = true;
|
|
||||||
services.openssh.settings.PermitRootLogin = "no";
|
|
||||||
services.openssh.settings.PasswordAuthentication = false;
|
|
||||||
services.openssh.openFirewall = true;
|
|
||||||
programs.ssh.startAgent = true;
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
|
||||||
networking.firewall.allowedTCPPorts = [ 22 27015 25565 25570 8123 8100 24800 ];
|
|
||||||
networking.firewall.allowedTCPPortRanges = [{ from = 16262; to = 16272; }];
|
|
||||||
networking.firewall.allowedUDPPorts = [ 22 16261 16262 8766 8767 25565 24454 8123 24800 ];
|
|
||||||
# Or disable the firewall altogether.
|
|
||||||
networking.firewall.enable = true;
|
|
||||||
|
|
||||||
networking.networkmanager.settings = {
|
|
||||||
connectivity = { uri = lib.mkDefault "http://nmcheck.gnome.org/check_network_status.txt"; };
|
|
||||||
};
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
|
||||||
# settings for stateful data, like file locations and database versions
|
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
||||||
# this value at the release version of the first install of this system.
|
|
||||||
# Before changing this value read the documentation for this option
|
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
||||||
system.stateVersion = "23.05"; # Did you read the comment?
|
|
||||||
|
|
||||||
|
|
||||||
programs.neovim.enable = true;
|
|
||||||
programs.neovim.vimAlias = true;
|
|
||||||
programs.neovim.viAlias = true;
|
|
||||||
|
|
||||||
services.flatpak.enable = true;
|
|
||||||
xdg.portal.enable = true;
|
|
||||||
|
|
||||||
virtualisation.podman.enable = true;
|
|
||||||
virtualisation.podman.dockerCompat = true;
|
|
||||||
virtualisation.podman.enableNvidia = true;
|
|
||||||
virtualisation.podman.dockerSocket.enable = true;
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
# Include the results of the hardware scan.
|
|
||||||
./configuration.nix
|
|
||||||
];
|
|
||||||
materus.profile.nix.enable = true;
|
|
||||||
#materus.profile.steam.enable = true;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,78 +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 = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_usb_sdmmc" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
fileSystems."/" =
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-label/NixOS_Root_Laptop";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@" "noatime" "ssd" "space_cache=v2" "compress=zstd" ];
|
|
||||||
};
|
|
||||||
fileSystems."/nix" =
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-label/NixOS_Root_Laptop";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@nix" "noatime" "compress=zstd" "ssd" "space_cache=v2" ];
|
|
||||||
};
|
|
||||||
fileSystems."/data" =
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-label/HDD_DATA";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "noatime" "compress=zstd" "nossd" "autodefrag" ];
|
|
||||||
};
|
|
||||||
fileSystems."/boot" =
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-label/NixOS_Root_Laptop";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@boot" "ssd" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot/efi" =
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-label/NixOS_EFI_L";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
fileSystems."/etc/nixos" =
|
|
||||||
{
|
|
||||||
device = "/materus/config/nixos-config";
|
|
||||||
fsType = "none";
|
|
||||||
options = [ "bind" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [{
|
|
||||||
device = "/data/.swapfile";
|
|
||||||
size = 32 * 1024;
|
|
||||||
}];
|
|
||||||
|
|
||||||
zramSwap = {
|
|
||||||
enable = true;
|
|
||||||
memoryPercent = 50;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
# 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.enp5s0.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
{ config, pkgs, materusArg, lib, ... }:
|
|
||||||
{
|
|
||||||
home.stateVersion = "23.05";
|
|
||||||
home.homeDirectory = "/home/materus";
|
|
||||||
|
|
||||||
xdg.dataFile."java-runtimes/graalvm-oracle-17".source = pkgs.graalvmPackages.graalvm-oracle_17;
|
|
||||||
xdg.dataFile."java-runtimes/graalvm-oracle-latest".source = pkgs.graalvmPackages.graalvm-oracle;
|
|
||||||
xdg.dataFile."java-runtimes/openjdk21".source = pkgs.jdk21;
|
|
||||||
|
|
||||||
materus.profile = {
|
|
||||||
fonts.enable = lib.mkDefault true;
|
|
||||||
nixpkgs.enable = lib.mkDefault false;
|
|
||||||
enableDesktop = lib.mkDefault true;
|
|
||||||
enableTerminal = lib.mkDefault true;
|
|
||||||
enableTerminalExtra = lib.mkDefault true;
|
|
||||||
enableNixDevel = lib.mkDefault true;
|
|
||||||
|
|
||||||
bash.enable = true;
|
|
||||||
zsh.enable = true;
|
|
||||||
editor.code.fhs.enable = true;
|
|
||||||
editor.code.fhs.packages = (ps: with ps; let llvmpkgs = llvmPackages_16; in [
|
|
||||||
llvmpkgs.clang
|
|
||||||
llvmpkgs.llvm
|
|
||||||
llvmpkgs.bintools
|
|
||||||
llvmpkgs.lld
|
|
||||||
llvmpkgs.lldb
|
|
||||||
llvmpkgs.libllvm
|
|
||||||
llvmpkgs.libllvm.dev
|
|
||||||
|
|
||||||
raylib
|
|
||||||
gcc
|
|
||||||
gdb
|
|
||||||
materusArg.unstable.nixd
|
|
||||||
nixfmt-rfc-style
|
|
||||||
nixpkgs-fmt
|
|
||||||
cmake
|
|
||||||
gnumake
|
|
||||||
ninja
|
|
||||||
binutils
|
|
||||||
coreutils
|
|
||||||
util-linux
|
|
||||||
openssl
|
|
||||||
openssl.dev
|
|
||||||
pkg-config
|
|
||||||
dotnet-sdk_8
|
|
||||||
mono
|
|
||||||
mold
|
|
||||||
python3
|
|
||||||
lua
|
|
||||||
gtk4.dev
|
|
||||||
gtk4
|
|
||||||
miniaudio
|
|
||||||
SDL2.dev
|
|
||||||
SDL2
|
|
||||||
freeglut.dev
|
|
||||||
freeglut
|
|
||||||
boost.dev
|
|
||||||
boost
|
|
||||||
glew.dev
|
|
||||||
libGL.dev
|
|
||||||
libGLU.dev
|
|
||||||
vulkan-loader.dev
|
|
||||||
xorg.xorgproto
|
|
||||||
xorg.libX11.dev
|
|
||||||
xorg.libXrandr.dev
|
|
||||||
xorg.libXrender.dev
|
|
||||||
rustup
|
|
||||||
freetype.dev
|
|
||||||
|
|
||||||
fpc
|
|
||||||
openjdk21
|
|
||||||
bison
|
|
||||||
flex
|
|
||||||
|
|
||||||
ldc
|
|
||||||
dmd
|
|
||||||
dub
|
|
||||||
]);
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
home.packages = [
|
|
||||||
pkgs.papirus-icon-theme
|
|
||||||
(materusArg.pkgs.polymc.wrap { extraJDKs = [ pkgs.graalvm-ce ]; })
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,90 +0,0 @@
|
|||||||
{ pkgs, lib, ... }:
|
|
||||||
{
|
|
||||||
#REGION test
|
|
||||||
#sound.enable = true;
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
|
||||||
audio.enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
alsa.support32Bit = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
systemWide = true;
|
|
||||||
jack.enable = true;
|
|
||||||
};
|
|
||||||
hardware.pulseaudio.enable = false;
|
|
||||||
environment.sessionVariables =
|
|
||||||
let
|
|
||||||
makePluginPath =
|
|
||||||
format:
|
|
||||||
"$HOME/.${format}:"
|
|
||||||
+ (lib.makeSearchPath format [
|
|
||||||
"$HOME/.nix-profile/lib"
|
|
||||||
"/run/current-system/sw/lib"
|
|
||||||
"/etc/profiles/per-user/$USER/lib"
|
|
||||||
]);
|
|
||||||
in
|
|
||||||
{
|
|
||||||
ALSOFT_DRIVERS = "pulse";
|
|
||||||
|
|
||||||
DSSI_PATH = makePluginPath "dssi";
|
|
||||||
LADSPA_PATH = makePluginPath "ladspa";
|
|
||||||
LV2_PATH = makePluginPath "lv2";
|
|
||||||
LXVST_PATH = makePluginPath "lxvst";
|
|
||||||
VST_PATH = makePluginPath "vst";
|
|
||||||
VST3_PATH = makePluginPath "vst3";
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
services.udev = let
|
|
||||||
script = pkgs.writeShellScript "arch-mknod" ''
|
|
||||||
ACTION=$1
|
|
||||||
KERNEL=$(basename $2)
|
|
||||||
MAJOR=$3
|
|
||||||
MINOR=$4
|
|
||||||
|
|
||||||
|
|
||||||
if (systemctl is-active --quiet systemd-nspawn@archlinux); then
|
|
||||||
if [[ $ACTION == "add" || "$ACTION" == "change" ]]; then
|
|
||||||
machinectl shell root@archlinux /bin/bash -c "
|
|
||||||
if ! [ -f /dev/$KERNEL ]; then
|
|
||||||
mknod /dev/$KERNEL c $MAJOR $MINOR
|
|
||||||
chmod 660 /dev/$KERNEL
|
|
||||||
chown root:input /dev/$KERNEL
|
|
||||||
fi
|
|
||||||
"
|
|
||||||
elif [[ $ACTION == "remove" ]]; then
|
|
||||||
machinectl shell root@archlinux /bin/rm /dev/$KERNEL
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
'';
|
|
||||||
in {
|
|
||||||
extraRules = ''
|
|
||||||
KERNEL=="rtc0", GROUP="audio"
|
|
||||||
KERNEL=="hpet", GROUP="audio"
|
|
||||||
DEVPATH=="/devices/virtual/misc/cpu_dma_latency", OWNER="root", GROUP="audio", MODE="0660"
|
|
||||||
|
|
||||||
|
|
||||||
SUBSYSTEM=="hidraw", KERNEL=="hidraw*", RUN+="${script} ''$env{ACTION} ''$env{DEVNAME} ''$env{MAJOR} ''$env{MINOR}"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
openal
|
|
||||||
pulseaudio
|
|
||||||
|
|
||||||
reaper
|
|
||||||
|
|
||||||
yabridge
|
|
||||||
yabridgectl
|
|
||||||
|
|
||||||
vital
|
|
||||||
odin2
|
|
||||||
surge
|
|
||||||
fire
|
|
||||||
decent-sampler
|
|
||||||
lsp-plugins
|
|
||||||
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,75 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
ttys = [
|
|
||||||
9
|
|
||||||
10
|
|
||||||
];
|
|
||||||
|
|
||||||
in
|
|
||||||
{
|
|
||||||
systemd.nspawn."fedora" = {
|
|
||||||
enable = true;
|
|
||||||
execConfig = {
|
|
||||||
Boot = true;
|
|
||||||
SystemCallFilter = [ "@known" ];
|
|
||||||
Timezone = "symlink";
|
|
||||||
Capability = "all";
|
|
||||||
PrivateUsers = "no";
|
|
||||||
ResolvConf = "off";
|
|
||||||
};
|
|
||||||
|
|
||||||
filesConfig = {
|
|
||||||
BindReadOnly = [
|
|
||||||
"/nix"
|
|
||||||
|
|
||||||
"/run/current-system"
|
|
||||||
"/run/booted-system"
|
|
||||||
"/run/opengl-driver"
|
|
||||||
"/run/opengl-driver-32"
|
|
||||||
|
|
||||||
];
|
|
||||||
Bind = [
|
|
||||||
"/:/run/host-root"
|
|
||||||
|
|
||||||
"/run/udev"
|
|
||||||
|
|
||||||
"/dev/fuse"
|
|
||||||
"/dev/snd"
|
|
||||||
"/dev/input"
|
|
||||||
"/dev/shm"
|
|
||||||
"/dev/kfd"
|
|
||||||
"/dev/dri"
|
|
||||||
"/dev/tty"
|
|
||||||
"/dev/tty0"
|
|
||||||
|
|
||||||
"/var/lib/flatpak"
|
|
||||||
|
|
||||||
"/tmp/.X11-unix"
|
|
||||||
|
|
||||||
/materus
|
|
||||||
|
|
||||||
] ++ lib.lists.forEach ttys (x: "/dev/tty${builtins.toString x}");
|
|
||||||
};
|
|
||||||
networkConfig = {
|
|
||||||
Bridge="br0";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
systemd.services."systemd-nspawn@fedora" = {
|
|
||||||
enable = true;
|
|
||||||
overrideStrategy = "asDropin";
|
|
||||||
serviceConfig = {
|
|
||||||
ConditionPathExists="/var/lib/machines/fedora";
|
|
||||||
DeviceAllow = [
|
|
||||||
"char-tty rwm"
|
|
||||||
"char-input rwm"
|
|
||||||
"char-drm rwm"
|
|
||||||
];
|
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
|
|
||||||
./hardware
|
|
||||||
./vm
|
|
||||||
./secrets
|
|
||||||
./containers
|
|
||||||
./other
|
|
||||||
|
|
||||||
./scripts.nix
|
|
||||||
./tmp.nix
|
|
||||||
./network.nix
|
|
||||||
|
|
||||||
./audio.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
system.copySystemConfiguration = false;
|
|
||||||
system.stateVersion = "23.05";
|
|
||||||
|
|
||||||
|
|
||||||
materus.profile.nix.enable = true;
|
|
||||||
materus.profile.nixpkgs.enable = true;
|
|
||||||
materus.profile.fonts.enable = true;
|
|
||||||
materus.profile.steam.enable = false;
|
|
||||||
|
|
||||||
services.logind.extraConfig = ''
|
|
||||||
NAutoVTs=4
|
|
||||||
ReserveVT=4
|
|
||||||
'';
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,82 +0,0 @@
|
|||||||
{ config, pkgs, lib, materusArg, ... }:
|
|
||||||
let
|
|
||||||
video = [
|
|
||||||
|
|
||||||
"video=HDMI-A-3:1920x1080@144"
|
|
||||||
"video=DP-3:1920x1080@240"
|
|
||||||
|
|
||||||
|
|
||||||
#"video=DP-1:1920x1080@240"
|
|
||||||
#"video=DP-2:1920x1080@240"
|
|
||||||
#"video=HDMI-A-1:1920x1080@240"
|
|
||||||
#"video=HDMI-A-2:1920x1080@240"
|
|
||||||
|
|
||||||
|
|
||||||
];
|
|
||||||
|
|
||||||
in
|
|
||||||
{
|
|
||||||
#Kernel
|
|
||||||
|
|
||||||
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_zen;
|
|
||||||
|
|
||||||
boot.kernelParams = [
|
|
||||||
"rcu_nocbs=${materusArg.materusPC.vmCores}"
|
|
||||||
"nohz_full=${materusArg.materusPC.vmCores}"
|
|
||||||
"vfio_iommu_type1.allow_unsafe_interrupts=1"
|
|
||||||
"pcie_acs_override=downstream,multifunction"
|
|
||||||
#''vfio-pci.ids="1002:744c"''
|
|
||||||
"nox2apic"
|
|
||||||
"nvme_core.default_ps_max_latency_us=0"
|
|
||||||
"nvme_core.io_timeout=255"
|
|
||||||
"nvme_core.max_retries=10"
|
|
||||||
"nvme_core.shutdown_timeout=10"
|
|
||||||
"amd_iommu=on"
|
|
||||||
"amdgpu.ppfeaturemask=0xffffffff"
|
|
||||||
#"amdgpu.runpm=0"
|
|
||||||
"iommu=pt"
|
|
||||||
"psi=1"
|
|
||||||
"i915.force_probe=!56a6"
|
|
||||||
"xe.force_probe=56a6"
|
|
||||||
] ++ video;
|
|
||||||
boot.kernelModules = [ "pci-stub" "amdgpu" "i2c_dev" "kvm_amd" "vfio" "vfio_iommu_type1" "vfio-pci" "kvmfr" "xe" ];
|
|
||||||
boot.extraModprobeConfig = ''
|
|
||||||
options kvm_amd nested=1 avic=1 npt=1 sev=0
|
|
||||||
options vfio_iommu_type1 allow_unsafe_interrupts=1
|
|
||||||
options kvmfr static_size_mb=64
|
|
||||||
'';
|
|
||||||
boot.kernel.sysctl = {
|
|
||||||
"vm.max_map_count" = 1000000;
|
|
||||||
"vm.swappiness" = 10;
|
|
||||||
"net.ipv4.ip_forward"=1;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
|
|
||||||
boot.initrd.kernelModules = [ "vfio-pci" "amdgpu" ];
|
|
||||||
|
|
||||||
boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback kvmfr ];
|
|
||||||
|
|
||||||
|
|
||||||
boot.supportedFilesystems = [ "ntfs" "btrfs" "vfat" "exfat" "ext4" ];
|
|
||||||
|
|
||||||
boot.tmp.useTmpfs = true;
|
|
||||||
|
|
||||||
|
|
||||||
#bootloader
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
|
||||||
boot.loader.grub = {
|
|
||||||
enable = true;
|
|
||||||
efiSupport = true;
|
|
||||||
device = "nodev";
|
|
||||||
gfxmodeEfi = pkgs.lib.mkDefault "1920x1080@240";
|
|
||||||
gfxmodeBios = pkgs.lib.mkDefault "1920x1080@240";
|
|
||||||
useOSProber = true;
|
|
||||||
memtest86.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
boot.plymouth.enable = true;
|
|
||||||
|
|
||||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
|
||||||
}
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
{ config, pkgs, lib, materusArg, ... }:
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
./filesystem.nix
|
|
||||||
./boot.nix
|
|
||||||
|
|
||||||
];
|
|
||||||
hardware.firmware = with pkgs; [
|
|
||||||
materusArg.pkgs.amdgpu-pro-libs.firmware.vcn
|
|
||||||
materusArg.pkgs.amdgpu-pro-libs.firmware
|
|
||||||
linux-firmware
|
|
||||||
alsa-firmware
|
|
||||||
sof-firmware
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.variables = {
|
|
||||||
DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1 = "1";
|
|
||||||
#VK_ICD_FILENAMES = "${pkgs.mesa.drivers}/share/vulkan/icd.d/radeon_icd.x86_64.json:${pkgs.driversi686Linux.mesa.drivers}/share/vulkan/icd.d/radeon_icd.i686.json";
|
|
||||||
AMD_VULKAN_ICD = "RADV";
|
|
||||||
RADV_PERFTEST = "gpl,rt,sam";
|
|
||||||
#OCL_ICD_VENDORS = "${pkgs.rocmPackages.clr.icd}/etc/OpenCL/vendors/";
|
|
||||||
};
|
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkForce true;
|
|
||||||
|
|
||||||
#extra
|
|
||||||
hardware.wooting.enable = true;
|
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
#Graphics
|
|
||||||
hardware.opengl.enable = true;
|
|
||||||
hardware.opengl.driSupport32Bit = true;
|
|
||||||
hardware.opengl.extraPackages = with pkgs; [
|
|
||||||
vaapiVdpau
|
|
||||||
vpl-gpu-rt
|
|
||||||
intel-media-driver
|
|
||||||
libvdpau-va-gl
|
|
||||||
amdvlk
|
|
||||||
vkbasalt
|
|
||||||
rocmPackages.clr.icd
|
|
||||||
rocmPackages.clr
|
|
||||||
materusArg.pkgs.amdgpu-pro-libs.vulkan
|
|
||||||
materusArg.pkgs.amdgpu-pro-libs.amf
|
|
||||||
];
|
|
||||||
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [
|
|
||||||
vaapiVdpau
|
|
||||||
vkbasalt
|
|
||||||
pkgs.driversi686Linux.amdvlk
|
|
||||||
materusArg.pkgs.i686Linux.amdgpu-pro-libs.vulkan
|
|
||||||
libvdpau-va-gl
|
|
||||||
];
|
|
||||||
/*services.udev.extraRules = ''
|
|
||||||
|
|
||||||
#GPU bar size
|
|
||||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x1002", ATTR{device}=="0x744c", ATTR{resource0_resize}="15"
|
|
||||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x1002", ATTR{device}=="0x744c", ATTR{resource2_resize}="8"
|
|
||||||
'';*/
|
|
||||||
|
|
||||||
|
|
||||||
#Trim
|
|
||||||
services.fstrim = {
|
|
||||||
enable = true;
|
|
||||||
interval = "weekly";
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
{
|
|
||||||
zramSwap = {
|
|
||||||
enable = true;
|
|
||||||
memoryPercent = 50;
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [
|
|
||||||
{
|
|
||||||
label = "NixOS_Swap";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
fileSystems."/etc/nixos" =
|
|
||||||
{
|
|
||||||
device = "/materus/config/nixos-config";
|
|
||||||
fsType = "none";
|
|
||||||
options = [ "bind" ];
|
|
||||||
depends = [ "/materus" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
fileSystems."/materus" =
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-label/NixOS_Root";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@materus" "noatime" "compress=zstd" "ssd" "space_cache=v2" ];
|
|
||||||
neededForBoot = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/" =
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-label/NixOS_Root";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@" "noatime" "ssd" "space_cache=v2" "compress=zstd" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/nix" =
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-label/NixOS_Root";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@nix" "noatime" "compress=zstd" "ssd" "space_cache=v2" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/home" =
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-label/NixOS_Root";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@home" "noatime" "compress=zstd" "ssd" "space_cache=v2" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" =
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-label/NixOS_Root";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@boot" "ssd" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
fileSystems."/boot/efi" =
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-label/NixOS_EFI";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,188 +0,0 @@
|
|||||||
{
|
|
||||||
pkgs,
|
|
||||||
materusArg,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./plasma.nix
|
|
||||||
];
|
|
||||||
home.stateVersion = "23.05";
|
|
||||||
home.homeDirectory = "/home/materus";
|
|
||||||
|
|
||||||
materus.profile.wezterm.enable = true;
|
|
||||||
|
|
||||||
programs.git.signing.signByDefault = true;
|
|
||||||
|
|
||||||
xdg.userDirs.enable = true;
|
|
||||||
materus.profile = {
|
|
||||||
|
|
||||||
fonts.enable = lib.mkDefault true;
|
|
||||||
nixpkgs.enable = lib.mkDefault false;
|
|
||||||
enableDesktop = lib.mkDefault true;
|
|
||||||
enableTerminal = lib.mkDefault true;
|
|
||||||
enableTerminalExtra = lib.mkDefault true;
|
|
||||||
enableNixDevel = lib.mkDefault true;
|
|
||||||
editor.emacs.enable = true;
|
|
||||||
editor.code.fhs.enable = true;
|
|
||||||
editor.code.fhs.packages = (
|
|
||||||
ps:
|
|
||||||
with ps;
|
|
||||||
let
|
|
||||||
llvmpkgs = llvmPackages_18;
|
|
||||||
in
|
|
||||||
[
|
|
||||||
llvmpkgs.clang
|
|
||||||
llvmpkgs.llvm
|
|
||||||
llvmpkgs.bintools
|
|
||||||
llvmpkgs.lld
|
|
||||||
llvmpkgs.lldb
|
|
||||||
llvmpkgs.libllvm
|
|
||||||
llvmpkgs.mlir
|
|
||||||
llvmpkgs.libllvm.dev
|
|
||||||
|
|
||||||
fpc
|
|
||||||
xmake
|
|
||||||
raylib
|
|
||||||
gcc
|
|
||||||
gdb
|
|
||||||
materusArg.unstable.nixd
|
|
||||||
nixfmt-rfc-style
|
|
||||||
nixpkgs-fmt
|
|
||||||
cmake
|
|
||||||
gnumake
|
|
||||||
ninja
|
|
||||||
binutils
|
|
||||||
coreutils
|
|
||||||
util-linux
|
|
||||||
openssl
|
|
||||||
openssl.dev
|
|
||||||
pkg-config
|
|
||||||
dotnet-sdk_8
|
|
||||||
mono
|
|
||||||
mold
|
|
||||||
python3
|
|
||||||
lua
|
|
||||||
gtk4.dev
|
|
||||||
gtk4
|
|
||||||
glib
|
|
||||||
glib.dev
|
|
||||||
miniaudio
|
|
||||||
SDL2.dev
|
|
||||||
SDL2
|
|
||||||
freeglut.dev
|
|
||||||
freeglut
|
|
||||||
boost.dev
|
|
||||||
boost
|
|
||||||
glew.dev
|
|
||||||
libGL.dev
|
|
||||||
libGLU.dev
|
|
||||||
vulkan-loader.dev
|
|
||||||
vulkan-headers
|
|
||||||
xorg.xorgproto
|
|
||||||
xorg.libX11.dev
|
|
||||||
xorg.libXrandr.dev
|
|
||||||
xorg.libXrender.dev
|
|
||||||
rustup
|
|
||||||
freetype.dev
|
|
||||||
|
|
||||||
fpc
|
|
||||||
gradle
|
|
||||||
bison
|
|
||||||
flex
|
|
||||||
|
|
||||||
ldc
|
|
||||||
dmd
|
|
||||||
dub
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
home.packages = [
|
|
||||||
(pkgs.ffmpeg-full)
|
|
||||||
(materusArg.pkgs.polymc.wrap {
|
|
||||||
extraJDKs = [ pkgs.graalvm-ce ];
|
|
||||||
extraLibs = [ ];
|
|
||||||
})
|
|
||||||
pkgs.git-crypt
|
|
||||||
pkgs.obsidian
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.obs-studio = {
|
|
||||||
enable = true;
|
|
||||||
plugins = with pkgs.obs-studio-plugins; [
|
|
||||||
wlrobs
|
|
||||||
input-overlay
|
|
||||||
|
|
||||||
obs-source-switcher
|
|
||||||
obs-tuna
|
|
||||||
obs-vaapi
|
|
||||||
obs-vkcapture
|
|
||||||
obs-gstreamer
|
|
||||||
obs-backgroundremoval
|
|
||||||
obs-multi-rtmp
|
|
||||||
obs-pipewire-audio-capture
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
home.file.".gradle/gradle.properties".text = ''
|
|
||||||
org.gradle.java.installations.fromEnv=JAVA_8_HOME,JAVA_17_HOME,JAVA_21_HOME
|
|
||||||
org.gradle.home=${pkgs.jdk21}
|
|
||||||
'';
|
|
||||||
|
|
||||||
xdg.dataFile."java-runtimes/graalvm-oracle-17".source = pkgs.graalvmPackages.graalvm-oracle_17;
|
|
||||||
xdg.dataFile."java-runtimes/graalvm-oracle-latest".source = pkgs.graalvmPackages.graalvm-oracle;
|
|
||||||
xdg.dataFile."java-runtimes/openjdk21".source = pkgs.jdk21;
|
|
||||||
|
|
||||||
xdg.desktopEntries.brave-browser =
|
|
||||||
let
|
|
||||||
env = lib.concatStringsSep " " [
|
|
||||||
];
|
|
||||||
script = pkgs.writeShellScript "brave" ''
|
|
||||||
${env} brave "$@"
|
|
||||||
'';
|
|
||||||
|
|
||||||
in
|
|
||||||
{
|
|
||||||
name = "Brave Web Browser";
|
|
||||||
genericName = "Przeglądarka WWW";
|
|
||||||
comment = "Skorzystaj z internetu";
|
|
||||||
exec = "${script} %U";
|
|
||||||
icon = "brave-browser";
|
|
||||||
terminal = false;
|
|
||||||
categories = [
|
|
||||||
"Application"
|
|
||||||
"Network"
|
|
||||||
"WebBrowser"
|
|
||||||
];
|
|
||||||
mimeType = [
|
|
||||||
"application/pdf"
|
|
||||||
"application/rdf+xml"
|
|
||||||
"application/rss+xml"
|
|
||||||
"application/xhtml+xml"
|
|
||||||
"application/xhtml_xml"
|
|
||||||
"application/xml"
|
|
||||||
"image/gif"
|
|
||||||
"image/jpeg"
|
|
||||||
"image/png"
|
|
||||||
"image/webp"
|
|
||||||
"text/html"
|
|
||||||
"text/xml"
|
|
||||||
"x-scheme-handler/http"
|
|
||||||
"x-scheme-handler/https"
|
|
||||||
"x-scheme-handler/ipfs"
|
|
||||||
"x-scheme-handler/ipns"
|
|
||||||
];
|
|
||||||
actions.new-windows = {
|
|
||||||
exec = "${script}";
|
|
||||||
name = "Nowe okno";
|
|
||||||
};
|
|
||||||
actions.new-private-windows = {
|
|
||||||
exec = "${script} --incognito";
|
|
||||||
name = "Nowe okno incognito";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,139 +0,0 @@
|
|||||||
{ pkgs, materusArg, ... }:
|
|
||||||
{
|
|
||||||
home.packages = [
|
|
||||||
pkgs.papirus-icon-theme
|
|
||||||
pkgs.nerd-fonts.hack
|
|
||||||
];
|
|
||||||
|
|
||||||
xdg.dataFile."konsole/materus-linux.keytab".source = ("${materusArg.cfg.path}" + "/extraFiles/config/plasma/materus-linux.keytab");
|
|
||||||
programs.konsole = {
|
|
||||||
enable = true;
|
|
||||||
profiles = {
|
|
||||||
materus = {
|
|
||||||
colorScheme = "Breeze";
|
|
||||||
font.name = "Hack Nerd Font";
|
|
||||||
extraConfig = {
|
|
||||||
Keyboard = {
|
|
||||||
KeyBindings="materus-linux";
|
|
||||||
};
|
|
||||||
Scrolling = {
|
|
||||||
HistoryMode = 2;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
extraConfig = {
|
|
||||||
KonsoleWindow = {
|
|
||||||
RememberWindowSize = "false";
|
|
||||||
};
|
|
||||||
MainWindow = {
|
|
||||||
MenuBar = "Enabled";
|
|
||||||
};
|
|
||||||
|
|
||||||
"Desktop Entry" = {
|
|
||||||
DefaultProfile = "materus.profile";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
programs.plasma = {
|
|
||||||
enable = true;
|
|
||||||
overrideConfig = false;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
workspace = {
|
|
||||||
lookAndFeel = "org.kde.breezedark.desktop";
|
|
||||||
iconTheme = "Papirus-Dark";
|
|
||||||
};
|
|
||||||
|
|
||||||
shortcuts = {
|
|
||||||
"kwin"."Grid View" = "Meta+Alt+Tab";
|
|
||||||
"kwin"."Overview" = "Meta+Tab";
|
|
||||||
"services/org.kde.kcalc.desktop"."_launch" = [ ];
|
|
||||||
};
|
|
||||||
spectacle.shortcuts = {
|
|
||||||
captureActiveWindow = "Meta+Print";
|
|
||||||
captureCurrentMonitor = "Print";
|
|
||||||
captureEntireDesktop = "Shift+Print";
|
|
||||||
captureRectangularRegion = "Meta+S";
|
|
||||||
launchWithoutCapturing = "Meta+Shift+S";
|
|
||||||
launch = "Meta+Alt+S";
|
|
||||||
};
|
|
||||||
|
|
||||||
kwin = {
|
|
||||||
effects = {
|
|
||||||
wobblyWindows.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
input = {
|
|
||||||
keyboard = {
|
|
||||||
options = [ "caps:none" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
kscreenlocker = {
|
|
||||||
autoLock = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
panels = [
|
|
||||||
{
|
|
||||||
location = "left";
|
|
||||||
screen = 0;
|
|
||||||
widgets = [
|
|
||||||
{
|
|
||||||
name = "org.kde.plasma.kickerdash";
|
|
||||||
config = {
|
|
||||||
General = {
|
|
||||||
icon = "nix-snowflake-white";
|
|
||||||
customButtonImage="nix-snowflake-white";
|
|
||||||
alphaSort = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
"org.kde.plasma.icontasks"
|
|
||||||
"org.kde.plasma.marginsseparator"
|
|
||||||
"org.kde.plasma.systemtray"
|
|
||||||
{
|
|
||||||
name = "org.kde.plasma.digitalclock";
|
|
||||||
config = {
|
|
||||||
Appearance = {
|
|
||||||
showDate = "false";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
];
|
|
||||||
configFile = {
|
|
||||||
"kwinrc"."Effect-overview"."BorderActivate" = 9;
|
|
||||||
|
|
||||||
"klaunchrc"."BusyCursorSettings"."Timeout" = 1;
|
|
||||||
"klaunchrc"."FeedbackStyle"."TaskbarButton" = false;
|
|
||||||
|
|
||||||
"kcminputrc"."Libinput/9610/46/SINOWEALTH Wired Gaming Mouse"."PointerAccelerationProfile" = 1;
|
|
||||||
"kcminputrc"."Libinput/9610/47/SINOWEALTH 2.4G Wireless Receiver"."PointerAccelerationProfile" = 1;
|
|
||||||
|
|
||||||
"spectaclerc"."ImageSave"."imageFilenameTemplate" = "<yyyy>-<MM>-<dd>.<hh>_<mm>_<ss>-<t>.materusPC";
|
|
||||||
"spectaclerc"."VideoSave"."videoFilenameTemplate" = "<yyyy>-<MM>-<dd>.<hh>_<mm>_<ss>-<t>.materusPC";
|
|
||||||
"spectaclerc"."ImageSave"."preferredImageFormat" = "WEBP";
|
|
||||||
"spectaclerc"."ImageSave"."translatedScreenshotsFolder" = "Zrzuty ekranu";
|
|
||||||
"spectaclerc"."VideoSave"."translatedScreencastsFolder" = "Nagranie ekranu";
|
|
||||||
|
|
||||||
"dolphinrc"."General"."RememberOpenedTabs" = false;
|
|
||||||
|
|
||||||
"kwalletrc"."Wallet"."Enabled" = true;
|
|
||||||
|
|
||||||
};
|
|
||||||
dataFile = {
|
|
||||||
"dolphin/view_properties/global/.directory"."Settings"."HiddenFilesShown" = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
resetFiles = [
|
|
||||||
"spectaclerc"
|
|
||||||
];
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,82 +0,0 @@
|
|||||||
{ config, pkgs, lib, materusArg, ... }:
|
|
||||||
{
|
|
||||||
sops.templates."networkmanager.env".content = ''
|
|
||||||
WIREGUARD_PRIVATEKEY="${config.sops.placeholder.wireguard}"
|
|
||||||
'';
|
|
||||||
|
|
||||||
networking.firewall = {
|
|
||||||
logReversePathDrops = false;
|
|
||||||
# wireguard trips rpfilter up
|
|
||||||
extraCommands = ''
|
|
||||||
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --sport ${materusArg.wireguard.port} -j RETURN
|
|
||||||
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --dport ${materusArg.wireguard.port} -j RETURN
|
|
||||||
'';
|
|
||||||
extraStopCommands = ''
|
|
||||||
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --sport ${materusArg.wireguard.port} -j RETURN || true
|
|
||||||
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --dport ${materusArg.wireguard.port} -j RETURN || true
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
networking.hostName = "materusPC";
|
|
||||||
networking.wireless.iwd.enable = true;
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
#networking.networkmanager.wifi.backend = "iwd";
|
|
||||||
networking.firewall.enable = true;
|
|
||||||
networking.firewall.allowedTCPPorts = [
|
|
||||||
24800 5900 5357 4656 8080 9943 9944
|
|
||||||
22000 config.services.syncthing.relay.statusPort config.services.syncthing.relay.port # Syncthing
|
|
||||||
25565 25570 8100 # Minecraft + BlueMap + Velocity
|
|
||||||
];
|
|
||||||
networking.firewall.allowedUDPPorts = [ (lib.strings.toInt materusArg.wireguard.port)
|
|
||||||
24800 5900 3702 4656 6000 9943 9944
|
|
||||||
22000 21027 # Syncthing
|
|
||||||
17000 17001 # zomboid
|
|
||||||
24454 # Minecraft Voice Chat
|
|
||||||
];
|
|
||||||
networking.networkmanager.settings = {
|
|
||||||
connectivity = {
|
|
||||||
uri = "http://nmcheck.gnome.org/check_network_status.txt";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
networking.networkmanager.ensureProfiles.environmentFiles = [
|
|
||||||
config.sops.templates."networkmanager.env".path
|
|
||||||
];
|
|
||||||
networking.networkmanager.ensureProfiles.profiles = {
|
|
||||||
wg0 = {
|
|
||||||
connection = {
|
|
||||||
id = "wg0";
|
|
||||||
type = "wireguard";
|
|
||||||
interface-name = "wg0";
|
|
||||||
};
|
|
||||||
wireguard = {
|
|
||||||
private-key = "$WIREGUARD_PRIVATEKEY";
|
|
||||||
};
|
|
||||||
"wireguard-peer.${materusArg.wireguard.pubKeys.valkyrie}" = {
|
|
||||||
endpoint = "${materusArg.ips.valkyrie}:${materusArg.wireguard.port}";
|
|
||||||
allowed-ips = "${materusArg.ip-masks.wireguard.main};${materusArg.ip-masks.wireguard.guest};${materusArg.ip-masks.wireguard.asia};${materusArg.ips.wireguard.valkyrie}/32;";
|
|
||||||
persistent-keepalive = "20";
|
|
||||||
};
|
|
||||||
ipv4 = {
|
|
||||||
address1 = "${materusArg.ips.wireguard.materusPC}/32";
|
|
||||||
dns = "${materusArg.ips.wireguard.valkyrie};";
|
|
||||||
method = "manual";
|
|
||||||
never-default = "true";
|
|
||||||
};
|
|
||||||
ipv6 = {
|
|
||||||
addr-gen-mode = "stable-privacy";
|
|
||||||
method = "disabled";
|
|
||||||
};
|
|
||||||
proxy = { };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services = {
|
|
||||||
syncthing = {
|
|
||||||
enable = true;
|
|
||||||
user = "materus";
|
|
||||||
dataDir = "/home/materus";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,147 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
materusArg,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
|
|
||||||
#services.jackett.enable = true;
|
|
||||||
programs.nix-ld.enable = true;
|
|
||||||
programs.nix-ld.libraries = with pkgs; [
|
|
||||||
|
|
||||||
];
|
|
||||||
programs.chromium.enable = true;
|
|
||||||
programs.chromium.enablePlasmaBrowserIntegration = true;
|
|
||||||
|
|
||||||
services.guix.enable = true;
|
|
||||||
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
|
|
||||||
vivaldi
|
|
||||||
|
|
||||||
#(pkgs.lutris.override { extraLibraries = pkgs: with pkgs; [ pkgs.samba pkgs.jansson pkgs.tdb pkgs.libunwind pkgs.libusb1 pkgs.gnutls pkgs.gtk3 pkgs.pango ]; })
|
|
||||||
materusArg.pkgs.amdgpu-pro-libs.prefixes
|
|
||||||
(pkgs.bottles.override {
|
|
||||||
extraPkgs = pkgs: [
|
|
||||||
pkgs.libsForQt5.breeze-qt5
|
|
||||||
pkgs.kdePackages.breeze-gtk
|
|
||||||
pkgs.nss_latest
|
|
||||||
];
|
|
||||||
extraLibraries = pkgs: [
|
|
||||||
pkgs.samba
|
|
||||||
pkgs.jansson
|
|
||||||
pkgs.tdb
|
|
||||||
pkgs.libunwind
|
|
||||||
pkgs.libusb1
|
|
||||||
pkgs.gnutls
|
|
||||||
pkgs.gtk3
|
|
||||||
pkgs.pango
|
|
||||||
];
|
|
||||||
})
|
|
||||||
glibc
|
|
||||||
glib
|
|
||||||
gtk3
|
|
||||||
gtk4
|
|
||||||
gsettings-desktop-schemas
|
|
||||||
kdePackages.dolphin
|
|
||||||
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
|
||||||
vlc
|
|
||||||
vkbasalt-cli
|
|
||||||
|
|
||||||
patchelf
|
|
||||||
killall
|
|
||||||
util-linux
|
|
||||||
xorg.xhost
|
|
||||||
nix-top
|
|
||||||
|
|
||||||
gitFull
|
|
||||||
curl
|
|
||||||
wget
|
|
||||||
|
|
||||||
config.programs.java.package
|
|
||||||
|
|
||||||
nss_latest
|
|
||||||
|
|
||||||
pciutils
|
|
||||||
|
|
||||||
(aspellWithDicts (
|
|
||||||
ds: with ds; [
|
|
||||||
en
|
|
||||||
en-computers
|
|
||||||
en-science
|
|
||||||
pl
|
|
||||||
]
|
|
||||||
))
|
|
||||||
steamtinkerlaunch
|
|
||||||
distrobox
|
|
||||||
# WebP support
|
|
||||||
libwebp
|
|
||||||
webp-pixbuf-loader
|
|
||||||
|
|
||||||
# Compression
|
|
||||||
p7zip
|
|
||||||
unrar
|
|
||||||
bzip2
|
|
||||||
rar
|
|
||||||
unzip
|
|
||||||
zstd
|
|
||||||
xz
|
|
||||||
zip
|
|
||||||
gzip
|
|
||||||
|
|
||||||
tree
|
|
||||||
mc
|
|
||||||
lf
|
|
||||||
htop
|
|
||||||
nmon
|
|
||||||
iftop
|
|
||||||
iptraf-ng
|
|
||||||
mprocs
|
|
||||||
tldr
|
|
||||||
bat
|
|
||||||
##config.materus.profile.packages.home-manager
|
|
||||||
gcr
|
|
||||||
# pgcli
|
|
||||||
# litecli
|
|
||||||
materusArg.pkgs.alvr
|
|
||||||
#zenmonitor
|
|
||||||
|
|
||||||
nix-du
|
|
||||||
|
|
||||||
kdePackages.kate
|
|
||||||
krusader
|
|
||||||
|
|
||||||
wineWowPackages.stagingFull
|
|
||||||
winetricks
|
|
||||||
protontricks
|
|
||||||
gnupg
|
|
||||||
pinentry
|
|
||||||
pinentry-gnome3
|
|
||||||
pinentry-curses
|
|
||||||
ncurses
|
|
||||||
monkeysphere
|
|
||||||
gparted
|
|
||||||
|
|
||||||
virt-viewer
|
|
||||||
|
|
||||||
inkscape
|
|
||||||
gimp
|
|
||||||
|
|
||||||
git-crypt
|
|
||||||
|
|
||||||
bubblewrap
|
|
||||||
bindfs
|
|
||||||
|
|
||||||
binutils
|
|
||||||
|
|
||||||
materusArg.unstable.qbittorrent
|
|
||||||
mkvtoolnix
|
|
||||||
nicotine-plus
|
|
||||||
picard
|
|
||||||
opusTools
|
|
||||||
aegisub
|
|
||||||
audacity
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./apps.nix
|
|
||||||
./java.nix
|
|
||||||
./users.nix
|
|
||||||
./desktop
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./kde.nix
|
|
||||||
./sddm.nix
|
|
||||||
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
{
|
|
||||||
services.displayManager.defaultSession = "gnome";
|
|
||||||
|
|
||||||
services.xserver.desktopManager.gnome.enable = true;
|
|
||||||
services.xserver.desktopManager.gnome.sessionPath = [ pkgs.gnome.gpaste ];
|
|
||||||
|
|
||||||
services.gnome.gnome-online-accounts.enable = true;
|
|
||||||
services.gnome.gnome-browser-connector.enable = true;
|
|
||||||
services.gnome.core-utilities.enable = true;
|
|
||||||
services.gnome.core-shell.enable = true;
|
|
||||||
services.gnome.core-os-services.enable = true;
|
|
||||||
|
|
||||||
programs.gnupg.agent.pinentryPackage = lib.mkForce pkgs.pinentry-gnome3;
|
|
||||||
|
|
||||||
|
|
||||||
programs.gnome-terminal.enable = true;
|
|
||||||
|
|
||||||
services.udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
|
|
||||||
services.dbus.packages = with pkgs; [ gnome2.GConf ];
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
|
|
||||||
gnome3.adwaita-icon-theme
|
|
||||||
gnome3.gnome-tweaks
|
|
||||||
gnome3.gnome-color-manager
|
|
||||||
gnome3.gnome-shell-extensions
|
|
||||||
|
|
||||||
gnomeExtensions.appindicator
|
|
||||||
gnomeExtensions.desktop-clock
|
|
||||||
gnomeExtensions.gtk4-desktop-icons-ng-ding
|
|
||||||
gnomeExtensions.compiz-windows-effect
|
|
||||||
gnomeExtensions.burn-my-windows
|
|
||||||
gnomeExtensions.user-themes
|
|
||||||
gnomeExtensions.gsconnect
|
|
||||||
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
{
|
|
||||||
|
|
||||||
xdg.portal.enable = true;
|
|
||||||
xdg.portal.wlr.enable = true;
|
|
||||||
xdg.portal.xdgOpenUsePortal = true;
|
|
||||||
xdg.portal.extraPortals = [ pkgs.kdePackages.xdg-desktop-portal-kde ];
|
|
||||||
|
|
||||||
services.desktopManager.plasma6.enable = true;
|
|
||||||
services.desktopManager.plasma6.enableQt5Integration = true;
|
|
||||||
#programs.gnupg.agent.pinentryPackage = lib.mkForce (pkgs.kwalletcli.overrideAttrs {meta.mainProgram = "pinentry-kwallet";});
|
|
||||||
#environment.plasma6.excludePackages = with pkgs.kdePackages; [ kwallet kwalletmanager kwallet-pam ];
|
|
||||||
environment.variables = {
|
|
||||||
# Old fix for black cursor on amdgpu, seems to work fine now
|
|
||||||
#KWIN_DRM_NO_AMS = "1";
|
|
||||||
|
|
||||||
#Fix for amdgpu crashes
|
|
||||||
KWIN_DRM_USE_MODIFIERS = "0";
|
|
||||||
KWIN_DRM_NO_DIRECT_SCANOUT = "1";
|
|
||||||
QT_PLUGIN_PATH = [
|
|
||||||
"${pkgs.qt6.qtimageformats}/${pkgs.qt6.qtbase.qtPluginPrefix}"
|
|
||||||
"${pkgs.kdePackages.ffmpegthumbs}/${pkgs.qt6.qtbase.qtPluginPrefix}"
|
|
||||||
];
|
|
||||||
XCURSOR_THEME = "breeze_cursors";
|
|
||||||
};
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
kdePackages.ark
|
|
||||||
kdePackages.kcalc
|
|
||||||
];
|
|
||||||
programs.kdeconnect.enable = true;
|
|
||||||
materus.profile.steam.extraPkgs = [ pkgs.kdePackages.breeze pkgs.kdePackages.breeze-gtk pkgs.kdePackages.dolphin pkgs.vlc pkgs.vkbasalt-cli ];
|
|
||||||
|
|
||||||
programs.firefox = {
|
|
||||||
enable = true;
|
|
||||||
autoConfig = builtins.readFile(builtins.fetchurl {
|
|
||||||
url = "https://raw.githubusercontent.com/MrOtherGuy/fx-autoconfig/master/program/config.js";
|
|
||||||
sha256 = "1mx679fbc4d9x4bnqajqx5a95y1lfasvf90pbqkh9sm3ch945p40";
|
|
||||||
});
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
plasma-materus = pkgs.writeScript "plasma-materus" ''
|
|
||||||
export KWIN_DRM_DEVICES="/dev/dri/by-path/pci-0000\:53\:00.0-card"
|
|
||||||
${pkgs.kdePackages.plasma-workspace}/libexec/plasma-dbus-run-session-if-needed ${pkgs.kdePackages.plasma-workspace}/bin/startplasma-wayland
|
|
||||||
'';
|
|
||||||
westonSddm =
|
|
||||||
let
|
|
||||||
xcfg = config.services.xserver;
|
|
||||||
in
|
|
||||||
pkgs.writeText "weston.ini" ''
|
|
||||||
[core]
|
|
||||||
xwayland=false
|
|
||||||
shell=fullscreen-shell.so
|
|
||||||
|
|
||||||
[keyboard]
|
|
||||||
keymap_model = ${builtins.toString xcfg.xkb.model};
|
|
||||||
keymap_layout = ${builtins.toString xcfg.xkb.layout};
|
|
||||||
keymap_variant = ${builtins.toString xcfg.xkb.variant};
|
|
||||||
keymap_options = ${builtins.toString xcfg.xkb.options};
|
|
||||||
|
|
||||||
[libinput]
|
|
||||||
enable-tap = ${builtins.toString xcfg.libinput.mouse.tapping};
|
|
||||||
left-handed = ${builtins.toString xcfg.libinput.mouse.leftHanded};
|
|
||||||
|
|
||||||
[output]
|
|
||||||
name=DP-3
|
|
||||||
mode=1920x1080@240
|
|
||||||
|
|
||||||
[output]
|
|
||||||
name=DP-4
|
|
||||||
mode=off
|
|
||||||
|
|
||||||
[output]
|
|
||||||
name=HDMI-A-3
|
|
||||||
mode=off
|
|
||||||
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
{
|
|
||||||
services.displayManager.defaultSession = "plasma-materus";
|
|
||||||
|
|
||||||
services.displayManager.sddm.enable = true;
|
|
||||||
services.displayManager.sddm.wayland.enable = true;
|
|
||||||
services.displayManager.sddm.wayland.compositor = lib.mkForce "weston";
|
|
||||||
services.displayManager.sddm.wayland.compositorCommand = lib.concatStringsSep " " [
|
|
||||||
"${lib.getExe pkgs.weston}"
|
|
||||||
"--shell=kiosk"
|
|
||||||
"-c ${westonSddm}"
|
|
||||||
];
|
|
||||||
services.displayManager.sessionPackages = [
|
|
||||||
(
|
|
||||||
(pkgs.writeTextDir "share/wayland-sessions/plasma-materus.desktop" ''
|
|
||||||
[Desktop Entry]
|
|
||||||
Name=Plasma (Wayland Materus)
|
|
||||||
Comment=Plasma Desktop with KWIN_DRM_DEVICES env
|
|
||||||
Exec=${plasma-materus}
|
|
||||||
DesktopNames=KDE
|
|
||||||
Type=Application
|
|
||||||
'').overrideAttrs
|
|
||||||
(_: {
|
|
||||||
passthru.providedSessions = [ "plasma-materus" ];
|
|
||||||
})
|
|
||||||
)
|
|
||||||
];
|
|
||||||
|
|
||||||
services.displayManager.sddm.settings = {
|
|
||||||
General = {
|
|
||||||
InputMethod = "";
|
|
||||||
};
|
|
||||||
Theme = {
|
|
||||||
CursorTheme = "breeze_cursors";
|
|
||||||
CursorSize = "24";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
programs = {
|
|
||||||
java.enable = true;
|
|
||||||
java.package = pkgs.jdk;
|
|
||||||
java.binfmt = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.variables = {
|
|
||||||
JAVA_8_HOME = "${pkgs.jdk8}/lib/openjdk/";
|
|
||||||
JAVA_17_HOME = "${pkgs.jdk17}/lib/openjdk/";
|
|
||||||
JAVA_21_HOME = "${pkgs.jdk21}/lib/openjdk/";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
{ pkgs, materusArg, config, ... }:
|
|
||||||
{
|
|
||||||
|
|
||||||
users.users.materus = {
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = [
|
|
||||||
"audio"
|
|
||||||
"video"
|
|
||||||
"render"
|
|
||||||
"pipewire"
|
|
||||||
"wheel"
|
|
||||||
"networkmanager"
|
|
||||||
"input"
|
|
||||||
"kvm"
|
|
||||||
"libvirt-qemu"
|
|
||||||
"libvirt"
|
|
||||||
"libvirtd"
|
|
||||||
"podman"
|
|
||||||
"scanner"
|
|
||||||
"lp"
|
|
||||||
];
|
|
||||||
shell = pkgs.zsh;
|
|
||||||
description = "Mateusz Słodkowicz";
|
|
||||||
openssh.authorizedKeys.keyFiles = [ ("${materusArg.cfg.path}" + "/extraFiles/keys/ssh/materus.pub") ];
|
|
||||||
#hashedPasswordFile = config.sops.secrets."users/materus".path;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
let
|
|
||||||
valkyrie-sync = pkgs.writeShellScriptBin "valkyrie-sync" ''
|
|
||||||
${pkgs.rsync}/bin/rsync -avzrh --delete --exclude ".git*" --exclude "flake.lock" /materus/config/nixos-config materus@valkyrie:/materus/config/ && \
|
|
||||||
${pkgs.rsync}/bin/rsync -avzrh --delete --exclude ".git*" /materus/config/private/valkyrie materus@valkyrie:/materus/config/private
|
|
||||||
'';
|
|
||||||
|
|
||||||
valkyrie-flakelock = pkgs.writeShellScriptBin "valkyrie-flakelock" ''
|
|
||||||
${pkgs.openssh}/bin/ssh materus@valkyrie "nix flake update /materus/config/nixos-config --override-input nixpkgs github:NixOS/nixpkgs/23.05 \
|
|
||||||
--override-input home-manager github:nix-community/home-manager/release-23.05 \
|
|
||||||
--override-input private /materus/config/private/valkyrie/flake"
|
|
||||||
'';
|
|
||||||
|
|
||||||
valkyrie-rebuild-boot = pkgs.writeShellScriptBin "valkyrie-rebuild-boot" ''
|
|
||||||
${pkgs.openssh}/bin/ssh -t materus@valkyrie "sudo nixos-rebuild boot --flake /materus/config/nixos-config#valkyrie \
|
|
||||||
--override-input private /materus/config/private/valkyrie/flake"
|
|
||||||
'';
|
|
||||||
valkyrie-rebuild-switch = pkgs.writeShellScriptBin "valkyrie-rebuild-switch" ''
|
|
||||||
${pkgs.openssh}/bin/ssh -t materus@valkyrie "sudo nixos-rebuild switch --flake /materus/config/nixos-config#valkyrie \
|
|
||||||
--override-input private /materus/config/private/valkyrie/flake"
|
|
||||||
'';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
flamaster-sync = pkgs.writeShellScriptBin "flamaster-sync" ''
|
|
||||||
${pkgs.rsync}/bin/rsync -avzrh --delete --exclude ".git*" --exclude "flake.lock" /materus/config/nixos-config materus@flamaster:/materus/config/ && \
|
|
||||||
${pkgs.rsync}/bin/rsync -avzrh --delete --exclude ".git*" /materus/config/private/flamaster materus@flamaster:/materus/config/private
|
|
||||||
'';
|
|
||||||
|
|
||||||
flamaster-flakelock = pkgs.writeShellScriptBin "flamaster-flakelock" ''
|
|
||||||
${pkgs.openssh}/bin/ssh materus@flamaster "nix flake update /materus/config/nixos-config --override-input nixpkgs github:NixOS/nixpkgs/23.05 \
|
|
||||||
--override-input home-manager github:nix-community/home-manager/release-23.05 \
|
|
||||||
--override-input private /materus/config/private/flamaster/flake"
|
|
||||||
'';
|
|
||||||
|
|
||||||
flamaster-rebuild-boot = pkgs.writeShellScriptBin "flamaster-rebuild-boot" ''
|
|
||||||
${pkgs.openssh}/bin/ssh -t materus@flamaster "sudo nixos-rebuild boot --flake /materus/config/nixos-config#flamaster \
|
|
||||||
--override-input private /materus/config/private/flamaster/flake"
|
|
||||||
'';
|
|
||||||
flamaster-rebuild-switch = pkgs.writeShellScriptBin "flamaster-rebuild-switch" ''
|
|
||||||
${pkgs.openssh}/bin/ssh -t materus@flamaster "sudo nixos-rebuild switch --flake /materus/config/nixos-config#flamaster \
|
|
||||||
--override-input private /materus/config/private/flamaster/flake"
|
|
||||||
'';
|
|
||||||
|
|
||||||
|
|
||||||
in
|
|
||||||
{
|
|
||||||
environment.systemPackages = [
|
|
||||||
valkyrie-rebuild-boot
|
|
||||||
valkyrie-rebuild-switch
|
|
||||||
valkyrie-sync
|
|
||||||
valkyrie-flakelock
|
|
||||||
|
|
||||||
flamaster-rebuild-boot
|
|
||||||
flamaster-rebuild-switch
|
|
||||||
flamaster-sync
|
|
||||||
flamaster-flakelock
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
{ config, pkgs, lib, materusCfg, ... }:
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
|
|
||||||
] ++ (if (materusCfg.materusFlake.decrypted) then [ ./private ] else [ ]);
|
|
||||||
|
|
||||||
sops.age.generateKey = false;
|
|
||||||
sops.gnupg.home = null;
|
|
||||||
sops.gnupg.sshKeyPaths = [ ];
|
|
||||||
sops.age.sshKeyPaths = [ "/materus/root/ssh_host_ed25519_key" ];
|
|
||||||
sops.defaultSopsFile = materusCfg.hostPath + "/secrets/secrets.yaml";
|
|
||||||
#sops.secrets."users/materus" = { neededForUsers = true; };
|
|
||||||
sops.secrets.wireguard = { };
|
|
||||||
|
|
||||||
services.openssh.hostKeys = [
|
|
||||||
{
|
|
||||||
bits = 4096;
|
|
||||||
path = "/materus/root/ssh_host_rsa_key";
|
|
||||||
type = "rsa";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
path = "/materus/root/ssh_host_ed25519_key";
|
|
||||||
type = "ed25519";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
Binary file not shown.
@@ -1,36 +0,0 @@
|
|||||||
users:
|
|
||||||
materus: ENC[AES256_GCM,data:okqSgMvdFq1BMAg+Gs725zaNbeAQIpJKSPB2Sa83i3EYimphZNBtrJLen+gQEGNq4yeTyAc9Ih/hcnr+3z+Tea/g9ffh/UC4YA==,iv:OhKoWLREAqCbtmS3Rw9nE9+PtcBLwEHimJXcj4oejRA=,tag:Ht/SQSwumnQR6E45Pl47AQ==,type:str]
|
|
||||||
root: ENC[AES256_GCM,data:vnPjK+xayk/Zk895rERYAeCzpjv5NJ7EAyK4MRDUzDbW++4Dy+UEI81v1v7w9dfpDeL+x5kOqUFO5zVVDUGfZ3yf/l8M8N8KcA==,iv:gGFGcy3K27nQxn0+7I/t0kg3nZyXeGWqysOl2auZJXo=,tag:N+LYhKpPCbI1EjEBwxuh1g==,type:str]
|
|
||||||
wireguard: ENC[AES256_GCM,data:rBkftzBcdamhP0xZB3qxfLptL8bX1qc7SdcfPNpYV67TeQs6i79+5KB/da4=,iv:22J5SZbFtYco7iSHvD2GD1bcazfGWlyEJ2isa3Ab4bI=,tag:BeUn9Srl2vyoDgK5Xv0UCg==,type:str]
|
|
||||||
sops:
|
|
||||||
kms: []
|
|
||||||
gcp_kms: []
|
|
||||||
azure_kv: []
|
|
||||||
hc_vault: []
|
|
||||||
age:
|
|
||||||
- recipient: age1fq9ckkwtgvm69w045rf9pgurnhch6ukdxejr8yxgrthn7j8vp48qvd9rkx
|
|
||||||
enc: |
|
|
||||||
-----BEGIN AGE ENCRYPTED FILE-----
|
|
||||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBEbHZZUVF1dVJSU1NvNXVk
|
|
||||||
N3VtTm00ZHRWb082T0FkNXJncUxCU3haVmpVCk9FQkJBZnVJVFNLOThjZzlxNVF1
|
|
||||||
b0phQ2daejRrdVhEZ2YvRHVRRU5BQlEKLS0tIGdQeDlOSzl4VDhGNURQditCWUFG
|
|
||||||
dWVzbzUyakxXUGpTQjNsYzcyVG1aRDgKXVa8tIAbmggw1vSt3NJYRLgXhbagpNrX
|
|
||||||
RNXyndPaeQXVPVXuJWmHgRCYbwPTcfAFpGwFlX2IxVLlmC914Zklhw==
|
|
||||||
-----END AGE ENCRYPTED FILE-----
|
|
||||||
lastmodified: "2024-04-19T15:58:46Z"
|
|
||||||
mac: ENC[AES256_GCM,data:BLa0G3ci8EWH43UkLI2OoFJp2F9YeuKDrg6+2I/bq/lLi/YUitkJvBkA9VSIbvCyYWs/5SlEL5MayX8iiVdJ7r9bCiw+LVsWNAdaYDCafbZRW5F7KiHS5WXV3v4c201kFok7rmnRhEfKfdDxLlQ/mFHqOhupHU/qCNMTuUzJBiA=,iv:EPRoXHVMB6I16lTFJdFVAuSnMD/B55fPYtSBOQddutE=,tag:gohg+BdRlMPAQmNpRdk8sg==,type:str]
|
|
||||||
pgp:
|
|
||||||
- created_at: "2024-03-02T22:10:50Z"
|
|
||||||
enc: |-
|
|
||||||
-----BEGIN PGP MESSAGE-----
|
|
||||||
|
|
||||||
hF4D5fSX77p80GYSAQdAvGVUu56Pd2+DMHqgIcJokyh11952nQK2eVtQNj42CAUw
|
|
||||||
NQfulNRUHX5BonsLyvXPx74bVku6Wxr80loIWoz049/xbFj4S7FyftkakY8rOUGu
|
|
||||||
1GgBCQIQOoEFvTQB8qGbea/85fktuljXPou/WgUY6Mxd4n0dBz54f69B/NttnBGc
|
|
||||||
7eUDKfe79Omr0o/0CVC/6SGKoiS38suV903QHeF1MXFPeOG72k4TvfF9lVlBgK8H
|
|
||||||
k4DXtzC7wm3WWg==
|
|
||||||
=eh7Z
|
|
||||||
-----END PGP MESSAGE-----
|
|
||||||
fp: 28D140BCA60B4FD1
|
|
||||||
unencrypted_suffix: _unencrypted
|
|
||||||
version: 3.8.1
|
|
||||||
@@ -1,168 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
materusArg,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
programs.gamemode.enable = true;
|
|
||||||
programs.corectrl.enable = true;
|
|
||||||
|
|
||||||
services.teamviewer.enable = true;
|
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [ "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}" ];
|
|
||||||
|
|
||||||
# Gamepad
|
|
||||||
services.udev = {
|
|
||||||
packages = with pkgs; [
|
|
||||||
game-devices-udev-rules
|
|
||||||
];
|
|
||||||
};
|
|
||||||
hardware.uinput.enable = true;
|
|
||||||
hardware.steam-hardware.enable = true;
|
|
||||||
|
|
||||||
nix.package = pkgs.nixVersions.nix_2_28;
|
|
||||||
programs.steam = {
|
|
||||||
enable = false;
|
|
||||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
|
||||||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
|
||||||
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
|
|
||||||
};
|
|
||||||
services.flatpak.enable = true;
|
|
||||||
services.gvfs.enable = true;
|
|
||||||
|
|
||||||
services.xserver.xkb.layout = "pl";
|
|
||||||
|
|
||||||
services.xserver.enable = true;
|
|
||||||
#services.xserver.videoDrivers = [ "amdgpu" "intel" ];
|
|
||||||
services.dbus.enable = true;
|
|
||||||
services.dbus.packages = [ pkgs.gcr ];
|
|
||||||
|
|
||||||
services.xserver.displayManager.startx.enable = false;
|
|
||||||
|
|
||||||
services.xserver.exportConfiguration = true;
|
|
||||||
services.xserver.extraConfig = pkgs.lib.mkDefault ''
|
|
||||||
Section "OutputClass"
|
|
||||||
Identifier "amd-options"
|
|
||||||
Option "TearFree" "True"
|
|
||||||
Option "SWCursor" "True"
|
|
||||||
Option "VariableRefresh" "true"
|
|
||||||
Option "AsyncFlipSecondaries" "true"
|
|
||||||
Option "DRI3" "1"
|
|
||||||
MatchDriver "amdgpu"
|
|
||||||
EndSection
|
|
||||||
|
|
||||||
'';
|
|
||||||
|
|
||||||
services.printing.enable = true;
|
|
||||||
|
|
||||||
services.libinput.enable = true;
|
|
||||||
|
|
||||||
environment.sessionVariables = {
|
|
||||||
XDG_CACHE_HOME = "\${HOME}/.cache";
|
|
||||||
XDG_CONFIG_HOME = "\${HOME}/.config";
|
|
||||||
XDG_BIN_HOME = "\${HOME}/.local/bin";
|
|
||||||
XDG_DATA_HOME = "\${HOME}/.local/share";
|
|
||||||
QT_XKB_CONFIG_ROOT = "\${XKB_CONFIG_ROOT}";
|
|
||||||
GTK_IM_MODULE = "fcitx";
|
|
||||||
QT_IM_MODULE = "fcitx";
|
|
||||||
XMODIFIERS = "@im=fcitx";
|
|
||||||
SDL_IM_MODULE = "fcitx";
|
|
||||||
|
|
||||||
MOZ_USE_XINPUT2 = "1";
|
|
||||||
PATH = [ "\${XDG_BIN_HOME}" ];
|
|
||||||
};
|
|
||||||
environment.shellInit = ''
|
|
||||||
if ! [ -z "$DISPLAY" ]; then xhost +si:localuser:root &> /dev/null; fi;
|
|
||||||
if ! [ -z "$DISPLAY" ]; then xhost +si:localuser:$USER &> /dev/null; fi;
|
|
||||||
'';
|
|
||||||
|
|
||||||
i18n.inputMethod.enabled = "fcitx5";
|
|
||||||
i18n.inputMethod.fcitx5.addons = [
|
|
||||||
pkgs.kdePackages.fcitx5-configtool
|
|
||||||
pkgs.fcitx5-lua
|
|
||||||
pkgs.fcitx5-mozc
|
|
||||||
pkgs.fcitx5-gtk
|
|
||||||
pkgs.kdePackages.fcitx5-qt
|
|
||||||
];
|
|
||||||
|
|
||||||
services.pcscd.enable = true;
|
|
||||||
|
|
||||||
services.samba-wsdd.enable = true;
|
|
||||||
services.samba-wsdd.openFirewall = true;
|
|
||||||
services.samba = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.sambaFull;
|
|
||||||
securityType = "user";
|
|
||||||
openFirewall = true;
|
|
||||||
settings = {
|
|
||||||
global = {
|
|
||||||
"workgroup" = "WORKGROUP";
|
|
||||||
"server string" = "smbmaterus";
|
|
||||||
"netbios name " = "smbmaterus";
|
|
||||||
"security" = "user";
|
|
||||||
"hosts allow" = "192.168.122. 127.0.0.1 localhost";
|
|
||||||
"hosts deny" = "0.0.0.0/0";
|
|
||||||
"guest account" = "nobody";
|
|
||||||
"map to guest" = "bad user";
|
|
||||||
"allow insecure wide links" = "yes";
|
|
||||||
};
|
|
||||||
windows = {
|
|
||||||
"path" = "/materus/data/VM/windows_shared";
|
|
||||||
"browseable" = "yes";
|
|
||||||
"read only" = "no";
|
|
||||||
"guest ok" = "no";
|
|
||||||
"create mask" = "0644";
|
|
||||||
"directory mask" = "0755";
|
|
||||||
"force user" = "materus";
|
|
||||||
"force group" = "users";
|
|
||||||
"follow symlinks" = "yes";
|
|
||||||
"wide links" = "yes";
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.gnupg.agent = {
|
|
||||||
enable = true;
|
|
||||||
enableSSHSupport = false;
|
|
||||||
enableBrowserSocket = true;
|
|
||||||
|
|
||||||
};
|
|
||||||
programs.ssh.startAgent = true;
|
|
||||||
services.openssh.enable = true;
|
|
||||||
services.openssh.settings.PermitRootLogin = "no";
|
|
||||||
services.openssh.settings.PasswordAuthentication = false;
|
|
||||||
services.openssh.openFirewall = true;
|
|
||||||
|
|
||||||
services.sunshine = {
|
|
||||||
enable = true;
|
|
||||||
capSysAdmin = true;
|
|
||||||
openFirewall = true;
|
|
||||||
autoStart = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.enableAllTerminfo = true;
|
|
||||||
environment.pathsToLink = [
|
|
||||||
"/share/zsh"
|
|
||||||
"/share/bash-completion"
|
|
||||||
"/share/fish"
|
|
||||||
];
|
|
||||||
environment.shells = with pkgs; [
|
|
||||||
zsh
|
|
||||||
bashInteractive
|
|
||||||
fish
|
|
||||||
];
|
|
||||||
programs = {
|
|
||||||
fish.enable = true;
|
|
||||||
command-not-found.enable = false;
|
|
||||||
dconf.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
materus.profile.browser.enable = true;
|
|
||||||
|
|
||||||
services.davfs2.enable = true;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
home.stateVersion = "23.05";
|
|
||||||
home.homeDirectory = "/home/materus";
|
|
||||||
materus.profile = {
|
|
||||||
fonts.enable = false;
|
|
||||||
nixpkgs.enable = false;
|
|
||||||
enableDesktop = false;
|
|
||||||
enableTerminal = false;
|
|
||||||
enableTerminalExtra = false;
|
|
||||||
enableNixDevel = false;
|
|
||||||
|
|
||||||
fish.enable = false;
|
|
||||||
bash.enable = true;
|
|
||||||
zsh.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
{ materusCfg, ... }:
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
|
|
||||||
] ++ (if (materusCfg.materusFlake.decrypted) then [ ./private ] else [ ]);
|
|
||||||
|
|
||||||
sops.age.generateKey = false;
|
|
||||||
sops.gnupg.home = null;
|
|
||||||
sops.gnupg.sshKeyPaths = [ ];
|
|
||||||
sops.defaultSopsFile = materusCfg.hostPath + "/secrets/secrets.yaml";
|
|
||||||
|
|
||||||
sops.secrets.wireguard = { };
|
|
||||||
sops.secrets.discord-token = {};
|
|
||||||
sops.secrets.spotify-client-id = {};
|
|
||||||
sops.secrets.spotify-client-secret = {};
|
|
||||||
sops.secrets.youtube-api = {};
|
|
||||||
sops.secrets.certs = {};
|
|
||||||
sops.secrets.steamladder-api = {};
|
|
||||||
sops.secrets.webarchive-accesskey = {};
|
|
||||||
sops.secrets.webarchive-secretkey = {};
|
|
||||||
|
|
||||||
services.openssh.hostKeys = [
|
|
||||||
{
|
|
||||||
bits = 4096;
|
|
||||||
path = "/materus/root/ssh_host_rsa_key";
|
|
||||||
type = "rsa";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
path = "/materus/root/ssh_host_ed25519_key";
|
|
||||||
type = "ed25519";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
|
||||||
Binary file not shown.
Binary file not shown.
@@ -1,41 +0,0 @@
|
|||||||
wireguard: ENC[AES256_GCM,data:i98U0ugxbNqWNuKR8u+mdWoSMLViHXfsWRBS1lvjb+hgGxveyzjBcagBIeY=,iv:/hF9oH2R6NSeHT/UQTlbmtx+gPX/3CJOLPNnxrzsY/g=,tag:2ub5w8uH2O1B2hoku8Kowg==,type:str]
|
|
||||||
discord-token: ENC[AES256_GCM,data:JQ/6MJvBlJpKzs/L0hFB1LPpQSfJvDdEB6YerVZyDqGo7plA0S5wORACgA88Dei1x1NGsXhYtiwT4vE9jjeCOlWXZdl1mA==,iv:BsDu1De0qLX/8VDiZ5co1q1LXxkz/Som9+hvm/67/xU=,tag:YO0wQNF3/AXbifpeAa935Q==,type:str]
|
|
||||||
spotify-client-id: ENC[AES256_GCM,data:WK7CJGw6mtIG3Jfp59cWx3ool4z1P09TvHcpbOQ2JV0=,iv:EaJ5ecXdmx0Ky+43xZITM811IOo4EisvPSyogXrJXng=,tag:NYTI4vLsWGa695CJ+TIgbw==,type:str]
|
|
||||||
spotify-client-secret: ENC[AES256_GCM,data:TnR+zLLklTfzMdR4woaZWuMVJQ9VIYsFM588GRO6WCY=,iv:cYiqw8ZdMgLeug4ptwPV3L+MeY6xIldfUBfiYg1mFD8=,tag:YDLh6BXFcBHnpdgM7e87wg==,type:str]
|
|
||||||
youtube-api: ENC[AES256_GCM,data:qmpFlFvudS9rXQfN+Th/UrPWCW0mg5GkpMucS/01AmOnlChqtojC,iv:q3bKwI2I6BNa3L9ezKCE1fWT/vZLiJ8uzug1z2z+TWA=,tag:gKG3HTz8jp2LAFh8e8O6sg==,type:str]
|
|
||||||
steamladder-api: ENC[AES256_GCM,data:m30o5atqugwqn/WbXGkUq5GvqiIKQT0kSRQCtHc1Gxk/dC3YcbDvMw==,iv:duLKl1NvysD0XMaUOkl/6nclMQB6seXcQYkGMrm7K7Y=,tag:9dw+UH10uAdca5fVdlw1Mg==,type:str]
|
|
||||||
webarchive-accesskey: ENC[AES256_GCM,data:jdKlHsZq2Dkk1BcBfUVv5g==,iv:BXCgPb/2W57PYXxRktInz1LxSEwlw6m3xnQU4TOPMeY=,tag:kK4+InaH7K4D4n1hyGaR+w==,type:str]
|
|
||||||
webarchive-secretkey: ENC[AES256_GCM,data:t7lZ1aA72BrBxaE+jXmE3w==,iv:A8PF/MyRTIluqEzzt4uCw7eNCYDXAt4iB29PSrwlVyY=,tag:6HbtcrFeFcpagjzPXOANzA==,type:str]
|
|
||||||
certs: ENC[AES256_GCM,data:ttmSNTTx51a3L2HTC8RnSphDLHO2OSyIgXQ0YpZGySTdu69mgEyhaiSi+IAXg/1AHKRjpFJgE4fhsLAiW78pNYb+Zg7aDL47YtABO99sTZrZnBxZo6k6itpZ3oClDch2ZALzoXChLroc0tUbZKwsfOwGe3pw9lOJZJT34AhV+BVoXDDLQcpQoxz23Baa8oxklecT6wpJ1u1nW+aAHw33gm41Vw==,iv:b0aNZwaRKBg+ipe5+19BowyFbCjZt52S738om6emYGo=,tag:lUqtcc4vVWKx/fnc19vj7A==,type:str]
|
|
||||||
sops:
|
|
||||||
kms: []
|
|
||||||
gcp_kms: []
|
|
||||||
azure_kv: []
|
|
||||||
hc_vault: []
|
|
||||||
age:
|
|
||||||
- recipient: age1wscr6kv8393wv0fjaux8juplaxq55znlzrp62qyteq0fauu3yg0s7d7k98
|
|
||||||
enc: |
|
|
||||||
-----BEGIN AGE ENCRYPTED FILE-----
|
|
||||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBSRXNLdUZaVU13alNhVGgz
|
|
||||||
aXdMb3IzNjNQcHJFV2JLNVM2SUVBa3VNZlRFCkxxd21CTWVDUkVXbzR6ZEkxbm5J
|
|
||||||
VGorSkp6a2xSdHRHcFk5T3VYVlJJa0UKLS0tIE1WdHo5eTlpNEEyN25oSjk1KzdS
|
|
||||||
d2dMUUh1RDB3UnpEdFJsNHpQRXFWemMKc41dlOapTsvH91QLNhdPbrzerPFakOiX
|
|
||||||
J/uoZDMIhsmQxgQM7Fqxr05NywhI/ZjOtJS2bayp73O57xjjMYcyNQ==
|
|
||||||
-----END AGE ENCRYPTED FILE-----
|
|
||||||
lastmodified: "2024-11-18T09:01:39Z"
|
|
||||||
mac: ENC[AES256_GCM,data:CVsqff1qCcxyQ0e78ewottYKgqA2rG3j1m8X0Sb8If3qibAiBMMblc8T0doB+Fg4dVhPpbJSZdCx4JiV7sHopv2wNdguXd6Xe0L8iJqWtBeHTGTxSLvJ8UIHknak9c+JeQzZz8jAkbHYUXsc7VyeJaXoQptosz1BbE74D48Xjrg=,iv:0e+etjwabJx7PXgDUoh41Ha3aziQxBlH6QJZGG02ME0=,tag:oQIf503tmFlPoLE5d8Y24w==,type:str]
|
|
||||||
pgp:
|
|
||||||
- created_at: "2024-03-21T22:55:36Z"
|
|
||||||
enc: |-
|
|
||||||
-----BEGIN PGP MESSAGE-----
|
|
||||||
|
|
||||||
hF4D5fSX77p80GYSAQdA667A9P/3ktuS2iEjxkv3aYMAGSu0oPGIX7dsC23VVgkw
|
|
||||||
OmcwhXxBnipcG+izbtNylXz5VonyyKHwdR2QIgkt9FEuC8lI17GHVyogTCFiP7Dj
|
|
||||||
1GgBCQIQN4EqFdiXqzJUeeE+PdOzVPs+1kStz+S1H22NjrJAFv67cbyIgwpItuXD
|
|
||||||
Sfao+MU1HWDY4iKZrcfWArUgpQj/pvsmUeJ72iXD3bkTTrK61g3GZA+g9lFewl/B
|
|
||||||
SORJMu9btS4GAw==
|
|
||||||
=aBMP
|
|
||||||
-----END PGP MESSAGE-----
|
|
||||||
fp: 28D140BCA60B4FD1
|
|
||||||
unencrypted_suffix: _unencrypted
|
|
||||||
version: 3.8.1
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
{
|
|
||||||
home.stateVersion = "23.11";
|
|
||||||
home.homeDirectory = "/home/materus";
|
|
||||||
materus.profile = {
|
|
||||||
fonts.enable = false;
|
|
||||||
nixpkgs.enable = false;
|
|
||||||
enableDesktop = false;
|
|
||||||
enableTerminal = false;
|
|
||||||
enableTerminalExtra = false;
|
|
||||||
enableNixDevel = false;
|
|
||||||
|
|
||||||
fish.enable = false;
|
|
||||||
bash.enable = true;
|
|
||||||
zsh.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
{ materusCfg, ... }:
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
|
|
||||||
] ++ (if (materusCfg.materusFlake.decrypted) then [ ./private ] else [ ]);
|
|
||||||
|
|
||||||
sops.age.generateKey = false;
|
|
||||||
sops.gnupg.home = null;
|
|
||||||
sops.gnupg.sshKeyPaths = [ ];
|
|
||||||
sops.defaultSopsFile = materusCfg.hostPath + "/secrets/secrets.yaml";
|
|
||||||
|
|
||||||
services.openssh.hostKeys = [
|
|
||||||
{
|
|
||||||
bits = 4096;
|
|
||||||
path = "/materus/root/ssh_host_rsa_key";
|
|
||||||
type = "rsa";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
path = "/materus/root/ssh_host_ed25519_key";
|
|
||||||
type = "ed25519";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
sops.secrets.wireguard = { };
|
|
||||||
sops.secrets."users/materus" = { neededForUsers = true; };
|
|
||||||
sops.secrets.elements = { };
|
|
||||||
sops.secrets.nextcloud-adminpass = { };
|
|
||||||
sops.secrets.maloja = { };
|
|
||||||
sops.secrets.maloja-api = { };
|
|
||||||
sops.secrets.spotify-client-id = {};
|
|
||||||
sops.secrets.spotify-client-secret = {};
|
|
||||||
sops.secrets.lastfm-user= {};
|
|
||||||
sops.secrets.lastfm-pass = {};
|
|
||||||
sops.secrets.lastfm-api = {};
|
|
||||||
sops.secrets.lastfm-secret = {};
|
|
||||||
sops.secrets.lastfm-token = {};
|
|
||||||
sops.secrets.listenbrainz-api = {};
|
|
||||||
}
|
|
||||||
Binary file not shown.
@@ -1,52 +0,0 @@
|
|||||||
wireguard: ENC[AES256_GCM,data:fFQKj78HGLDmslDST+usAZxWDanHkUORBgIeOb7lQN4EPXdz6mQODHhn1ek=,iv:/BbbiFlfk8fMX4yFgVXuYkxitbRJqai5PHku2wZUFw4=,tag:cutoXkApljbB3bgSvaS1LQ==,type:str]
|
|
||||||
nextcloud-adminpass: ENC[AES256_GCM,data:5vohRPEcJJ8gIRro38O73ufSYYEp1DXpBgjCPdPnMcg=,iv:STh3k5wUwx3AfSDTPCXhuXbPb3d+Vi1cAaQN2a9eW1w=,tag:Ef/Z2Idvl6575Jvs2GDJ8A==,type:str]
|
|
||||||
jwt: ENC[AES256_GCM,data:1Qn7DaBZr8vEa8VZiv2BpwePPOBYRTdHEiDv0asUbvhCtfHvhG4mX5/plyRPlQok6FLEjEzKZTEdnvyyOtFEgA==,iv:kqfHkEr0jkKAro9gQup6CeopQnjfMGhEqbVL81wnDgc=,tag:gP/WACy5cOzzmQOh1v8wsQ==,type:str]
|
|
||||||
lldap-database: ENC[AES256_GCM,data:rNLS4WwvqRd3TFWDXaf8UmDTRsHZNPPS,iv:URV4Oz4ik2vHb03+Zh7ND+AbozSmoXpxENpvad4yvRI=,tag:6TbuMCnHwtTaG5mMWVN/mQ==,type:str]
|
|
||||||
authelia-storagekey: ENC[AES256_GCM,data:T5b5QWf6vlGHniuUic0tEFSJNNWaFbvi3emZOWEQz0AhNqDpxJZqO57KdjZ02NVMoxHN54c0ChWlHRCoAj234A==,iv:Rch5RQ0oblTTWXz0it7zZuYQNYhYMa0MsorAx9N4GV0=,tag:+GlwGnPXLukzDnW6BUf6Hg==,type:str]
|
|
||||||
authelia-database: ENC[AES256_GCM,data:XZYk4clzLaMb3/plELOnEoy4bwu/YSQg,iv:TGDKjLdcdmwEI12XDDNGHTgYnJxB+vV6RaomKU+jwpY=,tag:c/p7X4tzPWWiLvAL7DJmYg==,type:str]
|
|
||||||
ldap-master: ENC[AES256_GCM,data:jiinK8xzuKiTwB9k44okgj+sWWEgbeay,iv:Slvci3EBylIbP/I6NFIJTd3eitxVApXrORtnXY48eGg=,tag:OwaVYBNxNbQyIHrqOcUGhg==,type:str]
|
|
||||||
elements: ENC[AES256_GCM,data:Kh6ueReXpj9h5yQ3P0qY8X1ow4RRZD9zyXZLS6DUIIVuthgqgu9dPzBc7ojnz6nXoYTHt1I2LJJKLOGQYZC+iVxXOk+QADJMPwY4NCyeZ3prgvYMghlD,iv:WFA/UQ0XDFjpbgaDEacrBxkteLitXv3CJP54ANVSJHM=,tag:M+tTpTR0alvQxvUiP2MWlA==,type:str]
|
|
||||||
users:
|
|
||||||
materus: ENC[AES256_GCM,data:MhPrMJ4/0oxEsFZDUKcYb3WMUWLI2ZbRTgnh1fQZG1Ly2J781jcUWtA8vVAdMBedNfWky0mDq5+KEQ/2fJNGU4IkTBvLdAqnWw==,iv:Dpl+M+x1weNIVkEsf3I/uXpG0SM6bDz+d9w7AYwn/MY=,tag:yGc1D2ODp6Te/QAztOj7yA==,type:str]
|
|
||||||
maloja: ENC[AES256_GCM,data:V/WV0181zupKLiDtf5pinwYFFzL1hg+j,iv:KmGHapsD7thnmgkHwnTYFP/fvBS6dft9ZmmFN4AZEXs=,tag:uEmZaFkvBIQfu+3+0gQFlg==,type:str]
|
|
||||||
maloja-api: ENC[AES256_GCM,data:8vLC1a5pL8ldS7LWXqA/HOqtnyYFQk7/oisGgOOYH7TtnpBL93I2O3mWQIGCZUwWqMWFLvbOxIAnpoS0Qmg=,iv:swziHFypoh1YZkyEpDhqH2BhqUrWi0J63CqzORyY4s4=,tag:B9kkYHqyWP0KGPMD4S1I1A==,type:str]
|
|
||||||
spotify-client-id: ENC[AES256_GCM,data:2vC2E7rHBrZ2VHTGqYRJp1fWNWprDaYq4J6gJ7tTfF0=,iv:KQJgzUiD70N2vQeTO9r8ucC96xc9mSW9VlU2IGmKT7Y=,tag:kWR+1Hhb4yGK/AAqxMCd3A==,type:str]
|
|
||||||
spotify-client-secret: ENC[AES256_GCM,data:MKHo36AF1hHiXERltKdeMiuMhiGyyH8E3TqQfTf1tqc=,iv:/dPWUqjDtxZUOLZRx2lrHuU5Sf2fch2Fvnl+20KZ5dk=,tag:ZgsbCFBNHXSUuHbdSlrm4w==,type:str]
|
|
||||||
lastfm-user: ENC[AES256_GCM,data:o/FUjIiB9PcFTQ==,iv:UtovNmHISz9jUj+HFZPIduZj6h3ayjA5RyVlh11k8LM=,tag:bS3ReGR2BRcs3lcutt95UQ==,type:str]
|
|
||||||
lastfm-pass: ENC[AES256_GCM,data:g90kxN+HkSqN+B9XFH6AvbD376bHFPVI,iv:ZRxKxdKXIgKOm7TKKPLR1yLzTBjuCWQk4tTJN5d/0N4=,tag:soIJI75WAhoiXwVYlxkmQA==,type:str]
|
|
||||||
lastfm-api: ENC[AES256_GCM,data:UxGOqFEsjDb5zBXjm6G+66zlr5M0pk/NdTad3a5MBVE=,iv:3v9Lg0bjmlAhcSOjCW44CN7FezSdNG3KVVLrk1G9Ies=,tag:amgDr25PYiB+E7+D/fVEOw==,type:str]
|
|
||||||
lastfm-secret: ENC[AES256_GCM,data:z+XqodyRm9qnZwYwdON/KwAQ3E6hSI+mA0Nby0PQVT4=,iv:sY3Eqr7ZCx5lwjZaRFSghx/3OjuWlDQHQywgt7LpoIo=,tag:f7j1PFanHfLdDK+ASusCMA==,type:str]
|
|
||||||
lastfm-token: ENC[AES256_GCM,data:X877lDOXtou5OF0KbkvuJ4rhJ+3IY5XnyXlqq4LuSb8=,iv:f8t36ut6zlHvBuKGmJabyc9nHViQvUcqNvCVy0YIeB8=,tag:0h9Jm1h2cxegUXXk6UTz9Q==,type:str]
|
|
||||||
listenbrainz-api: ENC[AES256_GCM,data:eh03MPc5kn7CUDXXnEJTx4DXv9BpyabyRL+ENDFJw+kS66tV,iv:gerOaZ3gqM7ccLursFuCJrW1HcSjlTGk0wOLM8x4/2A=,tag:ZqxYNlgdqV0zRUUHm7VK3Q==,type:str]
|
|
||||||
sops:
|
|
||||||
kms: []
|
|
||||||
gcp_kms: []
|
|
||||||
azure_kv: []
|
|
||||||
hc_vault: []
|
|
||||||
age:
|
|
||||||
- recipient: age1j34lqh0z6ak2c94n564wgyjeykn9srma34f5e5e7xvf498fwk3rqxvwx0l
|
|
||||||
enc: |
|
|
||||||
-----BEGIN AGE ENCRYPTED FILE-----
|
|
||||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAvejRrcGVwZHNkTVB5dkYr
|
|
||||||
RnhVVjNEblFVd0xXSStqdjFhWVVNS3ljUTNZCnBFVmRRVVVENGhJUVg2L1lSM1NO
|
|
||||||
dkQydVhOaFVxd0p0aFhVcmp6eXdGeVEKLS0tIFIvRDlvZDdsbm1USEZUZ3FYMmla
|
|
||||||
eFN4VVdUMkVjcTVWNFdLM0xtbExLdncK6LYUufWzIcd2jFyEeZDypo0xkJQ4z91F
|
|
||||||
ULyGxJLLWl6/inYXtxHNdxIIPfwW+5yppBAbXaOgvABi1E7tf1JZcA==
|
|
||||||
-----END AGE ENCRYPTED FILE-----
|
|
||||||
lastmodified: "2024-09-13T18:29:55Z"
|
|
||||||
mac: ENC[AES256_GCM,data:djOmSpNrZoFgUK4JlueCUpZtvHldVEsH90ASO+strLJ7wd1MEFdQaYyNonvTaUUzJQkUncyX3cXdO9Aoj9B6CPSKAuSKE7LRScCCXn+OezwUB5d5m/jLy4KmRhtADO0QHap4+/3fXzOupsHyZpVMIjwUw4tJ9MZMT8iMtbaHv2A=,iv:x4RaxRelUOyyTWpTLFRik92TibE+2mFctz/OYHvBoZA=,tag:S9dIzTc7rVBSFXUISuEDAQ==,type:str]
|
|
||||||
pgp:
|
|
||||||
- created_at: "2024-03-21T18:15:00Z"
|
|
||||||
enc: |-
|
|
||||||
-----BEGIN PGP MESSAGE-----
|
|
||||||
|
|
||||||
hF4D5fSX77p80GYSAQdAWetrf0jhs/b9qcQc4b21+PJUPdSjk372BjokfwJ2oXQw
|
|
||||||
4LaIaNB3LRmY4FF3UOqk28NwkwBw6n0AzYKC/k1G4ntaNBMI9eDtFJ1c1+KkxSl2
|
|
||||||
1GYBCQIQMCKcu2aBEMiIGOyG08vcRW2T23DUAfTQqQdRKD/SgSTqAZLSICVJ91xU
|
|
||||||
TBsdiPBKO2cRDfPc7DlVLbPNe/SUqVUX9N4GTGPUocXc1s6lvgx3NBP5cGoSNx+A
|
|
||||||
xCmXl373IDc=
|
|
||||||
=uSyc
|
|
||||||
-----END PGP MESSAGE-----
|
|
||||||
fp: 28D140BCA60B4FD1
|
|
||||||
unencrypted_suffix: _unencrypted
|
|
||||||
version: 3.8.1
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
{ materusArg, config, lib, pkgs, ... }:
|
|
||||||
{
|
|
||||||
options.waffentragerService.mount-acme.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable mount-acme";
|
|
||||||
|
|
||||||
config =
|
|
||||||
let
|
|
||||||
cfg = config.waffentragerService.mount-acme;
|
|
||||||
in
|
|
||||||
lib.mkIf cfg.enable {
|
|
||||||
environment.systemPackages = with pkgs; [ sshfs ];
|
|
||||||
systemd.mounts = [{
|
|
||||||
description = "Mount remote acme dir from valkyrie";
|
|
||||||
what = "acme@valkyrie:/var/lib/acme";
|
|
||||||
where = "/var/lib/mnt_acme";
|
|
||||||
type = "fuse.sshfs";
|
|
||||||
options = "reconnect,gid=${builtins.toString config.ids.gids.nginx},_netdev,rw,nosuid,allow_other,default_permissions,follow_symlinks,idmap=user,compression=yes,identityfile=/materus/root/ssh_host_ed25519_key";
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
{ config, pkgs, lib, materusCfg, ... }:
|
|
||||||
let
|
|
||||||
materusArg = {
|
|
||||||
pkgs = (import materusCfg.nixerus { inherit pkgs; }) //
|
|
||||||
(if pkgs.system == "x86_64-linux" then { i686Linux = import materusCfg.nixerus { pkgs = pkgs.pkgsi686Linux; }; } else { });
|
|
||||||
cfg = materusCfg;
|
|
||||||
unstable = import materusCfg.materusFlake.inputs.nixpkgs { system = materusCfg.arch; config = { allowUnfree = true; nvidia.acceptLicense = true; }; };
|
|
||||||
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./nixpkgs.nix
|
|
||||||
./packages
|
|
||||||
./private
|
|
||||||
];
|
|
||||||
options.materus.materusArg = lib.mkOption { default = { }; };
|
|
||||||
config._module.args.materusArg = config.materus.materusArg // materusArg;
|
|
||||||
config.assertions = [
|
|
||||||
{
|
|
||||||
assertion = materusCfg.materusFlake.decrypted;
|
|
||||||
message = "Repository not decrypted, use crypt.sh to decrypt";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,99 +0,0 @@
|
|||||||
{ config, pkgs, lib, materusArg, materusCfg, ... }:
|
|
||||||
let
|
|
||||||
mkBoolOpt = default: description: lib.mkOption {
|
|
||||||
inherit default;
|
|
||||||
inherit description;
|
|
||||||
type = lib.types.bool;
|
|
||||||
example = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
cfg = config.materus.profile.nixpkgs;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.materus.profile.nixpkgs.enable = mkBoolOpt false "Enable materus nixpkgs config";
|
|
||||||
options.materus.profile.nixpkgs.enableOverlays = mkBoolOpt (cfg.enable) "Enable materus overlays";
|
|
||||||
options.materus.profile.nix.enableRegistry = mkBoolOpt (!materusCfg.isHm) "Enable materus nix registry";
|
|
||||||
|
|
||||||
config.nixpkgs.config = lib.mkIf cfg.enable {
|
|
||||||
allowUnfree = lib.mkDefault true;
|
|
||||||
joypixels.acceptLicense = lib.mkDefault true;
|
|
||||||
};
|
|
||||||
config.nixpkgs.overlays = lib.mkIf cfg.enableOverlays [ materusArg.cfg.configInputs.emacs-overlay.overlay ];
|
|
||||||
|
|
||||||
config.nix.package = lib.mkDefault pkgs.nixVersions.latest;
|
|
||||||
config.nix.registry = lib.mkIf config.materus.profile.nix.enableRegistry {
|
|
||||||
nixpkgs-stable = {
|
|
||||||
from = { type = "indirect"; id = "nixpkgs-stable"; };
|
|
||||||
flake = materusCfg.materusFlake.inputs.nixpkgs-stable;
|
|
||||||
};
|
|
||||||
nixpkgs-unstable = {
|
|
||||||
from = { type = "indirect"; id = "nixpkgs-unstable"; };
|
|
||||||
flake = materusCfg.materusFlake.inputs.nixpkgs;
|
|
||||||
};
|
|
||||||
|
|
||||||
nixpkgs = {
|
|
||||||
from = { type = "indirect"; id = "nixpkgs"; };
|
|
||||||
flake = materusCfg.configInputs.nixpkgs;
|
|
||||||
};
|
|
||||||
|
|
||||||
emacs-overlay = {
|
|
||||||
from = { type = "indirect"; id = "emacs-overlay"; };
|
|
||||||
flake = materusCfg.configInputs.emacs-overlay;
|
|
||||||
};
|
|
||||||
|
|
||||||
flake-utils = {
|
|
||||||
from = { type = "indirect"; id = "flake-utils"; };
|
|
||||||
flake = materusCfg.configInputs.flake-utils;
|
|
||||||
};
|
|
||||||
|
|
||||||
nixos-hardware = {
|
|
||||||
from = { type = "indirect"; id = "nixos-hardware"; };
|
|
||||||
flake = materusCfg.configInputs.nixos-hardware;
|
|
||||||
};
|
|
||||||
|
|
||||||
nixerus = {
|
|
||||||
from = { type = "indirect"; id = "nixerus"; };
|
|
||||||
flake = materusCfg.configInputs.nixerus;
|
|
||||||
};
|
|
||||||
|
|
||||||
devshell = {
|
|
||||||
from = { type = "indirect"; id = "devshell"; };
|
|
||||||
flake = materusCfg.configInputs.devshell;
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
from = { type = "indirect"; id = "home-manager"; };
|
|
||||||
flake = materusCfg.configInputs.home-manager;
|
|
||||||
};
|
|
||||||
|
|
||||||
sops-nix = {
|
|
||||||
from = { type = "indirect"; id = "sops-nix"; };
|
|
||||||
flake = materusCfg.configInputs.sops-nix;
|
|
||||||
};
|
|
||||||
|
|
||||||
base16 = {
|
|
||||||
from = { type = "indirect"; id = "base16"; };
|
|
||||||
flake = materusCfg.configInputs.base16;
|
|
||||||
};
|
|
||||||
|
|
||||||
git-agecrypt = {
|
|
||||||
from = { type = "indirect"; id = "git-agecrypt"; };
|
|
||||||
flake = materusCfg.configInputs.git-agecrypt;
|
|
||||||
};
|
|
||||||
|
|
||||||
plasma-manager = {
|
|
||||||
from = { type = "indirect"; id = "plasma-manager"; };
|
|
||||||
flake = materusCfg.configInputs.plasma-manager;
|
|
||||||
};
|
|
||||||
|
|
||||||
nur = {
|
|
||||||
from = { type = "indirect"; id = "nur"; };
|
|
||||||
flake = materusCfg.configInputs.nur;
|
|
||||||
};
|
|
||||||
nix-vscode-extensions = {
|
|
||||||
from = { type = "indirect"; id = "nix-vscode-extensions"; };
|
|
||||||
flake = materusCfg.configInputs.nix-vscode-extensions;
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
materusArg,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with materusArg.pkgs.lib;
|
|
||||||
{
|
|
||||||
imports = [ ./fonts.nix ];
|
|
||||||
|
|
||||||
#Single Packages
|
|
||||||
options.materus.profile.packages.home-manager =
|
|
||||||
mkPrivateVar
|
|
||||||
materusArg.cfg.configInputs.home-manager.packages.${pkgs.system}.home-manager;
|
|
||||||
options.materus.profile.packages.firefox = mkPrivateVar (
|
|
||||||
pkgs.firefox.override { nativeMessagingHosts = [ pkgs.plasma-browser-integration ]; }
|
|
||||||
);
|
|
||||||
|
|
||||||
#Package Lists
|
|
||||||
options.materus.profile.packages.list.nixRelated = mkPrivateVar (
|
|
||||||
with pkgs;
|
|
||||||
[
|
|
||||||
nix-prefetch
|
|
||||||
nix-prefetch-scripts
|
|
||||||
nix-prefetch-github
|
|
||||||
nix-prefetch-docker
|
|
||||||
nixfmt-rfc-style
|
|
||||||
nix-top
|
|
||||||
nix-tree
|
|
||||||
nix-diff
|
|
||||||
nix-ld
|
|
||||||
nixpkgs-fmt
|
|
||||||
nixpkgs-review
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
options.materus.profile.packages.list.desktopApps = mkPrivateVar (
|
|
||||||
with pkgs;
|
|
||||||
[
|
|
||||||
(discord.override {
|
|
||||||
nss = nss_latest;
|
|
||||||
withOpenASAR = true;
|
|
||||||
withTTS = true;
|
|
||||||
})
|
|
||||||
tdesktop
|
|
||||||
syncplay
|
|
||||||
ani-cli
|
|
||||||
nextcloud-client
|
|
||||||
spotify
|
|
||||||
thunderbird
|
|
||||||
keepassxc
|
|
||||||
(aspellWithDicts (
|
|
||||||
ds: with ds; [
|
|
||||||
en
|
|
||||||
en-computers
|
|
||||||
en-science
|
|
||||||
pl
|
|
||||||
]
|
|
||||||
))
|
|
||||||
onlyoffice-bin
|
|
||||||
qalculate-qt
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
options.materus.profile.packages.list.terminalApps = mkPrivateVar (
|
|
||||||
with pkgs;
|
|
||||||
[
|
|
||||||
neofetch
|
|
||||||
ripgrep
|
|
||||||
fd
|
|
||||||
micro
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
{ pkgs, lib, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
defaultFonts = [
|
|
||||||
pkgs.dejavu_fonts
|
|
||||||
pkgs.freefont_ttf
|
|
||||||
pkgs.gyre-fonts
|
|
||||||
pkgs.liberation_ttf
|
|
||||||
pkgs.unifont
|
|
||||||
];
|
|
||||||
fonts = [
|
|
||||||
pkgs.noto-fonts
|
|
||||||
pkgs.noto-fonts-extra
|
|
||||||
pkgs.noto-fonts-emoji
|
|
||||||
pkgs.noto-fonts-cjk-sans
|
|
||||||
pkgs.noto-fonts-cjk-serif
|
|
||||||
pkgs.wqy_zenhei
|
|
||||||
pkgs.corefonts
|
|
||||||
pkgs.hack-font
|
|
||||||
pkgs.nerd-fonts.hack
|
|
||||||
|
|
||||||
] ++ defaultFonts;
|
|
||||||
|
|
||||||
moreFonts = [
|
|
||||||
pkgs.ubuntu_font_family
|
|
||||||
pkgs.monocraft
|
|
||||||
pkgs.nerd-fonts.droid-sans-mono
|
|
||||||
pkgs.nerd-fonts.meslo-lg
|
|
||||||
pkgs.nerd-fonts.profont
|
|
||||||
pkgs.nerd-fonts.fira-code
|
|
||||||
];
|
|
||||||
in
|
|
||||||
{
|
|
||||||
|
|
||||||
options.materus.profile.packages.list.fonts = lib.mkOption { default = fonts; readOnly = true; visible = false; };
|
|
||||||
options.materus.profile.packages.list.moreFonts = lib.mkOption { default = moreFonts; readOnly = true; visible = false; };
|
|
||||||
|
|
||||||
}
|
|
||||||
Binary file not shown.
@@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
osProfile = {
|
|
||||||
imports = [
|
|
||||||
./os
|
|
||||||
./common
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
homeProfile = {
|
|
||||||
imports = [
|
|
||||||
./common
|
|
||||||
./home
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
{ config, lib, pkgs, materusArg, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.materus.profile.browser;
|
|
||||||
osConfig = (if (builtins.hasAttr "osConfig" config._module.args) then config._module.args.osConfig else null);
|
|
||||||
in
|
|
||||||
{
|
|
||||||
|
|
||||||
options = let mkBoolOpt = materusArg.pkgs.lib.mkBoolOpt; in {
|
|
||||||
materus.profile.browser.firefox.enable = mkBoolOpt false "Enable Firefox with materus cfg";
|
|
||||||
materus.profile.browser.vivaldi.enable = mkBoolOpt false "Enable Vivaldi with materus cfg";
|
|
||||||
materus.profile.browser.brave.enable = mkBoolOpt false "Enable Brave with materus cfg";
|
|
||||||
|
|
||||||
};
|
|
||||||
#TODO: Make some config
|
|
||||||
config = lib.mkMerge [{
|
|
||||||
home.packages = [
|
|
||||||
(lib.mkIf cfg.firefox.enable config.materus.profile.packages.firefox)
|
|
||||||
(lib.mkIf cfg.vivaldi.enable pkgs.vivaldi)
|
|
||||||
(lib.mkIf cfg.brave.enable pkgs.brave)
|
|
||||||
] ++ [ (lib.mkIf (osConfig != null && osConfig.materus.profile.browser.enable) osConfig.materus.profile.browser.package)];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,85 +0,0 @@
|
|||||||
{ config, lib, pkgs, materusArg, ... }:
|
|
||||||
let
|
|
||||||
packages = cfg.packages;
|
|
||||||
cfg = config.materus.profile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./fonts.nix
|
|
||||||
./browser.nix
|
|
||||||
./xdg.nix
|
|
||||||
|
|
||||||
./shell
|
|
||||||
./editor
|
|
||||||
./terminal
|
|
||||||
|
|
||||||
];
|
|
||||||
options.materus.profile.enableDesktop = materusArg.pkgs.lib.mkBoolOpt false "Enable settings for desktop";
|
|
||||||
options.materus.profile.enableTerminal = materusArg.pkgs.lib.mkBoolOpt true "Enable settings for terminal";
|
|
||||||
options.materus.profile.enableTerminalExtra = materusArg.pkgs.lib.mkBoolOpt false "Enable extra settings for terminal";
|
|
||||||
options.materus.profile.enableNixDevel = materusArg.pkgs.lib.mkBoolOpt false "Enable settings for nix devel";
|
|
||||||
|
|
||||||
config =
|
|
||||||
{
|
|
||||||
|
|
||||||
home.packages = (if cfg.enableDesktop then packages.list.desktopApps else [ ]) ++
|
|
||||||
(if cfg.enableNixDevel then packages.list.nixRelated else [ ]) ++
|
|
||||||
(if cfg.enableTerminal then packages.list.terminalApps else [ ]);
|
|
||||||
#Desktop
|
|
||||||
programs.feh.enable = lib.mkDefault cfg.enableDesktop;
|
|
||||||
programs.mpv = lib.mkIf cfg.enableDesktop {
|
|
||||||
enable = true;
|
|
||||||
config = {
|
|
||||||
ytdl-format = "bestvideo+bestaudio";
|
|
||||||
slang="pl,pol,Polish,Polski,en,eng,English";
|
|
||||||
alang="ja,jp,jpn,Japanese,pl,pol,Polski,en,eng,English";
|
|
||||||
demuxer-max-bytes="500MiB";
|
|
||||||
demuxer-max-back-bytes="150MiB";
|
|
||||||
cache="yes";
|
|
||||||
cache-pause-wait="10";
|
|
||||||
cache-pause-initial="yes";
|
|
||||||
keep-open="yes";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
#Terminal
|
|
||||||
programs.git = {
|
|
||||||
enable = lib.mkDefault cfg.enableTerminal;
|
|
||||||
package = lib.mkDefault pkgs.gitFull;
|
|
||||||
delta.enable = lib.mkDefault cfg.enableTerminal;
|
|
||||||
lfs.enable = lib.mkDefault cfg.enableTerminal;
|
|
||||||
};
|
|
||||||
programs.gitui.enable = cfg.enableTerminalExtra;
|
|
||||||
|
|
||||||
programs.nix-index = {
|
|
||||||
enable = lib.mkDefault cfg.enableTerminal;
|
|
||||||
enableBashIntegration = lib.mkDefault config.programs.bash.enable;
|
|
||||||
enableFishIntegration = lib.mkDefault config.programs.fish.enable;
|
|
||||||
enableZshIntegration = lib.mkDefault config.programs.zsh.enable;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.direnv = {
|
|
||||||
enable = lib.mkDefault (cfg.enableTerminalExtra || cfg.enableNixDevel);
|
|
||||||
nix-direnv.enable = lib.mkDefault (cfg.enableNixDevel && (config.programs.direnv.enable == true));
|
|
||||||
enableBashIntegration = lib.mkDefault config.programs.bash.enable;
|
|
||||||
#enableFishIntegration = lib.mkDefault config.programs.fish.enable;
|
|
||||||
enableZshIntegration = lib.mkDefault config.programs.zsh.enable;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
programs.fzf = {
|
|
||||||
enable = lib.mkDefault cfg.enableTerminalExtra;
|
|
||||||
enableBashIntegration = lib.mkDefault config.programs.bash.enable;
|
|
||||||
enableFishIntegration = lib.mkDefault config.programs.fish.enable;
|
|
||||||
enableZshIntegration = lib.mkDefault config.programs.zsh.enable;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.eza.enable = lib.mkDefault cfg.enableTerminalExtra;
|
|
||||||
|
|
||||||
programs.yt-dlp.enable = lib.mkDefault cfg.enableTerminalExtra;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,159 +0,0 @@
|
|||||||
{ config, lib, pkgs, materusArg, materusCfg, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.materus.profile.editor.code;
|
|
||||||
ext = let
|
|
||||||
market =
|
|
||||||
(materusCfg.configInputs.nix-vscode-extensions.extensions."${materusCfg.arch}".forVSCodeVersion
|
|
||||||
config.programs.vscode.package.version);
|
|
||||||
marketNv =
|
|
||||||
(materusCfg.configInputs.nix-vscode-extensions.extensions."${materusCfg.arch}");
|
|
||||||
in with market;
|
|
||||||
with pkgs; [
|
|
||||||
#Cpp
|
|
||||||
open-vsx.twxs.cmake
|
|
||||||
vscode-extensions.ms-vscode.cpptools
|
|
||||||
vscode-marketplace.ms-vscode.cmake-tools
|
|
||||||
vscode-marketplace.cs128.cs128-clang-tidy
|
|
||||||
|
|
||||||
#Python
|
|
||||||
#vscode-marketplace.ms-python.python
|
|
||||||
#vscode-marketplace.ms-python.vscode-pylance
|
|
||||||
#vscode-marketplace.ms-python.debugpy
|
|
||||||
|
|
||||||
# CSharp
|
|
||||||
open-vsx.muhammad-sammy.csharp
|
|
||||||
|
|
||||||
#Java
|
|
||||||
vscode-marketplace.redhat.java
|
|
||||||
vscode-marketplace.vscjava.vscode-java-debug
|
|
||||||
vscode-marketplace.vscjava.vscode-java-test
|
|
||||||
vscode-marketplace.vscjava.vscode-gradle
|
|
||||||
vscode-marketplace.vscjava.vscode-java-dependency
|
|
||||||
|
|
||||||
#JS
|
|
||||||
vscode-marketplace.angular.ng-template
|
|
||||||
#DLang
|
|
||||||
open-vsx.webfreak.code-d
|
|
||||||
|
|
||||||
#Nix
|
|
||||||
open-vsx.jnoortheen.nix-ide
|
|
||||||
|
|
||||||
#Web
|
|
||||||
open-vsx.ecmel.vscode-html-css
|
|
||||||
open-vsx.formulahendry.auto-close-tag
|
|
||||||
|
|
||||||
#Lua
|
|
||||||
open-vsx.sumneko.lua
|
|
||||||
|
|
||||||
#YAML, XML
|
|
||||||
open-vsx.redhat.vscode-yaml
|
|
||||||
open-vsx.redhat.vscode-xml
|
|
||||||
|
|
||||||
#Git
|
|
||||||
open-vsx.donjayamanne.githistory
|
|
||||||
#open-vsx.mhutchie.git-graph
|
|
||||||
open-vsx.eamodio.gitlens
|
|
||||||
|
|
||||||
#Other
|
|
||||||
#open-vsx.asciidoctor.asciidoctor-vscode
|
|
||||||
open-vsx.ms-azuretools.vscode-docker
|
|
||||||
open-vsx.webfreak.debug
|
|
||||||
open-vsx.mkhl.direnv
|
|
||||||
#vscode-marketplace.ms-vscode-remote.remote-wsl
|
|
||||||
#vscode-marketplace.ms-vscode-remote.remote-containers
|
|
||||||
open-vsx.esbenp.prettier-vscode
|
|
||||||
open-vsx.formulahendry.code-runner
|
|
||||||
open-vsx.leonardssh.vscord
|
|
||||||
open-vsx.ms-vscode.hexeditor
|
|
||||||
open-vsx.alefragnani.project-manager
|
|
||||||
vscode-marketplace.cantonios.project-templates
|
|
||||||
vscode-marketplace.betterthantomorrow.joyride
|
|
||||||
|
|
||||||
#Icons
|
|
||||||
open-vsx.pkief.material-icon-theme
|
|
||||||
open-vsx.pkief.material-product-icons
|
|
||||||
#Themes
|
|
||||||
open-vsx.dracula-theme.theme-dracula
|
|
||||||
open-vsx.ahmadawais.shades-of-purple
|
|
||||||
|
|
||||||
#Languages
|
|
||||||
marketNv.vscode-marketplace.ms-ceintl.vscode-language-pack-pl
|
|
||||||
|
|
||||||
];
|
|
||||||
set = {
|
|
||||||
"vscord.app.name" = lib.mkDefault "VSCodium";
|
|
||||||
"window.dialogStyle" = lib.mkDefault "custom";
|
|
||||||
"window.titleBarStyle" = lib.mkDefault "custom";
|
|
||||||
"editor.fontFamily" =
|
|
||||||
lib.mkDefault "'Hack Nerd Font', 'monospace', monospace";
|
|
||||||
"workbench.colorTheme" = lib.mkDefault "Shades of Purple";
|
|
||||||
"workbench.productIconTheme" = lib.mkDefault "material-product-icons";
|
|
||||||
"workbench.iconTheme" = lib.mkDefault "material-icon-theme";
|
|
||||||
|
|
||||||
"d.aggressiveUpdate" = lib.mkDefault false;
|
|
||||||
"d.servedPath" = lib.mkDefault "${pkgs.serve-d}/bin/serve-d";
|
|
||||||
|
|
||||||
"direnv.path.executable" = lib.mkDefault "${pkgs.direnv}/bin/direnv";
|
|
||||||
|
|
||||||
"nix.enableLanguageServer" = lib.mkDefault true;
|
|
||||||
"nix.serverPath" = lib.mkDefault "${pkgs.nixd}/bin/nixd";
|
|
||||||
"nix.formatterPath" = lib.mkDefault "${pkgs.nixfmt-rfc-style}/bin/nixfmt";
|
|
||||||
"nix.serverSettings" = {
|
|
||||||
"nixd" = { "formatting" = { "command" = lib.mkDefault [ "nixfmt" ]; }; };
|
|
||||||
};
|
|
||||||
|
|
||||||
"C_Cpp.clang_format_path" =
|
|
||||||
lib.mkDefault "${pkgs.clang-tools}/bin/clang-format";
|
|
||||||
"C_Cpp.clang_format_fallbackStyle" = lib.mkDefault "Microsoft";
|
|
||||||
"clang-tidy.executable" =
|
|
||||||
lib.mkDefault "${pkgs.clang-tools}/bin/clang-tidy";
|
|
||||||
"redhat.telemetry.enabled" = lib.mkDefault false;
|
|
||||||
"python.defaultInterpreterPath" =
|
|
||||||
lib.mkDefault "${pkgs.python3Full}/bin/python";
|
|
||||||
"[cpp]" = {
|
|
||||||
"editor.defaultFormatter" = lib.mkDefault "xaver.clang-format";
|
|
||||||
};
|
|
||||||
"[javascript]" = {
|
|
||||||
"editor.defaultFormatter" = lib.mkDefault "esbenp.prettier-vscode";
|
|
||||||
};
|
|
||||||
"typescript.tsserver.maxTsServerMemory" = 1024 * 8;
|
|
||||||
"typescript.tsserver.nodePath"= lib.mkDefault "${pkgs.nodejs}/bin/node";
|
|
||||||
"cmake.showOptionsMovedNotification" = false;
|
|
||||||
"cmake.pinnedCommands" = [
|
|
||||||
"workbench.action.tasks.configureTaskRunner"
|
|
||||||
"workbench.action.tasks.runTask"
|
|
||||||
];
|
|
||||||
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
options.materus.profile.editor.code.enable =
|
|
||||||
materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableDesktop
|
|
||||||
"Enable VSCodium with materus cfg";
|
|
||||||
options.materus.profile.editor.code.fhs.enable =
|
|
||||||
materusArg.pkgs.lib.mkBoolOpt false "Use fhs vscodium";
|
|
||||||
options.materus.profile.editor.code.fhs.packages =
|
|
||||||
lib.mkOption { default = (ps: [ ]); };
|
|
||||||
options.materus.profile.editor.code.extensions =
|
|
||||||
lib.mkOption { default = [ ]; };
|
|
||||||
options.materus.profile.editor.code.settings =
|
|
||||||
lib.mkOption { default = { }; };
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
materus.profile.editor.code.extensions = ext;
|
|
||||||
materus.profile.editor.code.settings = set;
|
|
||||||
programs.vscode = {
|
|
||||||
enable = lib.mkDefault true;
|
|
||||||
package = lib.mkDefault (if (cfg.fhs.enable) then
|
|
||||||
(pkgs.vscodium.fhsWithPackages cfg.fhs.packages)
|
|
||||||
else
|
|
||||||
pkgs.vscodium);
|
|
||||||
mutableExtensionsDir =
|
|
||||||
lib.mkDefault config.materus.profile.editor.code.fhs.enable;
|
|
||||||
extensions = lib.mkDefault config.materus.profile.editor.code.extensions;
|
|
||||||
enableExtensionUpdateCheck =
|
|
||||||
lib.mkDefault config.materus.profile.editor.code.fhs.enable;
|
|
||||||
enableUpdateCheck = lib.mkDefault false;
|
|
||||||
userSettings = lib.mkDefault config.materus.profile.editor.code.settings;
|
|
||||||
};
|
|
||||||
materus.profile.fonts.enable = lib.mkDefault true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./code.nix
|
|
||||||
./neovim.nix
|
|
||||||
./emacs
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,296 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
materusArg,
|
|
||||||
materusCfg,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
emacs-pkg = materusCfg.configInputs.emacs-overlay.packages.x86_64-linux.emacs-git;
|
|
||||||
|
|
||||||
materus-nix = e:
|
|
||||||
e.trivialBuild {
|
|
||||||
pname = "materus-nix";
|
|
||||||
src = pkgs.writeText "materus-nix.el" ''
|
|
||||||
(when (file-exists-p "${config.programs.emacs.package}/opt/emacs/buildtime")
|
|
||||||
(setq emacs-build-time (decode-time (seconds-to-time (string-to-number (with-temp-buffer
|
|
||||||
(insert-file-contents "${config.programs.emacs.package}/opt/emacs/buildtime")
|
|
||||||
(buffer-string)))))))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(defvar lsp-java-configuration-runtimes nil)
|
|
||||||
(setq dap-lldb-debug-program '("${pkgs.llvmPackages.lldb}/bin/lldb-vscode"))
|
|
||||||
(setq lsp-java-configuration-runtimes '[(:name "JavaSE-1.8"
|
|
||||||
:path "${pkgs.jdk8}/lib/openjdk/")
|
|
||||||
(:name "JavaSE-17"
|
|
||||||
:path "${pkgs.jdk17}/lib/openjdk/")
|
|
||||||
(:name "JavaSE-21"
|
|
||||||
:path "${pkgs.jdk21}/lib/openjdk/"
|
|
||||||
:default t)])
|
|
||||||
|
|
||||||
(setq lsp-nix-nixd-nixos-options-expr (concat "(builtins.getFlake \"/etc/nixos\").nixosConfigurations." (system-name) ".options"))
|
|
||||||
(setenv "JAVA_HOME" "${pkgs.jdk21}/lib/openjdk")
|
|
||||||
(setenv "PATH" (concat "${emacsEnv}/bin:" (getenv "PATH")))
|
|
||||||
(setq exec-path (append '("${emacsEnv}/bin") exec-path))
|
|
||||||
|
|
||||||
|
|
||||||
(call-process-shell-command "${pkgs.xorg.xmodmap}/bin/xmodmap -e \"keycode 148 = Hyper_L\" -e \"remove Mod4 = Hyper_L\" -e \"add Mod3 = Hyper_L\" &" nil 0)
|
|
||||||
(call-process-shell-command "${pkgs.xorg.xmodmap}/bin/xmodmap -e \"keycode 66 = Hyper_L\" -e \"remove Mod4 = Hyper_L\" -e \"add Mod3 = Hyper_L\" &" nil 0)
|
|
||||||
|
|
||||||
(provide 'materus-nix)
|
|
||||||
'';
|
|
||||||
version = "1.0.0";
|
|
||||||
};
|
|
||||||
|
|
||||||
packages = epkgs:
|
|
||||||
with epkgs; [
|
|
||||||
treesit-grammars.with-all-grammars
|
|
||||||
use-package
|
|
||||||
elcord
|
|
||||||
dashboard
|
|
||||||
magit
|
|
||||||
git-timemachine
|
|
||||||
avy
|
|
||||||
vterm
|
|
||||||
direnv
|
|
||||||
projectile
|
|
||||||
clipetty
|
|
||||||
which-key
|
|
||||||
iedit
|
|
||||||
hideshowvis
|
|
||||||
perspective
|
|
||||||
treemacs
|
|
||||||
treemacs-perspective
|
|
||||||
treemacs-nerd-icons
|
|
||||||
treemacs-icons-dired
|
|
||||||
treemacs-magit
|
|
||||||
treemacs-projectile
|
|
||||||
tree-edit
|
|
||||||
nerd-icons
|
|
||||||
nerd-icons-completion
|
|
||||||
minions
|
|
||||||
rainbow-delimiters
|
|
||||||
rainbow-mode
|
|
||||||
cmake-mode
|
|
||||||
lsp-mode
|
|
||||||
lsp-java
|
|
||||||
lsp-jedi
|
|
||||||
lsp-haskell
|
|
||||||
lsp-pascal
|
|
||||||
lsp-pyright
|
|
||||||
lsp-ui
|
|
||||||
lsp-treemacs
|
|
||||||
dap-mode
|
|
||||||
flycheck
|
|
||||||
gradle-mode
|
|
||||||
groovy-mode
|
|
||||||
kotlin-mode
|
|
||||||
d-mode
|
|
||||||
lua-mode
|
|
||||||
multiple-cursors
|
|
||||||
org
|
|
||||||
org-contrib
|
|
||||||
org-ql
|
|
||||||
org-rainbow-tags
|
|
||||||
org-roam
|
|
||||||
org-roam-ui
|
|
||||||
org-review
|
|
||||||
org-present
|
|
||||||
org-modern
|
|
||||||
org-auto-tangle
|
|
||||||
ox-pandoc
|
|
||||||
visual-fill-column
|
|
||||||
csharp-mode
|
|
||||||
markdown-mode
|
|
||||||
json-mode
|
|
||||||
nix-mode
|
|
||||||
nixfmt
|
|
||||||
nix-ts-mode
|
|
||||||
no-littering
|
|
||||||
right-click-context
|
|
||||||
dracula-theme
|
|
||||||
doom-themes
|
|
||||||
doom-modeline
|
|
||||||
popper
|
|
||||||
undo-tree
|
|
||||||
bash-completion
|
|
||||||
eldoc-box
|
|
||||||
yasnippet
|
|
||||||
yasnippet-capf
|
|
||||||
async
|
|
||||||
request
|
|
||||||
markdown-ts-mode
|
|
||||||
llvm-ts-mode
|
|
||||||
treesit-fold
|
|
||||||
treesit-auto
|
|
||||||
tree-sitter-langs
|
|
||||||
eat
|
|
||||||
vlf
|
|
||||||
edit-indirect
|
|
||||||
zones
|
|
||||||
sudo-edit
|
|
||||||
toc-org
|
|
||||||
#empv
|
|
||||||
volatile-highlights
|
|
||||||
highlight
|
|
||||||
elfeed
|
|
||||||
elfeed-goodies
|
|
||||||
drag-stuff
|
|
||||||
dirvish
|
|
||||||
rg
|
|
||||||
shfmt
|
|
||||||
mermaid-mode
|
|
||||||
ob-mermaid
|
|
||||||
visual-replace
|
|
||||||
scroll-restore
|
|
||||||
highlight-indent-guides
|
|
||||||
diff-hl
|
|
||||||
transient
|
|
||||||
embark
|
|
||||||
embark-consult
|
|
||||||
ef-themes
|
|
||||||
pdf-tools
|
|
||||||
minimap
|
|
||||||
geiser-guile
|
|
||||||
fennel-mode
|
|
||||||
paredit
|
|
||||||
# Completions & Minibuffer
|
|
||||||
corfu
|
|
||||||
corfu-terminal
|
|
||||||
kind-icon
|
|
||||||
cape
|
|
||||||
orderless
|
|
||||||
vertico
|
|
||||||
marginalia
|
|
||||||
];
|
|
||||||
|
|
||||||
emacsEnv = pkgs.buildEnv {
|
|
||||||
name = "emacs-env";
|
|
||||||
paths = with pkgs; [
|
|
||||||
jdk21
|
|
||||||
|
|
||||||
luaformatter
|
|
||||||
pandoc
|
|
||||||
(luajit.withPackages (p: [
|
|
||||||
p.fennel
|
|
||||||
p.lua-lsp
|
|
||||||
]))
|
|
||||||
fennel-ls
|
|
||||||
fnlfmt
|
|
||||||
sbcl
|
|
||||||
silver-searcher
|
|
||||||
guile
|
|
||||||
plantuml
|
|
||||||
mermaid-cli
|
|
||||||
pyright
|
|
||||||
shfmt
|
|
||||||
ripgrep
|
|
||||||
cmake
|
|
||||||
gnumake
|
|
||||||
nixfmt-rfc-style
|
|
||||||
(python3.withPackages (python-pkgs: with python-pkgs; [
|
|
||||||
matplotlib
|
|
||||||
pandas
|
|
||||||
requests
|
|
||||||
]))
|
|
||||||
multimarkdown
|
|
||||||
git
|
|
||||||
emacs-lsp-booster
|
|
||||||
llvmPackages.clang-tools
|
|
||||||
llvmPackages.clang
|
|
||||||
llvmPackages.lldb
|
|
||||||
(hiPrio gcc)
|
|
||||||
gdb
|
|
||||||
materusArg.unstable.nixd
|
|
||||||
jdt-language-server
|
|
||||||
gradle
|
|
||||||
fpc
|
|
||||||
nodejs
|
|
||||||
omnisharp-roslyn
|
|
||||||
texlive.combined.scheme-full
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
cfg = config.materus.profile.editor.emacs;
|
|
||||||
in {
|
|
||||||
options.materus.profile.editor.emacs.enable =
|
|
||||||
materusArg.pkgs.lib.mkBoolOpt false "Enable emacs with materus cfg";
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
home.activation.emacsSetup = lib.hm.dag.entryAfter ["linkGeneration"] '''';
|
|
||||||
|
|
||||||
#Emacsclient with COLORTERM env variable, without it display in "-nw" client is broken
|
|
||||||
xdg.desktopEntries.emacs = {
|
|
||||||
name = "Emacs";
|
|
||||||
genericName = "Edytor tekstu";
|
|
||||||
comment = "Edytuj tekst";
|
|
||||||
exec = ''env COLORTERM=truecolor emacsclient -a "" -r %F'';
|
|
||||||
icon = "emacs";
|
|
||||||
terminal = false;
|
|
||||||
type = "Application";
|
|
||||||
categories = [
|
|
||||||
"Development"
|
|
||||||
"TextEditor"
|
|
||||||
];
|
|
||||||
mimeType = [
|
|
||||||
"text/english"
|
|
||||||
"text/plain"
|
|
||||||
"text/x-makefile"
|
|
||||||
"text/x-c++hdr"
|
|
||||||
"text/x-c++src"
|
|
||||||
"text/x-chdr"
|
|
||||||
"text/x-csrc"
|
|
||||||
"text/x-java"
|
|
||||||
"text/x-moc"
|
|
||||||
"text/x-pascal"
|
|
||||||
"text/x-tcl"
|
|
||||||
"text/x-tex"
|
|
||||||
"application/x-shellscript"
|
|
||||||
"text/x-c"
|
|
||||||
"text/x-c++"
|
|
||||||
"x-scheme-handler/org-protocol"
|
|
||||||
];
|
|
||||||
actions.new-window = {
|
|
||||||
exec = ''env COLORTERM=truecolor emacsclient -a "" -c %F'';
|
|
||||||
name = "Nowe okno";
|
|
||||||
};
|
|
||||||
actions.no-daemon = {
|
|
||||||
exec = "env COLORTERM=truecolor emacs %F";
|
|
||||||
name = "Instancja samodzielna";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.emacs = {
|
|
||||||
enable = true;
|
|
||||||
extraPackages = epkgs: [(materus-nix epkgs) epkgs.vterm epkgs.treesit-grammars.with-all-grammars];
|
|
||||||
package = lib.mkDefault (
|
|
||||||
(emacs-pkg.override {
|
|
||||||
withSQLite3 = true;
|
|
||||||
withWebP = true;
|
|
||||||
withX = true;
|
|
||||||
#withXwidgets = true;
|
|
||||||
withGTK3 = true;
|
|
||||||
withAlsaLib = true;
|
|
||||||
|
|
||||||
#withGconf = true;
|
|
||||||
withImageMagick = true;
|
|
||||||
})
|
|
||||||
.overrideAttrs
|
|
||||||
(
|
|
||||||
f: p: {
|
|
||||||
#Remove .desktop files, will use my own. Add file with buildtime in case of using elpaca
|
|
||||||
postInstall =
|
|
||||||
p.postInstall
|
|
||||||
+ ''
|
|
||||||
rm -fr $out/share/applications/*
|
|
||||||
mkdir -p $out/opt/emacs
|
|
||||||
date +%s | tr -d '\n' > $out/opt/emacs/buildtime
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
)
|
|
||||||
);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
From 75e41ae5bd1c0879b323ed0ddc4bac29badb29ff Mon Sep 17 00:00:00 2001
|
|
||||||
From: fanshi1028 <jackychany321@gmail.com>
|
|
||||||
Date: Fri, 1 Nov 2024 14:41:26 +0000
|
|
||||||
Subject: [PATCH] fix lsp-org breaks with org 9.7 (#4300)
|
|
||||||
|
|
||||||
---
|
|
||||||
lsp-mode.el | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/lsp-mode.el b/lsp-mode.el
|
|
||||||
index f5c700dbf3..a149d6d2c7 100644
|
|
||||||
--- a/lsp-mode.el
|
|
||||||
+++ b/lsp-mode.el
|
|
||||||
@@ -9668,7 +9668,7 @@ defaults to `progress-bar."
|
|
||||||
(save-excursion
|
|
||||||
(funcall goto-buffer)
|
|
||||||
(funcall f))))))
|
|
||||||
- ((&plist :begin :end :post-blank :language) (cl-second (org-element-context)))
|
|
||||||
+ ((begin end post-blank language) (--map (org-element-property it (org-element-context) nil t) '(:begin :end :post-blank :language)))
|
|
||||||
((&alist :tangle file-name) (cl-third (org-babel-get-src-block-info 'light)))
|
|
||||||
|
|
||||||
(file-name (if file-name
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
{ config, lib, pkgs, materusArg, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.materus.profile.editor.neovim;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.materus.profile.editor.neovim.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableTerminalExtra "Enable neovim with materus cfg";
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
programs.neovim = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.neovim-unwrapped;
|
|
||||||
coc.enable = true;
|
|
||||||
coc.package = pkgs.vimPlugins.coc-nvim;
|
|
||||||
viAlias = true;
|
|
||||||
vimAlias = true;
|
|
||||||
vimdiffAlias = true;
|
|
||||||
defaultEditor = lib.mkDefault false;
|
|
||||||
|
|
||||||
|
|
||||||
extraConfig = ''
|
|
||||||
set number
|
|
||||||
'';
|
|
||||||
extraLuaConfig = ''
|
|
||||||
'';
|
|
||||||
|
|
||||||
extraPackages = with pkgs;[
|
|
||||||
];
|
|
||||||
|
|
||||||
plugins = with pkgs.vimPlugins;[
|
|
||||||
syntastic
|
|
||||||
vim-fugitive
|
|
||||||
vim-airline
|
|
||||||
vim-nix
|
|
||||||
nvim-fzf
|
|
||||||
nvim-treesitter.withAllGrammars
|
|
||||||
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
{ config, pkgs, lib, materusArg, ... }:
|
|
||||||
let
|
|
||||||
packages = config.materus.profile.packages;
|
|
||||||
cfg = config.materus.profile.fonts;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.materus.profile.fonts.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableDesktop "Enable materus font settings";
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
fonts.fontconfig.enable = lib.mkDefault true;
|
|
||||||
home.packages = packages.list.fonts;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
{ config, pkgs, lib, materusArg, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.materus.profile.bash;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.materus.profile.bash.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableTerminal "Enable materus bash config";
|
|
||||||
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
|
|
||||||
programs.bash = {
|
|
||||||
|
|
||||||
enable = true;
|
|
||||||
enableCompletion = lib.mkDefault true;
|
|
||||||
enableVteIntegration = lib.mkDefault true;
|
|
||||||
historyControl = lib.mkDefault [ "erasedups" "ignorespace" ];
|
|
||||||
shellOptions = lib.mkDefault [ "autocd" "checkwinsize" "cmdhist" "expand_aliases" "extglob" "globstar" "checkjobs" "nocaseglob" ];
|
|
||||||
initExtra = ''
|
|
||||||
if [ -n "$EAT_SHELL_INTEGRATION_DIR" ]; then
|
|
||||||
source "$EAT_SHELL_INTEGRATION_DIR/bash";
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
{config, pkgs, lib, ...}:
|
|
||||||
{
|
|
||||||
|
|
||||||
imports = [
|
|
||||||
./zsh.nix
|
|
||||||
./bash.nix
|
|
||||||
./fish.nix
|
|
||||||
./starship.nix
|
|
||||||
];
|
|
||||||
home.sessionVariables = {
|
|
||||||
EDITOR = lib.mkDefault (if (config.materus.profile.editor.emacs.enable) then
|
|
||||||
lib.getBin (pkgs.writeShellScript "editor" ''${config.programs.emacs.finalPackage}/bin/emacsclient --alternate-editor= -c -nw $@'')
|
|
||||||
else "${pkgs.micro}/bin/micro");
|
|
||||||
VISUAL = lib.mkDefault (if (config.materus.profile.editor.emacs.enable) then
|
|
||||||
lib.getBin (pkgs.writeShellScript "editor-visual" ''exec env COLORTERM=truecolor ${config.programs.emacs.finalPackage}/bin/emacsclient --alternate-editor= -c $@'')
|
|
||||||
else "${pkgs.micro}/bin/micro");
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
{ config, pkgs, lib, materusArg, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.materus.profile.fish;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.materus.profile.fish.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableTerminalExtra "Enable materus fish config";
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
programs.fish = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
{ config, pkgs, lib, materusArg, ... }:
|
|
||||||
let
|
|
||||||
profile = config.materus.profile;
|
|
||||||
cfg = config.materus.profile.starship;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.materus.profile.starship.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable materus starship config";
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
programs.starship.enable = true;
|
|
||||||
|
|
||||||
programs.starship.settings = {
|
|
||||||
|
|
||||||
python = {
|
|
||||||
symbol = " ";
|
|
||||||
};
|
|
||||||
|
|
||||||
format = "$username@$hostname$all";
|
|
||||||
right_format = "$cmd_duration $time";
|
|
||||||
|
|
||||||
time = {
|
|
||||||
disabled = false;
|
|
||||||
style = "bold bright-black";
|
|
||||||
format = "[$time]($style)";
|
|
||||||
};
|
|
||||||
|
|
||||||
line_break = { disabled = true; };
|
|
||||||
shell = {
|
|
||||||
disabled = false;
|
|
||||||
fish_indicator = "fish";
|
|
||||||
bash_indicator = "bash";
|
|
||||||
zsh_indicator = "zsh";
|
|
||||||
style = "blue bold";
|
|
||||||
};
|
|
||||||
|
|
||||||
hostname = {
|
|
||||||
ssh_only = false;
|
|
||||||
};
|
|
||||||
username = {
|
|
||||||
disabled = false;
|
|
||||||
show_always = true;
|
|
||||||
format = "[$user]($style)";
|
|
||||||
style_user = "white bold";
|
|
||||||
style_root = "black bold";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,202 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
materusArg,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
|
|
||||||
relToDotDir =
|
|
||||||
file:
|
|
||||||
(lib.optionalString (config.programs.zsh.dotDir != null) (config.programs.zsh.dotDir + "/")) + file;
|
|
||||||
pluginsDir =
|
|
||||||
if config.programs.zsh.dotDir != null then
|
|
||||||
relToDotDir "plugins"
|
|
||||||
else
|
|
||||||
"${config.home.homeDirectory}/.zsh/plugins";
|
|
||||||
|
|
||||||
p10kcfg = "${zshcfg}/p10kcfg";
|
|
||||||
zshcfg = "${materusArg.cfg.path}" + "/extraFiles/config/zsh";
|
|
||||||
cfg = config.materus.profile.zsh;
|
|
||||||
|
|
||||||
makeEnv = name: val: ''${name}=''${${name}:-"${val}"}'';
|
|
||||||
makeIfVar = var: val: ret: ''
|
|
||||||
if [[ "''$${var}" = "${val}" ]]; then
|
|
||||||
${ret}
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
|
|
||||||
makePlugin = nameArg: fileArg: srcArg: rec {
|
|
||||||
name = nameArg;
|
|
||||||
src = srcArg;
|
|
||||||
path = pluginsDir + "/" + name;
|
|
||||||
file = fileArg;
|
|
||||||
fullPath = path + "/" + file;
|
|
||||||
};
|
|
||||||
|
|
||||||
extraPlugins = {
|
|
||||||
powerlevel10k = makePlugin "powerlevel10k" "powerlevel10k.zsh-theme" (
|
|
||||||
pkgs.fetchFromGitHub {
|
|
||||||
owner = "romkatv";
|
|
||||||
repo = "powerlevel10k";
|
|
||||||
rev = "v1.20.0";
|
|
||||||
sha256 = "sha256-ES5vJXHjAKw/VHjWs8Au/3R+/aotSbY7PWnWAMzCR8E=";
|
|
||||||
}
|
|
||||||
);
|
|
||||||
sudo = makePlugin "sudo" "sudo.plugin.zsh" "${pkgs.oh-my-zsh}/share/oh-my-zsh/plugins/sudo";
|
|
||||||
extract =
|
|
||||||
makePlugin "extract" "extract.plugin.zsh"
|
|
||||||
"${pkgs.oh-my-zsh}/share/oh-my-zsh/plugins/extract";
|
|
||||||
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.materus.profile.zsh.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableTerminalExtra "Enable materus zsh config";
|
|
||||||
options.materus.profile.zsh.prompt = lib.mkOption {
|
|
||||||
type = lib.types.enum [ "p10k" ];
|
|
||||||
example = "p10k";
|
|
||||||
default = "p10k";
|
|
||||||
};
|
|
||||||
options.materus.profile.zsh.endConfig = lib.mkOption {
|
|
||||||
default = "";
|
|
||||||
description = "Zsh config after all of config";
|
|
||||||
type = lib.types.lines;
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
home.packages = [ pkgs.ripgrep ];
|
|
||||||
|
|
||||||
home.file = lib.mkMerge [
|
|
||||||
(builtins.foldl' (a: b: a // b) { } (
|
|
||||||
builtins.map (plugin: { ${plugin.path}.source = plugin.src; }) (builtins.attrValues extraPlugins)
|
|
||||||
))
|
|
||||||
{ "${relToDotDir ".zshrc"}".text = lib.mkAfter cfg.endConfig; }
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.zsh = {
|
|
||||||
enable = true;
|
|
||||||
autosuggestion.enable = true;
|
|
||||||
syntaxHighlighting.enable = true;
|
|
||||||
enableVteIntegration = true;
|
|
||||||
historySubstringSearch.enable = true;
|
|
||||||
historySubstringSearch.searchUpKey = "$key[Up]";
|
|
||||||
historySubstringSearch.searchDownKey = "$key[Down]";
|
|
||||||
|
|
||||||
envExtra = ''
|
|
||||||
${makeEnv "__MATERUS_HM_ZSH" "1"}
|
|
||||||
${makeEnv "__MATERUS_HM_ZSH_PROMPT" cfg.prompt}
|
|
||||||
${makeEnv "__MATERUS_HM_ZSH_PRIVATE" "0"}
|
|
||||||
'';
|
|
||||||
initExtraFirst = ''
|
|
||||||
bindkey -e
|
|
||||||
if [ -n "$EAT_SHELL_INTEGRATION_DIR" ]; then
|
|
||||||
source "$EAT_SHELL_INTEGRATION_DIR/zsh";
|
|
||||||
fi
|
|
||||||
|
|
||||||
${makeIfVar "__MATERUS_HM_ZSH_PROMPT" "p10k" ''
|
|
||||||
if [[ -r "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then
|
|
||||||
source "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh"
|
|
||||||
fi
|
|
||||||
if [[ -f "${extraPlugins.powerlevel10k.fullPath}" ]]; then
|
|
||||||
source "${extraPlugins.powerlevel10k.fullPath}"
|
|
||||||
fi
|
|
||||||
''}
|
|
||||||
if zmodload zsh/terminfo && (( "$terminfo[colors]" >= "256" )); then
|
|
||||||
__MATERUS_HM_ZSH_256COLORS="''${__MATERUS_HM_ZSH_256COLORS:-1}"; else
|
|
||||||
__MATERUS_HM_ZSH_256COLORS="''${__MATERUS_HM_ZSH_256COLORS:-0}";
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -f "${extraPlugins.sudo.fullPath}" ]]; then
|
|
||||||
source "${extraPlugins.sudo.fullPath}"
|
|
||||||
fi
|
|
||||||
if [[ -f "${extraPlugins.extract.fullPath}" ]]; then
|
|
||||||
source "${extraPlugins.extract.fullPath}"
|
|
||||||
path+="${extraPlugins.extract.path}"
|
|
||||||
fpath+="${extraPlugins.extract.path}"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
|
|
||||||
plugins = [ ];
|
|
||||||
|
|
||||||
history = {
|
|
||||||
extended = true;
|
|
||||||
save = 100000;
|
|
||||||
size = 100000;
|
|
||||||
share = true;
|
|
||||||
ignoreDups = true;
|
|
||||||
ignoreAllDups = true;
|
|
||||||
ignoreSpace = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
completionInit = ''
|
|
||||||
ZSH_COMPDUMP="''${ZSH_COMPDUMP:-''${XDG_CACHE_HOME:-${config.home.homeDirectory}/.cache}/.zcompdump-''${HOST}-''${ZSH_VERSION}}"
|
|
||||||
autoload -U compinit && compinit -d $ZSH_COMPDUMP
|
|
||||||
'';
|
|
||||||
initExtra =
|
|
||||||
''
|
|
||||||
if [[ "$__ETC_ZSHRC_SOURCED" != "1" ]]; then
|
|
||||||
. ${zshcfg}/zinputrc
|
|
||||||
fi
|
|
||||||
source ${zshcfg}/zshcompletion.zsh
|
|
||||||
|
|
||||||
history-substring-search-up-prefixed(){
|
|
||||||
HISTORY_SUBSTRING_SEARCH_PREFIXED=1 history-substring-search-up
|
|
||||||
}
|
|
||||||
history-substring-search-down-prefixed(){
|
|
||||||
HISTORY_SUBSTRING_SEARCH_PREFIXED=1 history-substring-search-down
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
zle -N history-substring-search-up-prefixed
|
|
||||||
zle -N history-substring-search-down-prefixed
|
|
||||||
|
|
||||||
|
|
||||||
bindkey -r "^["
|
|
||||||
bindkey "^[[1;5C" forward-word
|
|
||||||
bindkey "^[[1;5D" backward-word
|
|
||||||
bindkey "^[[1;5A" history-substring-search-up-prefixed
|
|
||||||
bindkey "^[[1;5B" history-substring-search-down-prefixed
|
|
||||||
|
|
||||||
bindkey '^[[3~' delete-char
|
|
||||||
bindkey '^[[3;2~' delete-word
|
|
||||||
|
|
||||||
zsh-private() {
|
|
||||||
__MATERUS_HM_ZSH_PRIVATE=1 ${lib.getExe config.programs.zsh.package}
|
|
||||||
}
|
|
||||||
|
|
||||||
myip() {
|
|
||||||
${lib.getExe pkgs.wget} -qO- https://wtfismyip.com/text
|
|
||||||
}
|
|
||||||
|
|
||||||
speedtest() {
|
|
||||||
${lib.getExe pkgs.curl} -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | ${lib.getExe pkgs.python3}
|
|
||||||
}
|
|
||||||
${lib.optionalString config.materus.profile.editor.emacs.enable ''alias "e"="emacsclient -nw -c --alternate-editor= "''}
|
|
||||||
${lib.optionalString config.materus.profile.editor.emacs.enable ''alias "ee"="emacsclient -n -r --alternate-editor= "''}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
''
|
|
||||||
+ makeIfVar "__MATERUS_HM_ZSH_PROMPT" "p10k" ''
|
|
||||||
if [[ "$__MATERUS_HM_ZSH_256COLORS" = "1" ]] ; then
|
|
||||||
[[ ! -f ${p10kcfg}/fullcolor.zsh ]] || source ${p10kcfg}/fullcolor.zsh
|
|
||||||
else
|
|
||||||
[[ ! -f ${p10kcfg}/compatibility.zsh ]] || source ${p10kcfg}/compatibility.zsh
|
|
||||||
fi
|
|
||||||
''
|
|
||||||
+ makeIfVar "__MATERUS_HM_ZSH_PRIVATE" "1" ''
|
|
||||||
unset HISTFILE
|
|
||||||
${lib.optionalString config.programs.zsh.history.share "unsetopt SHARE_HISTORY"}
|
|
||||||
alias -- 'zsh'="__MATERUS_HM_ZSH_PRIVATE=0 zsh "
|
|
||||||
''
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.starship.enableZshIntegration = lib.mkDefault false;
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{...}:
|
|
||||||
{
|
|
||||||
|
|
||||||
imports = [
|
|
||||||
./wezterm.nix
|
|
||||||
./tmux.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
{ materusArg, config, lib, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.materus.profile.tmux;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.materus.profile.tmux.enable = materusArg.pkgs.lib.mkBoolOpt true "Enable materus tmux config";
|
|
||||||
config = lib.mkIf cfg.enable
|
|
||||||
{
|
|
||||||
programs.tmux = {
|
|
||||||
enable = true;
|
|
||||||
clock24 = lib.mkDefault true;
|
|
||||||
aggressiveResize = lib.mkDefault true;
|
|
||||||
escapeTime = lib.mkDefault 0;
|
|
||||||
historyLimit = lib.mkDefault 10000;
|
|
||||||
mouse = lib.mkDefault true;
|
|
||||||
terminal = lib.mkDefault "tmux-256color";
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
{ config, lib, materusArg, pkgs, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.materus.profile.wezterm;
|
|
||||||
zshCfg = ''
|
|
||||||
source "${config.programs.wezterm.package}/etc/profile.d/wezterm.sh"
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.materus.profile.wezterm.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable materus wezterm config";
|
|
||||||
options.materus.profile.wezterm.enableHackFont = materusArg.pkgs.lib.mkBoolOpt true "Enable hack nerd font for wezterm";
|
|
||||||
options.materus.profile.wezterm.enableWezcraft = materusArg.pkgs.lib.mkBoolOpt true "Enable alias to start wezcraft with monocraft font";
|
|
||||||
options.materus.profile.wezterm.extraConfig = lib.mkOption {
|
|
||||||
default = "";
|
|
||||||
description = "Config for wezterm";
|
|
||||||
type = lib.types.lines;
|
|
||||||
};
|
|
||||||
config = lib.mkIf cfg.enable
|
|
||||||
{
|
|
||||||
programs.wezterm.enable = true;
|
|
||||||
programs.wezterm.colorSchemes = { };
|
|
||||||
programs.wezterm.enableZshIntegration = false;
|
|
||||||
programs.wezterm.extraConfig = ''
|
|
||||||
|
|
||||||
package.path = package.path .. ";${materusArg.cfg.path}/extraFiles/config/wezterm/?.lua"
|
|
||||||
require("wezterm_config");
|
|
||||||
local config = materus_wezterm_config();
|
|
||||||
${lib.optionalString cfg.enableHackFont "config.font = wezterm.font 'Hack Nerd Font';"}
|
|
||||||
${cfg.extraConfig}
|
|
||||||
|
|
||||||
return config;
|
|
||||||
'';
|
|
||||||
|
|
||||||
home.packages = [
|
|
||||||
(lib.mkIf cfg.enableHackFont (pkgs.nerd-fonts.hack))
|
|
||||||
(lib.mkIf cfg.enableWezcraft (pkgs.monocraft))
|
|
||||||
(lib.mkIf cfg.enableWezcraft (pkgs.writeShellScriptBin "wezcraft" ''
|
|
||||||
${lib.getExe config.programs.wezterm.package} --config font="wezterm.font 'Monocraft Nerd Font'" $@
|
|
||||||
''))
|
|
||||||
];
|
|
||||||
|
|
||||||
materus.profile.zsh.endConfig = lib.optionalString cfg.enableWezcraft zshCfg;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
{ config, lib, materusArg, pkgs, ... }:
|
|
||||||
{
|
|
||||||
|
|
||||||
options.materus.profile.xdg =
|
|
||||||
{
|
|
||||||
enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableDesktop "Enable xdg settings";
|
|
||||||
};
|
|
||||||
|
|
||||||
config =
|
|
||||||
let
|
|
||||||
cfg = config.materus.profile.xdg;
|
|
||||||
in
|
|
||||||
lib.mkIf cfg.enable {
|
|
||||||
xdg.enable = true;
|
|
||||||
|
|
||||||
xdg.userDirs.enable = lib.mkDefault true;
|
|
||||||
xdg.userDirs.createDirectories = lib.mkDefault config.xdg.userDirs.enable;
|
|
||||||
|
|
||||||
xdg.userDirs.desktop = lib.mkDefault "${config.home.homeDirectory}/Pulpit";
|
|
||||||
xdg.userDirs.documents = lib.mkDefault "${config.home.homeDirectory}/Dokumenty";
|
|
||||||
xdg.userDirs.download = lib.mkDefault "${config.home.homeDirectory}/Pobrane";
|
|
||||||
xdg.userDirs.music = lib.mkDefault "${config.xdg.userDirs.extraConfig.XDG_AUDIO_DIR}/Muzyka";
|
|
||||||
xdg.userDirs.pictures = lib.mkDefault "${config.home.homeDirectory}/Obrazy";
|
|
||||||
xdg.userDirs.publicShare = lib.mkDefault "${config.home.homeDirectory}/Publiczny";
|
|
||||||
xdg.userDirs.templates = lib.mkDefault "${config.home.homeDirectory}/Szablony";
|
|
||||||
xdg.userDirs.videos = lib.mkDefault "${config.home.homeDirectory}/Wideo";
|
|
||||||
xdg.userDirs.extraConfig = {
|
|
||||||
XDG_MISC_DIR = lib.mkDefault "${config.home.homeDirectory}/Inne";
|
|
||||||
XDG_PIC_SCREENSHOTS_DIR = lib.mkDefault "${config.xdg.userDirs.pictures}/Zrzuty ekranu";
|
|
||||||
XDG_PIC_MEMES_DIR = lib.mkDefault "${config.xdg.userDirs.pictures}/Memy";
|
|
||||||
XDG_PIC_MISC_DIR = lib.mkDefault "${config.xdg.userDirs.pictures}/Inne";
|
|
||||||
XDG_PIC_PHOTOS_DIR = lib.mkDefault "${config.xdg.userDirs.pictures}/Zdjęcia";
|
|
||||||
XDG_PIC_AVATARS_DIR = "${config.xdg.userDirs.pictures}/Avatar";
|
|
||||||
XDG_AUDIO_DIR = lib.mkDefault "${config.home.homeDirectory}/Audio";
|
|
||||||
XDG_KEYS_DIR = lib.mkDefault "${config.xdg.userDirs.documents}/Klucze";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
imports = [
|
|
||||||
./nix.nix
|
|
||||||
./fonts.nix
|
|
||||||
|
|
||||||
./shell
|
|
||||||
./games
|
|
||||||
./desktop
|
|
||||||
];
|
|
||||||
|
|
||||||
time.timeZone = lib.mkDefault "Europe/Warsaw";
|
|
||||||
i18n.defaultLocale = lib.mkDefault "pl_PL.UTF-8";
|
|
||||||
|
|
||||||
console = {
|
|
||||||
enable = lib.mkDefault true;
|
|
||||||
earlySetup = lib.mkDefault true;
|
|
||||||
font = lib.mkDefault "LatArCyrHeb-16";
|
|
||||||
keyMap = lib.mkDefault "pl";
|
|
||||||
};
|
|
||||||
environment.sessionVariables = {
|
|
||||||
MATERUS_CONFIG_DIR = lib.mkDefault "/etc/nixos/";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.tmux = {
|
|
||||||
enable = lib.mkDefault true;
|
|
||||||
clock24 = lib.mkDefault true;
|
|
||||||
};
|
|
||||||
environment.systemPackages =
|
|
||||||
lib.mkIf config.programs.tmux.enable [ pkgs.tmux.terminfo ];
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
{ materusArg, config, pkgs, lib, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.materus.profile.browser;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.materus.profile.browser.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable materus default browser config";
|
|
||||||
options.materus.profile.browser.default = lib.mkOption {
|
|
||||||
type = lib.types.enum [ "firefox" "brave" "vivaldi" ];
|
|
||||||
example = "vivaldi";
|
|
||||||
default = "brave";
|
|
||||||
};
|
|
||||||
options.materus.profile.browser.package = materusArg.pkgs.lib.mkPrivateVar
|
|
||||||
(if (cfg.default == "firefox") then config.materus.profile.packages.firefox else
|
|
||||||
if (cfg.default == "vivaldi") then pkgs.vivaldi else
|
|
||||||
if (cfg.default == "brave") then pkgs.brave else { });
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
|
|
||||||
environment.systemPackages = [
|
|
||||||
config.materus.profile.browser.package
|
|
||||||
];
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
|
|
||||||
imports = [
|
|
||||||
./browser.nix
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
{ config, pkgs, lib, materusArg, ... }:
|
|
||||||
let
|
|
||||||
packages = config.materus.profile.packages;
|
|
||||||
cfg = config.materus.profile.fonts;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.materus.profile.fonts.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable materus font settings for OS";
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
|
|
||||||
fonts.packages = packages.list.fonts ++ packages.list.moreFonts;
|
|
||||||
fonts.enableDefaultPackages = lib.mkDefault true;
|
|
||||||
|
|
||||||
fonts.fontconfig.enable = lib.mkDefault true;
|
|
||||||
fonts.fontconfig.cache32Bit = lib.mkDefault true;
|
|
||||||
|
|
||||||
fonts.fontconfig.defaultFonts.sansSerif = [ "Noto Sans" "DejaVu Sans" "WenQuanYi Zen Hei" "Noto Color Emoji" ];
|
|
||||||
fonts.fontconfig.defaultFonts.serif = [ "Noto Serif" "DejaVu Serif" "WenQuanYi Zen Hei" "Noto Color Emoji" ];
|
|
||||||
fonts.fontconfig.defaultFonts.emoji = [ "Noto Color Emoji" "OpenMoji Color" ];
|
|
||||||
fonts.fontconfig.defaultFonts.monospace = [ "Hack Nerd Font" "Noto Sans Mono" "WenQuanYi Zen Hei Mono" ];
|
|
||||||
|
|
||||||
fonts.fontDir.enable = lib.mkDefault true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
{ config, pkgs, ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./steam.nix
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,117 +0,0 @@
|
|||||||
{ config, pkgs, lib, materusArg, inputs, ... }:
|
|
||||||
let
|
|
||||||
steamPkg = pkgs.steam.override {
|
|
||||||
extraPkgs = pkgs: [
|
|
||||||
pkgs.libdecor
|
|
||||||
pkgs.obs-studio-plugins.obs-vkcapture
|
|
||||||
pkgs.steamcmd
|
|
||||||
pkgs.nss_latest
|
|
||||||
pkgs.libstrangle
|
|
||||||
pkgs.libkrb5
|
|
||||||
pkgs.keyutils
|
|
||||||
pkgs.libGL
|
|
||||||
pkgs.libglvnd
|
|
||||||
pkgs.steamPackages.steam
|
|
||||||
pkgs.libxcrypt
|
|
||||||
pkgs.gnutls
|
|
||||||
pkgs.xorg.libXcursor
|
|
||||||
pkgs.xorg.libXi
|
|
||||||
pkgs.xorg.libXinerama
|
|
||||||
pkgs.xorg.libXScrnSaver
|
|
||||||
pkgs.xorg.xinput
|
|
||||||
pkgs.xorg.xcbutilwm
|
|
||||||
pkgs.xorg.xcbutilimage
|
|
||||||
pkgs.xorg.xcbutilkeysyms
|
|
||||||
pkgs.xorg.xcbutilerrors
|
|
||||||
pkgs.xorg.xcbutilrenderutil
|
|
||||||
pkgs.xorg.xcbutil
|
|
||||||
pkgs.xorg.xwininfo
|
|
||||||
pkgs.yad
|
|
||||||
pkgs.xdotool
|
|
||||||
pkgs.libinput
|
|
||||||
pkgs.openvdb
|
|
||||||
pkgs.openssl
|
|
||||||
pkgs.tbb
|
|
||||||
pkgs.gtk4
|
|
||||||
pkgs.gtk3
|
|
||||||
pkgs.glib
|
|
||||||
pkgs.gsettings-desktop-schemas
|
|
||||||
pkgs.fuse
|
|
||||||
pkgs.samba4Full
|
|
||||||
pkgs.tdb
|
|
||||||
pkgs.jbig2enc
|
|
||||||
pkgs.jbig2dec
|
|
||||||
pkgs.vivaldi
|
|
||||||
pkgs.x264.lib
|
|
||||||
pkgs.steamtinkerlaunch
|
|
||||||
pkgs.pipewire
|
|
||||||
pkgs.gitFull
|
|
||||||
pkgs.git-lfs
|
|
||||||
|
|
||||||
] ++ config.materus.profile.packages.list.fonts ++ config.materus.profile.steam.extraPkgs;
|
|
||||||
|
|
||||||
extraLibraries = pkgs: [
|
|
||||||
pkgs.libkrb5
|
|
||||||
pkgs.keyutils
|
|
||||||
pkgs.ncurses6
|
|
||||||
pkgs.xorg.xinput
|
|
||||||
pkgs.libinput
|
|
||||||
pkgs.fontconfig
|
|
||||||
pkgs.libxcrypt
|
|
||||||
pkgs.gnutls
|
|
||||||
pkgs.samba
|
|
||||||
pkgs.tdb
|
|
||||||
pkgs.jemalloc
|
|
||||||
pkgs.gperftools
|
|
||||||
] ++
|
|
||||||
(with config.hardware.opengl; if pkgs.hostPlatform.is64bit
|
|
||||||
then [ package ] ++ extraPackages
|
|
||||||
else [ package32 ] ++ extraPackages32);
|
|
||||||
|
|
||||||
extraEnv = config.materus.profile.steam.extraEnv;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
cfg = config.materus.profile.steam;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.materus.profile.steam.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable materus steam settings for OS";
|
|
||||||
options.materus.profile.steam.package = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = steamPkg;
|
|
||||||
description = "Package used by steam";
|
|
||||||
};
|
|
||||||
options.materus.profile.steam.extraPkgs = lib.mkOption {
|
|
||||||
default = [ ];
|
|
||||||
description = "Extra packages for steam";
|
|
||||||
};
|
|
||||||
options.materus.profile.steam.extraEnv = lib.mkOption {
|
|
||||||
default = { };
|
|
||||||
description = "Extra Env for steam";
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
programs.gamescope.enable = lib.mkDefault true;
|
|
||||||
programs.gamescope.capSysNice = lib.mkDefault false;
|
|
||||||
hardware.steam-hardware.enable = lib.mkDefault true;
|
|
||||||
materus.profile.steam.extraEnv = {
|
|
||||||
XDG_DATA_DIRS = "/usr/share:\${XDG_DATA_DIRS}";
|
|
||||||
OBS_VKCAPTURE = "1";
|
|
||||||
};
|
|
||||||
programs.steam = {
|
|
||||||
enable = lib.mkDefault true;
|
|
||||||
dedicatedServer.openFirewall = lib.mkDefault true;
|
|
||||||
remotePlay.openFirewall = lib.mkDefault true;
|
|
||||||
gamescopeSession.enable = lib.mkDefault true;
|
|
||||||
};
|
|
||||||
environment.sessionVariables = rec {
|
|
||||||
STEAM_EXTRA_COMPAT_TOOLS_PATHS = lib.mkDefault "\${HOME}/.steam/root/compatibilitytools.d";
|
|
||||||
};
|
|
||||||
environment.systemPackages = [
|
|
||||||
steamPkg
|
|
||||||
steamPkg.run
|
|
||||||
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
{ config, pkgs, lib, materusArg, materusCfg, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.materus.profile.nix;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.materus.profile.nix.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable materus nix settings";
|
|
||||||
config.nix = lib.mkIf cfg.enable {
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
experimental-features = lib.mkMerge [[ "nix-command" "flakes" "no-url-literals" ]];
|
|
||||||
auto-optimise-store = true;
|
|
||||||
trusted-users = [ "root" "@wheel" ];
|
|
||||||
|
|
||||||
substituters = [
|
|
||||||
"https://nix-community.cachix.org"
|
|
||||||
"https://cache.nixos.org/"
|
|
||||||
"https://nixerus.cachix.org/"
|
|
||||||
];
|
|
||||||
trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nixerus.cachix.org-1:2x7sIG7y1vAoxc8BNRJwsfapZsiX4hIl4aTi9V5ZDdE=" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
imports = [
|
|
||||||
./zsh.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
{materusArg, config, pkgs, lib, ...}:
|
|
||||||
let
|
|
||||||
cfg = config.materus.profile.zsh;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.materus.profile.zsh.enable = materusArg.pkgs.lib.mkBoolOpt true "Enable materus system zsh config";
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
users.defaultUserShell = pkgs.zsh;
|
|
||||||
environment.shells = [ pkgs.zsh ];
|
|
||||||
programs.zsh = {
|
|
||||||
enable = true;
|
|
||||||
enableGlobalCompInit=false;
|
|
||||||
interactiveShellInit = ''
|
|
||||||
if [[ ''${__MATERUS_HM_ZSH:-0} == 0 ]]; then
|
|
||||||
source ${pkgs.grml-zsh-config}/etc/zsh/zshrc
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
promptInit = ''
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
{ inputs, materusFlake, ... }:
|
|
||||||
let
|
|
||||||
genHomes = import ./genHomes.nix { inherit inputs; inherit materusFlake; };
|
|
||||||
in
|
|
||||||
genHomes "materus"
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
{ inputs, materusFlake, ... }:
|
|
||||||
let
|
|
||||||
profiles = import (materusFlake.selfPath + "/configurations/profile");
|
|
||||||
|
|
||||||
hosts = builtins.attrNames materusFlake.nixosConfigurations;
|
|
||||||
genHomes = username:
|
|
||||||
let
|
|
||||||
#Make host specific user profile "username@host"
|
|
||||||
_list = builtins.map (host: username + "@" + host) hosts;
|
|
||||||
_for = i: (
|
|
||||||
let len = builtins.length hosts; in
|
|
||||||
([{
|
|
||||||
name = builtins.elemAt _list i;
|
|
||||||
value = let host = builtins.elemAt hosts i; in
|
|
||||||
materusFlake.nixosConfigurations.${host}.materusCfg.hm.lib.homeManagerConfiguration {
|
|
||||||
pkgs = materusFlake.nixosConfigurations.${host}.pkgs;
|
|
||||||
extraSpecialArgs = { materusCfg = materusFlake.nixosConfigurations.${host}.materusCfg // { isHm = true; }; };
|
|
||||||
modules = [
|
|
||||||
(materusFlake.selfPath + "/configurations/shared/home/${username}")
|
|
||||||
(materusFlake.selfPath + "/configurations/host/${host}/home/${username}")
|
|
||||||
profiles.homeProfile
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}]
|
|
||||||
++ (if ((i + 1) < len) then _for (i + 1) else [ ]))
|
|
||||||
);
|
|
||||||
in
|
|
||||||
(builtins.listToAttrs (_for 0)) // {
|
|
||||||
#Make generic x86_64-linux user profile "username"
|
|
||||||
${username} =
|
|
||||||
let
|
|
||||||
materusCfg = {
|
|
||||||
stable = false;
|
|
||||||
inherit materusFlake;
|
|
||||||
host = "Generic";
|
|
||||||
hm = inputs.configInputs.home-manager;
|
|
||||||
hmAsModule = false;
|
|
||||||
nixerus = inputs.configInputs.nixerus;
|
|
||||||
configInputs = inputs.configInputs;
|
|
||||||
path = materusFlake.selfPath;
|
|
||||||
isHm = true;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
inputs.configInputs.home-manager.lib.homeManagerConfiguration {
|
|
||||||
pkgs = import inputs.nixpkgs { system = "x86_64-linux"; config = { allowUnfree = true; }; };
|
|
||||||
extraSpecialArgs = { inherit materusCfg; };
|
|
||||||
modules = [
|
|
||||||
./${username}
|
|
||||||
profiles.homeProfile
|
|
||||||
materusCfg.configInputs.sops-nix.homeManagerModules.sops
|
|
||||||
materusCfg.configInputs.plasma-manager.homeManagerModules.plasma-manager
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
genHomes
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
{
|
|
||||||
|
|
||||||
home.username = "materus";
|
|
||||||
home.packages = [ ];
|
|
||||||
|
|
||||||
programs.git.signing.key = lib.mkDefault "28D140BCA60B4FD1";
|
|
||||||
programs.git.userEmail = lib.mkDefault "materus@podkos.pl";
|
|
||||||
programs.git.userName = lib.mkDefault "materus";
|
|
||||||
|
|
||||||
home.stateVersion = lib.mkDefault "23.05";
|
|
||||||
home.homeDirectory = lib.mkDefault "/home/materus";
|
|
||||||
|
|
||||||
programs.home-manager.enable = lib.mkDefault true;
|
|
||||||
}
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
||||||
cd $SCRIPT_DIR
|
|
||||||
|
|
||||||
if [ $# = 0 ] || ( [ $# = 1 ] && [ $1 = "help" ] ); then
|
|
||||||
echo "Use \"unlock\" to unlock with pgp"
|
|
||||||
echo "Use \"unlock\" /path/to/key to unlock with symmetric key"
|
|
||||||
echo "Use \"lock\": to lock repository"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
check_git () {
|
|
||||||
if [ "$(git status --porcelain)" ]; then
|
|
||||||
echo "Working directory not clean."
|
|
||||||
echo "Please commit your changes or 'git stash' them before running this script"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
create_decrypt () {
|
|
||||||
touch decrypted
|
|
||||||
git add --intent-to-add decrypted
|
|
||||||
git update-index --assume-unchanged decrypted
|
|
||||||
}
|
|
||||||
delete_decrypt () {
|
|
||||||
rm decrypted
|
|
||||||
git rm decrypted
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if [ $# = 1 ]; then
|
|
||||||
|
|
||||||
if [ $1 = "unlock" ]; then
|
|
||||||
check_git
|
|
||||||
git-crypt unlock
|
|
||||||
create_decrypt
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $1 = "lock" ]; then
|
|
||||||
check_git
|
|
||||||
delete_decrypt
|
|
||||||
git-crypt lock
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $1 = "create_decrypt" ]; then
|
|
||||||
create_decrypt
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $1 = "delete_decrypt" ]; then
|
|
||||||
delete_decrypt
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $# = 2 ] && [ $1 = "unlock" ]; then
|
|
||||||
git-crypt unlock $2
|
|
||||||
create_decrypt
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
let
|
||||||
|
flake-compatish = import (
|
||||||
|
builtins.fetchTree {
|
||||||
|
type = "github";
|
||||||
|
owner = "lillecarl";
|
||||||
|
repo = "flake-compatish";
|
||||||
|
ref = "main";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
flake = flake-compatish {
|
||||||
|
source = ./.;
|
||||||
|
overrides = {
|
||||||
|
self = ./.;
|
||||||
|
materus-inputs = ./nix-config/subflake;
|
||||||
|
materus-inputs-unstable = ./nix-config/subflake;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
flake.impure
|
||||||
|
|
||||||
|
# sudo -i nixos-rebuild switch --file . --attr nixosConfigurations.${HOSTNAME}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user