Compare commits

..

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

27 changed files with 224 additions and 724 deletions

View File

@ -5,11 +5,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github"
},
"original": {
@ -25,43 +25,27 @@
]
},
"locked": {
"lastModified": 1732319136,
"narHash": "sha256-wpmPl6FkAF9Jj5C/rzANgpUjfzQrUYOn267LnzKU2uI=",
"lastModified": 1685019994,
"narHash": "sha256-81o6SKZPALvib21hIOMx2lIhFSs0mRy0PfPvg0zsfTk=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "f8831cc700030e11fc91da9ef6270593e6440edc",
"rev": "d1f04b0f365a34896a37d9015637796537ec88a3",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-24.11",
"ref": "master",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1731755305,
"narHash": "sha256-v5P3dk5JdiT+4x69ZaB18B8+Rcu3TIOrcdG4uEX7WZ8=",
"lastModified": 1684935479,
"narHash": "sha256-6QMMsXMr2nhmOPHdti2j3KRHt+bai2zw+LJfdCl97Mk=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "057f63b6dc1a2c67301286152eb5af20747a9cb4",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1732014248,
"narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "23e89b7da85c3640bbc2173fe04f4bd114342367",
"rev": "f91ee3065de91a3531329a674a45ddcb3467a650",
"type": "github"
},
"original": {
@ -75,8 +59,7 @@
"inputs": {
"flake-utils": "flake-utils",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable"
"nixpkgs": "nixpkgs"
}
},
"systems": {

View File

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

View File

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

View File

@ -27,47 +27,34 @@ let
mode_system = "System: L : | S : | P : | R : | E : ";
in {
imports = [
./polybar.nix
];
home.packages = with pkgs; [
# i3lock
dmenu
i3blocks
i3lock-fancy-rapid
i3status
rofi
];
xsession = {
xsession.windowManager.i3 = {
enable = true;
windowManager.i3 = {
enable = true;
# package = pkgs.i3-gaps;
config = {
modifier = mod;
# package = pkgs.i3-gaps;
config = {
modifier = mod;
workspaceAutoBackAndForth = true;
workspaceAutoBackAndForth = true;
fonts = {
names = [ "NotoSans-Regular" "FontAwesome" ];
style = "Monospace";
size = 12.0;
};
fonts = {
names = [ "NotoSans-Regular" "FontAwesome" ];
style = "Monospace";
size = 12.0;
};
assigns = {
"${ws1}" = [
assigns = {
"${ws1}" = [
{ class = "^Firefox$"; }
{ class = "firefox"; }
{ class = "Firefox"; }
];
"${ws4}" = [{ class="Pidgin"; }];
"${ws5}" = [{ class="Thunar"; }];
"${ws6}" = [{ class="libreoffice-startcenter"; }];
"${ws7}" = [{ class="Thunderbird"; }];
};
];
"${ws4}" = [{ class="Pidgin"; }];
"${ws5}" = [{ class="Thunar"; }];
"${ws6}" = [{ class="libreoffice-startcenter"; }];
"${ws7}" = [{ class="Thunderbird"; }];
};
floating = {
criteria = [
floating = {
criteria = [
{ window_role = "pop-up"; }
{ window_role = "task_dialog"; }
{ title = "Preferences$"; }
@ -76,107 +63,106 @@ in {
{ class = "KeePassXC"; }
{ class = "^Pavucontrol$"; }
{ class = "^Pinentry-gtk-2$"; }
];
};
terminal = "alacritty";
keybindings = lib.mkOptionDefault {
"${mod}+Shift+q" = "kill";
"${mod}+h" = "focus left";
"${mod}+j" = "focus down";
"${mod}+k" = "focus up";
"${mod}+l" = "focus right";
"${mod}+Left" = "focus left";
"${mod}+Down" = "focus down";
"${mod}+Up" = "focus up";
"${mod}+Right" = "focus right";
"${mod}+Shift+h" = "move left";
"${mod}+Shift+j" = "move down";
"${mod}+Shift+k" = "move up";
"${mod}+Shift+l" = "move right";
"${mod}+Shift+Left" = "move left";
"${mod}+Shift+Down" = "move down";
"${mod}+Shift+Up" = "move up";
"${mod}+Shift+Right" = "move right";
"${mod}+b" = "split h";
"${mod}+v" = "split v";
"${mod}+s" = "layout stacking";
"${mod}+w" = "layout tabbed";
"${mod}+e" = "layout toggle split";
"${mod}+Shift+space" = "floating toggle";
"${mod}+space" = "focus mode_toggle";
"${mod}+a" = "focus parent";
"${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+c" = "reload";
"${mod}+Shift+r" = "restart";
"${mod}+Shift+e" = "exec \"i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'\"";
"${mod}+r" = "mode \"resize\"";
"${mod}+x" = "mode \"${mode_system}\"";
"${mod}+Shift+x" = "exec i3lock-fancy-rapid 5 3";
};
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";
Left = "resize shrink width 10 px or 10 ppt";
Down = "resize grow height 10 px or 10 ppt";
Up = "resize shrink height 10 px or 10 ppt";
Right = "resize grow width 10 px or 10 ppt";
Return = "mode \"default\"";
Escape = "mode \"default\"";
};
"${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;
};
];
};
terminal = "alacritty";
keybindings = lib.mkOptionDefault {
"${mod}+Shift+q" = "kill";
"${mod}+h" = "focus left";
"${mod}+j" = "focus down";
"${mod}+k" = "focus up";
"${mod}+l" = "focus right";
"${mod}+Left" = "focus left";
"${mod}+Down" = "focus down";
"${mod}+Up" = "focus up";
"${mod}+Right" = "focus right";
"${mod}+Shift+h" = "move left";
"${mod}+Shift+j" = "move down";
"${mod}+Shift+k" = "move up";
"${mod}+Shift+l" = "move right";
"${mod}+Shift+Left" = "move left";
"${mod}+Shift+Down" = "move down";
"${mod}+Shift+Up" = "move up";
"${mod}+Shift+Right" = "move right";
"${mod}+b" = "split h";
"${mod}+v" = "split v";
"${mod}+s" = "layout stacking";
"${mod}+w" = "layout tabbed";
"${mod}+e" = "layout toggle split";
"${mod}+Shift+space" = "floating toggle";
"${mod}+space" = "focus mode_toggle";
"${mod}+a" = "focus parent";
"${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+c" = "reload";
"${mod}+Shift+r" = "restart";
"${mod}+Shift+e" = "exec \"i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'\"";
"${mod}+r" = "mode \"resize\"";
"${mod}+x" = "mode \"${mode_system}\"";
"${mod}+Shift+x" = "exec i3lock-fancy -n";
};
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";
Left = "resize shrink width 10 px or 10 ppt";
Down = "resize grow height 10 px or 10 ppt";
Up = "resize shrink height 10 px or 10 ppt";
Right = "resize grow width 10 px or 10 ppt";
Return = "mode \"default\"";
Escape = "mode \"default\"";
};
"${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,6 +0,0 @@
{ ... }: {
services.kdeconnect = {
enable = true;
indicator = true;
};
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,155 +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
./kanshi.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;
systemd.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,7 +0,0 @@
{ ... }: {
services.gammastep = {
enable = true;
longitude = "49.01315";
latitude = "12.1119";
};
}

View File

@ -1,34 +0,0 @@
{ config, ... }: {
# automatically configure monitor layout depending on connected devices
# https://git.sr.ht/~emersion/kanshi
services.kanshi = {
enable = config.wayland.windowManager.sway.enable;
settings = [
{
profile = {
name = "home";
outputs = [
{
criteria = "eDP-1";
position = "0,0";
}
{
criteria = "HDMI-A-1";
position = "1920,0";
}
];
};
}
{
profile = {
name = "mobile";
outputs = [
{
criteria = "eDP-1";
}
];
};
}
];
};
}

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, ... }: {
programs.zsh = {
enable = true;
autosuggestion.enable = true;
enableAutosuggestions = true;
enableCompletion = true;
autocd = true;
dotDir = ".config/zsh";

View File

@ -1,7 +1,7 @@
inputs:
{ config, lib, pkgs, ... }: {
nix = {
package = pkgs.nixStable;
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command flakes
'';
@ -26,21 +26,21 @@ inputs:
i18n.defaultLocale = "en_GB.UTF-8";
time.timeZone = "Europe/Berlin";
#sound.enable = true;
sound.enable = true;
hardware = {
# TODO: remove
enableAllFirmware = true;
#pulseaudio = {
pulseaudio = {
# TODO: pipewire
#enable = true;
enable = true;
# stop mumble from muting other processes
#extraConfig = "unload-module module-role-cork";
#};
graphics = {
extraConfig = "unload-module module-role-cork";
};
opengl = {
enable = true;
# driSupport = true;
enable32Bit = true;
driSupport32Bit = true;
};
};
@ -66,13 +66,9 @@ inputs:
# Enable CUPS to print documents.
printing.enable = true;
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
enable = false;
pulse.enable = true;
wireplumber.enable = true;
};
# required for nextcloud
gnome.gnome-keyring.enable = true;
@ -86,25 +82,26 @@ inputs:
enable = true;
};
displayManager = {
#defaultSession = "none+i3";
defaultSession = "sway";
};
xserver = {
enable = true;
xkb = {
options = "caps:escape";
layout = "eu";
};
layout = "eu";
xkbOptions = "caps:escape";
displayManager = {
gdm.enable = true;
defaultSession = "none+i3";
lightdm.enable = true;
};
windowManager.i3 = {
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"
];
# 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; [
alacritty
arandr
@ -149,9 +134,9 @@ inputs:
];
virtualisation = {
docker = {
enable = false;
};
# docker = {
# enable = true;
# };
podman = {
enable = true;
@ -160,22 +145,12 @@ inputs:
/* to make networking in docker-compose work */
dns_enabled = true;
};
dockerSocket.enable = true;
#dockerSocket.enable = true;
};
# lxd.enable = true;
# virtualbox.host.enable = 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 = {
# enable zsh globally
@ -183,13 +158,12 @@ inputs:
gnupg.agent = {
enable = true;
enableSSHSupport = true;
pinentryPackage = pkgs.pinentry-curses;
pinentryFlavor = "curses";
};
thunar = {
enable = true;
plugins = with pkgs.xfce; [ thunar-archive-plugin thunar-volman ];
};
kdeconnect.enable = true;
};
environment.sessionVariables = {
@ -201,12 +175,12 @@ inputs:
environment.pathsToLink = [ "/libexec" ]; # links /libexec from derivations to /run/current-system/sw
fonts = {
enableDefaultPackages = true;
packages = with pkgs; [
enableDefaultFonts = true;
fonts = with pkgs; [
font-awesome
nerdfonts
noto-fonts
noto-fonts-cjk-sans
noto-fonts-cjk
noto-fonts-emoji
powerline-fonts
material-icons
@ -220,20 +194,11 @@ inputs:
};
};
security = {
# generate login settings
# ykman otp chalresp --touch --generate 2
pam.yubico = {
enable = true;
# debug = true;
mode = "challenge-response";
};
sudo = {
package = pkgs.sudo.override { withInsults = true; };
};
# rtkit is optional but recommended for pipewire
rtkit.enable = true;
# generate login settings
# ykman otp chalresp --touch --generate 2
security.pam.yubico = {
enable = true;
# debug = true;
mode = "challenge-response";
};
}

View File

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

View File

@ -11,9 +11,6 @@ inputs:
spotify
vlc
# podcast app with nextcloud sync
libsForQt5.kasts
teamspeak_client
# support both 32- and 64-bit applications
@ -23,7 +20,7 @@ inputs:
];
# needed for steam
hardware.graphics.enable32Bit = true;
hardware.opengl.driSupport32Bit = true;
hardware.pulseaudio.support32Bit = true;
programs.steam.enable = true;

View File

@ -3,38 +3,18 @@ let
system = "x86_64-linux";
hostname = "morpheus";
swapUUID = "93bdadfc-961a-4ea6-aef0-d3cd50847f0b";
overlay-unstable = final: prev: {
unstable = inputs.nixpkgs-unstable.legacyPackages.${prev.system};
};
in
inputs.nixpkgs.lib.nixosSystem {
inherit system;
modules = [
({ config, pkgs, ... } : {
system.stateVersion = "22.05";
nixpkgs.overlays = [ overlay-unstable ];
})
{ system.stateVersion = "22.05"; }
(import ./common.nix inputs)
(import ./sway.nix inputs)
(import ./morpheus/btrbk.nix inputs)
(import ./dev.nix inputs)
(import ./entertainment.nix inputs)
(import ./office.nix inputs)
({ pkgs, lib, ... }: {
system.autoUpgrade = {
enable = false;
flake = inputs.self.outPath;
flags = [
"--update-input"
"nixpkgs"
"--update-input"
"nixpkgs-unstable"
"--update-input"
"home-manager"
"--update-input"
"flake-utils"
"-L" # print build logs
];
enable = true;
allowReboot = false;
};
@ -51,14 +31,16 @@ inputs.nixpkgs.lib.nixosSystem {
};
services = {
# enable touchpad support
libinput.enable = true;
xserver.libinput.enable = true;
blueman.enable = true;
snapper.configs = {
home = {
SUBVOLUME = "/home";
ALLOW_USERS = [ "me" ];
TIMELINE_CREATE = true;
TIMELINE_CLEANUP = true;
subvolume = "/home";
extraConfig = ''
ALLOW_USERS="me"
TIMELINE_CREATE=yes
TIMELINE_CLEANUP=yes
'';
};
};
};
@ -71,7 +53,6 @@ inputs.nixpkgs.lib.nixosSystem {
"davfs2"
"disk"
"docker"
"libvirtd" # virt-manager
"networkmanager"
"plugdev"
"podman"
@ -88,12 +69,7 @@ inputs.nixpkgs.lib.nixosSystem {
#availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" ];
kernelModules = [ ];
luks.devices."system" = {
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;
};
luks.devices."system".device = "/dev/disk/by-uuid/06549d22-b96c-44f2-bb27-45200d5feda5";
};
kernelModules = [ "kvm-amd" ];
# use latest kernel
@ -123,13 +99,6 @@ inputs.nixpkgs.lib.nixosSystem {
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."/" =
{ device = "/dev/disk/by-uuid/93bdadfc-961a-4ea6-aef0-d3cd50847f0b";
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)
({ pkgs, lib, ... }: {
system.autoUpgrade = {
enable = false;
enable = true;
allowReboot = false;
};

View File

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