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

226 lines
5.3 KiB
Nix
Raw Normal View History

2022-03-10 21:52:12 +01:00
{
pkgs,
lib,
config,
...
2025-05-21 10:46:32 +02:00
}:
let
2020-10-24 13:27:36 +02:00
inherit (lib.strings) makeBinPath;
2025-05-21 10:46:32 +02:00
in
{
2019-04-19 03:11:51 +02:00
imports = [
2020-10-18 17:26:19 +02:00
{
2025-05-21 10:46:32 +02:00
boot.supportedFilesystems = [ "ntfs" ];
2020-10-18 17:26:19 +02:00
}
2019-11-05 21:59:51 +01:00
{
nixpkgs = {
2020-04-09 17:51:16 +02:00
config = {
allowUnfree = true;
2022-11-30 09:19:30 +01:00
permittedInsecurePackages = [
];
2020-04-09 17:51:16 +02:00
};
2019-04-19 03:11:51 +02:00
};
}
{
2023-06-06 19:59:27 +02:00
boot.tmp.cleanOnBoot = true;
2019-04-19 03:11:51 +02:00
boot.loader.timeout = 1;
}
{
age.secrets = {
di-fm-key = {
file = ../secrets/di-fm-key.age;
owner = config.users.users.me.name;
group = config.users.users.me.group;
2026-01-12 06:30:07 +01:00
mode = "440";
};
restic = {
file = ../secrets/restic.age;
owner = config.users.users.me.name;
group = config.users.users.me.group;
mode = "400";
};
};
}
2019-04-19 03:11:51 +02:00
{
home-manager.users.me = {
programs.zathura = {
enable = true;
options = {
selection-clipboard = "clipboard";
# 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 = pkgs.lib.niveum.kieran.name;
2024-03-19 23:05:43 +01:00
hashedPasswordFile = config.age.secrets.kfm-password.path;
2019-08-26 17:27:09 +02:00
isNormalUser = true;
uid = 1000;
2025-05-21 10:46:32 +02:00
extraGroups = [
"pipewire"
"audio"
"lp"
"scanner"
2025-05-21 10:46:32 +02:00
];
2019-04-19 03:11:51 +02:00
};
2021-04-05 08:33:11 +02:00
2024-05-16 22:10:17 +02:00
nix.settings.trusted-users = [ config.users.users.me.name ];
2024-03-19 23:05:43 +01:00
age.secrets = {
kfm-password.file = ../secrets/kfm-password.age;
};
2021-04-05 08:33:11 +02:00
home-manager.users.me.xdg.enable = true;
2019-04-19 03:11:51 +02:00
}
{
2024-04-03 07:56:07 +02:00
environment.interactiveShellInit = "export PATH=$PATH";
2025-05-21 10:46:32 +02:00
environment.shellAliases =
let
swallow = command: "${pkgs.swallow}/bin/swallow ${command}";
2025-05-21 10:46:32 +02:00
in
{
sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv";
zathura = swallow "${pkgs.zathura}/bin/zathura";
2026-02-17 20:12:14 +01:00
im = "${pkgs.openssh}/bin/ssh weechat@makanek -t screen -x weechat";
2025-05-21 10:46:32 +02:00
yt = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -ic"; # Download video link
2025-10-06 12:29:29 +02:00
yta = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata --audio-format mp3 --audio-quality 0 -xic"; # Download with audio
2025-05-21 10:46:32 +02:00
};
2019-04-19 03:11:51 +02:00
}
2022-07-29 21:30:28 +02:00
{
i18n = {
defaultLocale = "en_DK.UTF-8";
2025-05-21 10:46:32 +02:00
supportedLocales = [ "all" ];
2022-07-29 21:30:28 +02:00
};
}
2026-01-06 22:46:12 +01:00
{
services.power-profiles-daemon.enable = true;
2026-01-02 17:04:50 +01:00
}
2020-04-26 20:21:39 +02:00
{
programs.gnupg = {
agent = {
2022-12-13 14:38:14 +01:00
enable = true;
pinentryPackage = pkgs.pinentry-qt;
2025-12-27 22:22:54 +01:00
settings =
let
defaultCacheTtl = 2 * 60 * 60;
in
{
default-cache-ttl = defaultCacheTtl;
max-cache-ttl = 4 * defaultCacheTtl;
};
2022-12-13 14:38:14 +01:00
};
};
2020-04-26 20:21:39 +02:00
2020-11-23 15:28:22 +01:00
environment.systemPackages = [
pkgs.gnupg
2025-05-21 10:46:32 +02:00
(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 = {
2025-12-22 11:27:54 +01:00
greetingLine = lib.mkForce "As-salamu alaykum wa rahmatullahi wa barakatuh!";
2020-07-19 07:57:44 +02:00
helpLine = lib.mkForce "";
};
}
2020-10-24 13:27:36 +02:00
{
2025-05-21 10:46:32 +02:00
networking.hosts = lib.mapAttrs' (name: address: {
name = address;
value = [ "${name}.local" ];
}) pkgs.lib.niveum.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";
2024-06-03 07:27:01 +02:00
home-manager.backupFileExtension = "bak";
2023-02-07 22:26:59 +01:00
}
{
programs.dconf.enable = true;
home-manager.users.me = {
dconf.enable = true;
dconf.settings = {
# Change the default terminal for Nemo
"org/cinnamon/desktop/applications/terminal".exec = lib.getExe pkgs.niphas-terminal;
2023-02-07 22:26:59 +01:00
};
};
2022-06-28 15:27:36 +02:00
}
2023-07-22 23:43:17 +02:00
./android.nix
2023-07-26 07:38:52 +02:00
./stylix.nix
./alacritty.nix
2022-01-18 21:29:30 +01:00
./backup.nix
./bluetooth.nix
2023-02-21 11:57:26 +01:00
./aerc.nix
2021-04-07 20:10:48 +02:00
./khal.nix
./browser.nix
2022-11-29 22:49:51 +01:00
./clipboard.nix
./cloud.nix
./fonts.nix
./hledger.nix
./htop.nix
2026-02-11 16:44:46 +01:00
./lix.nix
2025-10-21 15:18:54 +02:00
./uni.nix
2026-01-06 22:46:12 +01:00
# ./i3.nix
./graphical
2025-12-25 14:35:28 +01:00
./keyboard
2024-05-04 22:44:49 +02:00
./kdeconnect.nix
{ services.upower.enable = true; }
2021-10-07 00:29:50 +02:00
./lb.nix
./mpv.nix
2020-09-30 11:40:49 +02:00
./mime.nix
2026-02-04 16:49:28 +01:00
./editor.nix
./flameshot.nix
./packages.nix
2025-12-09 12:54:48 +01:00
./virtualization.nix
./stardict.nix
./polkit.nix
./printing.nix
./redshift.nix
./rofi.nix
./ssh.nix
2023-01-06 15:32:20 +01:00
./sound.nix
./sudo.nix
./unclutter.nix
./vscode.nix
2024-01-08 14:55:04 +01:00
./wallpaper.nix
2025-02-11 21:04:02 +01:00
{
home-manager.users.me.home.file.".zshrc".text = ''
# nothing to see here
'';
}
2024-04-30 17:28:34 +02:00
{
2026-02-04 16:49:28 +01:00
programs.zsh.interactiveShellInit = ''
hash -d nixos=/etc/nixos niveum=${config.users.users.me.home}/sync/src/niveum
'';
2024-04-30 17:28:34 +02:00
home-manager.users.me = {
2025-12-27 22:22:54 +01:00
xdg.userDirs =
let
pictures = "${config.users.users.me.home}/cloud/nextcloud/Bilder";
in
{
enable = true;
documents = "${config.users.users.me.home}/cloud/nextcloud/Documents";
desktop = "/tmp";
download = "${config.users.users.me.home}/sync/Downloads";
music = "${config.users.users.me.home}/mobile/audio";
publicShare = "${config.users.users.me.home}/cloud/nextcloud/tmp";
videos = pictures;
pictures = pictures;
};
2024-04-30 17:28:34 +02:00
};
}
2019-04-19 03:11:51 +02:00
];
}