Compare commits
19 Commits
a43fbd0342
...
65ef9efd77
12
flake.nix
12
flake.nix
|
@ -14,16 +14,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
dotfiles = {
|
dotfiles = {
|
||||||
url = "git+https://git.nani.wtf/h7x4/dotfiles?ref=master";
|
url = "git+https://git.pvv.ntnu.no/oysteikt/dotfiles?ref=master";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
nix-attr-search ={
|
|
||||||
url = "github:h7x4/nix-attr-search";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
inputs.home-manager.follows = "home-manager";
|
|
||||||
};
|
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
url = "path:/home/h7x4/git/fonts";
|
url = "path:/home/h7x4/git/fonts";
|
||||||
flake = false;
|
flake = false;
|
||||||
|
@ -37,7 +31,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
website = {
|
website = {
|
||||||
url = "git+https://git.nani.wtf/h7x4/nani.wtf?ref=main";
|
url = "git+https://git.pvv.ntnu.no/oysteikt/nani.wtf?ref=main";
|
||||||
# url = "path:/home/h7x4/git/nani.wtf";
|
# url = "path:/home/h7x4/git/nani.wtf";
|
||||||
# inputs.nixpkgs.follows = "nixpkgs";
|
# inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
@ -105,7 +99,7 @@
|
||||||
in [
|
in [
|
||||||
(self: super: { kanidm = nonrecursive-unstable-pkgs.kanidm; })
|
(self: super: { kanidm = nonrecursive-unstable-pkgs.kanidm; })
|
||||||
(self: super: { pgadmin4 = nonrecursive-unstable-pkgs.pgadmin4; })
|
(self: super: { pgadmin4 = nonrecursive-unstable-pkgs.pgadmin4; })
|
||||||
(self: super: { pcloud = unstable-pkgs.callPackage ./package-overrides/pcloud.nix {}; })
|
# (self: super: { pcloud = nonrecursive-unstable-pkgs.pcloud; })
|
||||||
osuchan.overlays.default
|
osuchan.overlays.default
|
||||||
(self: super: {
|
(self: super: {
|
||||||
mpv-unwrapped = super.mpv-unwrapped.override {
|
mpv-unwrapped = super.mpv-unwrapped.override {
|
||||||
|
|
|
@ -133,7 +133,7 @@ in {
|
||||||
|
|
||||||
qt = mkIf graphics {
|
qt = mkIf graphics {
|
||||||
enable = true;
|
enable = true;
|
||||||
platformTheme = "gtk";
|
platformTheme.name = "gtk";
|
||||||
style = {
|
style = {
|
||||||
name = "adwaita-dark";
|
name = "adwaita-dark";
|
||||||
package = pkgs.adwaita-qt;
|
package = pkgs.adwaita-qt;
|
||||||
|
|
|
@ -37,8 +37,6 @@ in {
|
||||||
ouch
|
ouch
|
||||||
pandoc
|
pandoc
|
||||||
parallel
|
parallel
|
||||||
pinentry
|
|
||||||
pinentry-curses
|
|
||||||
progress
|
progress
|
||||||
python3
|
python3
|
||||||
rclone
|
rclone
|
||||||
|
@ -107,7 +105,7 @@ in {
|
||||||
mpc_cli
|
mpc_cli
|
||||||
nyxt
|
nyxt
|
||||||
# obsidian
|
# obsidian
|
||||||
pcloud
|
# pcloud
|
||||||
pulseaudio
|
pulseaudio
|
||||||
pulsemixer
|
pulsemixer
|
||||||
# scrcpy
|
# scrcpy
|
||||||
|
@ -141,10 +139,11 @@ in {
|
||||||
] ++ lib.optionals (machineVars.laptop) [
|
] ++ lib.optionals (machineVars.laptop) [
|
||||||
touchegg
|
touchegg
|
||||||
] ++ lib.optionals (machineVars.gaming) [
|
] ++ lib.optionals (machineVars.gaming) [
|
||||||
citra
|
|
||||||
desmume
|
desmume
|
||||||
minecraft
|
|
||||||
osu-lazer
|
osu-lazer
|
||||||
|
(prismlauncher.override {
|
||||||
|
jdk17 = jdk21;
|
||||||
|
})
|
||||||
retroarchFull
|
retroarchFull
|
||||||
steam
|
steam
|
||||||
steam-tui
|
steam-tui
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
{ ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
programs.gh = {
|
programs.gh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
gitProtocol = "ssh";
|
gitProtocol = "ssh";
|
||||||
|
pager = "${pkgs.bat}/git/bat";
|
||||||
aliases = {
|
aliases = {
|
||||||
co = "pr checkout";
|
co = "pr checkout";
|
||||||
pv = "pr view";
|
pv = "pr view";
|
||||||
|
|
|
@ -22,15 +22,15 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
aliases = {
|
aliases = {
|
||||||
aliases = "!git config --get-regexp alias | sed -re 's/alias\\.(\\S*)\\s(.*)$/\\1 = \\2/g'";
|
aliases = "!git config --get-regexp alias | sed -re 's/alias\\.(\\S*)\\s(.*)$/\\1 = \\2/g'";
|
||||||
delete-merged = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d";
|
delete-merged = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d";
|
||||||
graph = "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all";
|
graph = "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all";
|
||||||
graphv = "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all";
|
graphv = "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all";
|
||||||
forcepush = "push --force-with-lease --force-if-includes";
|
forcepush = "push --force-with-lease --force-if-includes";
|
||||||
authors = "shortlog --summary --numbered --email";
|
authors = "shortlog --summary --numbered --email";
|
||||||
switch-interactive = "!cat <(git branch) <(git branch -r) | grep -v '^\\*\\|HEAD ->' | ${pkgs.fzf}/bin/fzf --reverse --info=inline --preview 'echo {} | xargs git show --color' | sed 's|\\s*.*/||' | xargs git switch";
|
switch-interactive = "!cat <(git branch) <(git branch -r) | grep -v '^\\*\\|HEAD ->' | ${pkgs.fzf}/bin/fzf --reverse --info=inline --preview 'echo {} | xargs git show --color' | sed 's|\\s*.*/||' | xargs git switch";
|
||||||
si = "switch-interactive";
|
si = "switch-interactive";
|
||||||
rebase-author = "rebase -i -x \"git commit --amend --reset-author -CHEAD\"";
|
rebase-author = "rebase -i -x \"git commit --amend --reset-author -CHEAD\"";
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
|
@ -40,6 +40,10 @@
|
||||||
editor = "nvim";
|
editor = "nvim";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
rerere.enabled = true;
|
||||||
|
|
||||||
|
branch.sort = "-committerdate";
|
||||||
|
|
||||||
"color \"branch\"".upstream = "cyan";
|
"color \"branch\"".upstream = "cyan";
|
||||||
color.ui = "auto";
|
color.ui = "auto";
|
||||||
|
|
||||||
|
@ -77,6 +81,8 @@
|
||||||
|
|
||||||
github.user = "h7x4";
|
github.user = "h7x4";
|
||||||
|
|
||||||
|
"url \"git@github:\"".insteadOf = "https://github.com/";
|
||||||
|
|
||||||
web.browser = "google-chrome-stable";
|
web.browser = "google-chrome-stable";
|
||||||
|
|
||||||
"filter \"lfs\"" = {
|
"filter \"lfs\"" = {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
programs.gpg = {
|
programs.gpg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
services.gpg-agent = {
|
services.gpg-agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
pinentryFlavor = "curses";
|
pinentryPackage = pkgs.pinentry-curses;
|
||||||
enableExtraSocket = true;
|
enableExtraSocket = true;
|
||||||
enableSshSupport = true;
|
enableSshSupport = true;
|
||||||
enableScDaemon = true;
|
enableScDaemon = true;
|
||||||
|
|
|
@ -99,6 +99,20 @@
|
||||||
vnoremap <A-j> :m '>+1<CR>gv=gv
|
vnoremap <A-j> :m '>+1<CR>gv=gv
|
||||||
vnoremap <A-k> :m '<-2<CR>gv=gv
|
vnoremap <A-k> :m '<-2<CR>gv=gv
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
extraLuaConfig = ''
|
||||||
|
local function paste_buf()
|
||||||
|
local content = os.getenv("NVIM_CLIPBOARD")
|
||||||
|
|
||||||
|
local line = vim.api.nvim_get_current_line()
|
||||||
|
local indent = string.match(line, " +")
|
||||||
|
|
||||||
|
vim.fn.setreg("a", indent .. content)
|
||||||
|
vim.cmd("put a")
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.keymap.set('n', ';', paste_buf)
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
home.sessionVariables = { EDITOR = "nvim"; };
|
home.sessionVariables = { EDITOR = "nvim"; };
|
||||||
|
|
|
@ -304,8 +304,12 @@ in
|
||||||
shardulm94.trailing-spaces
|
shardulm94.trailing-spaces
|
||||||
usernamehw.errorlens
|
usernamehw.errorlens
|
||||||
rust-lang.rust-analyzer
|
rust-lang.rust-analyzer
|
||||||
|
mkhl.direnv
|
||||||
|
waderyan.gitblame
|
||||||
# vs-liveshare
|
# vs-liveshare
|
||||||
vscodevim.vim
|
vscodevim.vim
|
||||||
|
|
||||||
|
ms-dotnettools.csharp
|
||||||
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||||
{
|
{
|
||||||
name = "monokai-st3";
|
name = "monokai-st3";
|
||||||
|
|
|
@ -1,7 +1,15 @@
|
||||||
{ pkgs, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.services.sxhkd;
|
||||||
|
keybindingsStr = lib.concatStringsSep "\n" (lib.mapAttrsToList (hotkey: command:
|
||||||
|
lib.optionalString (command != null) ''
|
||||||
|
${hotkey}
|
||||||
|
${command}
|
||||||
|
'') cfg.keybindings);
|
||||||
|
in
|
||||||
{
|
{
|
||||||
services.sxhkd = {
|
services.sxhkd = {
|
||||||
enable = true;
|
enable = false;
|
||||||
keybindings = {
|
keybindings = {
|
||||||
|
|
||||||
# make sxhkd reload its configuration files:
|
# make sxhkd reload its configuration files:
|
||||||
|
@ -44,8 +52,7 @@
|
||||||
|
|
||||||
"super + a" = "${pkgs.copyq}/bin/copyq toggle";
|
"super + a" = "${pkgs.copyq}/bin/copyq toggle";
|
||||||
|
|
||||||
# fcitx
|
# fcitx "super + {b,n,m}" = "${pkgs.fcitx}/bin/fcitx-remote -s {mozc,fcitx-keyboard-no,fcitx-keyboard-us}";
|
||||||
# "super + {b,n,m}" = "${pkgs.fcitx}/bin/fcitx-remote -s {mozc,fcitx-keyboard-no,fcitx-keyboard-us}";
|
|
||||||
|
|
||||||
# fcitx5
|
# fcitx5
|
||||||
"super + {b,n,m}" = "${pkgs.fcitx5}/bin/fcitx5-remote -s {mozc,keyboard-no,keyboard-us}";
|
"super + {b,n,m}" = "${pkgs.fcitx5}/bin/fcitx5-remote -s {mozc,keyboard-no,keyboard-us}";
|
||||||
|
@ -72,4 +79,24 @@
|
||||||
"super + shift + e" = "sleep 0.3; ${pkgs.xdotool}/bin/xdotool key U00E9";
|
"super + shift + e" = "sleep 0.3; ${pkgs.xdotool}/bin/xdotool key U00E9";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
xdg.configFile."sxhkd/sxhkdrc".text =
|
||||||
|
lib.concatStringsSep "\n" [ keybindingsStr cfg.extraConfig ];
|
||||||
|
|
||||||
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
|
systemd.user.services.sxhkd = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Simple X hotkey daemon";
|
||||||
|
PartOf = [ "graphical-session.target" ];
|
||||||
|
After = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
Service = {
|
||||||
|
ExecStart = "${cfg.package}/bin/sxhkd ${toString cfg.extraOptions}";
|
||||||
|
Restart = "always";
|
||||||
|
};
|
||||||
|
|
||||||
|
Install.WantedBy = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ in {
|
||||||
htop = "${pkgs.bottom}/bin/btm";
|
htop = "${pkgs.bottom}/bin/btm";
|
||||||
hhtop = p "htop";
|
hhtop = p "htop";
|
||||||
|
|
||||||
dig = p "dog";
|
dig = p "dogdns";
|
||||||
|
|
||||||
# Flags are incompatible, so they are suffixed by -x
|
# Flags are incompatible, so they are suffixed by -x
|
||||||
psx = p "procs";
|
psx = p "procs";
|
||||||
|
@ -92,9 +92,6 @@ in {
|
||||||
nxr-hm = "sudo nixos-rebuild switch --flake ~/nix#home-manager-tester";
|
nxr-hm = "sudo nixos-rebuild switch --flake ~/nix#home-manager-tester";
|
||||||
nxr-ks = "sudo nixos-rebuild switch --flake ~/nix#kasei";
|
nxr-ks = "sudo nixos-rebuild switch --flake ~/nix#kasei";
|
||||||
|
|
||||||
hms = toString inputs.nix-attr-search.packages.${pkgs.system}.home-manager-search;
|
|
||||||
nxo = toString inputs.nix-attr-search.packages.${pkgs.system}.nix-option-search;
|
|
||||||
|
|
||||||
# TODO: does this need to be a function?
|
# TODO: does this need to be a function?
|
||||||
# ofborg-build = {};
|
# ofborg-build = {};
|
||||||
|
|
||||||
|
@ -251,7 +248,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
m = p "ncmpcpp";
|
m = p "ncmpcpp";
|
||||||
p = "${pkgs.python39Packages.ipython}/bin/ipython";
|
p = "${pkgs.python3Packages.ipython}/bin/ipython";
|
||||||
s = p "sxiv";
|
s = p "sxiv";
|
||||||
v = p "mpv";
|
v = p "mpv";
|
||||||
zt = p "zathura";
|
zt = p "zathura";
|
||||||
|
|
177
hosts/common.nix
177
hosts/common.nix
|
@ -4,6 +4,14 @@ let
|
||||||
in {
|
in {
|
||||||
sops.defaultSopsFile = ../secrets/default.yaml;
|
sops.defaultSopsFile = ../secrets/default.yaml;
|
||||||
|
|
||||||
|
sops.secrets = {
|
||||||
|
"ssh/nix-builders/tsuki/key" = { };
|
||||||
|
"ssh/nix-builders/tsuki/pub" = { };
|
||||||
|
"ssh/nix-builders/isvegg/key" = { };
|
||||||
|
"ssh/nix-builders/bob/key" = { };
|
||||||
|
# "ssh/nix-builders/isvegg/pub" = { };
|
||||||
|
};
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
package = unstable-pkgs.nixVersions.stable;
|
package = unstable-pkgs.nixVersions.stable;
|
||||||
distributedBuilds = config.networking.hostName != "tsuki";
|
distributedBuilds = config.networking.hostName != "tsuki";
|
||||||
|
@ -20,55 +28,110 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
buildMachines = [
|
buildMachines = [
|
||||||
|
# {
|
||||||
|
# # Login details configured in ssh module in nix-secrets
|
||||||
|
# hostName = "nix-builder-tsukir";
|
||||||
|
# system = "x86_64-linux";
|
||||||
|
# speedFactor = 2;
|
||||||
|
# maxJobs = 8;
|
||||||
|
# supportedFeatures = [
|
||||||
|
# "nixos-test"
|
||||||
|
# "benchmark"
|
||||||
|
# "big-paralell"
|
||||||
|
# ];
|
||||||
|
# mandatoryFeatures = [ ];
|
||||||
|
# sshUser = "nix-ssh";
|
||||||
|
# sshKey = config.sops.secrets."ssh/nix-builders/tsuki/key".path;
|
||||||
|
# }
|
||||||
{
|
{
|
||||||
# Login details configured in ssh module in nix-secrets
|
# Login details configured in ssh module in nix-secrets
|
||||||
hostName = "nix-builder-tsukir";
|
hostName = "nix-builder-isvegg";
|
||||||
|
system = "x86_64-linux";
|
||||||
|
speedFactor = 1;
|
||||||
|
maxJobs = 8;
|
||||||
|
supportedFeatures = [ ];
|
||||||
|
mandatoryFeatures = [ ];
|
||||||
|
sshUser = secrets.ssh.users.pvv.normalUser;
|
||||||
|
sshKey = config.sops.secrets."ssh/nix-builders/isvegg/key".path;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# Login details configured in ssh module in nix-secrets
|
||||||
|
hostName = "nix-builder-bob";
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
speedFactor = 5;
|
speedFactor = 5;
|
||||||
maxJobs = 8;
|
maxJobs = 24;
|
||||||
supportedFeatures = [
|
supportedFeatures = [
|
||||||
"nixos-test"
|
"nixos-test"
|
||||||
"benchmark"
|
"benchmark"
|
||||||
"big-paralell"
|
"big-paralell"
|
||||||
];
|
];
|
||||||
mandatoryFeatures = [];
|
mandatoryFeatures = [ ];
|
||||||
sshUser = "nix-ssh";
|
# sshUser = secrets.ssh.users.pvv.normalUser;
|
||||||
sshKey = secrets.keys.ssh.nixBuilders.tsuki.private;
|
# sshKey = config.sops.secrets."ssh/nix-builders/bob/key".path;
|
||||||
}
|
|
||||||
{
|
|
||||||
# Login details configured in ssh module in nix-secrets
|
|
||||||
hostName = "nix-builder-isvegg";
|
|
||||||
system = "x86_64-linux";
|
|
||||||
speedFactor = 7;
|
|
||||||
maxJobs = 16;
|
|
||||||
supportedFeatures = [
|
|
||||||
"benchmark"
|
|
||||||
"big-paralell"
|
|
||||||
];
|
|
||||||
mandatoryFeatures = [];
|
|
||||||
sshUser = secrets.ssh.users.pvv.normalUser;
|
|
||||||
sshKey = secrets.keys.ssh.nixBuilders.isvegg.private;
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
# registry = {
|
registry = {
|
||||||
|
home.to = {
|
||||||
# };
|
type = "path";
|
||||||
|
path = "/home/h7x4/nix";
|
||||||
|
};
|
||||||
|
wack.to = {
|
||||||
|
type = "path";
|
||||||
|
path = "/home/h7x4/git/wack-ctf-flake";
|
||||||
|
};
|
||||||
|
nxpt.to = {
|
||||||
|
type = "path";
|
||||||
|
path = "/home/h7x4/git/nixpkgs-tools";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.ssh = {
|
programs.ssh = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
Host nix-builder-isvegg
|
Host nix-builder-isvegg
|
||||||
HostName isvegg.pvv.ntnu.no
|
HostName isvegg.pvv.ntnu.no
|
||||||
|
User oysteikt
|
||||||
|
IdentityFile ${config.sops.secrets."ssh/nix-builders/isvegg/key".path}
|
||||||
|
|
||||||
|
Host nix-builder-bob
|
||||||
|
HostName bob.pvv.ntnu.no
|
||||||
|
ProxyJump nix-builder-isvegg
|
||||||
|
User oysteikt
|
||||||
|
IdentityFile ${config.sops.secrets."ssh/nix-builders/bob/key".path}
|
||||||
|
|
||||||
Host nix-builder-tsukir
|
Host nix-builder-tsukir
|
||||||
HostName gingakei.loginto.me
|
HostName gingakei.loginto.me
|
||||||
Port ${toString secrets.ports.ssh.home-in}
|
Port ${toString secrets.ports.ssh.home-in}
|
||||||
'';
|
'';
|
||||||
knownHosts = {
|
knownHosts = {
|
||||||
tsukir = {
|
bob = {
|
||||||
hostNames = [ "nani.wtf" "gingakei.loginto.me" ];
|
hostNames = [
|
||||||
publicKeyFile = secrets.keys.ssh.nixBuilders.tsuki.public;
|
"bob.pvv.ntnu.no"
|
||||||
|
"bob.pvv.org"
|
||||||
|
];
|
||||||
|
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGJSgh20qDIYEXiK4MUZhc879dJIyH0K/s0RZ+9wFI0F";
|
||||||
};
|
};
|
||||||
|
hildring = {
|
||||||
|
hostNames = [
|
||||||
|
"hildring.pvv.ntnu.no"
|
||||||
|
"hildring.pvv.org"
|
||||||
|
"login.pvv.ntnu.no"
|
||||||
|
"login.pvv.org"
|
||||||
|
];
|
||||||
|
publicKey = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGurF7rdnrDP/VgIK2Tx38of+bX/QGCGL+alrWnZ1Ca5llGneMulUt1RB9xZzNLHiaWIE+HOP0i4spEaeZhilfU=";
|
||||||
|
};
|
||||||
|
isvegg = {
|
||||||
|
hostNames = [
|
||||||
|
"isvegg.pvv.ntnu.no"
|
||||||
|
"isvegg.pvv.org"
|
||||||
|
];
|
||||||
|
publicKey = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGurF7rdnrDP/VgIK2Tx38of+bX/QGCGL+alrWnZ1Ca5llGneMulUt1RB9xZzNLHiaWIE+HOP0i4spEaeZhilfU=";
|
||||||
|
};
|
||||||
|
# tsukir = {
|
||||||
|
# hostNames = [ "nani.wtf" "gingakei.loginto.me" ];
|
||||||
|
# # publicKeyFile = config.sops.secrets."ssh/nix-builders/tsuki/pub".path;
|
||||||
|
# publicKeyFile = "/var/keys/tsuki_nix-builder.pub";
|
||||||
|
# };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -95,9 +158,33 @@ in {
|
||||||
enabled = "fcitx5";
|
enabled = "fcitx5";
|
||||||
fcitx5.addons = with pkgs; [
|
fcitx5.addons = with pkgs; [
|
||||||
fcitx5-mozc
|
fcitx5-mozc
|
||||||
# fcitx5-gtk
|
fcitx5-gtk
|
||||||
# fcitx5-chinese-addons
|
# fcitx5-chinese-addons
|
||||||
];
|
];
|
||||||
|
|
||||||
|
fcitx5.ignoreUserConfig = true;
|
||||||
|
fcitx5.settings.inputMethod = {
|
||||||
|
"Groups/0" = {
|
||||||
|
"Name" = "Default";
|
||||||
|
"Default Layout" = "ch";
|
||||||
|
"DefaultIM" = "mozc";
|
||||||
|
};
|
||||||
|
"Groups/0/Items/0" = {
|
||||||
|
"Name" = "keybord-us";
|
||||||
|
"Layout" = null;
|
||||||
|
};
|
||||||
|
"Groups/0/Items/1" = {
|
||||||
|
"Name" = "keybord-no";
|
||||||
|
"Layout" = null;
|
||||||
|
};
|
||||||
|
"Groups/0/Items/2" = {
|
||||||
|
"Name" = "mozc";
|
||||||
|
"Layout" = null;
|
||||||
|
};
|
||||||
|
"GroupOrder" = {
|
||||||
|
"0" = "Default";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -131,12 +218,6 @@ in {
|
||||||
];
|
];
|
||||||
|
|
||||||
etc = {
|
etc = {
|
||||||
# TODO: move this out of etc, and reference it directly in sudo config.
|
|
||||||
sudoLecture = {
|
|
||||||
target = "sudo.lecture";
|
|
||||||
text = extendedLib.termColors.front.red "Be careful or something, idk...\n";
|
|
||||||
};
|
|
||||||
|
|
||||||
currentSystemPackages = {
|
currentSystemPackages = {
|
||||||
target = "current-system-packages";
|
target = "current-system-packages";
|
||||||
text = let
|
text = let
|
||||||
|
@ -165,11 +246,10 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
enableDefaultFonts = true;
|
|
||||||
|
|
||||||
fontDir.enable = true;
|
fontDir.enable = true;
|
||||||
|
|
||||||
fonts = with pkgs; [
|
enableDefaultPackages = true;
|
||||||
|
packages = with pkgs; [
|
||||||
cm_unicode
|
cm_unicode
|
||||||
dejavu_fonts
|
dejavu_fonts
|
||||||
fira-code
|
fira-code
|
||||||
|
@ -222,6 +302,7 @@ in {
|
||||||
"networkmanager"
|
"networkmanager"
|
||||||
"video"
|
"video"
|
||||||
"wheel"
|
"wheel"
|
||||||
|
"wireshark"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -261,14 +342,19 @@ in {
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
libinput = {
|
||||||
|
enable = !config.machineVars.headless;
|
||||||
|
touchpad.disableWhileTyping = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
displayManager.defaultSession = "none+xmonad";
|
||||||
|
|
||||||
xserver = {
|
xserver = {
|
||||||
enable = !config.machineVars.headless;
|
enable = !config.machineVars.headless;
|
||||||
layout = "us";
|
|
||||||
xkbOptions = "caps:escape";
|
|
||||||
|
|
||||||
libinput = {
|
xkb = {
|
||||||
enable = true;
|
layout = "us";
|
||||||
touchpad.disableWhileTyping = true;
|
options = "caps:escape";
|
||||||
};
|
};
|
||||||
|
|
||||||
desktopManager = {
|
desktopManager = {
|
||||||
|
@ -276,6 +362,8 @@ in {
|
||||||
xfce.enable = !config.machineVars.headless;
|
xfce.enable = !config.machineVars.headless;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
displayManager.lightdm.enable = !config.machineVars.headless;
|
||||||
|
|
||||||
windowManager.xmonad = {
|
windowManager.xmonad = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableContribAndExtras = true;
|
enableContribAndExtras = true;
|
||||||
|
@ -285,8 +373,6 @@ in {
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
displayManager.lightdm.enable = !config.machineVars.headless;
|
|
||||||
displayManager.defaultSession = "none+xmonad";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -300,6 +386,7 @@ in {
|
||||||
zsh.enable = true;
|
zsh.enable = true;
|
||||||
|
|
||||||
gnupg.agent.enable = true;
|
gnupg.agent.enable = true;
|
||||||
|
gnupg.agent.pinentryPackage = pkgs.pinentry-curses;
|
||||||
|
|
||||||
neovim = {
|
neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -377,9 +464,11 @@ in {
|
||||||
|
|
||||||
hardware.pulseaudio.enable = !config.machineVars.headless;
|
hardware.pulseaudio.enable = !config.machineVars.headless;
|
||||||
|
|
||||||
security.sudo.extraConfig = ''
|
security.sudo.extraConfig = let
|
||||||
|
sudoLecture = pkgs.writeText "sudo-lecture.txt" (extendedLib.termColors.front.red "Be careful or something, idk...\n");
|
||||||
|
in ''
|
||||||
Defaults lecture = always
|
Defaults lecture = always
|
||||||
Defaults lecture_file = /etc/${config.environment.etc.sudoLecture.target}
|
Defaults lecture_file = ${sudoLecture}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
system.stateVersion = "22.05";
|
system.stateVersion = "22.05";
|
||||||
|
|
|
@ -7,8 +7,18 @@
|
||||||
./services/postgres.nix
|
./services/postgres.nix
|
||||||
./services/stable-diffusion.nix
|
./services/stable-diffusion.nix
|
||||||
./services/tailscale.nix
|
./services/tailscale.nix
|
||||||
|
./services/keybase.nix
|
||||||
|
nix.settings.system-features = [
|
||||||
|
"kvm"
|
||||||
|
"benchmark"
|
||||||
|
"big-parallel"
|
||||||
|
"nixos-test"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ALL = "en_US.UTF-8";
|
||||||
|
};
|
||||||
|
|
||||||
machineVars = {
|
machineVars = {
|
||||||
headless = false;
|
headless = false;
|
||||||
gaming = true;
|
gaming = true;
|
||||||
|
@ -46,7 +56,7 @@
|
||||||
hostName = "kasei";
|
hostName = "kasei";
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
interfaces.enp6s0.useDHCP = true;
|
interfaces.enp6s0.useDHCP = true;
|
||||||
firewall.enable = true;
|
firewall.enable = false;
|
||||||
hostId = "f0660cef";
|
hostId = "f0660cef";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -55,8 +65,18 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.X11Forwarding = true;
|
settings.X11Forwarding = true;
|
||||||
};
|
};
|
||||||
xserver.videoDrivers = ["nvidia"];
|
xserver.videoDrivers = [ "nvidia" ];
|
||||||
tailscale.enable = true;
|
tailscale.enable = true;
|
||||||
|
avahi = {
|
||||||
|
enable = true;
|
||||||
|
publish.enable = true;
|
||||||
|
publish.addresses = true;
|
||||||
|
publish.domain = true;
|
||||||
|
publish.hinfo = true;
|
||||||
|
publish.userServices = true;
|
||||||
|
publish.workstation = true;
|
||||||
|
extraServiceFiles.ssh = "${pkgs.avahi}/etc/avahi/services/ssh.service";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
|
@ -111,5 +131,15 @@
|
||||||
cpu.amd.updateMicrocode = true;
|
cpu.amd.updateMicrocode = true;
|
||||||
enableRedistributableFirmware = true;
|
enableRedistributableFirmware = true;
|
||||||
keyboard.zsa.enable = true;
|
keyboard.zsa.enable = true;
|
||||||
|
opengl = {
|
||||||
|
enable = true;
|
||||||
|
driSupport = true;
|
||||||
|
driSupport32Bit = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
nvidia = {
|
||||||
|
modesetting.enable = true;
|
||||||
|
nvidiaSettings = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
{
|
||||||
|
services.keybase.enable = true;
|
||||||
|
|
||||||
|
services.kbfs = {
|
||||||
|
enable = true;
|
||||||
|
extraFlags = [
|
||||||
|
"-label kbfs"
|
||||||
|
"-mount-type normal"
|
||||||
|
];
|
||||||
|
# enableRedirector = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [ keybase keybase-gui kbfs ];
|
||||||
|
}
|
Loading…
Reference in New Issue