Compare commits

..

No commits in common. "main" and "feature/flakes" have entirely different histories.

26 changed files with 220 additions and 684 deletions

View File

@ -5,11 +5,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1731533236, "lastModified": 1681202837,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -25,43 +25,27 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726989464, "lastModified": 1685019994,
"narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=", "narHash": "sha256-81o6SKZPALvib21hIOMx2lIhFSs0mRy0PfPvg0zsfTk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176", "rev": "d1f04b0f365a34896a37d9015637796537ec88a3",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-24.05", "ref": "master",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1731386116, "lastModified": 1684935479,
"narHash": "sha256-lKA770aUmjPHdTaJWnP3yQ9OI1TigenUqVC3wweqZuI=", "narHash": "sha256-6QMMsXMr2nhmOPHdti2j3KRHt+bai2zw+LJfdCl97Mk=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "689fed12a013f56d4c4d3f612489634267d86529", "rev": "f91ee3065de91a3531329a674a45ddcb3467a650",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1731319897,
"narHash": "sha256-PbABj4tnbWFMfBp6OcUK5iGy1QY+/Z96ZcLpooIbuEI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "dc460ec76cbff0e66e269457d7b728432263166c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -75,8 +59,7 @@
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs"
"nixpkgs-unstable": "nixpkgs-unstable"
} }
}, },
"systems": { "systems": {

View File

@ -1,13 +1,11 @@
{ {
inputs = { inputs = {
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-24.05"; url = "github:nix-community/home-manager/master";
/* url = "github:nix-community/home-manager/release-22.05"; */
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nixpkgs = { nixpkgs = {
url = "github:nixos/nixpkgs/nixos-24.05";
};
nixpkgs-unstable = {
url = "github:nixos/nixpkgs/nixos-unstable"; url = "github:nixos/nixpkgs/nixos-unstable";
}; };
flake-utils = { flake-utils = {

View File

@ -20,7 +20,6 @@ user:
./home.nix ./home.nix
./htop.nix ./htop.nix
./i3.nix ./i3.nix
./kdeconnect.nix
./lsd.nix ./lsd.nix
./man.nix ./man.nix
./neovim/neovim.nix ./neovim/neovim.nix
@ -30,6 +29,7 @@ user:
./pasystray.nix ./pasystray.nix
./photography.nix ./photography.nix
./picom.nix ./picom.nix
./polybar.nix
./programs.nix ./programs.nix
./qt.nix ./qt.nix
./redshift.nix ./redshift.nix
@ -38,12 +38,10 @@ user:
./rofi.nix ./rofi.nix
./rust.nix ./rust.nix
./signal.nix ./signal.nix
./sway.nix
./telegram.nix ./telegram.nix
./thunderbird.nix ./thunderbird.nix
./tmux.nix ./tmux.nix
./tor.nix ./tor.nix
./waybar.nix
./xdg.nix ./xdg.nix
./zathura.nix ./zathura.nix
./zoom.nix ./zoom.nix

View File

@ -1,7 +0,0 @@
{ ... }: {
services.gammastep = {
enable = true;
longitude = "49.01315";
latitude = "12.1119";
};
}

View File

@ -27,20 +27,7 @@ let
mode_system = "System: L : | S : | P : | R : | E : "; mode_system = "System: L : | S : | P : | R : | E : ";
in { in {
imports = [ xsession.windowManager.i3 = {
./polybar.nix
];
home.packages = with pkgs; [
# i3lock
dmenu
i3blocks
i3lock-fancy-rapid
i3status
rofi
];
xsession = {
enable = true;
windowManager.i3 = {
enable = true; enable = true;
# package = pkgs.i3-gaps; # package = pkgs.i3-gaps;
config = { config = {
@ -138,7 +125,7 @@ in {
"${mod}+r" = "mode \"resize\""; "${mod}+r" = "mode \"resize\"";
"${mod}+x" = "mode \"${mode_system}\""; "${mod}+x" = "mode \"${mode_system}\"";
"${mod}+Shift+x" = "exec i3lock-fancy-rapid 5 3"; "${mod}+Shift+x" = "exec i3lock-fancy -n";
}; };
modes = { modes = {
@ -177,6 +164,5 @@ in {
}; };
}; };
};
} }

View File

@ -1,6 +0,0 @@
{ ... }: {
services.kdeconnect = {
enable = true;
indicator = true;
};
}

View File

@ -28,7 +28,7 @@ let
showSignature = "append"; showSignature = "append";
}; };
aerc = { aerc = {
enable = false; enable = true;
extraAccounts = { extraAccounts = {
pgp-opportunistic-encrypt = true; pgp-opportunistic-encrypt = true;
pgp-autosign = true; pgp-autosign = true;
@ -38,7 +38,7 @@ let
enable = true; enable = true;
/* TODO: which boxes? */ /* TODO: which boxes? */
boxes = [ "Inbox" ]; boxes = [ "Inbox" ];
onNotify = "${pkgs.isync}/bin/mbsync ${configName}"; onNotify = "mbsync ${configName}";
onNotifyPost = "${pkgs.libnotify}/bin/notify-send -a mail '${configName}: new in %s'"; onNotifyPost = "${pkgs.libnotify}/bin/notify-send -a mail '${configName}: new in %s'";
}; };
mbsync = { mbsync = {
@ -75,7 +75,7 @@ in {
home.packages = with pkgs; [ home.packages = with pkgs; [
libsecret libsecret
libnotify libnotify
urlscan urlview
]; ];
home.file.mailcap = { home.file.mailcap = {
target = ".mailcap"; target = ".mailcap";
@ -84,7 +84,7 @@ in {
programs.password-store.enable = true; programs.password-store.enable = true;
programs.aerc = { programs.aerc = {
enable = false; enable = true;
extraConfig = builtins.readFile ./aerc/aerc.conf; extraConfig = builtins.readFile ./aerc/aerc.conf;
/* { */ /* { */
/* general = { */ /* general = { */
@ -104,10 +104,6 @@ in {
services.imapnotify.enable = true; services.imapnotify.enable = true;
programs.notmuch = { programs.notmuch = {
enable = true; enable = true;
hooks.postNew = ''
# remove inbox tag from moved messages
notmuch tag -inbox not 'folder:/.*\/Inbox/'
'';
}; };
programs.neomutt = { programs.neomutt = {
@ -118,12 +114,8 @@ in {
macros = [ macros = [
{ map = [ "pager" "index" ]; { map = [ "pager" "index" ];
key = "B"; key = "B";
action = "|urlscan\\n"; action = "|urlview\\n";
} }
/*{ map = [ "pager" "index" ];
key = "dd";
action = ":set delete = yes\\n<clear-flag>N<delete-message>";
}*/
]; ];
binds = [ binds = [
/* sidebar */ /* sidebar */
@ -234,18 +226,12 @@ in {
key = "zA"; key = "zA";
action = "collapse-all"; action = "collapse-all";
} }
/* search with notmuch */
{ map = [ "pager" "index" ];
key = "S";
action = "vfolder-from-query";
}
]; ];
}; };
programs.msmtp.enable = true; programs.msmtp.enable = true;
accounts.email.accounts = let accounts.email.accounts = let
aliases = ".*@vbrandl.net"; aliases = "mail(\\+.*)?@vbrandl.net";
in { in {
vbrandl = ( vbrandl = (
mailBaseConfig { mailBaseConfig {

View File

@ -27,31 +27,27 @@ require('packer').startup(function(use)
} }
use { use {
"mrcjkb/rustaceanvim", 'simrat39/rust-tools.nvim',
ft = { 'rust' },
requires = { requires = {
{ { 'neovim/nvim-lspconfig' },
"lvimuser/lsp-inlayhints.nvim",
opts = {} -- Debugging
}, { 'nvim-lua/plenary.nvim' },
{ "nvim-lua/plenary.nvim" }, { 'mfussenegger/nvim-dap' },
{ "mfussenegger/nvim-dap" },
}, },
config = function() config = function()
vim.g.rustaceanvim = { local rt = require("rust-tools")
tools = {
hover_actions = { rt.setup({
auto_focus = true,
},
},
server = { server = {
on_attach = function(client, bufnr) on_attach = function(_, bufnr)
require("lsp-inlayhints").setup() -- Hover actions
require("lsp-inlayhints").on_attach(client, bufnr) vim.keymap.set("n", "<C-space>", rt.hover_actions.hover_actions, { buffer = bufnr })
require("lsp-inlayhints").show() -- Code action groups
end vim.keymap.set("n", "<Leader>a", rt.code_action_group.code_action_group, { buffer = bufnr })
} end,
} },
})
end, end,
} }
@ -68,7 +64,7 @@ require('packer').startup(function(use)
-- use { 'kien/ctrlp.vim' } -- use { 'kien/ctrlp.vim' }
use { use {
'nvim-telescope/telescope.nvim', 'nvim-telescope/telescope.nvim', tag = '0.1.0',
requires = { requires = {
{ 'nvim-lua/plenary.nvim' } { 'nvim-lua/plenary.nvim' }
}, },

View File

@ -67,6 +67,9 @@ set undofile
" clear highlighted search " clear highlighted search
noremap <space> :nohlsearch<cr> noremap <space> :nohlsearch<cr>
" Highlight symbol under cursor on CursorHold
autocmd CursorHold * silent call CocActionAsync('highlight')
" Append modeline after last line in buffer. " Append modeline after last line in buffer.
" Use substitute() instead of printf() to handle '%%s' modeline in LaTeX files. " Use substitute() instead of printf() to handle '%%s' modeline in LaTeX files.
function! AppendModeline() function! AppendModeline()

View File

@ -452,6 +452,13 @@ in {
programs.neovim = { programs.neovim = {
vimAlias = true; vimAlias = true;
viAlias = true; viAlias = true;
coc = {
enable = true;
# settings = {
# "rust-analyzer.serverPath" = "${pkgs.rust-analyzer}/bin/rust-analyzer";
# "gopls.experimentalWorkspaceModule" = true;
# };
};
} // config; } // config;
# programs.vim = config; # programs.vim = config;

View File

@ -1,6 +1,6 @@
{ config, pkgs, ... }: { { pkgs, ... }: {
services.polybar = { services.polybar = {
enable = config.xsession.windowManager.i3.enable; enable = true;
config = { config = {
"bar/top" = { "bar/top" = {
monitor = "\${env:MONITOR:}"; monitor = "\${env:MONITOR:}";

View File

@ -5,6 +5,8 @@
gnumake gnumake
pkg-config pkg-config
i3lock-fancy
antigen antigen
nodejs nodejs
fortune fortune
@ -26,7 +28,5 @@
/* obs-studio */ /* obs-studio */
# unstable.obs-v4l2sink # unstable.obs-v4l2sink
jellyfin-media-player
]; ];
} }

View File

@ -1,6 +1,6 @@
{ ... }: { { ... }: {
qt = { qt = {
enable = true; enable = true;
platformTheme.name = "gtk"; platformTheme = "gtk";
}; };
} }

View File

@ -1,6 +1,6 @@
{ config, ... }: { { ... }: {
services.redshift = { services.redshift = {
enable = config.xsession.windowManager.i3.enable; enable = true;
longitude = "49.01315"; longitude = "49.01315";
latitude = "12.1119"; latitude = "12.1119";
}; };

View File

@ -3,6 +3,7 @@
cargo-edit cargo-edit
# llvmPackages_latest.bintools # llvmPackages_latest.bintools
llvmPackages_latest.llvm llvmPackages_latest.llvm
rust-analyzer
rustup rustup
sccache sccache
xorriso xorriso

View File

@ -1,153 +0,0 @@
{ lib, pkgs, ... }:
let
mod = "Mod4";
ws1 = "1: www";
ws2 = "2: >_";
ws3 = "3: </>";
ws4 = "4: IM";
ws5 = "5: ./";
ws6 = "6: doc";
ws7 = "7: mail";
ws8 = "8";
ws9 = "9";
ws10 = "10: media";
mode_system = "System: L : | S : | P : | R : | E : ";
in {
imports = [
./gammastep.nix
];
home.packages = with pkgs; [
slurp # screenshot selection
grim # screenshots
wl-clipboard # copy/paste
swaybg # background images
];
# similar to i3-lock-fancy
programs.swaylock = {
enable = true;
package = pkgs.swaylock-effects;
settings = {
screenshots = true;
effect-blur = "7x5";
clock = true;
indicator = true;
indicator-thickness = 7;
};
};
wayland.windowManager.sway = {
enable = true;
swaynag.enable = true;
config = {
modifier = mod;
workspaceAutoBackAndForth = true;
fonts = {
names = [ "NotoSans-Regular" "FontAwesome" ];
style = "Monospace";
size = 12.0;
};
/* TODO: background
output = {
"*" = {
bg = "/home/me/media/Pictures/wallpapers/gargantua-black-3840x2160-11475.jpg fill";
};
};
*/
assigns = {
"${ws1}" = [ { app_id = "firefox"; } ];
"${ws5}" = [ { app_id="thunar"; } ];
"${ws7}" = [ { class="Thunderbird"; } ];
};
floating = {
criteria = [
{ window_role = "pop-up"; }
{ window_role = "task_dialog"; }
{ title = "Preferences$"; }
{ app_id = "org.keepassxc.KeePassXC"; }
{ app_id = "pavucontrol"; }
{ class = "^Pinentry-gtk-2$"; }
];
};
terminal = "alacritty";
keybindings = lib.mkOptionDefault {
"${mod}+b" = "split h";
"${mod}+v" = "split v";
"${mod}+s" = "layout stacking";
"${mod}+w" = "layout tabbed";
"${mod}+e" = "layout toggle split";
"${mod}+space" = "focus mode_toggle";
"${mod}+d" = "exec rofi -show drun";
"${mod}+Tab" = "exec rofi -show window";
"${mod}+1" = "workspace ${ws1}";
"${mod}+2" = "workspace ${ws2}";
"${mod}+3" = "workspace ${ws3}";
"${mod}+4" = "workspace ${ws4}; layout tabbed";
"${mod}+5" = "workspace ${ws5}";
"${mod}+6" = "workspace ${ws6}";
"${mod}+7" = "workspace ${ws7}; layout tabbed";
"${mod}+8" = "workspace ${ws8}";
"${mod}+9" = "workspace ${ws9}";
"${mod}+0" = "workspace ${ws10}";
"${mod}+Shift+1" = "move container to workspace ${ws1}";
"${mod}+Shift+2" = "move container to workspace ${ws2}";
"${mod}+Shift+3" = "move container to workspace ${ws3}";
"${mod}+Shift+4" = "move container to workspace ${ws4}";
"${mod}+Shift+5" = "move container to workspace ${ws5}";
"${mod}+Shift+6" = "move container to workspace ${ws6}";
"${mod}+Shift+7" = "move container to workspace ${ws7}";
"${mod}+Shift+8" = "move container to workspace ${ws8}";
"${mod}+Shift+9" = "move container to workspace ${ws9}";
"${mod}+Shift+0" = "move container to workspace ${ws10}";
"${mod}+Shift+r" = "reload";
"${mod}+r" = "mode \"resize\"";
"${mod}+x" = "mode \"${mode_system}\"";
"${mod}+Shift+x" = "exec swaylock";
};
modes = {
resize = {
h = "resize shrink width 10 px or 10 ppt";
j = "resize grow height 10 px or 10 ppt";
k = "resize shrink height 10 px or 10 ppt";
l = "resize grow width 10 px or 10 ppt";
Return = "mode \"default\"";
Escape = "mode \"default\"";
"${mod}+r" = "mode \"default\"";
};
"${mode_system}" = {
l = "exec ~/bin/lock.sh, mode \"default\"";
s = "exec $Lock systemctl suspend, mode \"default\"";
p = "exec systemctl poweroff -i, mode \"default\"";
r = "exec systemctl reboot, mode \"default\"";
e = "exec i3-msg exit, mode \"default\"";
# back to normal: Enter or Escape or mod+x again
Return = "mode \"default\"";
Escape = "mode \"default\"";
"${mod}+x" = "mode \"default\"";
};
};
window = {
hideEdgeBorders = "both";
# disable titlebar
titlebar = false;
};
};
};
}

View File

@ -1,100 +0,0 @@
{ config, pkgs, ... }: {
programs.waybar = {
enable = config.wayland.windowManager.sway.enable;
systemd.enable = true;
settings = {
mainBar = {
layer = "top";
position = "top";
height = 30;
output = [
"eDP-1"
"HDMI-A-1"
];
modules-left = ["sway/workspaces" "sway/mode"];
#modules-center = ["sway/window"];
modules-right = [
"pulseaudio"
"network"
"disk"
"memory"
"cpu"
"battery"
"clock#date"
"clock#time"
"tray"
];
"disk" = {
format = "Disk {percentage_free}%";
};
"pulseaudio" = {
format = "{volume}% {format_source}";
on-click = "pavucontrol";
};
"cpu" = {
format = "CPU {usage}% ({load})";
states = {
warning = "70";
critical = "90";
};
};
"memory" = {
format = "Mem {}%";
states = {
warning = "70";
critical = "90";
};
};
"network" = {
format-wifi = " {essid} ({signalStrength}%)";
format-ethernet = " {ifname}: {ipaddr}/{cidr}";
format-disconnected = " Disconnected";
};
"battery" = {
states = {
warning = "30";
critical = "15";
};
format = " {icon} {capacity}%";
format-discharging = "{icon} {capacity}%";
format-icons = [
""
""
""
""
""
];
};
tray = {
icon-size = 21;
spacing = 10;
};
"clock#time" = {
interval = 1;
format = "{:%H:%M:%S}";
};
"clock#date" = {
format = "{:%e %B %Y}";
};
"sway/workspaces" = {
all-outputs = false;
};
};
};
package = pkgs.waybar.override {
pulseSupport = true;
#i3Support = true;
};
};
}

View File

@ -1,7 +1,7 @@
{ pkgs, ... }: { { pkgs, ... }: {
programs.zsh = { programs.zsh = {
enable = true; enable = true;
autosuggestion.enable = true; enableAutosuggestions = true;
enableCompletion = true; enableCompletion = true;
autocd = true; autocd = true;
dotDir = ".config/zsh"; dotDir = ".config/zsh";

View File

@ -1,7 +1,7 @@
inputs: inputs:
{ config, lib, pkgs, ... }: { { config, lib, pkgs, ... }: {
nix = { nix = {
package = pkgs.nixStable; package = pkgs.nixUnstable;
extraOptions = '' extraOptions = ''
experimental-features = nix-command flakes experimental-features = nix-command flakes
''; '';
@ -26,17 +26,17 @@ inputs:
i18n.defaultLocale = "en_GB.UTF-8"; i18n.defaultLocale = "en_GB.UTF-8";
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
#sound.enable = true; sound.enable = true;
hardware = { hardware = {
# TODO: remove # TODO: remove
enableAllFirmware = true; enableAllFirmware = true;
#pulseaudio = { pulseaudio = {
# TODO: pipewire # TODO: pipewire
#enable = true; enable = true;
# stop mumble from muting other processes # stop mumble from muting other processes
#extraConfig = "unload-module module-role-cork"; extraConfig = "unload-module module-role-cork";
#}; };
opengl = { opengl = {
enable = true; enable = true;
# driSupport = true; # driSupport = true;
@ -66,13 +66,9 @@ inputs:
# Enable CUPS to print documents. # Enable CUPS to print documents.
printing.enable = true; printing.enable = true;
pipewire = { pipewire = {
enable = true; enable = false;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true; pulse.enable = true;
wireplumber.enable = true;
}; };
# required for nextcloud # required for nextcloud
gnome.gnome-keyring.enable = true; gnome.gnome-keyring.enable = true;
@ -86,25 +82,26 @@ inputs:
enable = true; enable = true;
}; };
displayManager = {
#defaultSession = "none+i3";
defaultSession = "sway";
};
xserver = { xserver = {
enable = true; enable = true;
xkb = {
options = "caps:escape";
layout = "eu"; layout = "eu";
}; xkbOptions = "caps:escape";
displayManager = { displayManager = {
gdm.enable = true; defaultSession = "none+i3";
lightdm.enable = true;
}; };
windowManager.i3 = { windowManager.i3 = {
enable = true; enable = true;
extraPackages = with pkgs; [
dmenu
rofi
i3status
i3lock
i3blocks
];
}; };
}; };
}; };
@ -113,18 +110,6 @@ inputs:
"L+ /lib64/ld-linux-x86-64.so.2 - - - - ${pkgs.glibc}/lib64/ld-linux-x86-64.so.2" "L+ /lib64/ld-linux-x86-64.so.2 - - - - ${pkgs.glibc}/lib64/ld-linux-x86-64.so.2"
]; ];
# pipewire bluetooth config (https://nixos.wiki/wiki/PipeWire#Bluetooth_Configuration)
environment.etc = {
"wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
bluez_monitor.properties = {
["bluez5.enable-sbc-xq"] = true,
["bluez5.enable-msbc"] = true,
["bluez5.enable-hw-volume"] = true,
["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
}
'';
};
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
alacritty alacritty
arandr arandr
@ -149,9 +134,9 @@ inputs:
]; ];
virtualisation = { virtualisation = {
docker = { # docker = {
enable = false; # enable = true;
}; # };
podman = { podman = {
enable = true; enable = true;
@ -160,22 +145,12 @@ inputs:
/* to make networking in docker-compose work */ /* to make networking in docker-compose work */
dns_enabled = true; dns_enabled = true;
}; };
dockerSocket.enable = true; #dockerSocket.enable = true;
}; };
# lxd.enable = true; # lxd.enable = true;
# virtualbox.host.enable = true; # virtualbox.host.enable = true;
# virtualbox.host.enableExtensionPack = true; # virtualbox.host.enableExtensionPack = true;
}; };
# virt-manager
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
#dconf.settings = {
#"org/virt-manager/virt-manager/connections" = {
#autoconnect = ["qemu:///system"];
#uris = ["qemu:///system"];
#};
#};
programs = { programs = {
# enable zsh globally # enable zsh globally
@ -183,13 +158,12 @@ inputs:
gnupg.agent = { gnupg.agent = {
enable = true; enable = true;
enableSSHSupport = true; enableSSHSupport = true;
pinentryPackage = pkgs.pinentry-curses; pinentryFlavor = "curses";
}; };
thunar = { thunar = {
enable = true; enable = true;
plugins = with pkgs.xfce; [ thunar-archive-plugin thunar-volman ]; plugins = with pkgs.xfce; [ thunar-archive-plugin thunar-volman ];
}; };
kdeconnect.enable = true;
}; };
environment.sessionVariables = { environment.sessionVariables = {
@ -201,8 +175,8 @@ inputs:
environment.pathsToLink = [ "/libexec" ]; # links /libexec from derivations to /run/current-system/sw environment.pathsToLink = [ "/libexec" ]; # links /libexec from derivations to /run/current-system/sw
fonts = { fonts = {
enableDefaultPackages = true; enableDefaultFonts = true;
packages = with pkgs; [ fonts = with pkgs; [
font-awesome font-awesome
nerdfonts nerdfonts
noto-fonts noto-fonts
@ -220,20 +194,11 @@ inputs:
}; };
}; };
security = {
# generate login settings # generate login settings
# ykman otp chalresp --touch --generate 2 # ykman otp chalresp --touch --generate 2
pam.yubico = { security.pam.yubico = {
enable = true; enable = true;
# debug = true; # debug = true;
mode = "challenge-response"; mode = "challenge-response";
}; };
sudo = {
package = pkgs.sudo.override { withInsults = true; };
};
# rtkit is optional but recommended for pipewire
rtkit.enable = true;
};
} }

View File

@ -1,5 +1,5 @@
inputs: inputs:
{ pkgs, pkgs-unstable, ... }: { { pkgs, ... }: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
neovim neovim
vim vim
@ -13,7 +13,7 @@ inputs:
binutils binutils
curl curl
htop htop
nixfmt-classic nixfmt
ripgrep ripgrep
shellcheck shellcheck
tmux tmux
@ -26,13 +26,10 @@ inputs:
direnv direnv
# gitea cli
tea
#idea.idea-community #idea.idea-community
unstable.jetbrains.idea-community jetbrains.idea-ultimate
dbeaver-bin dbeaver
]; ];
services.lorri.enable = true; services.lorri.enable = true;

View File

@ -11,9 +11,6 @@ inputs:
spotify spotify
vlc vlc
# podcast app with nextcloud sync
libsForQt5.kasts
teamspeak_client teamspeak_client
# support both 32- and 64-bit applications # support both 32- and 64-bit applications

View File

@ -3,38 +3,18 @@ let
system = "x86_64-linux"; system = "x86_64-linux";
hostname = "morpheus"; hostname = "morpheus";
swapUUID = "93bdadfc-961a-4ea6-aef0-d3cd50847f0b"; swapUUID = "93bdadfc-961a-4ea6-aef0-d3cd50847f0b";
overlay-unstable = final: prev: {
unstable = inputs.nixpkgs-unstable.legacyPackages.${prev.system};
};
in in
inputs.nixpkgs.lib.nixosSystem { inputs.nixpkgs.lib.nixosSystem {
inherit system; inherit system;
modules = [ modules = [
({ config, pkgs, ... } : { { system.stateVersion = "22.05"; }
system.stateVersion = "22.05";
nixpkgs.overlays = [ overlay-unstable ];
})
(import ./common.nix inputs) (import ./common.nix inputs)
(import ./sway.nix inputs)
(import ./morpheus/btrbk.nix inputs)
(import ./dev.nix inputs) (import ./dev.nix inputs)
(import ./entertainment.nix inputs) (import ./entertainment.nix inputs)
(import ./office.nix inputs) (import ./office.nix inputs)
({ pkgs, lib, ... }: { ({ pkgs, lib, ... }: {
system.autoUpgrade = { system.autoUpgrade = {
enable = false; enable = true;
flake = inputs.self.outPath;
flags = [
"--update-input"
"nixpkgs"
"--update-input"
"nixpkgs-unstable"
"--update-input"
"home-manager"
"--update-input"
"flake-utils"
"-L" # print build logs
];
allowReboot = false; allowReboot = false;
}; };
@ -51,14 +31,16 @@ inputs.nixpkgs.lib.nixosSystem {
}; };
services = { services = {
# enable touchpad support # enable touchpad support
libinput.enable = true; xserver.libinput.enable = true;
blueman.enable = true; blueman.enable = true;
snapper.configs = { snapper.configs = {
home = { home = {
SUBVOLUME = "/home"; subvolume = "/home";
ALLOW_USERS = [ "me" ]; extraConfig = ''
TIMELINE_CREATE = true; ALLOW_USERS="me"
TIMELINE_CLEANUP = true; TIMELINE_CREATE=yes
TIMELINE_CLEANUP=yes
'';
}; };
}; };
}; };
@ -71,7 +53,6 @@ inputs.nixpkgs.lib.nixosSystem {
"davfs2" "davfs2"
"disk" "disk"
"docker" "docker"
"libvirtd" # virt-manager
"networkmanager" "networkmanager"
"plugdev" "plugdev"
"podman" "podman"
@ -88,12 +69,7 @@ inputs.nixpkgs.lib.nixosSystem {
#availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; #availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" ]; availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" ];
kernelModules = [ ]; kernelModules = [ ];
luks.devices."system" = { luks.devices."system".device = "/dev/disk/by-uuid/06549d22-b96c-44f2-bb27-45200d5feda5";
device = "/dev/disk/by-uuid/06549d22-b96c-44f2-bb27-45200d5feda5";
# better SSD performance
# https://wiki.archlinux.org/title/Dm-crypt/Specialties#Disable_workqueue_for_increased_solid_state_drive_(SSD)_performance
bypassWorkqueues = true;
};
}; };
kernelModules = [ "kvm-amd" ]; kernelModules = [ "kvm-amd" ];
# use latest kernel # use latest kernel
@ -123,13 +99,6 @@ inputs.nixpkgs.lib.nixosSystem {
supportedFilesystems = [ "ntfs" ]; supportedFilesystems = [ "ntfs" ];
}; };
# btrf autoscrub
services.btrfs.autoScrub = {
enable = true;
# multiple subvolumes of the same fs are mounted. only scrub '/' to prevent multiple runs
fileSystems = [ "/" ];
};
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/93bdadfc-961a-4ea6-aef0-d3cd50847f0b"; { device = "/dev/disk/by-uuid/93bdadfc-961a-4ea6-aef0-d3cd50847f0b";
fsType = "btrfs"; fsType = "btrfs";

View File

@ -1,69 +0,0 @@
{ ... }: {
services.btrbk = {
instances = {
/*
home = {
settings = {
snapshot_preserve = "24h 14d 4w 12m";
snapshot_preserve_min = "latest";
# don't auto cleanup target
target_preserve_min = "all";
volume."/" = {
snapshot_dir = ".btrbk";
subvolume = {
home = {
snapshot_create = "always";
};
};
target = "/run/media/me/backup/morpheus";
};
};
};
*/
# local snapshots:
# - create hourly
# - keep hourly for 4 days and daily forever
home_local = {
onCalendar = "hourly";
settings = {
snapshot_preserve = "96h *d";
snapshot_preserve_min = "latest";
volume."/" = {
snapshot_dir = "/home/.btrbk";
subvolume.home = {
snapshot_create = "always";
};
};
};
};
# backup snapshots to backup drive
# - keep all hourly and the last 14 days of daily snapshots on the local disk
# - keep 14 daily, 8 weekly and all monthly snapshots on the backup drive
# - don't create new snapshots
# - TODO: trigger on mount
home_external = {
# disable systemd timer
onCalendar = null;
settings = {
snapshot_preserve = "*h 14d";
snapshot_preserve_min = "latest";
target_preserve = "14d 8w *m";
target_preserve_min = "2d";
volume."/" = {
snapshot_dir = "/home/.btrbk";
subvolume.home = {
snapshot_create = "no";
};
target = "/run/media/me/backup/morpheus";
};
};
};
};
};
}

View File

@ -1,9 +0,0 @@
inputs:
{ config, lib, pkgs, ... }: {
services.gnome.gnome-keyring.enable = true;
programs.sway = {
enable = true;
wrapperFeatures.gtk = true;
};
environment.sessionVariables.NIXOS_OZONE_WL = "1";
}

View File

@ -13,7 +13,7 @@ inputs.nixpkgs.lib.nixosSystem {
(import ./office.nix inputs) (import ./office.nix inputs)
({ pkgs, lib, ... }: { ({ pkgs, lib, ... }: {
system.autoUpgrade = { system.autoUpgrade = {
enable = false; enable = true;
allowReboot = false; allowReboot = false;
}; };

View File

@ -1,6 +0,0 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"local>renovate-bot/renovate-config"
]
}