Compare commits
13 Commits
9caab9f6a7
...
43cabb09ef
Author | SHA1 | Date |
---|---|---|
Oystein Kristoffer Tveit | 43cabb09ef | |
Oystein Kristoffer Tveit | ccc6846b0a | |
Oystein Kristoffer Tveit | 5bdf629e2f | |
Oystein Kristoffer Tveit | 89a667ec7e | |
Oystein Kristoffer Tveit | 8e6b6b14a2 | |
Oystein Kristoffer Tveit | d61e6d9127 | |
Oystein Kristoffer Tveit | c5ceb25ab0 | |
Oystein Kristoffer Tveit | 29c1fd0b89 | |
Oystein Kristoffer Tveit | 8dc56e4aa7 | |
Oystein Kristoffer Tveit | dc17c4e8ce | |
Oystein Kristoffer Tveit | e698df1244 | |
Oystein Kristoffer Tveit | 4959a4b188 | |
Oystein Kristoffer Tveit | ee44e4f952 |
21
flake.nix
21
flake.nix
|
@ -77,7 +77,6 @@
|
|||
matrix-synapse-next,
|
||||
maunium-stickerpicker,
|
||||
minecraft,
|
||||
nix-attr-search,
|
||||
osuchan,
|
||||
secrets,
|
||||
sops-nix,
|
||||
|
@ -95,9 +94,11 @@
|
|||
};
|
||||
|
||||
overlays = let
|
||||
nonrecursive-unstable-pkgs = nixpkgs-unstable.legacyPackages.${system};
|
||||
nonrecursive-unstable-pkgs = import nixpkgs-unstable {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
in [
|
||||
(self: super: { kanidm = nonrecursive-unstable-pkgs.kanidm; })
|
||||
(self: super: { pgadmin4 = nonrecursive-unstable-pkgs.pgadmin4; })
|
||||
# (self: super: { pcloud = nonrecursive-unstable-pkgs.pcloud; })
|
||||
osuchan.overlays.default
|
||||
|
@ -106,11 +107,6 @@
|
|||
ffmpeg = super.ffmpeg_6-full;
|
||||
};
|
||||
})
|
||||
# (self: super: {
|
||||
# systemd = super.systemd.overrideAttrs (final: prev: {
|
||||
# mesonFlags = prev.mesonFlags ++ [ "-Dsystemd-socket-proxyd=true" ];
|
||||
# });
|
||||
# })
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -195,15 +191,12 @@
|
|||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
inherit (self) extendedLib;
|
||||
inherit (config) machineVars;
|
||||
secrets = secrets.outputs.settings;
|
||||
};
|
||||
|
||||
users.h7x4 = import ./home/home.nix {
|
||||
inherit pkgs;
|
||||
inherit inputs;
|
||||
inherit (pkgs) lib;
|
||||
inherit (config) machineVars;
|
||||
inherit (self) extendedLib;
|
||||
users.h7x4 = {
|
||||
imports = [ ./home/home.nix ];
|
||||
};
|
||||
};
|
||||
})
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, config, ... }:
|
||||
{ pkgs, config, machineVars, ... }:
|
||||
{
|
||||
gtk = pkgs.lib.mkIf (!config.machineVars.headless) {
|
||||
gtk = pkgs.lib.mkIf (!machineVars.headless) {
|
||||
enable = true;
|
||||
font = {
|
||||
name = "Droid Sans";
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"ntnu" = {
|
||||
user = "oysteikt";
|
||||
hostname = "login.stud.ntnu.no";
|
||||
proxyJump = "pvv";
|
||||
};
|
||||
"gitlab.stud.idi.ntnu.no" = {
|
||||
user = "git";
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
imports = [ ./mimetypes.nix ];
|
||||
imports = [
|
||||
./mimetypes.nix
|
||||
./directory-spec-overrides.nix
|
||||
];
|
||||
xdg = {
|
||||
enable = true;
|
||||
userDirs = {
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
nix.settings.use-xdg-base-directories = true;
|
||||
|
||||
home.sessionVariables = let
|
||||
inherit (config.xdg) dataHome cacheHome configHome userDirs;
|
||||
in {
|
||||
TEXMFHOME = "${dataHome}/texmf";
|
||||
TEXMFVAR = "${cacheHome}/texlive";
|
||||
TEXMFCONFIG = "${configHome}/texlive";
|
||||
|
||||
PSQL_HISTORY = "${dataHome}/psql_history";
|
||||
SQLITE_HISTORY= "${dataHome}/sqlite_history";
|
||||
MYSQL_HISTFILE = "${dataHome}/mysql_history";
|
||||
NODE_REPL_HISTORY = "${dataHome}/node_repl_history";
|
||||
GDB_HISTFILE = "${dataHome}/gdb_history";
|
||||
PYTHON_HISTORY = "${dataHome}/python_history";
|
||||
|
||||
GHCUP_USE_XDG_DIRS = "true";
|
||||
|
||||
ANDROID_USER_HOME = "${dataHome}/android";
|
||||
AZURE_CONFIG_DIR = "${dataHome}/azure";
|
||||
CARGO_HOME = "${dataHome}/cargo";
|
||||
CUDA_CACHE_PATH = "${cacheHome}/nv";
|
||||
DOCKER_CONFIG = "${configHome}/docker";
|
||||
DOTNET_CLI_HOME = "${dataHome}/dotnet";
|
||||
DOT_SAGE = "${configHome}/sagemath";
|
||||
ELM_HOME = "${configHome}/";
|
||||
GOPATH = "${dataHome}/go";
|
||||
GRADLE_USER_HOME = "${dataHome}/gradle";
|
||||
ICEAUTHORITY = "${cacheHome}/ICEauthority";
|
||||
NIMBLE_DIR = "${dataHome}/nimble";
|
||||
NLTK_DATA = "${dataHome}/nltk_data";
|
||||
NRFUTIL_HOME = "${dataHome}/nrfutil";
|
||||
NUGET_PACKAGES = "${cacheHome}/nuget-packages";
|
||||
PARALLEL_HOME = "${configHome}/parallel";
|
||||
PYENV_ROOT = "${dataHome}/pyenv";
|
||||
RUSTUP_HOME = "${dataHome}/rustup";
|
||||
STACK_ROOT = "${dataHome}/stack";
|
||||
W3M_DIR = "${dataHome}/w3m";
|
||||
WINEPREFIX = "${dataHome}/wine";
|
||||
|
||||
# TODO: these needs to be set before the user session has fully initialized
|
||||
# XINITRC = "$XDG_CONFIG_HOME/x11/initrc";
|
||||
# XAUTHORITY
|
||||
# ERRFILE = "${cacheHome}/X11/xsession-errors";
|
||||
# USERXSESSION
|
||||
# XCOMPOSECACHE="${cacheHome}/X11/xcompose";
|
||||
# XCURSOR_PATH
|
||||
};
|
||||
|
||||
xdg.configFile = {
|
||||
"npm/npmrc".text = ''
|
||||
prefix=${config.xdg.dataHome}/npm
|
||||
cache=${config.xdg.cacheHome}/npm
|
||||
init-module=${config.xdg.configHome}/npm/config/npm-init.js
|
||||
'';
|
||||
"bpython/config".text = ''
|
||||
[general]
|
||||
hist_file = ${config.xdg.dataHome}/bpython_history
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,9 +1,7 @@
|
|||
{ pkgs, lib, extendedLib, inputs, machineVars, ... } @ args: let
|
||||
{ config, pkgs, lib, extendedLib, inputs, machineVars, ... } @ args: let
|
||||
inherit (lib) mkForce mkIf optionals;
|
||||
graphics = !machineVars.headless;
|
||||
in {
|
||||
inherit machineVars;
|
||||
|
||||
imports = [
|
||||
./shell.nix
|
||||
./packages.nix
|
||||
|
@ -26,7 +24,6 @@ in {
|
|||
./programs/tmux.nix
|
||||
./programs/zsh
|
||||
|
||||
../modules/machineVars.nix
|
||||
./modules/colors.nix
|
||||
./modules/shellAliases.nix
|
||||
] ++ optionals graphics [
|
||||
|
@ -46,34 +43,24 @@ in {
|
|||
./services/mpd.nix
|
||||
./services/picom.nix
|
||||
./services/polybar.nix
|
||||
./services/screen-locker.nix
|
||||
./services/stalonetray.nix
|
||||
./services/sxhkd.nix
|
||||
./services/copyq.nix
|
||||
];
|
||||
|
||||
nix.settings = {
|
||||
use-xdg-base-directories = true;
|
||||
};
|
||||
|
||||
home = {
|
||||
stateVersion = "22.05";
|
||||
username = "h7x4";
|
||||
homeDirectory = "/home/h7x4";
|
||||
file = {
|
||||
".ghci".text = ''
|
||||
:set prompt "${extendedLib.termColors.front.magenta "[GHCi]λ"} ".
|
||||
'';
|
||||
|
||||
".pyrc".text = ''
|
||||
#!/usr/bin/env python3
|
||||
import sys
|
||||
|
||||
# You also need \x01 and \x02 to separate escape sequence, due to:
|
||||
# https://stackoverflow.com/a/9468954/1147688
|
||||
sys.ps1='\x01\x1b${extendedLib.termColors.front.blue "[Python]> "}\x02>>>\x01\x1b[0m\x02 ' # bright yellow
|
||||
sys.ps2='\x01\x1b[1;49;31m\x02...\x01\x1b[0m\x02 ' # bright red
|
||||
'';
|
||||
};
|
||||
|
||||
sessionVariables = {
|
||||
TEXMFHOME = "$HOME/documents/texmf";
|
||||
};
|
||||
sessionPath = [
|
||||
"$HOME/.local/bin"
|
||||
];
|
||||
|
||||
pointerCursor = mkIf graphics {
|
||||
package = pkgs.capitaine-cursors;
|
||||
|
@ -82,6 +69,26 @@ in {
|
|||
};
|
||||
|
||||
keyboard.options = [ "caps:escape" ];
|
||||
|
||||
sessionVariables = {
|
||||
PYTHONSTARTUP = "${config.xdg.configHome}/python/pyrc";
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile = {
|
||||
"ghc/ghci.conf".text = ''
|
||||
:set prompt "${extendedLib.termColors.front.magenta "[GHCi]λ"} "
|
||||
'';
|
||||
|
||||
"python/pyrc".text = ''
|
||||
#!/usr/bin/env python3
|
||||
import sys
|
||||
|
||||
# You also need \x01 and \x02 to separate escape sequence, due to:
|
||||
# https://stackoverflow.com/a/9468954/1147688
|
||||
sys.ps1='\x01\x1b${extendedLib.termColors.front.blue "[Python]> "}\x02>>>\x01\x1b[0m\x02 ' # bright yellow
|
||||
sys.ps2='\x01\x1b[1;49;31m\x02...\x01\x1b[0m\x02 ' # bright red
|
||||
'';
|
||||
};
|
||||
|
||||
news.display = "silent";
|
||||
|
@ -91,8 +98,17 @@ in {
|
|||
programs = {
|
||||
home-manager.enable = true;
|
||||
|
||||
bash = {
|
||||
enable = true;
|
||||
historyFile = "${config.xdg.dataHome}/bash_history";
|
||||
historySize = 100000;
|
||||
};
|
||||
|
||||
bat.enable = true;
|
||||
bottom.enable = true;
|
||||
bottom = {
|
||||
enable = true;
|
||||
settings.flags.enable_gpu = true;
|
||||
};
|
||||
eza.enable = true;
|
||||
feh.enable = mkIf graphics true;
|
||||
fzf = {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{ pkgs, config, ... }: let
|
||||
inherit (config) machineVars;
|
||||
in {
|
||||
{ pkgs, config, machineVars, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
beets
|
||||
binutils
|
||||
cloc
|
||||
czkawka
|
||||
delta
|
||||
|
@ -22,6 +22,7 @@ in {
|
|||
lolcat
|
||||
mdcat
|
||||
mediainfo
|
||||
meli
|
||||
mkvtoolnix
|
||||
mmv
|
||||
mtr
|
||||
|
@ -65,7 +66,7 @@ in {
|
|||
|
||||
# Needed for VSCode liveshare
|
||||
desktop-file-utils
|
||||
krb5
|
||||
# krb5
|
||||
zlib
|
||||
icu
|
||||
openssl
|
||||
|
@ -78,7 +79,7 @@ in {
|
|||
birdtray
|
||||
calibre
|
||||
cool-retro-term
|
||||
# darktable
|
||||
darktable
|
||||
discord
|
||||
element-desktop
|
||||
geogebra
|
||||
|
@ -115,7 +116,7 @@ in {
|
|||
# swiPrologWithGui
|
||||
sxiv
|
||||
# tagainijisho
|
||||
teams
|
||||
|
||||
tenacity
|
||||
thunderbird
|
||||
# transcribe
|
||||
|
@ -123,6 +124,7 @@ in {
|
|||
xcalib
|
||||
xclip
|
||||
xdotool
|
||||
xorg.xmodmap
|
||||
(xfce.thunar.override {
|
||||
thunarPlugins = with xfce; [
|
||||
thunar-volman
|
||||
|
|
|
@ -26,14 +26,14 @@
|
|||
in
|
||||
{
|
||||
primary = getAttrs primaryColors config.colors.defaultColorSet;
|
||||
normal = let
|
||||
removePrimaryColorAttrs = n: v: !(any (pc: n ? pc) primaryColors);
|
||||
in filterAttrs removePrimaryColorAttrs config.colors.defaultColorSet;
|
||||
normal = builtins.removeAttrs config.colors.defaultColorSet (primaryColors ++ [ "name" ]);
|
||||
};
|
||||
|
||||
cursor = {
|
||||
style = "Block";
|
||||
blinking = "On";
|
||||
style = {
|
||||
shape = "Block";
|
||||
blinking = "On";
|
||||
};
|
||||
unfocused_hollow = true;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, config, ... }: let
|
||||
{ config, pkgs, machineVars, ... }: let
|
||||
inherit (pkgs) lib;
|
||||
in {
|
||||
programs.xmobar = let
|
||||
|
@ -7,8 +7,8 @@ in {
|
|||
# TODO: loop over dataDrives
|
||||
disks = [
|
||||
"/"
|
||||
"${config.machineVars.dataDrives.default}"
|
||||
"${config.machineVars.dataDrives.default}/disks/data2"
|
||||
"${machineVars.dataDrives.default}"
|
||||
"${machineVars.dataDrives.default}/disks/data2"
|
||||
];
|
||||
|
||||
mpd_status_script = pkgs.writeShellScript "mpd-status" ''
|
||||
|
|
|
@ -13,7 +13,9 @@
|
|||
'';
|
||||
|
||||
# TODO: Regenerate zcompdump with a systemd timer
|
||||
completionInit = "autoload -Uz compinit && compinit -C";
|
||||
completionInit = ''
|
||||
autoload -Uz compinit && compinit -C -d "${config.xdg.cacheHome}/zsh/zcompdump-$ZSH_VERSION"
|
||||
'';
|
||||
|
||||
history = {
|
||||
extended = true;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{ pkgs, config, ... }: let
|
||||
{ pkgs, config, machineVars, ... }: let
|
||||
colors = config.colors.defaultColorSet;
|
||||
inherit (config) machineVars;
|
||||
in {
|
||||
services.polybar = {
|
||||
enable = true;
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
services.screen-locker = {
|
||||
enable = true;
|
||||
lockCmd = lib.getExe pkgs.i3lock-fancy;
|
||||
};
|
||||
}
|
|
@ -50,6 +50,8 @@ in
|
|||
|
||||
# Misc
|
||||
|
||||
"super + l" = "loginctl lock-session";
|
||||
|
||||
"super + a" = "${pkgs.copyq}/bin/copyq toggle";
|
||||
|
||||
# fcitx "super + {b,n,m}" = "${pkgs.fcitx}/bin/fcitx-remote -s {mozc,fcitx-keyboard-no,fcitx-keyboard-us}";
|
||||
|
|
|
@ -22,9 +22,10 @@ in {
|
|||
auto-optimise-store = true;
|
||||
binary-caches = [ "https://cache.nixos.org/" ];
|
||||
builders-use-substitutes = true;
|
||||
experimental-features = [ "nix-command" "flakes" "repl-flake" ];
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
log-lines = 50;
|
||||
trusted-users = [ "h7x4" "nix-builder" ];
|
||||
use-xdg-base-directories = true;
|
||||
};
|
||||
|
||||
buildMachines = [
|
||||
|
@ -86,6 +87,13 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs; [
|
||||
libusb1
|
||||
];
|
||||
};
|
||||
|
||||
programs.ssh = {
|
||||
extraConfig = ''
|
||||
Host nix-builder-isvegg
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{ config, lib, pkgs, inputs, specialArgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./services/avahi.nix
|
||||
./services/docker.nix
|
||||
./services/libvirtd.nix
|
||||
./services/logiops.nix
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
services.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";
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue