Compare commits

..

3 commits

Author SHA1 Message Date
caandt aff050df73 misc 2025-02-25 17:06:17 -06:00
caandt c6ec27e9b3 version bump 2025-02-25 17:05:28 -06:00
caandt 0d4d413f94 yubikey 2025-02-25 16:36:30 -06:00
15 changed files with 203 additions and 89 deletions

View file

@ -26,11 +26,11 @@
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1736143030, "lastModified": 1738453229,
"narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=", "narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de", "rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -47,11 +47,11 @@
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1738013154, "lastModified": 1740502997,
"narHash": "sha256-yA8AwQM3bws/snp0sDscjrz7xiqZuq9LIHu12lxcb+g=", "narHash": "sha256-M+e//9CO9akq/pzEDQ0S9Uz1sFEk8yl1ayKtNqBV0Sc=",
"owner": "wamserma", "owner": "wamserma",
"repo": "flake-programs-sqlite", "repo": "flake-programs-sqlite",
"rev": "dcd8417121581ad263ca789345666a390d140eb5", "rev": "06bbfd83407a5a6d4de19560a0b18b2c3787f10c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -67,11 +67,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1737968762, "lastModified": 1740494361,
"narHash": "sha256-xiPARGKwocaMtv+U/rgi+h2g56CZZEmrcl7ldRaslq8=", "narHash": "sha256-Dd/GhJ9qKmUwuhgt/PAROG8J6YdU2ZjtJI9SQX5sVQI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "e1ae908bcc30af792b0bb0a52e53b03d2577255e", "rev": "74f0a8546e3f2458c870cf90fc4b38ac1f498b17",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -85,15 +85,14 @@
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ]
"umu": "umu"
}, },
"locked": { "locked": {
"lastModified": 1737855374, "lastModified": 1740361404,
"narHash": "sha256-RRGX2C+c+GaR3YMiYm6l/Tp5N/KZtYpiTplUrBwH/og=", "narHash": "sha256-hKaJ6QDZuxcbwifzcfLyiK9nmlIx1uQqWQwJ45PBn88=",
"owner": "fufexan", "owner": "fufexan",
"repo": "nix-gaming", "repo": "nix-gaming",
"rev": "4845fe94cda365c7550d9fd1ef899d45df0bc18a", "rev": "1e6dc4b9895602f9459d6ff3a11b0cd144321207",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -104,11 +103,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1737885589, "lastModified": 1740367490,
"narHash": "sha256-Zf0hSrtzaM1DEz8//+Xs51k/wdSajticVrATqDrfQjg=", "narHash": "sha256-WGaHVAjcrv+Cun7zPlI41SerRtfknGQap281+AakSAw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "852ff1d9e153d8875a83602e03fdef8a63f0ecf8", "rev": "0196c0175e9191c474c26ab5548db27ef5d34b05",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -120,23 +119,23 @@
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"lastModified": 1735774519, "lastModified": 1738452942,
"narHash": "sha256-CewEm1o2eVAnoqb6Ml+Qi9Gg/EfNAxbRx1lANGVyoLI=", "narHash": "sha256-vJzFZGaCpnmo7I6i416HaBLpC+hvcURh/BQwROcGIp8=",
"type": "tarball", "type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/e9b51731911566bbf7e4895475a87fe06961de0b.tar.gz" "url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/e9b51731911566bbf7e4895475a87fe06961de0b.tar.gz" "url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz"
} }
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1737885640, "lastModified": 1740339700,
"narHash": "sha256-GFzPxJzTd1rPIVD4IW+GwJlyGwBDV1Tj5FLYwDQQ9sM=", "narHash": "sha256-cbrw7EgQhcdFnu6iS3vane53bEagZQy/xyIkDWpCgVE=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "4e96537f163fad24ed9eb317798a79afc85b51b7", "rev": "04ef94c4c1582fd485bbfdb8c4a8ba250e359195",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -146,6 +145,79 @@
"type": "github" "type": "github"
} }
}, },
"pwndbg": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"pyproject-build-systems": "pyproject-build-systems",
"pyproject-nix": "pyproject-nix",
"uv2nix": "uv2nix"
},
"locked": {
"lastModified": 1740333626,
"narHash": "sha256-OcwULIZcWOC1FNGa0SNGtyMyfbwTsBj17LBPpGOZL78=",
"owner": "pwndbg",
"repo": "pwndbg",
"rev": "ef090ebf5eb75713b1f97c3d9aa3d7be636b0c3a",
"type": "github"
},
"original": {
"owner": "pwndbg",
"repo": "pwndbg",
"type": "github"
}
},
"pyproject-build-systems": {
"inputs": {
"nixpkgs": [
"pwndbg",
"nixpkgs"
],
"pyproject-nix": [
"pwndbg",
"pyproject-nix"
],
"uv2nix": [
"pwndbg",
"uv2nix"
]
},
"locked": {
"lastModified": 1737338290,
"narHash": "sha256-gnXlfFEHA+/jMH7R+7y3JxrI3WfOjgBhzzJNuFW70UU=",
"owner": "pyproject-nix",
"repo": "build-system-pkgs",
"rev": "e1487e5cefda0c7990bdd2e660bee20971680e45",
"type": "github"
},
"original": {
"owner": "pyproject-nix",
"repo": "build-system-pkgs",
"type": "github"
}
},
"pyproject-nix": {
"inputs": {
"nixpkgs": [
"pwndbg",
"nixpkgs"
]
},
"locked": {
"lastModified": 1738204167,
"narHash": "sha256-J5M2sj3x4ocM93shScT/3Z4XWHZhwwW1NyQK+C+8Mys=",
"owner": "pyproject-nix",
"repo": "pyproject.nix",
"rev": "0d9f4b90cee1b5c5d6c142ef22de1e246e003ccc",
"type": "github"
},
"original": {
"owner": "pyproject-nix",
"repo": "pyproject.nix",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"disko": "disko", "disko": "disko",
@ -154,6 +226,7 @@
"nix-gaming": "nix-gaming", "nix-gaming": "nix-gaming",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-stable": "nixpkgs-stable", "nixpkgs-stable": "nixpkgs-stable",
"pwndbg": "pwndbg",
"sops-nix": "sops-nix" "sops-nix": "sops-nix"
} }
}, },
@ -164,11 +237,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1737411508, "lastModified": 1739262228,
"narHash": "sha256-j9IdflJwRtqo9WpM0OfAZml47eBblUHGNQTe62OUqTw=", "narHash": "sha256-7JAGezJ0Dn5qIyA2+T4Dt/xQgAbhCglh6lzCekTVMeU=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "015d461c16678fc02a2f405eb453abb509d4e1d4", "rev": "07af005bb7d60c7f118d9d9f5530485da5d1e975",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -177,31 +250,6 @@
"type": "github" "type": "github"
} }
}, },
"umu": {
"inputs": {
"nixpkgs": [
"nix-gaming",
"nixpkgs"
]
},
"locked": {
"dir": "packaging/nix",
"lastModified": 1737834175,
"narHash": "sha256-fhyc89qqYM3ql0k4hJVibAhXvEXOch96hnsEGB7Av3I=",
"ref": "refs/heads/main",
"rev": "4d1860eefd79d6c04e964774155dbe13be65121a",
"revCount": 911,
"submodules": true,
"type": "git",
"url": "https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix"
},
"original": {
"dir": "packaging/nix",
"submodules": true,
"type": "git",
"url": "https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix"
}
},
"utils": { "utils": {
"locked": { "locked": {
"lastModified": 1678901627, "lastModified": 1678901627,
@ -216,6 +264,31 @@
"repo": "flake-utils", "repo": "flake-utils",
"type": "github" "type": "github"
} }
},
"uv2nix": {
"inputs": {
"nixpkgs": [
"pwndbg",
"nixpkgs"
],
"pyproject-nix": [
"pwndbg",
"pyproject-nix"
]
},
"locked": {
"lastModified": 1738653454,
"narHash": "sha256-tAFX8mPZtZ+zVE/+bwPC3U+u5MxjpNP0gG24DG26jVs=",
"owner": "pyproject-nix",
"repo": "uv2nix",
"rev": "05b0c148bc53aebc6a906b6d0ac41dde5954cd47",
"type": "github"
},
"original": {
"owner": "pyproject-nix",
"repo": "uv2nix",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -24,6 +24,10 @@
url = "github:Mic92/sops-nix"; url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
pwndbg = {
url = "github:/pwndbg/pwndbg";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { outputs = {

View file

@ -1,18 +1,25 @@
{ {
pkgs,
lib, lib,
inputs,
... ...
}: { }: {
nixpkgs.overlays = [ nixpkgs.overlays = [
(self: super: { (self: super: {
nsxiv = super.nsxiv.overrideAttrs (old: { nsxiv = super.nsxiv.overrideAttrs (old: {
buildInputs = old.buildInputs ++ [pkgs.xorg.libXcursor]; buildInputs = old.buildInputs ++ [super.xorg.libXcursor];
env.NIX_LDFLAGS = "-lXcursor"; env.NIX_LDFLAGS = "-lXcursor";
patches = [./nsxiv.diff]; patches = [./nsxiv.diff];
}); });
maim = super.maim.overrideAttrs (old: { maim = super.maim.overrideAttrs (old: {
buildInputs = old.buildInputs ++ [pkgs.xorg.libXcursor]; buildInputs = old.buildInputs ++ [super.xorg.libXcursor];
env.NIX_LDFLAGS = "-lXcursor"; env.NIX_LDFLAGS = "-lXcursor";
patches = [
(super.fetchpatch {
name = "maim-c++-17.patch";
url = "https://github.com/naelstrof/maim/commit/e7fe09b6734baeb59081b8805be542c92178cf0f.patch";
sha256 = "0z9zvrr8msfli88jmhxm5knysi385s48j2w7zpacc7qhf4c5zh8c";
})
];
}); });
ki = super.ki.overrideAttrs (old: { ki = super.ki.overrideAttrs (old: {
patches = old.patches ++ [./ki.diff]; patches = old.patches ++ [./ki.diff];
@ -27,17 +34,18 @@
lib.strings.concatLines (front ++ [add] ++ back); lib.strings.concatLines (front ++ [add] ++ back);
}); });
cifs-utils = super.cifs-utils.overrideAttrs (old: { cifs-utils = super.cifs-utils.overrideAttrs (old: {
buildInputs = lib.lists.remove pkgs.libcap old.buildInputs; buildInputs = lib.lists.remove super.libcap old.buildInputs;
}); });
wineWowPackages.stable = pkgs.symlinkJoin { wineWowPackages.stable = super.symlinkJoin {
name = "wine"; name = "wine";
paths = [super.wineWowPackages.stable]; paths = [super.wineWowPackages.stable];
buildInputs = [pkgs.makeWrapper]; buildInputs = [super.makeWrapper];
postBuild = '' postBuild = ''
wrapProgram $out/bin/wine \ wrapProgram $out/bin/wine \
--set LC_ALL "ja_JP.UTF-8" --set LC_ALL "ja_JP.UTF-8"
''; '';
}; };
pwndbg = inputs.pwndbg.packages.${super.system}.pwndbg;
}) })
]; ];
} }

View file

@ -14,31 +14,24 @@
./plasma.nix ./plasma.nix
./security.nix ./security.nix
./virt.nix ./virt.nix
./yubikey.nix
../overlays ../overlays
inputs.sops-nix.nixosModules.sops inputs.sops-nix.nixosModules.sops
]; ];
options.u = { options.u = {
has = { has = let
graphical = lib.mkOption { mkOpt = name:
type = lib.types.bool; lib.mkOption {
description = "enable graphical settings"; type = lib.types.bool;
default = true; description = "enable ${name}";
}; default = true;
wine = lib.mkOption { };
type = lib.types.bool; in {
description = "enable wine settings"; graphical = mkOpt "graphical";
default = true; wine = mkOpt "wine";
}; virt = mkOpt "virt";
virt = lib.mkOption { container = mkOpt "container";
type = lib.types.bool; yubikey = mkOpt "yubikey";
description = "enable virt settings";
default = true;
};
container = lib.mkOption {
type = lib.types.bool;
description = "enable container settings";
default = true;
};
}; };
}; };
} }

25
system/yubikey.nix Normal file
View file

@ -0,0 +1,25 @@
{
config,
lib,
pkgs,
...
}:
lib.mkIf config.u.has.yubikey {
environment.systemPackages = [
pkgs.yubikey-manager
pkgs.yubioath-flutter
pkgs.pam_u2f
];
services.pcscd.enable = true;
services.udev.packages = [pkgs.yubikey-personalization];
services.yubikey-agent.enable = true;
security.pam = {
u2f = {
enable = true;
settings.cue = true;
};
services.login.u2fAuth = false;
services.physlock.u2fAuth = false;
};
programs.yubikey-touch-detector.enable = true;
}

View file

@ -18,6 +18,9 @@ lib.mkIf config.u.has.graphical {
"safeeyes.service" "safeeyes.service"
"snixembed.service" "snixembed.service"
]; ];
Requires = [
"graphical-session.target"
];
}; };
}; };
systemd.user.services = { systemd.user.services = {

View file

@ -34,7 +34,6 @@ if _exists fzf; then
export FZF_DEFAULT_OPTS="--bind=ctrl-u:page-up,ctrl-d:page-down" export FZF_DEFAULT_OPTS="--bind=ctrl-u:page-up,ctrl-d:page-down"
eval "$(fzf --bash)" eval "$(fzf --bash)"
fi fi
_exists zoxide && eval "$(zoxide init bash)"
# use starship prompt, unless in linux terminal # use starship prompt, unless in linux terminal
if [[ "$TERM" != "linux" ]]; then if [[ "$TERM" != "linux" ]]; then
@ -67,6 +66,7 @@ else
export SHLVL=0 export SHLVL=0
fi fi
fi fi
_exists zoxide && eval "$(zoxide init bash)"
# set vi mode # set vi mode

View file

@ -7,6 +7,7 @@
ln = config.u.lib.ln "${config.u.confPath}/user/config"; ln = config.u.lib.ln "${config.u.confPath}/user/config";
in { in {
imports = [ imports = [
./gdb
./kde ./kde
./tmux ./tmux
./mpv ./mpv
@ -23,11 +24,6 @@ in {
xdg.configFile.bash.source = ln "bash"; xdg.configFile.bash.source = ln "bash";
xdg.configFile.fcitx5.source = ./fcitx5; xdg.configFile.fcitx5.source = ./fcitx5;
xdg.configFile.fontconfig.source = ./fontconfig; xdg.configFile.fontconfig.source = ./fontconfig;
xdg.configFile."gdb/gdbinit.py".source = gdb/gdbinit.py;
xdg.configFile."gdb/gdbinit".text = ''
source ${pkgs.pwndbg}/share/pwndbg/gdbinit.py
source ~/.config/gdb/gdbinit.py
'';
xdg.configFile.git.source = ./git; xdg.configFile.git.source = ./git;
xdg.configFile.lazygit.source = ./lazygit; xdg.configFile.lazygit.source = ./lazygit;
xdg.configFile.lsd.source = ./lsd; xdg.configFile.lsd.source = ./lsd;

View file

@ -0,0 +1,7 @@
{pkgs, ...}: {
xdg.configFile."gdb/gdbinit.py".source = ./gdbinit.py;
xdg.configFile."gdb/gdbinit".text = ''
source ${pkgs.pwndbg}/share/pwndbg/gdbinit.py
source ~/.config/gdb/gdbinit.py
'';
}

View file

@ -6,6 +6,6 @@ os:
edit: "nvim {{filename}}" edit: "nvim {{filename}}"
editAtLine: "nvim {{filename}} +{{line}}" editAtLine: "nvim {{filename}} +{{line}}"
open: "nvim {{filename}}" open: "nvim {{filename}}"
keybinding: git:
universal: autoFetch: false
quit: <disabled> autoRefresh: false

View file

@ -46,6 +46,8 @@
lua-language-server lua-language-server
]; ];
withRuby = false; withRuby = false;
withPython3 = false;
withNodeJs = false;
}; };
xdg.configFile."nvim/init.lua".text = "require('init')"; xdg.configFile."nvim/init.lua".text = "require('init')";
xdg.configFile."nvim/lua".source = config.u.lib.lnn "user/config/nvim/lua"; xdg.configFile."nvim/lua".source = config.u.lib.lnn "user/config/nvim/lua";

View file

@ -1,3 +1,4 @@
vim.loader.enable()
require('u.options') require('u.options')
require('u.plugins') require('u.plugins')
require('u.bindings') require('u.bindings')

View file

@ -9,3 +9,4 @@ map('n', '<leader>v', '<cmd>vs<cr>', {desc = "split [V]ertical"})
map('n', '<leader>h', '<cmd>sp<cr>', {desc = "split [H]orizontal"}) map('n', '<leader>h', '<cmd>sp<cr>', {desc = "split [H]orizontal"})
map('n', 'q:', '<nop>') map('n', 'q:', '<nop>')
map('n', '<leader>cd', vim.diagnostic.open_float, {desc = "[C]ode [D]iagnostic"}) map('n', '<leader>cd', vim.diagnostic.open_float, {desc = "[C]ode [D]iagnostic"})
map('n', 'x', '"_x')

View file

@ -49,10 +49,10 @@ require('undotree').setup({
['H'] = "nop", ['H'] = "nop",
} }
}) })
require('colorizer').setup()
require('lazydev').setup() require('lazydev').setup()
require('neorg').setup({ require('neorg').setup({
lazy_loading = true,
load = { load = {
["core.defaults"] = {}, ["core.defaults"] = {},
["core.concealer"] = {}, ["core.concealer"] = {},

View file

@ -26,6 +26,7 @@
ffsubsync ffsubsync
unzip unzip
unar unar
keepassxc
] ]
++ lib.optionals config.u.has.graphical [ ++ lib.optionals config.u.has.graphical [
(config.u.lib.localHome pkgs.firefox "firefox" "bin/firefox") (config.u.lib.localHome pkgs.firefox "firefox" "bin/firefox")