nixos/hosts/sakowsl/configuration.nix

153 lines
3.6 KiB
Nix
Raw Permalink Normal View History

2024-10-12 22:42:23 +04:00
{ lib, pkgs, config, modulesPath, inputs, outputs, ... }: {
imports = [
2023-08-18 12:46:05 +04:00
inputs.home-manager.nixosModules.default
"${modulesPath}/profiles/minimal.nix"
2023-09-22 19:19:14 +04:00
outputs.nixosModules.desktop
2023-08-18 12:46:05 +04:00
outputs.nixosModules.shell
outputs.nixosModules.hardware
outputs.nixosModules.dev
outputs.nixosModules.media
2023-12-03 15:02:10 +04:00
outputs.nixosModules.security
];
wsl = {
enable = true;
2023-08-26 14:05:13 +04:00
wslConf = {
2023-08-27 12:47:23 +04:00
automount = {
root = "/mnt";
# Allows writing to linux network section in Explorer
options = "metadata,uid=1000,gid=100,umask=22,fmask=11";
2023-09-23 13:09:49 +04:00
};
2023-08-26 14:05:13 +04:00
};
defaultUser = "sako";
startMenuLaunchers = true;
# Native systemd for wsl
nativeSystemd = true;
# Enable native Docker support
# docker-native.enable = true;
# Enable integration with Docker Desktop (needs to be installed)
# docker-desktop.enable = true;
};
users.users.sako.isNormalUser = true;
networking.hostName = "sakowsl";
# Enable nix flakes
nix.package = pkgs.nixFlakes;
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
2024-10-12 22:42:23 +04:00
# nix.settings.experimental-features = ["nix-command" "flakes"];
2024-04-10 05:53:24 +04:00
nix.settings = {
2024-10-12 22:42:23 +04:00
experimental-features = [ "nix-command" "flakes" ];
substituters =
[ "https://cache.garnix.io" "https://nix-community.cachix.org" ];
2024-04-10 05:53:24 +04:00
trusted-public-keys = [
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
2024-06-14 22:29:21 +04:00
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
2024-04-10 05:53:24 +04:00
];
};
# Home manager setup
home-manager.useUserPackages = true;
2024-10-12 22:42:23 +04:00
home-manager.users.sako = { pkgs, ... }: {
2023-08-18 12:46:05 +04:00
home.stateVersion = "22.05";
2024-10-12 22:42:23 +04:00
home.packages = [ ];
2023-08-18 12:46:05 +04:00
home.username = "sako";
home.homeDirectory = "/home/sako";
2024-10-12 22:42:23 +04:00
xdg.configFile.git = { source = ../../config/git; };
2024-01-09 21:13:50 +04:00
# cure my sanity
home.pointerCursor = {
name = "Catppuccin-Mocha-Dark";
size = 16;
2024-10-12 22:42:23 +04:00
x11 = { enable = true; };
2024-01-09 21:13:50 +04:00
gtk.enable = true;
package = pkgs.catppuccin-cursors.mochaDark;
};
gtk = {
enable = true;
theme.name = "vimix-dark-ruby";
iconTheme.name = "Vimix Ruby Dark";
};
2023-08-18 12:46:05 +04:00
};
2024-01-09 21:15:30 +04:00
# gtk themes
programs.dconf.enable = true;
2023-09-23 13:09:49 +04:00
programs.gnupg.agent = {
enable = true;
2024-06-14 14:57:40 +04:00
#pinentryPackage = null;
2024-10-12 22:42:23 +04:00
settings = {
# pinentry-program = "/mnt/c/Program Files (x86)/Gpg4win/bin/pinentry.exe";
2024-06-14 22:29:21 +04:00
allow-emacs-pinentry = "";
allow-loopback-pinentry = "";
2024-10-12 22:42:23 +04:00
};
2023-09-23 13:09:49 +04:00
};
# bare minimum
environment.systemPackages = with pkgs; [
vim # backup
2024-10-12 22:42:23 +04:00
wget # double u get
killall # die processes
unzip # zip file
gh # github
htop # htop
tree # trees
2023-12-28 18:55:12 +04:00
wsl-open # wsl-open
];
programs.git = {
enable = true;
package = pkgs.gitFull;
};
modules = {
2023-09-22 19:18:42 +04:00
desktop = {
apps = {
nextcloud.enable = true;
2023-11-08 18:14:12 +04:00
pass.enable = true;
2023-09-22 19:18:42 +04:00
};
2024-10-12 22:42:23 +04:00
chat = { weechat.enable = true; };
2023-09-22 19:18:42 +04:00
};
dev = {
2023-08-18 12:46:05 +04:00
editors = {
nvim.enable = true;
2024-02-14 20:20:39 +04:00
emacs = {
enable = true;
2024-06-14 21:29:38 +04:00
daemon = true;
2024-02-14 20:31:18 +04:00
package = pkgs.emacs-unstable-pgtk;
2024-02-14 20:20:39 +04:00
};
2023-08-18 12:46:05 +04:00
};
cc.enable = true;
nil.enable = true;
2023-08-20 14:13:02 +04:00
lua.enable = true;
2023-08-18 12:46:05 +04:00
python.enable = true;
rust.enable = true;
javascript.enable = true;
};
shell = {
zsh.enable = true;
2023-08-18 12:33:14 +04:00
tmux.enable = true;
ranger.enable = true;
nix = {
optimize.enable = true;
search.enable = true;
};
};
2024-10-12 22:42:23 +04:00
security = { certs.enable = true; };
};
2024-04-04 19:40:20 +04:00
services.gnome.gnome-keyring.enable = true;
2023-12-28 18:55:12 +04:00
# for wsl-open
2024-10-12 22:42:23 +04:00
environment.sessionVariables = rec { BROWSER = "wsl-open"; };
2023-12-28 18:55:12 +04:00
2023-08-20 11:06:35 +04:00
security.sudo.wheelNeedsPassword = true;
2023-08-20 11:06:01 +04:00
system.stateVersion = "22.05";
}