mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
Refactor: Moved profiles/*/home to users/kat/... Reorganised
users/kat/...
This commit is contained in:
parent
99da1a04e4
commit
82d22bf87b
82 changed files with 302 additions and 428 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1,6 +1,3 @@
|
|||
/result
|
||||
/result*
|
||||
/.direnv/
|
||||
secrets.nix
|
||||
!profiles/common/nixos/secrets.nix
|
||||
!profiles/kat/home/secrets.nix
|
||||
|
|
|
|||
11
default.nix
11
default.nix
|
|
@ -10,15 +10,18 @@ rec {
|
|||
defaultFile = "nixos.nix";
|
||||
};
|
||||
|
||||
hosts = import ./lib/hosts.nix {
|
||||
inherit pkgs sources witch profiles;
|
||||
users = witch.modList { modulesDir = ./users; };
|
||||
|
||||
inherit (import ./lib/hosts.nix {
|
||||
inherit pkgs sources witch profiles users;
|
||||
inherit (deploy) target;
|
||||
};
|
||||
})
|
||||
hosts targets;
|
||||
|
||||
inherit (pkgs) lib;
|
||||
|
||||
deploy = import ./lib/deploy.nix {
|
||||
inherit pkgs sources;
|
||||
inherit (hosts) hosts targets;
|
||||
inherit hosts targets;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, profiles, ... }:
|
||||
{ config, users, lib, pkgs, profiles, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
@ -6,7 +6,7 @@ with lib;
|
|||
imports = [
|
||||
./hw.nix
|
||||
# profiles
|
||||
profiles.kat
|
||||
users.kat.server
|
||||
# host-specific services
|
||||
./virtualhosts.nix
|
||||
# services
|
||||
|
|
|
|||
|
|
@ -1,8 +1,14 @@
|
|||
{ config, pkgs, profiles, ... }:
|
||||
{ config, users, pkgs, profiles, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ ./hw.nix profiles.gui profiles.sway profiles.kat profiles.laptop ];
|
||||
imports = [
|
||||
./hw.nix
|
||||
profiles.gui
|
||||
profiles.sway
|
||||
profiles.laptop
|
||||
users.kat.sway
|
||||
users.kat.gui
|
||||
];
|
||||
|
||||
deploy.target = "mbp";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ config, pkgs, profiles, ... }:
|
||||
{ config, users, pkgs, profiles, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./hw.nix profiles.kat profiles.laptop ];
|
||||
imports = [ ./hw.nix profiles.laptop ];
|
||||
|
||||
deploy.target = "slow";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ tf, config, pkgs, lib, profiles, sources, ... }:
|
||||
{ tf, config, users, pkgs, lib, profiles, sources, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
@ -11,7 +11,7 @@ in {
|
|||
./hw.nix
|
||||
profiles.gui
|
||||
profiles.sway
|
||||
profiles.kat
|
||||
users.kat.guiFull
|
||||
../../../services/zfs.nix
|
||||
../../../services/restic.nix
|
||||
../../../services/nginx.nix
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, lib, profiles, ... }:
|
||||
{ config, users, pkgs, lib, profiles, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
@ -13,8 +13,8 @@ with lib;
|
|||
../../../services/nginx.nix
|
||||
profiles.gui
|
||||
profiles.sway
|
||||
profiles.kat
|
||||
profiles.laptop
|
||||
users.kat.guiFull
|
||||
];
|
||||
|
||||
deploy.target = "personal";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{ pkgs, target, hostsDir ? ../hosts, profiles, pkgsPath ? ../pkgs, sources ? { }
|
||||
, witch ? { } }:
|
||||
{ pkgs, target, users, hostsDir ? ../hosts, profiles, pkgsPath ? ../pkgs
|
||||
, sources ? { }, witch ? { } }:
|
||||
|
||||
with pkgs.lib;
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ rec {
|
|||
else
|
||||
{ })
|
||||
];
|
||||
specialArgs = { inherit sources target profiles witch hostName; };
|
||||
specialArgs = { inherit sources target profiles witch hostName users; };
|
||||
})) hostNames);
|
||||
|
||||
targets = foldAttrs (host: hosts: [ host ] ++ hosts) [ ] (mapAttrsToList
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
./private/profile/nixos;
|
||||
|
||||
options = {
|
||||
deploy.profile.kat = lib.mkEnableOption "uhh meow";
|
||||
deploy.profile.gui = lib.mkEnableOption "graphical system";
|
||||
deploy.profile.sway = lib.mkEnableOption "sway wm";
|
||||
deploy.profile.laptop = lib.mkEnableOption "lappytop";
|
||||
|
|
@ -43,7 +42,6 @@
|
|||
(import (./private/hosts + "/${hostName}/home"));
|
||||
|
||||
options = {
|
||||
deploy.profile.kat = lib.mkEnableOption "uhh meow";
|
||||
deploy.profile.gui = lib.mkEnableOption "graphical system";
|
||||
deploy.profile.sway = lib.mkEnableOption "sway wm";
|
||||
deploy.profile.laptop = lib.mkEnableOption "lappytop";
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{ }
|
||||
|
|
@ -1,7 +1,5 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./nixos ../../users ];
|
||||
|
||||
config = { home-manager.users.kat = { imports = [ ./home.nix ]; }; };
|
||||
imports = [ ./nixos ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{ config, users, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
users.kat.base
|
||||
users.arc
|
||||
./system.nix
|
||||
./net.nix
|
||||
./access.nix
|
||||
|
|
|
|||
|
|
@ -5,27 +5,9 @@
|
|||
smartmontools
|
||||
hddtemp
|
||||
lm_sensors
|
||||
htop
|
||||
cachix
|
||||
borgbackup
|
||||
ripgrep
|
||||
git
|
||||
nixfmt
|
||||
wget
|
||||
rsync
|
||||
pv
|
||||
pinentry-curses
|
||||
kitty.terminfo
|
||||
progress
|
||||
bc
|
||||
bat
|
||||
zstd
|
||||
file
|
||||
whois
|
||||
fd
|
||||
exa
|
||||
socat
|
||||
tmux
|
||||
gnupg
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./home ];
|
||||
|
||||
deploy.profile.gui = true;
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./firefox
|
||||
./kitty.nix
|
||||
./packages.nix
|
||||
./gpg.nix
|
||||
./bitw.nix
|
||||
./weechat.nix
|
||||
./gtk.nix
|
||||
./music.nix
|
||||
./mpv.nix
|
||||
./syncplay.nix
|
||||
./obs.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
_1password
|
||||
bitwarden
|
||||
wire-desktop
|
||||
element-desktop
|
||||
wf-recorder
|
||||
mumble-speechd
|
||||
niv
|
||||
feh
|
||||
rink
|
||||
sd
|
||||
kat-scrot
|
||||
duc
|
||||
exiftool
|
||||
audacity
|
||||
avidemux
|
||||
gst_all_1.gstreamer.dev
|
||||
gst_all_1.gstreamer
|
||||
gst_all_1.gst-plugins-base
|
||||
gst_all_1.gst-plugins-good
|
||||
gst_all_1.gst-plugins-bad
|
||||
gst_all_1.gst-plugins-ugly
|
||||
vlc
|
||||
ffmpeg-full
|
||||
thunderbird
|
||||
youtube-dl
|
||||
mkchromecast
|
||||
google-chrome
|
||||
v4l-utils
|
||||
transmission-remote-gtk
|
||||
lm_sensors
|
||||
p7zip
|
||||
baresip
|
||||
psmisc
|
||||
discord
|
||||
tdesktop
|
||||
yubikey-manager
|
||||
pinentry.gtk2
|
||||
dino
|
||||
libnotify
|
||||
nextcloud-client
|
||||
vegur
|
||||
nitrogen
|
||||
terminator
|
||||
pavucontrol
|
||||
gparted
|
||||
scrot
|
||||
gimp-with-plugins
|
||||
vscode
|
||||
cryptsetup
|
||||
vifm
|
||||
neofetch
|
||||
htop
|
||||
];
|
||||
}
|
||||
|
|
@ -3,7 +3,5 @@
|
|||
{
|
||||
imports = [ ./nixos ];
|
||||
|
||||
home-manager.users.kat = { imports = [ ./home.nix ]; };
|
||||
|
||||
deploy.profile.gui = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,21 +8,7 @@
|
|||
'';
|
||||
};
|
||||
|
||||
/* hardware.pulseaudio = {
|
||||
enable = true;
|
||||
extraConfig = "unload-module module-role-cork";
|
||||
daemon.config = {
|
||||
exit-idle-time = 5;
|
||||
resample-method = "speex-float-5";
|
||||
avoid-resampling = "true";
|
||||
flat-volumes = "no";
|
||||
default-sample-format = "s32le";
|
||||
default-sample-rate = 48000;
|
||||
alternate-sample-rate = 44100;
|
||||
default-sample-channels = 2;
|
||||
};
|
||||
};
|
||||
*/
|
||||
environment.systemPackages = with pkgs; [ pavucontrol ];
|
||||
|
||||
security.rtkit.enable = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./home ];
|
||||
|
||||
deploy.profile.kat = true;
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [ hyperfine hexyl tokei ];
|
||||
}
|
||||
|
|
@ -1,142 +0,0 @@
|
|||
function term_title {
|
||||
emulate -L zsh
|
||||
unsetopt prompt_subst
|
||||
|
||||
[[ -t 1 ]] || return
|
||||
|
||||
local TITLE="$1"
|
||||
local TAB="${2-$1}"
|
||||
|
||||
case "$TERM" in
|
||||
cygwin|xterm*|putty*|rxvt*|ansi)
|
||||
print -Pn "\e]2;$TITLE:q\a"
|
||||
print -Pn "\e]1;$TAB:q\a"
|
||||
;;
|
||||
screen*)
|
||||
print -Pn "\ek$TITLE:q\e\\"
|
||||
;;
|
||||
*)
|
||||
if [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
|
||||
print -Pn "\e]2;$TITLE:q\a"
|
||||
print -Pn "\e]1;$TAB:q\a"
|
||||
else
|
||||
if [[ -n "$terminfo[fsl]" ]] && [[ -n "$terminfo[tsl]" ]]; then
|
||||
echoti tsl
|
||||
print -Pn "$TITLE"
|
||||
echoti fsl
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function term_dir {
|
||||
emulate -L zsh
|
||||
|
||||
[[ -t 1 ]] || return
|
||||
|
||||
local DIR="${1-$PWD}"
|
||||
|
||||
if [[ "${TERM_PROGRAM-}" == "Apple_Terminal" ]]; then
|
||||
local URL_PATH="$(__omz_urlencode -P "$DIR")"
|
||||
[[ $? != 0 ]] && return 1
|
||||
|
||||
printf '\e]7;%s\a' "file://$HOST$URL_PATH"
|
||||
fi
|
||||
}
|
||||
|
||||
function __arc_update_precmd {
|
||||
local TERM_TITLE="%~"
|
||||
local TERM_TAB="%~"
|
||||
|
||||
if [[ "${TERM_PROGRAM-}" == "Apple_Terminal" ]]; then
|
||||
TERM_TAB="$USER@%m"
|
||||
TERM_TITLE="$TERM_TAB"
|
||||
elif [[ "$USER" != "$DEFAULT_USER" || -n "${SSH_CLIENT-}" ]]; then
|
||||
TERM_TAB="$USER@%m"
|
||||
TERM_TITLE="$TERM_TAB - $TERM_TITLE"
|
||||
fi
|
||||
|
||||
term_title "$TERM_TITLE" "$TERM_TAB"
|
||||
}
|
||||
|
||||
function __arc_update_preexec {
|
||||
emulate -L zsh
|
||||
setopt extended_glob
|
||||
|
||||
local TERM_TAB=${1[(wr)^(*=*|sudo|ssh|mosh|rake|-*)]:gs/%/%%}
|
||||
local TERM_TITLE="${2:gs/%/%%}"
|
||||
|
||||
if [[ "$USER" != "$DEFAULT_USER" || -n "${SSH_CLIENT-}" ]]; then
|
||||
TERM_TAB="$USER@%m - $TERM_TAB"
|
||||
TERM_TITLE="$USER@%m - $TERM_TITLE"
|
||||
fi
|
||||
|
||||
term_title "$TERM_TITLE" "$TERM_TAB"
|
||||
}
|
||||
|
||||
zmodload zsh/langinfo
|
||||
|
||||
function __omz_urlencode() {
|
||||
emulate -L zsh
|
||||
zparseopts -D -E -a opts r m P
|
||||
|
||||
local in_str=$1
|
||||
local url_str=""
|
||||
local spaces_as_plus
|
||||
if [[ -z $opts[(r)-P] ]]; then spaces_as_plus=1; fi
|
||||
local str="$in_str"
|
||||
|
||||
# URLs must use UTF-8 encoding; convert str to UTF-8 if required
|
||||
local encoding=$langinfo[CODESET]
|
||||
local safe_encodings
|
||||
safe_encodings=(UTF-8 utf8 US-ASCII)
|
||||
if [[ -z ${safe_encodings[(r)$encoding]} ]]; then
|
||||
str=$(echo -E "$str" | iconv -f $encoding -t UTF-8)
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Error converting string from $encoding to UTF-8" >&2
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Use LC_CTYPE=C to process text byte-by-byte
|
||||
local i byte ord LC_ALL=C
|
||||
export LC_ALL
|
||||
local reserved=';/?:@&=+$,'
|
||||
local mark='_.!~*''()-'
|
||||
local dont_escape="[A-Za-z0-9"
|
||||
if [[ -z $opts[(r)-r] ]]; then
|
||||
dont_escape+=$reserved
|
||||
fi
|
||||
# $mark must be last because of the "-"
|
||||
if [[ -z $opts[(r)-m] ]]; then
|
||||
dont_escape+=$mark
|
||||
fi
|
||||
dont_escape+="]"
|
||||
|
||||
# Implemented to use a single printf call and avoid subshells in the loop,
|
||||
# for performance (primarily on Windows).
|
||||
local url_str=""
|
||||
for (( i = 1; i <= ${#str}; ++i )); do
|
||||
byte="$str[i]"
|
||||
if [[ "$byte" =~ "$dont_escape" ]]; then
|
||||
url_str+="$byte"
|
||||
else
|
||||
if [[ "$byte" == " " && -n $spaces_as_plus ]]; then
|
||||
url_str+="+"
|
||||
else
|
||||
ord=$(( [##16] #byte ))
|
||||
url_str+="%$ord"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
echo -E "$url_str"
|
||||
}
|
||||
|
||||
if [[ -z "${ARC_PROMPT_RUN-}" ]]; then
|
||||
chpwd_functions+=(term_dir)
|
||||
precmd_functions+=(__arc_update_precmd)
|
||||
preexec_functions+=(__arc_update_preexec)
|
||||
|
||||
term_dir
|
||||
fi
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
deploy.profile.laptop = true;
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./home ];
|
||||
|
||||
deploy.profile.sway = true;
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.konawall = {
|
||||
enable = true;
|
||||
interval = "20m";
|
||||
};
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
systemd.user.services.swayidle = {
|
||||
Unit = {
|
||||
Description = "swayidle";
|
||||
Documentation = [ "man:swayidle(1)" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = ''
|
||||
${pkgs.swayidle}/bin/swayidle -w \
|
||||
timeout 300 '${pkgs.swaylock}/bin/swaylock -f -i LVDS-1:${
|
||||
../../../private/files/wallpapers/main.png
|
||||
} -i eDP-1:${
|
||||
../../../private/files/wallpapers/main.png
|
||||
} -i HDMI-A-1:${../../../private/files/wallpapers/main.png} -i DP-1:${
|
||||
../../../private/files/wallpapers/left.jpg
|
||||
} -i DVI-D-1:${../../../private/files/wallpapers/right.jpg}' \
|
||||
#timeout 600 'swaymsg "output * dpms off"' \
|
||||
# resume 'swaymsg "output * dpms on"' \
|
||||
before-sleep '${pkgs.swaylock}/bin/swaylock -f -i LVDS-1:${
|
||||
../../../private/files/wallpapers/main.png
|
||||
} -p eDP-1:${
|
||||
../../../private/files/wallpapers/main.png
|
||||
} -i HDMI-A-1:${../../../private/files/wallpapers/main.png} -i DP-1:${
|
||||
../../../private/files/wallpapers/left.jpg
|
||||
} -i DVI-D-1:${../../../private/files/wallpapers/right.jpg}'
|
||||
'';
|
||||
RestartSec = 3;
|
||||
Restart = "always";
|
||||
};
|
||||
Install = { WantedBy = [ "sway-session.target" ]; };
|
||||
};
|
||||
}
|
||||
|
|
@ -3,7 +3,5 @@
|
|||
{
|
||||
imports = [ ./nixos ];
|
||||
|
||||
home-manager.users.kat = { imports = [ ./home.nix ]; };
|
||||
|
||||
deploy.profile.sway = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [ ./arc ];
|
||||
}
|
||||
11
users/kat/default.nix
Normal file
11
users/kat/default.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
rec {
|
||||
base = ./nixos/base.nix;
|
||||
gui = ./nixos/gui.nix;
|
||||
sway = ./nixos/sway.nix;
|
||||
dev = ./nixos/dev.nix;
|
||||
media = ./nixos/media.nix;
|
||||
personal = ./nixos/personal.nix;
|
||||
|
||||
server = { imports = [ personal ]; };
|
||||
guiFull = { imports = [ gui sway dev media personal ]; };
|
||||
}
|
||||
|
|
@ -2,12 +2,11 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
./zsh
|
||||
./vim
|
||||
./zsh.nix
|
||||
./git.nix
|
||||
./kitty.nix
|
||||
./tmux.nix
|
||||
./secrets.nix
|
||||
./base16.nix
|
||||
./xdg.nix
|
||||
./ssh.nix
|
||||
28
users/kat/home/base/packages.nix
Normal file
28
users/kat/home/base/packages.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
htop
|
||||
fd
|
||||
sd
|
||||
duc
|
||||
bat
|
||||
exa
|
||||
fd
|
||||
socat
|
||||
rsync
|
||||
wget
|
||||
ripgrep
|
||||
nixfmt
|
||||
pv
|
||||
progress
|
||||
zstd
|
||||
file
|
||||
whois
|
||||
niv
|
||||
dnsutils
|
||||
rink
|
||||
borgbackup
|
||||
neofetch
|
||||
];
|
||||
}
|
||||
|
|
@ -15,6 +15,7 @@
|
|||
lla = "exa -lga";
|
||||
};
|
||||
initExtra = ''
|
||||
genmac() { nix run nixpkgs.openssl -c openssl rand -hex 6 | sed 's/\(..\)\(..\)\(..\)\(..\)\(..\)\(..\)/\1:\2:\3:\4:\5:\6/' }
|
||||
nano() { echo "baps you for being naughty, use vim" }
|
||||
'';
|
||||
localVariables = {
|
||||
5
users/kat/home/default.nix
Normal file
5
users/kat/home/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
rec {
|
||||
base = ./base;
|
||||
sway = ./sway;
|
||||
gui = ./gui;
|
||||
}
|
||||
5
users/kat/home/dev/default.nix
Normal file
5
users/kat/home/dev/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./packages.nix ];
|
||||
}
|
||||
5
users/kat/home/dev/packages.nix
Normal file
5
users/kat/home/dev/packages.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [ hyperfine hexyl tokei horizon-eda ];
|
||||
}
|
||||
7
users/kat/home/gui/default.nix
Normal file
7
users/kat/home/gui/default.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
deploy.profile.gui = true;
|
||||
|
||||
imports = [ ./firefox ./kitty.nix ./packages.nix ./weechat.nix ./gtk.nix ];
|
||||
}
|
||||
25
users/kat/home/gui/packages.nix
Normal file
25
users/kat/home/gui/packages.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
_1password
|
||||
bitwarden
|
||||
wire-desktop
|
||||
element-desktop
|
||||
exiftool
|
||||
thunderbird
|
||||
google-chrome
|
||||
transmission-remote-gtk
|
||||
lm_sensors
|
||||
p7zip
|
||||
zip
|
||||
unzip
|
||||
baresip
|
||||
discord
|
||||
tdesktop
|
||||
yubikey-manager
|
||||
vegur
|
||||
gparted
|
||||
cryptsetup
|
||||
];
|
||||
}
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
{
|
||||
home.file = {
|
||||
".local/share/weechat/sec.conf" = lib.mkIf config.deploy.profile.private {
|
||||
source = ../../../private/files/weechat/sec.conf;
|
||||
source = ../../../../private/files/weechat/sec.conf;
|
||||
};
|
||||
};
|
||||
programs.weechat = {
|
||||
18
users/kat/home/media/beets.nix
Normal file
18
users/kat/home/media/beets.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
programs.beets = {
|
||||
enable = true;
|
||||
package = pkgs.beets;
|
||||
settings = {
|
||||
directory = "~/media-share/music";
|
||||
library = "~/.local/share/beets.db";
|
||||
plugins = lib.concatStringsSep " " [
|
||||
"mpdstats"
|
||||
"mpdupdate"
|
||||
"duplicates"
|
||||
"chroma"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
13
users/kat/home/media/default.nix
Normal file
13
users/kat/home/media/default.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./mpv.nix
|
||||
./obs.nix
|
||||
./syncplay.nix
|
||||
./beets.nix
|
||||
./mpd.nix
|
||||
./ncmpcpp.nix
|
||||
./packages.nix
|
||||
];
|
||||
}
|
||||
38
users/kat/home/media/mpd.nix
Normal file
38
users/kat/home/media/mpd.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
package = pkgs.mpd-youtube-dl;
|
||||
network.startWhenNeeded = true;
|
||||
musicDirectory = "/home/kat/media-share/music";
|
||||
extraConfig = ''
|
||||
max_output_buffer_size "32768"
|
||||
|
||||
audio_output {
|
||||
type "fifo"
|
||||
name "my_fifo"
|
||||
path "/tmp/mpd.fifo"
|
||||
format "44100:16:2"
|
||||
}
|
||||
|
||||
audio_output {
|
||||
type "pulse"
|
||||
name "speaker"
|
||||
}
|
||||
|
||||
|
||||
audio_output {
|
||||
type "httpd"
|
||||
name "httpd-high"
|
||||
encoder "opus"
|
||||
bitrate "96000"
|
||||
port "32101"
|
||||
max_clients "4"
|
||||
format "48000:16:2"
|
||||
always_on "yes"
|
||||
tags "yes"
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
programs.ncmpcpp = {
|
||||
|
|
@ -49,52 +49,4 @@
|
|||
}
|
||||
];
|
||||
};
|
||||
programs.beets = {
|
||||
enable = true;
|
||||
package = pkgs.beets;
|
||||
settings = {
|
||||
directory = "~/media-share/music";
|
||||
library = "~/.local/share/beets.db";
|
||||
plugins = lib.concatStringsSep " " [
|
||||
"mpdstats"
|
||||
"mpdupdate"
|
||||
"duplicates"
|
||||
"chroma"
|
||||
];
|
||||
};
|
||||
};
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
package = pkgs.mpd-youtube-dl;
|
||||
network.startWhenNeeded = true;
|
||||
musicDirectory = "/home/kat/media-share/music";
|
||||
extraConfig = ''
|
||||
max_output_buffer_size "32768"
|
||||
|
||||
audio_output {
|
||||
type "fifo"
|
||||
name "my_fifo"
|
||||
path "/tmp/mpd.fifo"
|
||||
format "44100:16:2"
|
||||
}
|
||||
|
||||
audio_output {
|
||||
type "pulse"
|
||||
name "speaker"
|
||||
}
|
||||
|
||||
|
||||
audio_output {
|
||||
type "httpd"
|
||||
name "httpd-high"
|
||||
encoder "opus"
|
||||
bitrate "96000"
|
||||
port "32101"
|
||||
max_clients "4"
|
||||
format "48000:16:2"
|
||||
always_on "yes"
|
||||
tags "yes"
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
21
users/kat/home/media/packages.nix
Normal file
21
users/kat/home/media/packages.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
audacity
|
||||
avidemux
|
||||
gst_all_1.gstreamer.dev
|
||||
gst_all_1.gstreamer
|
||||
gst_all_1.gst-plugins-base
|
||||
gst_all_1.gst-plugins-good
|
||||
gst_all_1.gst-plugins-bad
|
||||
gst_all_1.gst-plugins-ugly
|
||||
vlc
|
||||
ffmpeg-full
|
||||
youtube-dl
|
||||
mkchromecast
|
||||
v4l-utils
|
||||
gimp-with-plugins
|
||||
wf-recorder
|
||||
];
|
||||
}
|
||||
5
users/kat/home/personal/default.nix
Normal file
5
users/kat/home/personal/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [ ./secrets.nix ./bitw.nix ./gpg.nix ./packages.nix ];
|
||||
}
|
||||
5
users/kat/home/personal/packages.nix
Normal file
5
users/kat/home/personal/packages.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [ pinentry.gtk2 ];
|
||||
}
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
deploy.profile.sway = true;
|
||||
|
||||
imports = [
|
||||
./waybar
|
||||
./mako.nix
|
||||
|
|
@ -8,5 +10,6 @@
|
|||
./swayidle.nix
|
||||
./gammastep.nix
|
||||
./konawall.nix
|
||||
./packages.nix
|
||||
];
|
||||
}
|
||||
5
users/kat/home/sway/konawall.nix
Normal file
5
users/kat/home/sway/konawall.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.konawall = { enable = true; };
|
||||
}
|
||||
5
users/kat/home/sway/packages.nix
Normal file
5
users/kat/home/sway/packages.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [ kat-scrot ];
|
||||
}
|
||||
|
|
@ -77,13 +77,11 @@ in {
|
|||
config = let
|
||||
dmenu =
|
||||
"${pkgs.bemenu}/bin/bemenu --fn '${witch.style.font.name} ${witch.style.font.size}' --nb '${witch.style.base16.base00}' --nf '${witch.style.base16.base07}' --sb '${witch.style.base16.base01}' --sf '${witch.style.base16.base07}' -l 5 -m -1 -i";
|
||||
lockCommand = "swaylock -i LVDS-1:${
|
||||
../../../private/files/wallpapers/main.png
|
||||
}-i eDP-1:${../../../private/files/wallpapers/main.png} -i HDMI-A-1:${
|
||||
../../../private/files/wallpapers/main.png
|
||||
} -i DP-1:${../../../private/files/wallpapers/left.jpg} -i DVI-D-1:${
|
||||
../../../private/files/wallpapers/right.jpg
|
||||
} -s fill";
|
||||
lockCommand = "swaylock -i LVDS-1:${./wallpapers/main.png}-i eDP-1:${
|
||||
./wallpapers/main.png
|
||||
} -i HDMI-A-1:${./wallpapers/main.png} -i DP-1:${
|
||||
./wallpapers/left.jpg
|
||||
} -i DVI-D-1:${./wallpapers/right.jpg} -s fill";
|
||||
|
||||
in {
|
||||
bars = [{ command = "${pkgs.waybar}/bin/waybar"; }];
|
||||
36
users/kat/home/sway/swayidle.nix
Normal file
36
users/kat/home/sway/swayidle.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
systemd.user.services.swayidle = {
|
||||
Unit = {
|
||||
Description = "swayidle";
|
||||
Documentation = [ "man:swayidle(1)" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = ''
|
||||
${pkgs.swayidle}/bin/swayidle -w \
|
||||
timeout 300 '${pkgs.swaylock}/bin/swaylock -f -i LVDS-1:${
|
||||
./wallpapers/main.png
|
||||
} -i eDP-1:${./wallpapers/main.png} -i HDMI-A-1:${
|
||||
./wallpapers/main.png
|
||||
} -i DP-1:${./wallpapers/left.jpg} -i DVI-D-1:${
|
||||
./wallpapers/right.jpg
|
||||
}' \
|
||||
timeout 600 'swaymsg "output * dpms off"' \
|
||||
resume 'swaymsg "output * dpms on"' \
|
||||
before-sleep '${pkgs.swaylock}/bin/swaylock -f -i LVDS-1:${
|
||||
./wallpapers/main.png
|
||||
} -p eDP-1:${./wallpapers/main.png} -i HDMI-A-1:${
|
||||
./wallpapers/main.png
|
||||
} -i DP-1:${./wallpapers/left.jpg} -i DVI-D-1:${
|
||||
./wallpapers/right.jpg
|
||||
}'
|
||||
'';
|
||||
RestartSec = 3;
|
||||
Restart = "always";
|
||||
};
|
||||
Install = { WantedBy = [ "sway-session.target" ]; };
|
||||
};
|
||||
}
|
||||
BIN
users/kat/home/sway/wallpapers/left.jpg
Normal file
BIN
users/kat/home/sway/wallpapers/left.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 451 KiB |
BIN
users/kat/home/sway/wallpapers/main.png
Normal file
BIN
users/kat/home/sway/wallpapers/main.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.2 MiB |
BIN
users/kat/home/sway/wallpapers/right.jpg
Normal file
BIN
users/kat/home/sway/wallpapers/right.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 MiB |
|
|
@ -1,11 +1,7 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.kat = { imports = [ ./home.nix ]; };
|
||||
|
||||
deploy.profile.kat = true;
|
||||
|
||||
users.groups = { uinput = { }; };
|
||||
home-manager.users.kat = { imports = [ ../home/base ]; };
|
||||
|
||||
users.users.kat = {
|
||||
uid = 1000;
|
||||
5
users/kat/nixos/dev.nix
Normal file
5
users/kat/nixos/dev.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home-manager.users.kat = { imports = [ ../home/dev ]; };
|
||||
}
|
||||
5
users/kat/nixos/gui.nix
Normal file
5
users/kat/nixos/gui.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home-manager.users.kat = { imports = [ ../home/gui ]; };
|
||||
}
|
||||
5
users/kat/nixos/media.nix
Normal file
5
users/kat/nixos/media.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home-manager.users.kat = { imports = [ ../home/media ]; };
|
||||
}
|
||||
5
users/kat/nixos/personal.nix
Normal file
5
users/kat/nixos/personal.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home-manager.users.kat = { imports = [ ../home/personal ]; };
|
||||
}
|
||||
5
users/kat/nixos/sway.nix
Normal file
5
users/kat/nixos/sway.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home-manager.users.kat = { imports = [ ../home/sway ]; };
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue