Merge branch 'main' of ssh://git.0x76.dev:42/v/infrastructure
This commit is contained in:
commit
4da2b4f0c4
|
@ -5,7 +5,7 @@ root = true
|
|||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
|
|
1266
flake.lock
1266
flake.lock
File diff suppressed because it is too large
Load diff
|
@ -19,7 +19,7 @@ spec:
|
|||
emptyDir: {}
|
||||
containers:
|
||||
- name: renovate
|
||||
image: renovate/renovate:35.57.0
|
||||
image: renovate/renovate:35.58.0
|
||||
volumeMounts:
|
||||
- name: config-volume
|
||||
mountPath: /opt/renovate/
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||
nix.registry.nixpkgs.flake = inputs.nixpkgs;
|
||||
|
||||
home-manager.sharedModules = [ ./hm-modules ];
|
||||
home-manager.sharedModules =
|
||||
[ ./hm-modules inputs.nixvim.homeManagerModules.nixvim ];
|
||||
|
||||
vault-secrets = let
|
||||
inherit (config.networking) domain hostName;
|
||||
|
|
9
nixos/common/desktop/README.md
Normal file
9
nixos/common/desktop/README.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Common Desktop Config
|
||||
This is where I store the NixOS config that is common between
|
||||
my laptop and desktop
|
||||
|
||||
## Files
|
||||
* `./default.nix`: Contains common systemwide configuration
|
||||
* See also my NixOS [modules](../modules), specifically gnome
|
||||
* `./home.nix`: Contains common user-level configuration
|
||||
* See also my Home-Manager [modules](../hm-modules)
|
90
nixos/common/desktop/default.nix
Normal file
90
nixos/common/desktop/default.nix
Normal file
|
@ -0,0 +1,90 @@
|
|||
{ pkgs, ... }: {
|
||||
# Bootloader.
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
efi.efiSysMountPoint = "/boot/efi";
|
||||
};
|
||||
kernel.sysctl = { "fs.inotify.max_user_watches" = 524288; };
|
||||
initrd = {
|
||||
systemd.enable = true;
|
||||
verbose = false;
|
||||
};
|
||||
};
|
||||
|
||||
# Enable my config for the gnome desktop environment
|
||||
services.v.gnome.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "nl_NL.UTF-8";
|
||||
LC_IDENTIFICATION = "nl_NL.UTF-8";
|
||||
LC_MEASUREMENT = "nl_NL.UTF-8";
|
||||
LC_MONETARY = "nl_NL.UTF-8";
|
||||
LC_NAME = "nl_NL.UTF-8";
|
||||
LC_NUMERIC = "nl_NL.UTF-8";
|
||||
LC_PAPER = "nl_NL.UTF-8";
|
||||
LC_TELEPHONE = "nl_NL.UTF-8";
|
||||
LC_TIME = "nl_NL.UTF-8";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Global Packages
|
||||
environment.systemPackages = with pkgs; [ wireguard-tools ];
|
||||
|
||||
# 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;
|
||||
};
|
||||
|
||||
virtualisation = {
|
||||
podman.enable = true;
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
qemu.package = pkgs.qemu_kvm;
|
||||
};
|
||||
};
|
||||
|
||||
fonts.fonts = with pkgs; [
|
||||
material-design-icons
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
dejavu_fonts
|
||||
(nerdfonts.override {
|
||||
fonts =
|
||||
[ "DejaVuSansMono" "Ubuntu" "DroidSansMono" "NerdFontsSymbolsOnly" ];
|
||||
})
|
||||
];
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
# Open ports in the firewall for Steam Remote Play
|
||||
remotePlay.openFirewall = true;
|
||||
};
|
||||
|
||||
# Networking
|
||||
networking.networkmanager.enable = true;
|
||||
networking.firewall.checkReversePath = false;
|
||||
networking.firewall.enable = false;
|
||||
}
|
96
nixos/common/desktop/home.nix
Normal file
96
nixos/common/desktop/home.nix
Normal file
|
@ -0,0 +1,96 @@
|
|||
{ pkgs, inputs, config, ... }:
|
||||
let
|
||||
tex = pkgs.texlive.combine {
|
||||
inherit (pkgs.texlive) scheme-full;
|
||||
dnd-5e-latex-template = { pkgs = [ pkgs.v.dnd-5e-latex-template ]; };
|
||||
};
|
||||
my-python-packages = ps: with ps; [ pandas requests numpy ];
|
||||
in {
|
||||
home.packages = with pkgs; [
|
||||
btop
|
||||
calibre
|
||||
element-desktop
|
||||
fusee-launcher
|
||||
gcc
|
||||
gimp
|
||||
inputs.comma.packages.${pkgs.system}.default
|
||||
inputs.webcord.packages.${pkgs.system}.default
|
||||
jetbrains.clion
|
||||
jetbrains.idea-ultimate
|
||||
mullvad-vpn
|
||||
neofetch
|
||||
nixfmt
|
||||
nixpkgs-review
|
||||
(python3.withPackages my-python-packages)
|
||||
plex-media-player
|
||||
rustup
|
||||
solo2-cli
|
||||
tex
|
||||
yt-dlp
|
||||
];
|
||||
|
||||
# Enable my own hm modules
|
||||
themes.v.catppuccin.enable = true;
|
||||
programs.v.nvim.enable = true;
|
||||
programs.v.vscode.enable = true;
|
||||
|
||||
programs.riff = {
|
||||
enable = true;
|
||||
direnv = true;
|
||||
};
|
||||
|
||||
programs.exa = {
|
||||
enable = true;
|
||||
enableAliases = true;
|
||||
};
|
||||
|
||||
programs.bat.enable = true;
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
userName = "Victor";
|
||||
userEmail = "victor@xirion.net";
|
||||
lfs.enable = true;
|
||||
# delta.enable = true;
|
||||
extraConfig = {
|
||||
push.autoSetupRemote = true;
|
||||
init.defaultBranch = "main";
|
||||
};
|
||||
};
|
||||
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
shortcut = "b";
|
||||
terminal = "screen-256color";
|
||||
clock24 = true;
|
||||
};
|
||||
|
||||
programs.firefox.enable = true;
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
sessionVariables = { DIRENV_LOG_FORMAT = ""; };
|
||||
};
|
||||
|
||||
# Syncthing
|
||||
services.syncthing.enable = true;
|
||||
xdg.userDirs = let home = config.home.homeDirectory;
|
||||
in {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
desktop = "${home}/.desktop";
|
||||
documents = "${home}/cloud/Documents";
|
||||
download = "${home}/dl";
|
||||
music = "${home}/cloud/Music";
|
||||
pictures = "${home}/cloud/Pictures";
|
||||
publicShare = "${home}/.publicShare";
|
||||
templates = "${home}/.templates";
|
||||
videos = "${home}/cloud/Videos";
|
||||
};
|
||||
}
|
40
nixos/common/hm-modules/catppuccin.nix
Normal file
40
nixos/common/hm-modules/catppuccin.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let cfg = config.themes.v.catppuccin;
|
||||
in {
|
||||
options.themes.v.catppuccin = {
|
||||
enable = mkEnableOption "catppuccin";
|
||||
};
|
||||
config = let
|
||||
theme = "Catppuccin-Pink-Dark";
|
||||
cursorTheme = config.home.pointerCursor.name;
|
||||
in mkIf cfg.enable {
|
||||
home.pointerCursor = {
|
||||
name = "Bibata_Ghost";
|
||||
size = 24;
|
||||
package = pkgs.bibata-cursors-translucent;
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = theme;
|
||||
package = pkgs.catppuccin-gtk;
|
||||
};
|
||||
iconTheme = {
|
||||
name = "Papirus-Dark";
|
||||
package = pkgs.papirus-icon-theme.override { color = "violet"; };
|
||||
};
|
||||
cursorTheme = {
|
||||
name = cursorTheme;
|
||||
inherit (config.home.pointerCursor) package size;
|
||||
};
|
||||
};
|
||||
|
||||
programs.vscode = {
|
||||
userSettings."workbench.colorTheme" = "Catppuccin Frappé";
|
||||
extensions = [ pkgs.vscode-extensions.catppuccin.catppuccin-vsc ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,5 +1,8 @@
|
|||
{ ... }: {
|
||||
imports = [
|
||||
./catppuccin.nix
|
||||
./nvim.nix
|
||||
./riff.nix
|
||||
./vscode.nix
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
101
nixos/common/hm-modules/nvim.nix
Normal file
101
nixos/common/hm-modules/nvim.nix
Normal file
|
@ -0,0 +1,101 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let cfg = config.programs.v.nvim;
|
||||
in {
|
||||
options.programs.v.nvim = {
|
||||
enable = mkEnableOption "nvim";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
package = pkgs.neovim-unwrapped;
|
||||
vimAlias = true;
|
||||
|
||||
globals = { mapleader = " "; };
|
||||
|
||||
maps.normal = {
|
||||
"<leader>ff" = "<cmd>lua require('telescope.builtin').find_files()<cr>";
|
||||
"<leader>fg" = "<cmd>lua require('telescope.builtin').live_grep()<cr>";
|
||||
"<C-_>" =
|
||||
"<cmd>lua require('Comment.api').toggle.linewise.current()<cr>"; # map ctrl+/ to commenting code
|
||||
};
|
||||
|
||||
extraPlugins = with pkgs.vimPlugins; [ catppuccin-nvim luasnip ];
|
||||
|
||||
colorscheme = "catppuccin-frappe";
|
||||
|
||||
extraConfigLua = "";
|
||||
|
||||
plugins = {
|
||||
bufferline.enable = true;
|
||||
nix.enable = true;
|
||||
treesitter = {
|
||||
enable = true;
|
||||
nixGrammars = true;
|
||||
# ensureInstalled = [ ];
|
||||
};
|
||||
surround.enable = true;
|
||||
fugitive.enable = true;
|
||||
gitgutter.enable = true;
|
||||
lualine = {
|
||||
enable = true;
|
||||
theme = "catppuccin";
|
||||
};
|
||||
telescope = {
|
||||
enable = true;
|
||||
extensions.fzf-native.enable = true;
|
||||
extensions.fzf-native.fuzzy = true;
|
||||
};
|
||||
comment-nvim = { enable = true; };
|
||||
lsp = {
|
||||
enable = true;
|
||||
servers.rust-analyzer.enable = true;
|
||||
servers.rnix-lsp.enable = true;
|
||||
servers.pyright.enable = true;
|
||||
servers.elixirls.enable = true;
|
||||
servers.clangd.enable = true;
|
||||
};
|
||||
trouble.enable = true;
|
||||
lspkind.enable = true;
|
||||
nvim-cmp = {
|
||||
enable = true;
|
||||
autoEnableSources = true;
|
||||
sources = [
|
||||
{ name = "nvim_lsp"; }
|
||||
{ name = "cmp-latex-symbols"; }
|
||||
{
|
||||
name = "luasnip";
|
||||
option = { show_autosnippets = true; };
|
||||
}
|
||||
{ name = "cmp-spell"; }
|
||||
{ name = "cmp-rg"; }
|
||||
{ name = "path"; }
|
||||
{ name = "buffer"; }
|
||||
];
|
||||
snippet.expand = "luasnip";
|
||||
mappingPresets = [ "insert" "cmdline" ];
|
||||
mapping = {
|
||||
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||
"<Tab>" = {
|
||||
modes = [ "i" "s" ];
|
||||
action = ''
|
||||
function(fallback)
|
||||
local luasnip = require('luasnip')
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expandable() then
|
||||
luasnip.expand()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
68
nixos/common/hm-modules/vscode.nix
Normal file
68
nixos/common/hm-modules/vscode.nix
Normal file
|
@ -0,0 +1,68 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let cfg = config.programs.v.vscode;
|
||||
in {
|
||||
options.programs.v.vscode = { enable = mkEnableOption "vscode"; };
|
||||
config = mkIf cfg.enable {
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscode;
|
||||
userSettings = {
|
||||
"ltex.language" = "en-GB";
|
||||
"latex-workshop.linting.chktex.enabled" = true;
|
||||
"latex-workshop.latex.clean.subfolder.enabled" = true;
|
||||
"latex-workshop.latex.outDir" = "%TMPDIR%/%RELATIVE_DOC%";
|
||||
"editor.fontFamily" =
|
||||
"'DejaVuSansMono Nerd Font', 'monospace', monospace";
|
||||
"keyboard.dispatch" = "keyCode";
|
||||
"rust-analyzer.server.path" = "${pkgs.rust-analyzer}/bin/rust-analyzer";
|
||||
"terminal.integrated.defaultProfile.linux" = "zsh";
|
||||
"nix.enableLanguageServer" = true; # Enable LSP.
|
||||
"nix.serverPath" = "${pkgs.nil}/bin/nil";
|
||||
"[nix]" = { "editor.defaultFormatter" = "brettm12345.nixfmt-vscode"; };
|
||||
"rust-analyzer.checkOnSave.command" = "clippy";
|
||||
"debug.allowBreakpointsEverywhere" = true;
|
||||
# Don't index unecessary things
|
||||
"files.exclude" = {
|
||||
"**/.vscode" = true;
|
||||
"**/.git" = true;
|
||||
"**/.svn" = true;
|
||||
"**/.hg" = true;
|
||||
"**/.deps" = true;
|
||||
"**/CVS" = true;
|
||||
"**/.DS_Store" = true;
|
||||
"/bin" = true;
|
||||
"/boot" = true;
|
||||
"/cdrom" = true;
|
||||
"/dev" = true;
|
||||
"/proc" = true;
|
||||
"/etc" = true;
|
||||
"/nix" = true;
|
||||
};
|
||||
};
|
||||
extensions = with pkgs.vscode-extensions;
|
||||
with pkgs.v.vscode-extensions; [
|
||||
brettm12345.nixfmt-vscode
|
||||
codezombiech.gitignore
|
||||
editorconfig.editorconfig
|
||||
foxundermoon.shell-format
|
||||
james-yu.latex-workshop
|
||||
jnoortheen.nix-ide
|
||||
matklad.rust-analyzer
|
||||
mkhl.direnv
|
||||
ms-vscode-remote.remote-ssh
|
||||
ms-vscode.cpptools
|
||||
platformio.platformio-ide
|
||||
redhat.vscode-yaml
|
||||
tamasfe.even-better-toml
|
||||
valentjn.vscode-ltex
|
||||
vscodevim.vim
|
||||
vadimcn.vscode-lldb
|
||||
xaver.clang-format
|
||||
sumneko.lua
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
imports = [
|
||||
./dns.nix
|
||||
./flood.nix
|
||||
./gnome
|
||||
./unpackerr.nix
|
||||
./vault.nix
|
||||
];
|
||||
|
|
66
nixos/common/modules/gnome/default.nix
Normal file
66
nixos/common/modules/gnome/default.nix
Normal file
|
@ -0,0 +1,66 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let cfg = config.services.v.gnome;
|
||||
in {
|
||||
options.services.v.gnome = {
|
||||
enable = mkEnableOption "v.gnome";
|
||||
hm = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether to enable home manager integration to set default dconf values
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.xserver.enable = true;
|
||||
services.xserver.excludePackages = [ pkgs.xterm ];
|
||||
|
||||
# Add Home-manager dconf stuff
|
||||
home-manager.sharedModules = mkIf cfg.hm [ ./hm.nix ];
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
layout = "us";
|
||||
xkbVariant = "altgr-intl";
|
||||
};
|
||||
|
||||
# Enable the GNOME Desktop Environment.
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
services.udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
|
||||
environment.gnome.excludePackages =
|
||||
(with pkgs; [ gnome-photos gnome-tour gnome-connections ])
|
||||
++ (with pkgs.gnome; [
|
||||
atomix # puzzle game
|
||||
epiphany # web browser
|
||||
geary # email reader
|
||||
gedit # text editor
|
||||
gnome-calendar
|
||||
gnome-clocks
|
||||
gnome-contacts
|
||||
gnome-maps
|
||||
gnome-music
|
||||
gnome-notes
|
||||
gnome-terminal
|
||||
gnome-weather
|
||||
hitori # sudoku game
|
||||
iagno # go game
|
||||
simple-scan # document scanner
|
||||
tali # poker game
|
||||
totem # video player
|
||||
]);
|
||||
|
||||
# Services required for gnome
|
||||
programs.dconf.enable = true;
|
||||
services.dbus.enable = true;
|
||||
services.udisks2.enable = true;
|
||||
|
||||
# Extra gnome packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnome.gnome-tweaks
|
||||
gnome.gnome-boxes
|
||||
];
|
||||
};
|
||||
}
|
|
@ -16,13 +16,44 @@ let
|
|||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/${name}")
|
||||
binds;
|
||||
in {
|
||||
xdg.mimeApps.enable = true;
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"text/html" = "firefox.desktop";
|
||||
"text/plain" = "org.gnome.TextEditor.desktop";
|
||||
"application/pdf" = "org.gnome.Evince.desktop";
|
||||
|
||||
# Images
|
||||
"image/bmp" = "org.gnome.eog.desktop";
|
||||
"image/gif" = "org.gnome.eog.desktop";
|
||||
"image/jpg" = "org.gnome.eog.desktop";
|
||||
"image/pjpeg" = "org.gnome.eog.desktop";
|
||||
"image/png" = "org.gnome.eog.desktop";
|
||||
"image/tiff" = "org.gnome.eog.desktop";
|
||||
"image/webp" = "org.gnome.eog.desktop";
|
||||
"image/x-bmp" = "org.gnome.eog.desktop";
|
||||
"image/x-gray" = "org.gnome.eog.desktop";
|
||||
"image/x-icb" = "org.gnome.eog.desktop";
|
||||
"image/x-ico" = "org.gnome.eog.desktop";
|
||||
"image/x-png" = "org.gnome.eog.desktop";
|
||||
"image/x-portable-anymap" = "org.gnome.eog.desktop";
|
||||
"image/x-portable-bitmap" = "org.gnome.eog.desktop";
|
||||
"image/x-portable-graymap" = "org.gnome.eog.desktop";
|
||||
"image/x-portable-pixmap" = "org.gnome.eog.desktop";
|
||||
"image/x-xbitmap" = "org.gnome.eog.desktop";
|
||||
"image/x-xpixmap" = "org.gnome.eog.desktop";
|
||||
"image/x-pcx" = "org.gnome.eog.desktop";
|
||||
"image/svg+xml" = "org.gnome.eog.desktop";
|
||||
"image/svg+xml-compressed" = "org.gnome.eog.desktop";
|
||||
"image/vnd.wap.wbmp" = "org.gnome.eog.desktop";
|
||||
"image/x-icns" = "org.gnome.eog.desktop";
|
||||
};
|
||||
|
||||
|
||||
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/input-sources" = {
|
||||
sources = [ (mkTuple [ "xkb" "us+altgr-intl" ]) ];
|
||||
};
|
||||
|
||||
"org/gnome/desktop/peripherals/mouse" = {
|
||||
accel-profile = "flat";
|
||||
xkb-options = [ "terminate:ctrl_alt_bksp" ];
|
||||
};
|
||||
|
||||
"org/gnome/desktop/peripherals/touchpad" = {
|
|
@ -13,6 +13,6 @@ in {
|
|||
services.minio = {
|
||||
enable = true;
|
||||
rootCredentialsFile = "${vs.minio}/environment";
|
||||
package = pkgs.v.minio-old;
|
||||
package = pkgs.minio_legacy_fs;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ pkgs, ... }:
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
fix-vscode = pkgs.writeScriptBin "fix-vscode" ''
|
||||
#!${pkgs.stdenv.shell}
|
||||
|
@ -23,6 +23,15 @@ in {
|
|||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# This _should_ fix vscode errors as well
|
||||
programs.nix-ld.enable = true;
|
||||
# environment.variables = {
|
||||
# NIX_LD_LIBRARY_PATH = lib.makeLibraryPath [
|
||||
# pkgs.stdenv.cc.cc
|
||||
# ];
|
||||
# # NIX_LD = lib.fileContents "${pkgs.stdenv.cc}/nix-support/dynamic-linker";
|
||||
# };
|
||||
|
||||
# Use the GRUB 2 boot loader.
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.version = 2;
|
||||
|
@ -36,7 +45,7 @@ in {
|
|||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "22.11"; # Did you read the comment?
|
||||
|
||||
virtualisation.podman.enable = true;
|
||||
virtualisation.podman.enable = true;
|
||||
|
||||
# Additional packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
|
|
@ -27,7 +27,7 @@ in {
|
|||
|
||||
services.minio = {
|
||||
enable = true;
|
||||
package = pkgs.v.minio-old;
|
||||
package = pkgs.minio_legacy_fs;
|
||||
rootCredentialsFile = "${vs.minio}/environment";
|
||||
listenAddress = ":${toString listenPort}";
|
||||
consoleAddress = ":${toString consolePort}";
|
||||
|
|
|
@ -39,11 +39,10 @@ in {
|
|||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedBrotliSettings = true;
|
||||
clientMaxBodySize = "500m";
|
||||
|
||||
package = pkgs.nginxMainline.override {
|
||||
modules = with pkgs.nginxModules; [ brotli ];
|
||||
};
|
||||
package = pkgs.nginxMainline;
|
||||
|
||||
# 0x76.dev
|
||||
virtualHosts."ha.0x76.dev" = proxy "http://home-assistant.olympus:8123/";
|
||||
|
@ -148,17 +147,6 @@ in {
|
|||
virtualHosts."blog.xirion.net" = k8s_proxy;
|
||||
};
|
||||
|
||||
services.nginx.commonHttpConfig = ''
|
||||
brotli on;
|
||||
brotli_comp_level 6;
|
||||
brotli_static on;
|
||||
brotli_types application/atom+xml application/javascript application/json application/rss+xml
|
||||
application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype
|
||||
application/x-font-ttf application/x-javascript application/xhtml+xml application/xml
|
||||
font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon
|
||||
image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/xml;
|
||||
'';
|
||||
|
||||
security.acme.defaults.email = "victorheld12@gmail.com";
|
||||
security.acme.acceptTerms = true;
|
||||
security.acme.preliminarySelfsigned = true;
|
||||
|
|
|
@ -18,53 +18,43 @@ in {
|
|||
# Additional packages
|
||||
environment.systemPackages = with pkgs; [ ];
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ ];
|
||||
networking.firewall.allowedTCPPorts = [ 8000 9000 ];
|
||||
|
||||
vault-secrets.secrets.woodpecker = {
|
||||
services = [ "podman-woodpecker-server" "podman-woodpecker-agent" ];
|
||||
services = [ "woodpecker-server" "woodpecker-agent-docker" ];
|
||||
quoteEnvironmentValues = false; # Needed for docker
|
||||
};
|
||||
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
dockerSocket.enable = true;
|
||||
dockerCompat = true;
|
||||
};
|
||||
|
||||
systemd.services.create-woodpecker-pod = with config.virtualisation.oci-containers; {
|
||||
serviceConfig.Type = "oneshot";
|
||||
wantedBy = [ "${backend}-woodpecker-server.service" "${backend}-woodpecker-agent.service"];
|
||||
script = ''
|
||||
${pkgs.podman}/bin/podman pod exists woodpecker || \
|
||||
${pkgs.podman}/bin/podman pod create -n woodpecker -p 8000:8000
|
||||
'';
|
||||
services.woodpecker-server = {
|
||||
enable = true;
|
||||
environment = {
|
||||
WOODPECKER_OPEN = "true";
|
||||
WOODPECKER_HOST = "https://ci.0x76.dev";
|
||||
WOODPECKER_GITEA = "true";
|
||||
WOODPECKER_GITEA_URL = "https://git.0x76.dev";
|
||||
WOODPECKER_ADMIN = "v";
|
||||
WOODPECKER_AUTHENTICATE_PUBLIC_REPOS = "true";
|
||||
WOODPECKER_SERVER_ADDR = "10.42.42.33:8000";
|
||||
};
|
||||
environmentFile = "${vs.woodpecker}/environment";
|
||||
};
|
||||
|
||||
virtualisation.oci-containers = {
|
||||
backend = "podman";
|
||||
containers = {
|
||||
woodpecker-server = {
|
||||
image = "woodpeckerci/woodpecker-server:latest";
|
||||
volumes = [ "woodpecker-server-data:/var/lib/woodpecker/" ];
|
||||
environmentFiles = [ "${vs.woodpecker}/environment" ];
|
||||
extraOptions = [ "--pod=woodpecker" ];
|
||||
environment = {
|
||||
WOODPECKER_OPEN = "true";
|
||||
WOODPECKER_HOST = "https://ci.0x76.dev";
|
||||
WOODPECKER_GITEA = "true";
|
||||
WOODPECKER_GITEA_URL = "https://git.0x76.dev";
|
||||
WOODPECKER_ADMIN = "v";
|
||||
WOODPECKER_AUTHENTICATE_PUBLIC_REPOS = "true";
|
||||
};
|
||||
};
|
||||
woodpecker-agent = {
|
||||
image = "woodpeckerci/woodpecker-agent:latest";
|
||||
dependsOn = [ "woodpecker-server" ];
|
||||
extraOptions = [ "--pod=woodpecker" ];
|
||||
cmd = [ "agent" ];
|
||||
volumes = [ "/var/run/docker.sock:/var/run/docker.sock" ];
|
||||
environmentFiles = [ "${vs.woodpecker}/environment" ];
|
||||
environment = { WOODPECKER_SERVER = "localhost:9000"; };
|
||||
services.woodpecker-agents.agents = {
|
||||
docker = {
|
||||
enable = true;
|
||||
environment = {
|
||||
DOCKER_HOST = "unix:///run/podman/podman.sock";
|
||||
WOODPECKER_BACKEND = "docker";
|
||||
WOODPECKER_SERVER = "localhost:9000";
|
||||
};
|
||||
environmentFile = [ "${vs.woodpecker}/environment" ];
|
||||
extraGroups = [ "podman" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,57 +2,20 @@
|
|||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, inputs, ... }: {
|
||||
{ pkgs, inputs, ... }: {
|
||||
imports = [
|
||||
../../../common/desktop
|
||||
./hardware-configuration.nix
|
||||
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-z
|
||||
./hardware.nix
|
||||
./networking.nix
|
||||
./desktop-env.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
# kernelPackages = pkgs.linuxKernel.packages.linux_zen;
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
efi.efiSysMountPoint = "/boot/efi";
|
||||
};
|
||||
kernel.sysctl = { "fs.inotify.max_user_watches" = 524288; };
|
||||
initrd = {
|
||||
kernelModules = [ "amdgpu" ];
|
||||
systemd.enable = true;
|
||||
verbose = false;
|
||||
};
|
||||
initrd.kernelModules = [ "amdgpu" ];
|
||||
resumeDevice = "/dev/nvme0n1p2";
|
||||
};
|
||||
|
||||
fileSystems."/".options = [ "compress=zstd" ];
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "nl_NL.UTF-8";
|
||||
LC_IDENTIFICATION = "nl_NL.UTF-8";
|
||||
LC_MEASUREMENT = "nl_NL.UTF-8";
|
||||
LC_MONETARY = "nl_NL.UTF-8";
|
||||
LC_NAME = "nl_NL.UTF-8";
|
||||
LC_NUMERIC = "nl_NL.UTF-8";
|
||||
LC_PAPER = "nl_NL.UTF-8";
|
||||
LC_TELEPHONE = "nl_NL.UTF-8";
|
||||
LC_TIME = "nl_NL.UTF-8";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [ wireguard-tools ];
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
|
@ -60,48 +23,8 @@
|
|||
extraSpecialArgs = { inherit inputs; };
|
||||
};
|
||||
|
||||
# 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;
|
||||
};
|
||||
|
||||
virtualisation = {
|
||||
podman.enable = true;
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
qemu.package = pkgs.qemu_kvm;
|
||||
};
|
||||
};
|
||||
|
||||
fonts.fonts = with pkgs; [
|
||||
material-design-icons
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
dejavu_fonts
|
||||
(nerdfonts.override {
|
||||
fonts =
|
||||
[ "DejaVuSansMono" "Ubuntu" "DroidSansMono" "NerdFontsSymbolsOnly" ];
|
||||
})
|
||||
];
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
# Open ports in the firewall for Steam Remote Play
|
||||
remotePlay.openFirewall = true;
|
||||
};
|
||||
# Enable Ozone rendering for Chromium and Electron apps.
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
|
@ -110,14 +33,4 @@
|
|||
# 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?
|
||||
|
||||
# Enable ccache
|
||||
# WARNING: Adding packages here makes them always be built from source, so only do so for once that are usually build like that
|
||||
# This should be fixed when nix switches to content-addresabble paths
|
||||
programs.ccache.enable = true;
|
||||
programs.ccache.packageNames = [
|
||||
"mongodb"
|
||||
];
|
||||
nix.settings.extra-sandbox-paths =
|
||||
[ (toString config.programs.ccache.cacheDir) ];
|
||||
}
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
services.xserver.excludePackages = [ pkgs.xterm ];
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
# TODO: Is this smart?
|
||||
dpi = 280;
|
||||
layout = "us";
|
||||
xkbVariant = "altgr-intl";
|
||||
xkbOptions = "caps:swapescape";
|
||||
};
|
||||
|
||||
# Enable the GNOME Desktop Environment.
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
services.udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
|
||||
environment.gnome.excludePackages =
|
||||
(with pkgs; [ gnome-photos gnome-tour gnome-connections ])
|
||||
++ (with pkgs.gnome; [
|
||||
atomix # puzzle game
|
||||
epiphany # web browser
|
||||
geary # email reader
|
||||
gedit # text editor
|
||||
gnome-calendar
|
||||
gnome-clocks
|
||||
gnome-contacts
|
||||
gnome-maps
|
||||
gnome-music
|
||||
gnome-notes
|
||||
gnome-terminal
|
||||
gnome-weather
|
||||
hitori # sudoku game
|
||||
iagno # go game
|
||||
simple-scan # document scanner
|
||||
tali # poker game
|
||||
totem # video player
|
||||
]);
|
||||
|
||||
# Services required for gnome
|
||||
programs.dconf.enable = true;
|
||||
services.dbus.enable = true;
|
||||
services.udisks2.enable = true;
|
||||
|
||||
# Extra gnome packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnome.gnome-tweaks
|
||||
gnome.gnome-boxes
|
||||
];
|
||||
|
||||
}
|
|
@ -5,6 +5,16 @@
|
|||
|
||||
services.hardware.bolt.enable = true;
|
||||
|
||||
# FS
|
||||
fileSystems."/".options = [ "compress=zstd" ];
|
||||
|
||||
# Video Driver
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
services.xserver = {
|
||||
dpi = 280;
|
||||
xkbOptions = "caps:swapescape";
|
||||
};
|
||||
|
||||
# Vulkan
|
||||
hardware.opengl.driSupport = true;
|
||||
hardware.opengl.extraPackages = with pkgs; [
|
||||
|
@ -12,6 +22,7 @@
|
|||
rocm-opencl-icd
|
||||
rocm-opencl-runtime
|
||||
];
|
||||
|
||||
systemd.tmpfiles.rules =
|
||||
[ "L+ /opt/rocm/hip - - - - ${pkgs.hip}" ];
|
||||
|
||||
|
|
|
@ -1,88 +0,0 @@
|
|||
{ lib, ... }:
|
||||
|
||||
with lib.hm.gvariant;
|
||||
let
|
||||
inherit (builtins) attrNames map;
|
||||
inherit (lib.attrsets) mapAttrs' nameValuePair;
|
||||
generate_custom_keybindings = binds:
|
||||
{
|
||||
"org/gnome/settings-daemon/plugins/media-keys" = {
|
||||
custom-keybindings = map (name:
|
||||
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/${name}/")
|
||||
(attrNames binds);
|
||||
};
|
||||
} // mapAttrs' (name:
|
||||
nameValuePair
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/${name}")
|
||||
binds;
|
||||
in {
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/input-sources" = {
|
||||
sources = [ (mkTuple [ "xkb" "us+altgr-intl" ]) ];
|
||||
xkb-options = [ "terminate:ctrl_alt_bksp" "caps:swapescape" ];
|
||||
};
|
||||
|
||||
"org/gnome/desktop/peripherals/touchpad" = {
|
||||
tap-to-click = true;
|
||||
two-finger-scrolling-enabled = true;
|
||||
};
|
||||
|
||||
"org/gnome/mutter" = {
|
||||
attach-modal-dialogs = true;
|
||||
dynamic-workspaces = false;
|
||||
edge-tiling = true;
|
||||
focus-change-on-pointer-rest = true;
|
||||
workspaces-only-on-primary = true;
|
||||
};
|
||||
|
||||
"org/gnome/mutter/keybindings" = {
|
||||
toggle-tiled-left = [ "<Super>bracketleft" ];
|
||||
toggle-tiled-right = [ "<Super>bracketright" ];
|
||||
};
|
||||
|
||||
"org/gnome/shell/keybindings" = { toggle-overview = [ "<Super>d" ]; };
|
||||
|
||||
"org/gnome/desktop/interface" = { color-scheme = "prefer-dark"; };
|
||||
|
||||
"org/gnome/desktop/wm/preferences" = {
|
||||
auto-raise = false;
|
||||
num-workspaces = 6;
|
||||
focus-mode = "sloppy";
|
||||
};
|
||||
|
||||
"org/gnome/desktop/wm/keybindings" = {
|
||||
raise-or-lower = [ "<Super>s" ];
|
||||
switch-applications = [ "<Super>Tab" ];
|
||||
switch-applications-backward = [ "<Super>Tab" ];
|
||||
move-to-workspace-1 = [ "<Shift><Super>exclam" ];
|
||||
move-to-workspace-2 = [ "<Shift><Super>at" ];
|
||||
move-to-workspace-3 = [ "<Shift><Super>numbersign" ];
|
||||
move-to-workspace-4 = [ "<Shift><Super>dollar" ];
|
||||
move-to-workspace-5 = [ "<Shift><Super>percent" ];
|
||||
move-to-workspace-6 = [ "<Shift><Super>asciicircum" ];
|
||||
switch-to-workspace-1 = [ "<Super>1" ];
|
||||
switch-to-workspace-2 = [ "<Super>2" ];
|
||||
switch-to-workspace-3 = [ "<Super>3" ];
|
||||
switch-to-workspace-4 = [ "<Super>4" ];
|
||||
switch-to-workspace-5 = [ "<Super>5" ];
|
||||
switch-to-workspace-6 = [ "<Super>6" ];
|
||||
toggle-fullscreen = [ "<Super><Shift>M" ];
|
||||
toggle-maximized = [ "<Super>m" ];
|
||||
};
|
||||
|
||||
"org/gnome/tweaks" = { show-extensions-notice = false; };
|
||||
|
||||
"org/gnome/boxes" = { first-run = false; };
|
||||
} // generate_custom_keybindings {
|
||||
"terminal" = {
|
||||
binding = "<Super>Return";
|
||||
command = "kgx";
|
||||
name = "Open Terminal";
|
||||
};
|
||||
"firefox" = {
|
||||
binding = "<Super>f";
|
||||
command = "firefox";
|
||||
name = "Open Firefox";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,193 +1,14 @@
|
|||
{ lib, config, pkgs, inputs, ... }:
|
||||
let
|
||||
tex = pkgs.texlive.combine {
|
||||
inherit (pkgs.texlive) scheme-full;
|
||||
dnd-5e-latex-template = { pkgs = [ pkgs.v.dnd-5e-latex-template ]; };
|
||||
};
|
||||
in {
|
||||
{ ... }: {
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
home.username = "victor";
|
||||
home.homeDirectory = "/home/victor";
|
||||
home.stateVersion = "23.05";
|
||||
|
||||
imports = [
|
||||
./dconf.nix
|
||||
./theme.nix
|
||||
./neovim.nix
|
||||
];
|
||||
imports = [ ../../../../common/desktop/home.nix ];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
btop
|
||||
calibre
|
||||
element-desktop
|
||||
fusee-launcher
|
||||
gcc
|
||||
gimp
|
||||
inputs.comma.packages.${pkgs.system}.default
|
||||
inputs.webcord.packages.${pkgs.system}.default
|
||||
jetbrains.clion
|
||||
jetbrains.idea-ultimate
|
||||
mullvad-vpn
|
||||
neofetch
|
||||
nixfmt
|
||||
nixpkgs-review
|
||||
python3
|
||||
plex-media-player
|
||||
rustup
|
||||
solo2-cli
|
||||
tex
|
||||
yt-dlp
|
||||
];
|
||||
|
||||
programs.riff = {
|
||||
enable = true;
|
||||
direnv = true;
|
||||
# Custom dconf settings
|
||||
dconf.settings."org/gnome/desktop/input-sources" = {
|
||||
xkb-options = [ "caps:swapescape" ];
|
||||
};
|
||||
|
||||
xdg.mimeApps.enable = true;
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"text/html" = "firefox.desktop";
|
||||
"text/plain" = "org.gnome.TextEditor.desktop";
|
||||
"application/pdf" = "org.gnome.Evince.desktop";
|
||||
|
||||
# Images
|
||||
"image/bmp" = "org.gnome.eog.desktop";
|
||||
"image/gif" = "org.gnome.eog.desktop";
|
||||
"image/jpg" = "org.gnome.eog.desktop";
|
||||
"image/pjpeg" = "org.gnome.eog.desktop";
|
||||
"image/png" = "org.gnome.eog.desktop";
|
||||
"image/tiff" = "org.gnome.eog.desktop";
|
||||
"image/webp" = "org.gnome.eog.desktop";
|
||||
"image/x-bmp" = "org.gnome.eog.desktop";
|
||||
"image/x-gray" = "org.gnome.eog.desktop";
|
||||
"image/x-icb" = "org.gnome.eog.desktop";
|
||||
"image/x-ico" = "org.gnome.eog.desktop";
|
||||
"image/x-png" = "org.gnome.eog.desktop";
|
||||
"image/x-portable-anymap" = "org.gnome.eog.desktop";
|
||||
"image/x-portable-bitmap" = "org.gnome.eog.desktop";
|
||||
"image/x-portable-graymap" = "org.gnome.eog.desktop";
|
||||
"image/x-portable-pixmap" = "org.gnome.eog.desktop";
|
||||
"image/x-xbitmap" = "org.gnome.eog.desktop";
|
||||
"image/x-xpixmap" = "org.gnome.eog.desktop";
|
||||
"image/x-pcx" = "org.gnome.eog.desktop";
|
||||
"image/svg+xml" = "org.gnome.eog.desktop";
|
||||
"image/svg+xml-compressed" = "org.gnome.eog.desktop";
|
||||
"image/vnd.wap.wbmp" = "org.gnome.eog.desktop";
|
||||
"image/x-icns" = "org.gnome.eog.desktop";
|
||||
};
|
||||
|
||||
programs.exa = {
|
||||
enable = true;
|
||||
enableAliases = true;
|
||||
};
|
||||
|
||||
programs.bat.enable = true;
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
userName = "Victor";
|
||||
userEmail = "victor@xirion.net";
|
||||
lfs.enable = true;
|
||||
# delta.enable = true;
|
||||
extraConfig = {
|
||||
push.autoSetupRemote = true;
|
||||
init.defaultBranch = "main";
|
||||
};
|
||||
};
|
||||
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
shortcut = "b";
|
||||
terminal = "screen-256color";
|
||||
clock24 = true;
|
||||
};
|
||||
|
||||
programs.firefox.enable = true;
|
||||
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscode;
|
||||
userSettings = {
|
||||
"ltex.language" = "en-GB";
|
||||
"latex-workshop.linting.chktex.enabled" = true;
|
||||
"latex-workshop.latex.clean.subfolder.enabled" = true;
|
||||
"latex-workshop.latex.outDir" = "%TMPDIR%/%RELATIVE_DOC%";
|
||||
"editor.fontFamily" =
|
||||
"'DejaVuSansMono Nerd Font', 'monospace', monospace";
|
||||
"keyboard.dispatch" = "keyCode";
|
||||
"rust-analyzer.server.path" = "${pkgs.rust-analyzer}/bin/rust-analyzer";
|
||||
"terminal.integrated.defaultProfile.linux" = "zsh";
|
||||
"nix.enableLanguageServer" = true; # Enable LSP.
|
||||
"nix.serverPath" = "${pkgs.nil}/bin/nil";
|
||||
"[nix]" = { "editor.defaultFormatter" = "brettm12345.nixfmt-vscode"; };
|
||||
"rust-analyzer.checkOnSave.command" = "clippy";
|
||||
"debug.allowBreakpointsEverywhere" = true;
|
||||
# Don't index unecessary things
|
||||
"files.exclude" = {
|
||||
"**/.vscode" = true;
|
||||
"**/.git" = true;
|
||||
"**/.svn" = true;
|
||||
"**/.hg" = true;
|
||||
"**/.deps" = true;
|
||||
"**/CVS" = true;
|
||||
"**/.DS_Store" = true;
|
||||
"/bin" = true;
|
||||
"/boot" = true;
|
||||
"/cdrom" = true;
|
||||
"/dev" = true;
|
||||
"/proc" = true;
|
||||
"/etc" = true;
|
||||
"/nix" = true;
|
||||
};
|
||||
};
|
||||
extensions = with pkgs.vscode-extensions;
|
||||
with pkgs.v.vscode-extensions; [
|
||||
brettm12345.nixfmt-vscode
|
||||
codezombiech.gitignore
|
||||
editorconfig.editorconfig
|
||||
foxundermoon.shell-format
|
||||
james-yu.latex-workshop
|
||||
jnoortheen.nix-ide
|
||||
matklad.rust-analyzer
|
||||
mkhl.direnv
|
||||
ms-vscode-remote.remote-ssh
|
||||
ms-vscode.cpptools
|
||||
platformio.platformio-ide
|
||||
redhat.vscode-yaml
|
||||
tamasfe.even-better-toml
|
||||
valentjn.vscode-ltex
|
||||
vscodevim.vim
|
||||
vadimcn.vscode-lldb
|
||||
xaver.clang-format
|
||||
sumneko.lua
|
||||
];
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
sessionVariables = { DIRENV_LOG_FORMAT = ""; };
|
||||
};
|
||||
|
||||
xdg.userDirs = let home = config.home.homeDirectory;
|
||||
in {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
desktop = "${home}/.desktop";
|
||||
documents = "${home}/cloud/Documents";
|
||||
download = "${home}/dl";
|
||||
music = "${home}/cloud/Music";
|
||||
pictures = "${home}/cloud/Pictures";
|
||||
publicShare = "${home}/.publicShare";
|
||||
templates = "${home}/.templates";
|
||||
videos = "${home}/cloud/Videos";
|
||||
};
|
||||
|
||||
services.syncthing.enable = true;
|
||||
}
|
||||
|
|
|
@ -1,94 +0,0 @@
|
|||
{ inputs, pkgs, ... }: {
|
||||
imports = [ inputs.nixvim.homeManagerModules.nixvim ];
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
package = pkgs.neovim-unwrapped;
|
||||
vimAlias = true;
|
||||
|
||||
globals = { mapleader = " "; };
|
||||
|
||||
maps.normal = {
|
||||
"<leader>ff" = "<cmd>lua require('telescope.builtin').find_files()<cr>";
|
||||
"<leader>fg" = "<cmd>lua require('telescope.builtin').live_grep()<cr>";
|
||||
"<C-_>" =
|
||||
"<cmd>lua require('Comment.api').toggle.linewise.current()<cr>"; # map ctrl+/ to commenting code
|
||||
};
|
||||
|
||||
extraPlugins = with pkgs.vimPlugins; [ catppuccin-nvim luasnip ];
|
||||
|
||||
colorscheme = "catppuccin-frappe";
|
||||
|
||||
extraConfigLua = builtins.readFile ./nvim.lua;
|
||||
|
||||
plugins = {
|
||||
bufferline.enable = true;
|
||||
nix.enable = true;
|
||||
treesitter = {
|
||||
enable = true;
|
||||
nixGrammars = true;
|
||||
# ensureInstalled = [ ];
|
||||
};
|
||||
surround.enable = true;
|
||||
fugitive.enable = true;
|
||||
gitgutter.enable = true;
|
||||
lualine = {
|
||||
enable = true;
|
||||
theme = "catppuccin";
|
||||
};
|
||||
telescope = {
|
||||
enable = true;
|
||||
extensions.fzf-native.enable = true;
|
||||
extensions.fzf-native.fuzzy = true;
|
||||
};
|
||||
comment-nvim = { enable = true; };
|
||||
lsp = {
|
||||
enable = true;
|
||||
servers.rust-analyzer.enable = true;
|
||||
servers.rnix-lsp.enable = true;
|
||||
servers.pyright.enable = true;
|
||||
servers.elixirls.enable = true;
|
||||
servers.clangd.enable = true;
|
||||
};
|
||||
trouble.enable = true;
|
||||
lspkind.enable = true;
|
||||
nvim-cmp = {
|
||||
enable = true;
|
||||
autoEnableSources = true;
|
||||
sources = [
|
||||
{ name = "nvim_lsp"; }
|
||||
{ name = "cmp-latex-symbols"; }
|
||||
{
|
||||
name = "luasnip";
|
||||
option = { show_autosnippets = true; };
|
||||
}
|
||||
{ name = "cmp-spell"; }
|
||||
{ name = "cmp-rg"; }
|
||||
{ name = "path"; }
|
||||
{ name = "buffer"; }
|
||||
];
|
||||
snippet.expand = "luasnip";
|
||||
mappingPresets = [ "insert" "cmdline" ];
|
||||
mapping = {
|
||||
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||
"<Tab>" = {
|
||||
modes = [ "i" "s" ];
|
||||
action = ''
|
||||
function(fallback)
|
||||
local luasnip = require('luasnip')
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expandable() then
|
||||
luasnip.expand()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
let
|
||||
theme = "Catppuccin-Pink-Dark";
|
||||
cursorTheme = config.home.pointerCursor.name;
|
||||
in {
|
||||
home.pointerCursor = {
|
||||
name = "Bibata_Ghost";
|
||||
size = 24;
|
||||
package = pkgs.bibata-cursors-translucent;
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = theme;
|
||||
package = pkgs.catppuccin-gtk;
|
||||
};
|
||||
iconTheme = {
|
||||
name = "Papirus-Dark";
|
||||
package = pkgs.papirus-icon-theme.override { color = "violet"; };
|
||||
};
|
||||
cursorTheme = {
|
||||
name = cursorTheme;
|
||||
inherit (config.home.pointerCursor) package size;
|
||||
};
|
||||
};
|
||||
|
||||
programs.vscode = {
|
||||
userSettings."workbench.colorTheme" = "Catppuccin Frappé";
|
||||
extensions = [ pkgs.vscode-extensions.catppuccin.catppuccin-vsc ];
|
||||
};
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
_: {
|
||||
networking.networkmanager.enable = true;
|
||||
networking.firewall.checkReversePath = false;
|
||||
networking.firewall.enable = false;
|
||||
}
|
|
@ -4,10 +4,9 @@
|
|||
|
||||
{ config, pkgs, inputs, ... }: {
|
||||
imports = [
|
||||
../../../common/desktop
|
||||
./hardware-configuration.nix
|
||||
./hardware.nix
|
||||
./desktop-env.nix
|
||||
./networking.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
|
@ -56,50 +55,6 @@
|
|||
users.victor = import ./home;
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
};
|
||||
|
||||
# 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;
|
||||
};
|
||||
|
||||
virtualisation = {
|
||||
podman.enable = true;
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
qemu.package = pkgs.qemu_kvm;
|
||||
};
|
||||
};
|
||||
|
||||
fonts.fonts = with pkgs; [
|
||||
material-design-icons
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
dejavu_fonts
|
||||
(nerdfonts.override {
|
||||
fonts =
|
||||
[ "DejaVuSansMono" "Ubuntu" "DroidSansMono" "NerdFontsSymbolsOnly" ];
|
||||
})
|
||||
];
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
# Open ports in the firewall for Steam Remote Play
|
||||
remotePlay.openFirewall = true;
|
||||
};
|
||||
|
||||
# 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
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
services.xserver.excludePackages = [ pkgs.xterm ];
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
layout = "us";
|
||||
xkbVariant = "altgr-intl";
|
||||
};
|
||||
|
||||
# Enable the GNOME Desktop Environment.
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
services.udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
|
||||
environment.gnome.excludePackages =
|
||||
(with pkgs; [ gnome-photos gnome-tour gnome-connections ])
|
||||
++ (with pkgs.gnome; [
|
||||
atomix # puzzle game
|
||||
epiphany # web browser
|
||||
geary # email reader
|
||||
gedit # text editor
|
||||
gnome-calendar
|
||||
gnome-clocks
|
||||
gnome-contacts
|
||||
gnome-maps
|
||||
gnome-music
|
||||
gnome-notes
|
||||
gnome-terminal
|
||||
gnome-weather
|
||||
hitori # sudoku game
|
||||
iagno # go game
|
||||
simple-scan # document scanner
|
||||
tali # poker game
|
||||
totem # video player
|
||||
]);
|
||||
|
||||
# Services required for gnome
|
||||
programs.dconf.enable = true;
|
||||
services.dbus.enable = true;
|
||||
services.udisks2.enable = true;
|
||||
|
||||
# Extra gnome packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnome.gnome-tweaks
|
||||
gnome.gnome-boxes
|
||||
];
|
||||
}
|
|
@ -1,8 +1,6 @@
|
|||
{ pkgs, config, ... }: {
|
||||
hardware.enableAllFirmware = true;
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
|
||||
services.hardware.bolt.enable = true;
|
||||
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
@ -24,8 +22,12 @@
|
|||
driSupport = true;
|
||||
};
|
||||
|
||||
# udev
|
||||
services.udev.packages = with pkgs; [ wooting-udev-rules ];
|
||||
|
||||
# FS
|
||||
fileSystems."/".options = [ "compress=zstd" ];
|
||||
|
||||
# SSD Trim
|
||||
services.fstrim.enable = true;
|
||||
}
|
||||
|
|
|
@ -11,184 +11,9 @@ in {
|
|||
home.homeDirectory = "/home/victor";
|
||||
home.stateVersion = "23.05";
|
||||
|
||||
imports = [
|
||||
./dconf.nix
|
||||
./theme.nix
|
||||
./neovim.nix
|
||||
];
|
||||
imports = [ ../../../../common/desktop/home.nix ];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
btop
|
||||
calibre
|
||||
element-desktop
|
||||
fusee-launcher
|
||||
gcc
|
||||
gimp
|
||||
inputs.comma.packages.${pkgs.system}.default
|
||||
inputs.webcord.packages.${pkgs.system}.default
|
||||
jetbrains.clion
|
||||
jetbrains.idea-ultimate
|
||||
mullvad-vpn
|
||||
neofetch
|
||||
nixfmt
|
||||
nixpkgs-review
|
||||
python3
|
||||
plex-media-player
|
||||
rustup
|
||||
solo2-cli
|
||||
tex
|
||||
yt-dlp
|
||||
wootility
|
||||
];
|
||||
|
||||
programs.riff = {
|
||||
enable = true;
|
||||
direnv = true;
|
||||
dconf.settings."org/gnome/desktop/peripherals/mouse" = {
|
||||
accel-profile = "flat";
|
||||
};
|
||||
|
||||
xdg.mimeApps.enable = true;
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"text/html" = "firefox.desktop";
|
||||
"text/plain" = "org.gnome.TextEditor.desktop";
|
||||
"application/pdf" = "org.gnome.Evince.desktop";
|
||||
|
||||
# Images
|
||||
"image/bmp" = "org.gnome.eog.desktop";
|
||||
"image/gif" = "org.gnome.eog.desktop";
|
||||
"image/jpg" = "org.gnome.eog.desktop";
|
||||
"image/pjpeg" = "org.gnome.eog.desktop";
|
||||
"image/png" = "org.gnome.eog.desktop";
|
||||
"image/tiff" = "org.gnome.eog.desktop";
|
||||
"image/webp" = "org.gnome.eog.desktop";
|
||||
"image/x-bmp" = "org.gnome.eog.desktop";
|
||||
"image/x-gray" = "org.gnome.eog.desktop";
|
||||
"image/x-icb" = "org.gnome.eog.desktop";
|
||||
"image/x-ico" = "org.gnome.eog.desktop";
|
||||
"image/x-png" = "org.gnome.eog.desktop";
|
||||
"image/x-portable-anymap" = "org.gnome.eog.desktop";
|
||||
"image/x-portable-bitmap" = "org.gnome.eog.desktop";
|
||||
"image/x-portable-graymap" = "org.gnome.eog.desktop";
|
||||
"image/x-portable-pixmap" = "org.gnome.eog.desktop";
|
||||
"image/x-xbitmap" = "org.gnome.eog.desktop";
|
||||
"image/x-xpixmap" = "org.gnome.eog.desktop";
|
||||
"image/x-pcx" = "org.gnome.eog.desktop";
|
||||
"image/svg+xml" = "org.gnome.eog.desktop";
|
||||
"image/svg+xml-compressed" = "org.gnome.eog.desktop";
|
||||
"image/vnd.wap.wbmp" = "org.gnome.eog.desktop";
|
||||
"image/x-icns" = "org.gnome.eog.desktop";
|
||||
};
|
||||
|
||||
programs.exa = {
|
||||
enable = true;
|
||||
enableAliases = true;
|
||||
};
|
||||
|
||||
programs.bat.enable = true;
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
userName = "Victor";
|
||||
userEmail = "victor@xirion.net";
|
||||
lfs.enable = true;
|
||||
# delta.enable = true;
|
||||
extraConfig = {
|
||||
push.autoSetupRemote = true;
|
||||
init.defaultBranch = "main";
|
||||
};
|
||||
};
|
||||
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
shortcut = "b";
|
||||
terminal = "screen-256color";
|
||||
clock24 = true;
|
||||
};
|
||||
|
||||
programs.firefox.enable = true;
|
||||
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscode;
|
||||
userSettings = {
|
||||
"ltex.language" = "en-GB";
|
||||
"latex-workshop.linting.chktex.enabled" = true;
|
||||
"latex-workshop.latex.clean.subfolder.enabled" = true;
|
||||
"latex-workshop.latex.outDir" = "%TMPDIR%/%RELATIVE_DOC%";
|
||||
"editor.fontFamily" =
|
||||
"'DejaVuSansMono Nerd Font', 'monospace', monospace";
|
||||
"keyboard.dispatch" = "keyCode";
|
||||
"rust-analyzer.server.path" = "${pkgs.rust-analyzer}/bin/rust-analyzer";
|
||||
"terminal.integrated.defaultProfile.linux" = "zsh";
|
||||
"nix.enableLanguageServer" = true; # Enable LSP.
|
||||
"nix.serverPath" = "${pkgs.nil}/bin/nil";
|
||||
"[nix]" = { "editor.defaultFormatter" = "brettm12345.nixfmt-vscode"; };
|
||||
"rust-analyzer.checkOnSave.command" = "clippy";
|
||||
"debug.allowBreakpointsEverywhere" = true;
|
||||
# Don't index unecessary things
|
||||
"files.exclude" = {
|
||||
"**/.vscode" = true;
|
||||
"**/.git" = true;
|
||||
"**/.svn" = true;
|
||||
"**/.hg" = true;
|
||||
"**/.deps" = true;
|
||||
"**/CVS" = true;
|
||||
"**/.DS_Store" = true;
|
||||
"/bin" = true;
|
||||
"/boot" = true;
|
||||
"/cdrom" = true;
|
||||
"/dev" = true;
|
||||
"/proc" = true;
|
||||
"/etc" = true;
|
||||
"/nix" = true;
|
||||
};
|
||||
};
|
||||
extensions = with pkgs.vscode-extensions;
|
||||
with pkgs.v.vscode-extensions; [
|
||||
brettm12345.nixfmt-vscode
|
||||
codezombiech.gitignore
|
||||
editorconfig.editorconfig
|
||||
foxundermoon.shell-format
|
||||
james-yu.latex-workshop
|
||||
jnoortheen.nix-ide
|
||||
matklad.rust-analyzer
|
||||
mkhl.direnv
|
||||
ms-vscode-remote.remote-ssh
|
||||
ms-vscode.cpptools
|
||||
platformio.platformio-ide
|
||||
redhat.vscode-yaml
|
||||
tamasfe.even-better-toml
|
||||
valentjn.vscode-ltex
|
||||
vscodevim.vim
|
||||
vadimcn.vscode-lldb
|
||||
xaver.clang-format
|
||||
sumneko.lua
|
||||
];
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
sessionVariables = { DIRENV_LOG_FORMAT = ""; };
|
||||
};
|
||||
|
||||
xdg.userDirs = let home = config.home.homeDirectory;
|
||||
in {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
desktop = "${home}/.desktop";
|
||||
documents = "${home}/cloud/Documents";
|
||||
download = "${home}/dl";
|
||||
music = "${home}/cloud/Music";
|
||||
pictures = "${home}/cloud/Pictures";
|
||||
publicShare = "${home}/.publicShare";
|
||||
templates = "${home}/.templates";
|
||||
videos = "${home}/cloud/Videos";
|
||||
};
|
||||
|
||||
services.syncthing.enable = true;
|
||||
}
|
||||
|
|
|
@ -1,94 +0,0 @@
|
|||
{ inputs, pkgs, ... }: {
|
||||
imports = [ inputs.nixvim.homeManagerModules.nixvim ];
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
package = pkgs.neovim-unwrapped;
|
||||
vimAlias = true;
|
||||
|
||||
globals = { mapleader = " "; };
|
||||
|
||||
maps.normal = {
|
||||
"<leader>ff" = "<cmd>lua require('telescope.builtin').find_files()<cr>";
|
||||
"<leader>fg" = "<cmd>lua require('telescope.builtin').live_grep()<cr>";
|
||||
"<C-_>" =
|
||||
"<cmd>lua require('Comment.api').toggle.linewise.current()<cr>"; # map ctrl+/ to commenting code
|
||||
};
|
||||
|
||||
extraPlugins = with pkgs.vimPlugins; [ catppuccin-nvim luasnip ];
|
||||
|
||||
colorscheme = "catppuccin-frappe";
|
||||
|
||||
extraConfigLua = builtins.readFile ./nvim.lua;
|
||||
|
||||
plugins = {
|
||||
bufferline.enable = true;
|
||||
nix.enable = true;
|
||||
treesitter = {
|
||||
enable = true;
|
||||
nixGrammars = true;
|
||||
# ensureInstalled = [ ];
|
||||
};
|
||||
surround.enable = true;
|
||||
fugitive.enable = true;
|
||||
gitgutter.enable = true;
|
||||
lualine = {
|
||||
enable = true;
|
||||
theme = "catppuccin";
|
||||
};
|
||||
telescope = {
|
||||
enable = true;
|
||||
extensions.fzf-native.enable = true;
|
||||
extensions.fzf-native.fuzzy = true;
|
||||
};
|
||||
comment-nvim = { enable = true; };
|
||||
lsp = {
|
||||
enable = true;
|
||||
servers.rust-analyzer.enable = true;
|
||||
servers.rnix-lsp.enable = true;
|
||||
servers.pyright.enable = true;
|
||||
servers.elixirls.enable = true;
|
||||
servers.clangd.enable = true;
|
||||
};
|
||||
trouble.enable = true;
|
||||
lspkind.enable = true;
|
||||
nvim-cmp = {
|
||||
enable = true;
|
||||
autoEnableSources = true;
|
||||
sources = [
|
||||
{ name = "nvim_lsp"; }
|
||||
{ name = "cmp-latex-symbols"; }
|
||||
{
|
||||
name = "luasnip";
|
||||
option = { show_autosnippets = true; };
|
||||
}
|
||||
{ name = "cmp-spell"; }
|
||||
{ name = "cmp-rg"; }
|
||||
{ name = "path"; }
|
||||
{ name = "buffer"; }
|
||||
];
|
||||
snippet.expand = "luasnip";
|
||||
mappingPresets = [ "insert" "cmdline" ];
|
||||
mapping = {
|
||||
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||
"<Tab>" = {
|
||||
modes = [ "i" "s" ];
|
||||
action = ''
|
||||
function(fallback)
|
||||
local luasnip = require('luasnip')
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expandable() then
|
||||
luasnip.expand()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
_: {
|
||||
networking.networkmanager.enable = true;
|
||||
networking.firewall.checkReversePath = false;
|
||||
networking.firewall.enable = false;
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
{ lib, stdenv, fetchurl, appimageTools, makeWrapper, electron }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "deemix-gui";
|
||||
version = "2022-08-20";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.deemix.app/gui/linux-x64-latest.AppImage";
|
||||
sha256 = "sha256-e2neemsAzGniBpXIPYbKk5LQHoYLvFj5/8QszCcoTYM=";
|
||||
name = "${pname}-${version}.AppImage";
|
||||
};
|
||||
|
||||
appimageContents = appimageTools.extractType2 {
|
||||
name = "${pname}-${version}";
|
||||
inherit src;
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin $out/share/${pname} $out/share/applications
|
||||
|
||||
cp -a ${appimageContents}/{locales,resources} $out/share/${pname}
|
||||
cp -a ${appimageContents}/usr/share/icons $out/share
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
makeWrapper ${electron}/bin/electron $out/bin/${pname} --add-flags $out/share/${pname}/resources/app.asar
|
||||
'';
|
||||
|
||||
meta = { platforms = [ "x86_64-linux" ]; };
|
||||
}
|
|
@ -1,13 +1,8 @@
|
|||
# nix-build -E 'with import <nixpkgs> {}; callPackage ./default.nix {}'
|
||||
final: prev: {
|
||||
v = {
|
||||
# nixos 22.11 version of minio, need to upgrade backend from fs to xl
|
||||
minio-old = prev.callPackage ./minio-old { };
|
||||
|
||||
glitch-soc = prev.callPackage ./glitch-soc { };
|
||||
|
||||
deemix-gui = prev.callPackage ./deemix-gui { };
|
||||
|
||||
unbound = prev.unbound.override {
|
||||
withSystemd = true;
|
||||
withDoH = true;
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
|
||||
|
||||
let
|
||||
# The web client verifies, that the server version is a valid datetime string:
|
||||
# https://github.com/minio/minio/blob/3a0e7347cad25c60b2e51ff3194588b34d9e424c/browser/app/js/web.js#L51-L53
|
||||
#
|
||||
# Example:
|
||||
# versionToTimestamp "2021-04-22T15-44-28Z"
|
||||
# => "2021-04-22T15:44:28Z"
|
||||
versionToTimestamp = version:
|
||||
let
|
||||
splitTS = builtins.elemAt (builtins.split "(.*)(T.*)" version) 1;
|
||||
in
|
||||
builtins.concatStringsSep "" [ (builtins.elemAt splitTS 0) (builtins.replaceStrings [ "-" ] [ ":" ] (builtins.elemAt splitTS 1)) ];
|
||||
in
|
||||
buildGoModule rec {
|
||||
pname = "minio";
|
||||
version = "2022-10-24T18-35-07Z";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "minio";
|
||||
repo = "minio";
|
||||
rev = "RELEASE.${version}";
|
||||
sha256 = "sha256-sABNzhyfBNU5pWyE/VWHUzuSyKsx0glj01ectJPakV8=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-wB3UiuptT6D0CIUlHC1d5k0rjIxNeh5yAWOmYpyLGmA=";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
subPackages = [ "." ];
|
||||
|
||||
CGO_ENABLED = 0;
|
||||
|
||||
tags = [ "kqueue" ];
|
||||
|
||||
ldflags = let t = "github.com/minio/minio/cmd"; in [
|
||||
"-s" "-w" "-X ${t}.Version=${versionToTimestamp version}" "-X ${t}.ReleaseTag=RELEASE.${version}" "-X ${t}.CommitID=${src.rev}"
|
||||
];
|
||||
|
||||
passthru.tests.minio = nixosTests.minio;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.minio.io/";
|
||||
description = "An S3-compatible object storage server";
|
||||
changelog = "https://github.com/minio/minio/releases/tag/RELEASE.${version}";
|
||||
maintainers = with maintainers; [ eelco bachp ];
|
||||
platforms = platforms.unix;
|
||||
license = licenses.agpl3Plus;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue