1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 18:21:07 +01:00
Files
niveum/configs/default.nix

277 lines
7.4 KiB
Nix
Raw Normal View History

2022-03-10 21:52:12 +01:00
{
pkgs,
lib,
config,
options,
...
}: let
2020-10-24 13:27:36 +02:00
inherit (lib.strings) makeBinPath;
inherit (import <niveum/lib>) localAddresses kieran;
2022-09-23 23:31:14 +02:00
scripts = import <niveum/packages/scripts> {inherit pkgs lib;};
2020-06-10 17:37:25 +02:00
in {
2019-04-19 03:11:51 +02:00
imports = [
<home-manager/nixos>
<niveum/modules/system-dependent.nix>
2020-10-18 17:26:19 +02:00
{
2022-03-10 21:52:12 +01:00
boot.supportedFilesystems = ["ntfs"];
2020-10-18 17:26:19 +02:00
}
{
nix.nixPath = [
"/var/src"
"nixpkgs-overlays=${toString ../overlays}"
];
}
2019-11-05 21:59:51 +01:00
{
nixpkgs = {
2020-04-09 17:51:16 +02:00
config = {
allowUnfree = true;
packageOverrides = pkgs: {
2022-01-23 11:44:31 +01:00
dmenu = pkgs.writers.writeDashBin "dmenu" ''exec ${pkgs.rofi}/bin/rofi -dmenu "$@"'';
2020-10-28 21:56:14 +01:00
gfs-fonts = pkgs.callPackage <niveum/packages/gfs-fonts.nix> {};
2022-01-11 19:56:31 +01:00
tocharian-font = pkgs.callPackage <niveum/packages/tocharian-font.nix> {};
2022-03-10 21:52:12 +01:00
iolanguage = pkgs.callPackage <niveum/packages/iolanguage.nix> {};
ix = pkgs.callPackage <niveum/packages/ix.nix> {};
2022-09-05 15:38:49 +02:00
rofi-pass = pkgs.rofi-pass.overrideAttrs (final: previous: {
patches = [
# password store androi
<niveum/packages/rofi-pass.patch>
];
});
2020-04-09 17:51:16 +02:00
};
};
2019-04-19 03:11:51 +02:00
};
}
{
boot.cleanTmpDir = true;
boot.loader.timeout = 1;
}
{
home-manager.users.me = {
programs.zathura = {
enable = true;
options = {
selection-clipboard = "clipboard";
recolor-keephue = true;
# first-page-column = "1:1"; # makes side-by-side mode start on the left side
};
2019-04-19 03:11:51 +02:00
};
};
}
{
users.mutableUsers = false;
2019-08-26 17:27:09 +02:00
users.defaultUserShell = pkgs.zsh;
2019-04-19 03:11:51 +02:00
users.users.me = {
name = "kfm";
description = kieran.name;
2022-03-10 21:52:12 +01:00
hashedPassword = "$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/";
2019-08-26 17:27:09 +02:00
isNormalUser = true;
uid = 1000;
2019-04-19 03:11:51 +02:00
};
2021-04-05 08:33:11 +02:00
home-manager.users.me.xdg.enable = true;
2021-12-01 17:38:47 +01:00
home-manager.users.me.dconf.enable = false;
2019-04-19 03:11:51 +02:00
}
{
sound.enable = true;
hardware.pulseaudio = {
enable = true;
2021-05-10 09:23:09 +02:00
package = pkgs.pulseaudioFull;
2021-03-23 20:28:08 +01:00
# copy server:/run/pulse/.config/pulse/cookie to client:~/.config/pulse/cookie to authenticate a client machine
zeroconf.discovery.enable = true;
2021-03-23 20:28:08 +01:00
extraConfig = ''
2022-03-10 21:52:12 +01:00
load-module ${
toString [
"module-tunnel-sink-new"
"server=zaatar.r"
"sink_name=zaatar"
"channels=2"
"rate=44100"
]
}
2021-03-23 20:28:08 +01:00
'';
2019-04-19 03:11:51 +02:00
};
2022-03-10 21:52:12 +01:00
users.users.me.extraGroups = ["audio"];
2019-04-19 03:11:51 +02:00
2022-03-10 21:52:12 +01:00
environment.systemPackages = [pkgs.pavucontrol pkgs.ncpamixer pkgs.pamixer pkgs.pulsemixer];
2019-04-19 03:11:51 +02:00
}
{
2022-03-10 21:52:12 +01:00
environment.interactiveShellInit = "export PATH=$PATH:$HOME/projects/niveum";
2020-06-10 17:37:25 +02:00
environment.shellAliases = let
wcd = pkgs.writers.writeDash "wcd" ''
cd "$(readlink "$(${pkgs.which}/bin/which --skip-alias "$1")" | xargs dirname)/.."
2019-08-23 18:27:06 +02:00
'';
where = pkgs.writers.writeDash "where" ''
readlink "$(${pkgs.which}/bin/which --skip-alias "$1")" | xargs dirname
2019-08-23 18:27:06 +02:00
'';
take = pkgs.writers.writeDash "take" ''
2019-08-23 18:27:06 +02:00
mkdir "$1" && cd "$1"
'';
2022-03-23 19:07:07 +01:00
cdt = pkgs.writers.writeDash "cdt" ''
cd "$(mktemp -d)"
pwd
'';
2022-09-23 23:31:14 +02:00
swallow = command: "${scripts.swallow}/bin/swallow ${command}";
2019-08-22 09:44:11 +02:00
in {
2020-04-23 13:15:48 +02:00
"ß" = "${pkgs.utillinux}/bin/setsid";
cat = "${pkgs.bat}/bin/bat --style=plain";
2022-03-10 21:52:12 +01:00
chromium-incognito = "chromium --user-data-dir=$(mktemp -d /tmp/chr.XXXXXX) --no-first-run --incognito";
cp = "cp --interactive";
ip = "${pkgs.iproute}/bin/ip -c";
2022-03-10 21:52:12 +01:00
l = "ls --color=auto --time-style=long-iso --almost-all";
2020-12-11 18:43:41 +01:00
ls = "ls --color=auto --time-style=long-iso";
ll = "ls --color=auto --time-style=long-iso -l";
la = "ls --color=auto --time-style=long-iso --almost-all -l";
mv = "mv --interactive";
2019-11-05 21:59:51 +01:00
nixi = "nix repl '<nixpkgs>'";
ns = "nix-shell --run zsh";
o = "${pkgs.xdg_utils}/bin/xdg-open";
2020-04-23 13:15:48 +02:00
pbcopy = "${pkgs.xclip}/bin/xclip -selection clipboard -in";
pbpaste = "${pkgs.xclip}/bin/xclip -selection clipboard -out";
rm = "rm --interactive";
2020-04-23 13:15:48 +02:00
s = "${pkgs.systemd}/bin/systemctl";
2019-08-23 18:27:06 +02:00
take = "source ${take}";
2022-03-23 19:07:07 +01:00
cdt = "source ${cdt}";
vit = "$EDITOR $(mktemp)";
tmux = "${pkgs.tmux}/bin/tmux -2";
2022-08-30 19:32:27 +02:00
sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv";
zathura = swallow "${pkgs.zathura}/bin/zathura";
2020-04-23 13:15:48 +02:00
us = "${pkgs.systemd}/bin/systemctl --user";
wcd = "source ${wcd}";
im = "${pkgs.openssh}/bin/ssh weechat@makanek -t tmux attach-session -t IM";
where = "source ${where}";
2022-05-07 11:26:51 +02:00
yt = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -ic"; # Download video link
yta = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -xic"; # Download with audio
2019-04-19 03:11:51 +02:00
};
}
2022-07-29 21:30:28 +02:00
{
i18n = {
defaultLocale = "en_DK.UTF-8";
supportedLocales = ["all"];
};
}
2019-04-19 03:11:51 +02:00
{
services.xserver = {
enable = true;
2020-10-24 11:49:34 +02:00
displayManager = {
2019-09-14 18:43:23 +02:00
autoLogin = {
enable = true;
user = config.users.users.me.name;
};
2020-10-24 11:49:34 +02:00
lightdm = {
2019-05-02 15:28:17 +02:00
enable = true;
2020-10-24 11:49:34 +02:00
greeters.gtk = {
enable = true;
2022-03-10 21:52:12 +01:00
indicators = ["~spacer" "~host" "~spacer" "~session" "~power"];
2020-10-24 11:49:34 +02:00
};
2019-05-02 15:28:17 +02:00
};
2019-04-19 03:11:51 +02:00
};
};
}
{
security.wrappers = {
2021-12-01 17:38:47 +01:00
pmount = {
2022-05-11 11:23:21 +02:00
setuid = true;
2021-12-13 11:58:00 +01:00
owner = "root";
2022-05-11 11:23:21 +02:00
group = "root";
2021-12-01 17:38:47 +01:00
source = "${pkgs.pmount}/bin/pmount";
};
pumount = {
2022-05-11 11:23:21 +02:00
setuid = true;
2021-12-13 11:58:00 +01:00
owner = "root";
2022-05-11 11:23:21 +02:00
group = "root";
2021-12-01 17:38:47 +01:00
source = "${pkgs.pmount}/bin/pumount";
};
2019-04-19 03:11:51 +02:00
};
}
2022-03-10 21:52:12 +01:00
{programs.command-not-found.enable = true;}
2020-04-26 20:21:39 +02:00
{
programs.gnupg.agent.enable = true;
2020-11-23 15:28:22 +01:00
environment.systemPackages = [
pkgs.gnupg
(pkgs.pass.withExtensions (e: [e.pass-otp e.pass-import e.pass-genphrase]))
2020-11-14 13:24:25 +01:00
];
2020-04-26 20:21:39 +02:00
}
2020-07-19 16:18:07 +02:00
{
services.atd.enable = true;
}
2020-07-19 07:57:44 +02:00
{
2021-06-01 19:14:00 +02:00
services.getty = {
2020-07-19 07:57:44 +02:00
greetingLine = lib.mkForce "";
helpLine = lib.mkForce "";
};
}
2020-10-24 13:27:36 +02:00
{
2022-03-13 10:31:19 +01:00
networking.hosts =
lib.mapAttrs' (name: address: {
name = address;
value = ["${name}.local"];
})
localAddresses;
2020-10-24 13:27:36 +02:00
}
2022-06-28 15:27:36 +02:00
{
home-manager.users.me.home.stateVersion = "22.05";
}
./alacritty.nix
2022-01-18 21:29:30 +01:00
./backup.nix
./bash.nix
2021-07-30 08:40:54 +02:00
./beets.nix
./bluetooth.nix
./ccc.nix
2021-04-07 20:10:48 +02:00
./khal.nix
./chromium.nix
./cloud.nix
2021-11-23 21:48:00 +01:00
./copyq.nix
./compton.nix
./direnv.nix
./distrobump.nix
./docker.nix
./dunst.nix
./flix.nix
./fonts.nix
./fzf.nix
./git.nix
./hledger.nix
./htop.nix
./hu-berlin.nix
./i3.nix
./keyboard.nix
2021-10-07 00:29:50 +02:00
./lb.nix
./mpv.nix
2020-09-30 11:40:49 +02:00
./mime.nix
./neovim.nix
2021-10-07 00:43:44 +02:00
./neomutt.nix
2021-01-01 02:48:37 +01:00
./nix.nix
./newsboat.nix
2021-06-05 17:45:18 +02:00
./flameshot-once.nix
./packages.nix
./stardict.nix
./polkit.nix
./power-action.nix
./printing.nix
# ./openweathermap.nix
./wallpaper.nix
./redshift.nix
./retiolum.nix
./rofi.nix
2020-10-28 20:25:59 +01:00
./spacetime.nix
2021-04-07 09:19:00 +02:00
./seafile.nix
./ssh.nix
./sshd.nix
./sudo.nix
2022-08-30 19:32:27 +02:00
./nsxiv.nix
2022-05-10 20:52:07 +02:00
./themes.nix
./tmux.nix
2021-06-03 09:14:36 +02:00
./traadfri.nix
./unclutter.nix
./vscode.nix
2020-10-19 18:57:29 +02:00
./watson.nix
./zsh.nix
2022-03-29 20:10:12 +02:00
./tor.nix
2019-04-19 03:11:51 +02:00
];
}