Compare commits

...

4 Commits

10 changed files with 141 additions and 97 deletions

12
flake.lock generated
View File

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1748529677,
"narHash": "sha256-MJEX3Skt5EAIs/aGHD8/aXXZPcceMMHheyIGSjvxZN0=",
"lastModified": 1749178927,
"narHash": "sha256-bXcEx1aZUNm5hMLVJeuofcOrZyOiapzvQ7K36HYK3YQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "da282034f4d30e787b8a10722431e8b650a907ef",
"rev": "91287a0e9d42570754487b7e38c6697e15a9aab2",
"type": "github"
},
"original": {
@ -58,11 +58,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1748370509,
"narHash": "sha256-QlL8slIgc16W5UaI3w7xHQEP+Qmv/6vSNTpoZrrSlbk=",
"lastModified": 1748929857,
"narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4faa5f5321320e49a78ae7848582f684d64783e9",
"rev": "c2a03962b8e24e669fb37b7df10e7c79531ff1a4",
"type": "github"
},
"original": {

View File

@ -27,6 +27,8 @@
outputs = { self, nixpkgs, home-manager, plasma-manager, nixos-generators, secrix }:
let
hmModule = file: {
imports = [ home-manager.nixosModules.home-manager ];
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.sharedModules = [ plasma-manager.homeManagerModules.plasma-manager ];
@ -49,7 +51,6 @@
./hosts/Yura-PC
./users/cazzzer
# https://nix-community.github.io/home-manager/index.xhtml#sec-flakes-nixos-module
home-manager.nixosModules.home-manager
(hmModule ./home/cazzzer-pc.nix)
];
};
@ -62,7 +63,6 @@
./hosts/Yura-TPX13
./users/cazzzer
# https://nix-community.github.io/home-manager/index.xhtml#sec-flakes-nixos-module
home-manager.nixosModules.home-manager
(hmModule ./home/cazzzer-laptop.nix)
];
};
@ -74,6 +74,7 @@
./hosts/hw-vm.nix
./hosts/vm
./users/cazzzer
(hmModule ./home/cazzzer-pc.nix)
];
};
router = nixpkgs.lib.nixosSystem {
@ -84,6 +85,7 @@
./hosts/common.nix
./hosts/router
./users/cazzzer
(hmModule ./home/common.nix)
];
};
};
@ -97,6 +99,7 @@
./hosts/hw-proxmox.nix
./hosts/vm
./users/cazzzer
(hmModule ./home/cazzzer-pc.nix)
];
format = "proxmox";
};
@ -109,6 +112,7 @@
./hosts/hw-proxmox.nix
./hosts/vm
./users/cazzzer
(hmModule ./home/cazzzer-pc.nix)
];
};
in

View File

@ -2,7 +2,8 @@
{
imports = [
./modules
./common.nix
./common-desktop.nix
];
programs.plasma = {

View File

@ -2,7 +2,8 @@
{
imports = [
./modules
./common.nix
./common-desktop.nix
];
programs.plasma.kwin.virtualDesktops.number = 2;

21
home/common-desktop.nix Normal file
View File

@ -0,0 +1,21 @@
{ config, lib, pkgs, ... }:
{
imports = [
./modules/starship.nix
./modules/plasma.nix
];
services.darkman = {
enable = true;
settings = {
lat = 37.3387;
lng = -121.8853;
};
lightModeScripts = {
plasma-color = "plasma-apply-colorscheme BreezeLight";
};
darkModeScripts = {
plasma-color = "plasma-apply-colorscheme BreezeDark";
};
};
}

32
home/common.nix Normal file
View File

@ -0,0 +1,32 @@
{ config, lib, pkgs, ... }:
let
username = "cazzzer";
in
{
imports = [
./modules/fish.nix
./modules/git.nix
];
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = username;
home.homeDirectory = "/home/${username}";
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
home.sessionVariables = {
EDITOR = "micro";
SHELL = "fish";
};
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "24.11"; # Please read the comment before changing.
}

View File

@ -1,83 +0,0 @@
{ config, lib, pkgs, ... }:
let
username = "cazzzer";
in
{
imports = [
./fish.nix
./starship.nix
./plasma.nix
];
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = username;
home.homeDirectory = "/home/${username}";
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
home.sessionVariables = {
EDITOR = "micro";
SHELL = "fish";
};
services.darkman = {
enable = true;
settings = {
lat = 37.3387;
lng = -121.8853;
};
lightModeScripts = {
plasma-color = "plasma-apply-colorscheme BreezeLight";
};
darkModeScripts = {
plasma-color = "plasma-apply-colorscheme BreezeDark";
};
};
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "24.11"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
# home.packages = [
# # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run.
# pkgs.hello
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
# # fonts?
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
# ];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
# home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
# };
}

64
home/modules/git.nix Normal file
View File

@ -0,0 +1,64 @@
{ config, lib, pkgs, ... }:
let
name = "Yuri Tatishchev";
email = "itatishch@gmail.com";
signingKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE02AhJIZtrtZ+5sZhna39LUUCEojQzmz2BDWguT9ZHG";
in
{
programs.git = {
enable = true;
userName = name;
userEmail = email;
signing = {
key = signingKey;
signByDefault = true;
format = "ssh";
};
aliases = {
co = "checkout";
s = "switch";
};
extraConfig = {
url = {
"https://gitea.cazzzer.com/" = {
insteadOf = "caztea:";
};
"https://github.com/" = {
insteadOf = "github:";
};
};
core = {
autocrlf = "input";
editor = "micro";
};
color = {
ui = true;
};
pull = {
ff = "only";
};
filter.lfs = {
clean = "git-lfs clean -- %f";
smudge = "git-lfs smudge -- %f";
process = "git-lfs filter-process";
required = true;
};
credential = {
helper = "libsecret";
};
merge = {
conflictStyle = "zdiff3";
};
};
};
}

View File

@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }:
let
vars = import ./vars.nix;
enableDesktop = false;
enableDesktop = true;
in
{
imports =
@ -39,9 +39,11 @@ in
# Enable the KDE Plasma Desktop Environment.
# Useful for debugging with wireshark.
hardware.graphics.enable = true;
services.displayManager.sddm.enable = enableDesktop;
services.displayManager.sddm.wayland.enable = enableDesktop;
services.desktopManager.plasma6.enable = enableDesktop;
services.xserver.desktopManager.xfce.enable = enableDesktop;
services.xserver.desktopManager.xfce.enableWaylandSession = enableDesktop;
# services.displayManager.sddm.enable = enableDesktop;
# services.displayManager.sddm.wayland.enable = enableDesktop;
# services.desktopManager.plasma6.enable = enableDesktop;
# No need for audio in VM
services.pipewire.enable = false;

View File

@ -44,10 +44,12 @@ in
services.adguardhome.mutableSettings = false;
# https://github.com/AdguardTeam/Adguardhome/wiki/Configuration
services.adguardhome.settings = {
querylog.interval = "168h"; # 7 days
dns = {
# Disable rate limit, default of 20 is too low
# https://github.com/AdguardTeam/AdGuardHome/issues/6726
ratelimit = 0;
enable_dnssec = true;
bootstrap_dns = [ "1.1.1.1" "9.9.9.9" ];
upstream_dns = [
# Default upstreams