Compare commits

..

No commits in common. "1e8caeef3ca91be8d9b0873659b4c3980f4fd020" and "dc2851d30bdb23eb271e485ad9083ac478369355" have entirely different histories.

11 changed files with 113 additions and 51 deletions

View File

@ -2,11 +2,11 @@
"nodes": { "nodes": {
"catppuccin": { "catppuccin": {
"locked": { "locked": {
"lastModified": 1717565621, "lastModified": 1716337435,
"narHash": "sha256-uU6GeSbzopVcPga+Fy5n3tKfzUhuw4FVMv7h61/13XY=", "narHash": "sha256-eZqH1vLI9eKL/N5toXxOrQO80G0y4pWZrYCp472YBVQ=",
"owner": "catppuccin", "owner": "catppuccin",
"repo": "nix", "repo": "nix",
"rev": "0cdfa29b902976fc2941468d326325d24e148437", "rev": "fea5242c0eacc5efa81be0e36206a62e889dbd82",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -275,16 +275,15 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717527182, "lastModified": 1716457508,
"narHash": "sha256-vWSkg6AMok1UUQiSYVdGMOXKD2cDFnajITiSi0Zjd1A=", "narHash": "sha256-ZxzffLuWRyuMrkVVq7wastNUqeO0HJL9xqfY1QsYaqo=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "845a5c4c073f74105022533907703441e0464bc3", "rev": "850cb322046ef1a268449cf1ceda5fd24d930b05",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-24.05",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@ -318,11 +317,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717449440, "lastModified": 1716214890,
"narHash": "sha256-QtSCQFBhyQIsKJhOvcIOi+9EN1kEnNeoLo3PeQ5VbIY=", "narHash": "sha256-/zk5wn2NC8yOZLd6IxpmiVnnSj8mZUznDTngXvNM/vU=",
"owner": "StevenBlack", "owner": "StevenBlack",
"repo": "hosts", "repo": "hosts",
"rev": "e1a7b23e9769607009d741066b5789a99aaf9923", "rev": "7dc5651e1edcc5268fd72dfb90bd1c5c9fba942d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -342,11 +341,11 @@
"systems": "systems_3" "systems": "systems_3"
}, },
"locked": { "locked": {
"lastModified": 1716893760, "lastModified": 1716374315,
"narHash": "sha256-fI3Q8DpkSerjQ37pXBW9ZHKDQQVYfG5stDMw7n9No10=", "narHash": "sha256-tgSiLFT0PRGKbypXPCcBCqDRPXXGOkfTpRm1IEiyFyM=",
"owner": "ivandimitrov8080", "owner": "ivandimitrov8080",
"repo": "flake-ide", "repo": "flake-ide",
"rev": "eb5e62023fcf8ccab169a313a66ccdc7ff8a3319", "rev": "41c6c4d63e0cb294ab19d0fd46fdb0d4c9c4d2a9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -412,11 +411,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717297675, "lastModified": 1716170277,
"narHash": "sha256-43UmlS1Ifx17y93/Vc258U7bOlAAIZbu8dsGDHOIIr0=", "narHash": "sha256-fCAiox/TuzWGVaAz16PxrR4Jtf9lN5dwWL2W74DS0yI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "972a52bee3991ae1f1899e6452e0d7c01ee566d9", "rev": "e0638db3db43b582512a7de8c0f8363a162842b9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -449,16 +448,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1717281328, "lastModified": 1716358718,
"narHash": "sha256-evZPzpf59oNcDUXxh2GHcxHkTEG4fjae2ytWP85jXRo=", "narHash": "sha256-NQbegJb2ZZnAqp2EJhWwTf6DrZXSpA6xZCEq+RGV1r0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b3b2b28c1daa04fe2ae47c21bb76fd226eac4ca1", "rev": "3f316d2a50699a78afe5e77ca486ad553169061e",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-24.05", "ref": "nixpkgs-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }

View File

@ -1,8 +1,8 @@
{ {
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-24.05"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
hosts = { hosts = {
@ -22,7 +22,6 @@
outputs = { nixpkgs, home-manager, hosts, ide, nid, catppuccin, ... }: outputs = { nixpkgs, home-manager, hosts, ide, nid, catppuccin, ... }:
let let
system = "x86_64-linux"; system = "x86_64-linux";
stateVersion = "24.05";
my-overlay = self: super: { my-overlay = self: super: {
scripts = (super.buildEnv { name = "scripts"; paths = [ ./. ]; }); scripts = (super.buildEnv { name = "scripts"; paths = [ ./. ]; });
}; };
@ -34,10 +33,10 @@
inherit system nixpkgs pkgs ide my-overlay; inherit system nixpkgs pkgs ide my-overlay;
}; };
home = import ./home { home = import ./home {
inherit stateVersion pkgs modules home-manager nid catppuccin; inherit pkgs modules home-manager nid catppuccin;
}; };
nixos = import ./nixos { nixos = import ./nixos {
inherit stateVersion system nixpkgs modules hosts catppuccin; inherit system nixpkgs modules hosts catppuccin;
}; };
in in
{ {

View File

@ -1,4 +1,4 @@
{ stateVersion, pkgs, home-manager, modules, nid, catppuccin, ... }: { pkgs, home-manager, modules, nid, catppuccin, ... }:
let let
ivand-programs = with modules.home.programs; [ ivand-programs = with modules.home.programs; [
bat bat
@ -36,6 +36,6 @@ in
{ {
ivand = home-manager.lib.homeManagerConfiguration { ivand = home-manager.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs;
modules = [{ home.stateVersion = stateVersion; } ./ivand nid.hmModules.nix-index ivand-packages] ++ ivand-programs ++ [ catppuccin.homeManagerModules.catppuccin ]; modules = [ ./ivand nid.hmModules.nix-index ivand-packages ] ++ ivand-programs ++ [ catppuccin.homeManagerModules.catppuccin ];
}; };
} }

View File

@ -13,18 +13,13 @@
catppuccin.enable = true; catppuccin.enable = true;
}; };
home = rec { home = {
username = "ivand"; username = "ivand";
homeDirectory = "/home/ivand"; homeDirectory = "/home/ivand";
stateVersion = "23.11";
sessionPath = [ sessionPath = [
"$HOME/.local/bin" "$HOME/.local/bin"
]; ];
sessionVariables = {
PASSWORD_STORE_DIR = "${homeDirectory}/.password-store";
EDITOR = "nvim";
PAGER = "bat";
TERM = "screen-256color";
};
pointerCursor = { pointerCursor = {
name = "Catppuccin-Mocha-Green-Cursors"; name = "Catppuccin-Mocha-Green-Cursors";
package = pkgs.catppuccin-cursors.mochaGreen; package = pkgs.catppuccin-cursors.mochaGreen;

View File

@ -12,7 +12,10 @@
} }
} }
''; '';
PASSWORD_STORE_DIR = "($env.HOME | path join .password-store)";
PATH = "($env.PATH | split row (char esep) | append ($env.HOME | path join .local bin))"; PATH = "($env.PATH | split row (char esep) | append ($env.HOME | path join .local bin))";
EDITOR = "nvim";
TERM = "screen-256color";
}; };
shellAliases = { shellAliases = {
gcal = '' gcal = ''

View File

@ -7,6 +7,11 @@
loginExtra = '' loginExtra = ''
[ "$(tty)" = "/dev/tty1" ] && exec sway [ "$(tty)" = "/dev/tty1" ] && exec sway
''; '';
sessionVariables = {
PASSWORD_STORE_DIR = "$HOME/.password-store";
PAGER = "bat";
TERM = "screen-256color";
};
shellAliases = { shellAliases = {
cal = "cal $(date +%Y)"; cal = "cal $(date +%Y)";
GG = "git add . && git commit -m 'GG' && git push --set-upstream origin HEAD"; GG = "git add . && git commit -m 'GG' && git push --set-upstream origin HEAD";
@ -16,11 +21,9 @@
ga = "git add ."; ga = "git add .";
gc = "git commit"; gc = "git commit";
dev = "nix develop --command $SHELL"; dev = "nix develop --command $SHELL";
ls = "${pkgs.nushell}/bin/nu -c 'ls'"; la = "ls -alh";
la = "${pkgs.nushell}/bin/nu -c 'ls -al'";
torrent = "transmission-remote"; torrent = "transmission-remote";
vi = "nvim"; vi = "nvim";
sc = "systemctl";
}; };
shellGlobalAliases = { shellGlobalAliases = {
comp = "-vcodec libx265 -crf 28"; comp = "-vcodec libx265 -crf 28";

View File

@ -0,0 +1,26 @@
{
networking = {
nameservers = [ "127.0.0.1" "::1" ];
dhcpcd.extraConfig = "nohook resolv.conf";
};
services.dnscrypt-proxy2 = {
enable = true;
settings = {
ipv6_servers = true;
require_dnssec = true;
sources.public-resolvers = {
urls = [
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md"
"https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md"
];
cache_file = "/var/lib/dnscrypt-proxy/public-resolvers.md";
minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
};
};
};
systemd.services.dnscrypt-proxy2.serviceConfig = {
StateDirectory = "dnscrypt-proxy";
};
}

View File

@ -0,0 +1,19 @@
{ nixpkgs, ... }:
{
imports = [ ../nvidia ];
# Uses unfree shit
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (nixpkgs.lib.getName pkg) [
"steam"
"steamcmd"
"steam-original"
"steam-run"
"nvidia-settings"
"nvidia-x11"
"nvidia-persistenced"
];
programs.steam = {
enable = true;
};
}

View File

@ -0,0 +1,22 @@
{ nixpkgs, ... }:
{
# Uses unfree shit
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (nixpkgs.lib.getName pkg) [
"nvidia-settings"
"nvidia-x11"
"nvidia-persistenced"
];
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
prime = {
sync.enable = true;
nvidiaBusId = "PCI:1:0:0";
intelBusId = "PCI:0:2:0";
};
modesetting.enable = true;
nvidiaSettings = true;
};
}

View File

@ -1,11 +1,13 @@
{ stateVersion, system, nixpkgs, modules, hosts, catppuccin, ... }: { { system, nixpkgs, modules, hosts, catppuccin, ... }: {
laptop = nixpkgs.lib.nixosSystem { laptop = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
modules = [ modules = with modules.nixos; [
{ system.stateVersion = stateVersion; }
../hardware-configuration.nix ../hardware-configuration.nix
./laptop ./laptop
modules.nixos.wireguard # dnscrypt
# gaming
wireguard
# nvidia
hosts.nixosModule hosts.nixosModule
catppuccin.nixosModules.catppuccin catppuccin.nixosModules.catppuccin
]; ];

View File

@ -1,5 +1,7 @@
{ config, pkgs, ... }: { { config, pkgs, ... }: {
system.stateVersion = "23.11";
nix = { nix = {
extraOptions = '' extraOptions = ''
experimental-features = nix-command flakes experimental-features = nix-command flakes
@ -69,7 +71,7 @@
i18n.supportedLocales = [ "all" ]; i18n.supportedLocales = [ "all" ];
time.timeZone = "Europe/Prague"; time.timeZone = "Europe/Sofia";
fonts.packages = with pkgs; [ (nerdfonts.override { fonts = [ "FiraCode" ]; }) noto-fonts noto-fonts-emoji noto-fonts-lgc-plus ]; fonts.packages = with pkgs; [ (nerdfonts.override { fonts = [ "FiraCode" ]; }) noto-fonts noto-fonts-emoji noto-fonts-lgc-plus ];
@ -116,15 +118,6 @@
"BOUTIQUE APARTMENTS" = { "BOUTIQUE APARTMENTS" = {
psk = "boutique26"; psk = "boutique26";
}; };
"Safestay" = {
psk = "AlldayrooftopBAR";
};
"HOSTEL JASMIN 2" = {
psk = "Jasmin2024";
};
"HOME" = {
psk = "iloveprague";
};
}; };
}; };
stevenBlackHosts = { stevenBlackHosts = {
@ -145,6 +138,7 @@
defaultUserShell = pkgs.zsh; defaultUserShell = pkgs.zsh;
users = { users = {
ivand = { ivand = {
shell = pkgs.nushell;
isNormalUser = true; isNormalUser = true;
extraGroups = [ extraGroups = [
"adbusers" "adbusers"