Compare commits

..

No commits in common. "0a7f9ecc863da362f852f67277820ff38e684c7a" and "86643cca452b3edfd94aeac78d8660bb4ec63424" have entirely different histories.

9 changed files with 185 additions and 100 deletions

View file

@ -160,11 +160,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1703527373, "lastModified": 1703499046,
"narHash": "sha256-AjypRssRtS6F3xkf7rE3/bXkIF2WJOZLbTIspjcE1zM=", "narHash": "sha256-A6wclPJCOMEYuD28KBOBTwHEVOKy3f9yvuMFAJ55dco=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "80679ea5074ab7190c4cce478c600057cfb5edae", "rev": "d5a917bab40daf4e5f82cd27162b8a6656d3beab",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -230,11 +230,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1703550282, "lastModified": 1703520782,
"narHash": "sha256-G8DrHbmocUO4bzmi12w+5hvLhElhqlQfbV/OTQowEPo=", "narHash": "sha256-G5hdGOjRHP6PwX3yFkCVBipy4Tv4mZZo7slLAvehsf8=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e173e2e409e2bcc977d8726178d7943dabb83ce0", "rev": "0fcb94fb63231092733b5d367fd56110bedcec41",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -29,6 +29,8 @@
url = github:nix-community/home-manager; url = github:nix-community/home-manager;
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
}; };
outputs = inputs@{ outputs = inputs@{
@ -53,20 +55,23 @@
lib = nixpkgs.lib; lib = nixpkgs.lib;
in { in {
nixosConfigurations = { nixosConfigurations = {
inherit lib;
# Home server # Home server
Alaska = lib.nixosSystem { Alaska = lib.nixosSystem {
inherit system; inherit system;
specialArgs = { specialArgs = {
inherit user headscale; inherit user headscale pkgs-stable;
}; };
modules = [ modules = [
inputs.nicks_nextcloud_integrations.nixosModules.default
{ {
networking.hostName = "Alaska"; networking.hostName = "Alaska";
} }
inputs.nicks_nextcloud_integrations.nixosModules.default
./hosts/Alaska ./hosts/Alaska
./hosts/Alaska/configuration.nix
home-manager.nixosModules.home-manager { home-manager.nixosModules.home-manager {
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;

View file

@ -90,15 +90,14 @@ in
imports = [ imports = [
./modules/discord.nix ./modules/discord.nix
#./modules/emacs.nix #./modules/emacs.nix
./modules/fusuma.nix
./modules/git.nix ./modules/git.nix
./modules/hyprland
./modules/kitty.nix
./modules/neovim.nix ./modules/neovim.nix
./modules/kitty.nix
./modules/rofi.nix ./modules/rofi.nix
./modules/tmux.nix ./modules/tmux.nix
./modules/wezterm.nix ./modules/wezterm.nix
./modules/xdg.nix ./modules/xdg.nix
./modules/hyprland
./modules/yazi.nix ./modules/yazi.nix
./modules/zsh.nix ./modules/zsh.nix
]; ];
@ -106,10 +105,9 @@ in
# Let Home Manager install and manage itself. # Let Home Manager install and manage itself.
programs.home-manager.enable = true; programs.home-manager.enable = true;
programs.direnv = {
enable = true; programs.direnv.enable = true;
nix-direnv.enable = true; programs.direnv.nix-direnv.enable = true;
};
home = { home = {

View file

@ -5,7 +5,7 @@
{ {
imports = [ imports = [
./modules/backup_script.nix ./modules/backup_script.nix
./configuration.nix
./hardware-configuration.nix ./hardware-configuration.nix
./modules/dnsmasq.nix ./modules/dnsmasq.nix
./modules/forgejo.nix ./modules/forgejo.nix

View file

@ -5,6 +5,23 @@
{ config, lib, pkgs, user, inputs, ... }: { config, lib, pkgs, user, inputs, ... }:
{ {
# max cores used per derivation
nix.settings.cores = 8;
# max derivations that can be built at once
# nix.settings.max-jobs = 2;
networking.networkmanager.enable = true;
security.pam.services.kwallet = {
name = "kdewallet";
enableKwallet = true;
};
services.udev.packages = [
pkgs.android-udev-rules
];
# Some programs look for session variables to store config files at # Some programs look for session variables to store config files at
# (Looking at you home-manager yazi) # (Looking at you home-manager yazi)
environment.sessionVariables = rec { environment.sessionVariables = rec {
@ -42,20 +59,20 @@
}; };
}; };
# Android Debugging interface boot.supportedFilesystems = [ "nfts" ];
programs.adb.enable = true; boot.loader.systemd-boot.configurationLimit = 5;
services.udev.packages = [
pkgs.android-udev-rules nix.settings.auto-optimise-store = true;
]; nixpkgs.config.allowUnfree = true; # required for discord
nix.gc = {
automatic = true;
options = "--delete-generations 8d";
};
programs.zsh.enable = true; programs.zsh.enable = true;
users.users.${user} = { users.users.${user} = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ extraGroups = [ "wheel" "video" "audio" "networkmanager" "lp" "scanner" "input" "uinput" "cdrom"];
"wheel" "video"
"audio" "networkmanager"
"lp" "scanner"
"input" "uinput"
"cdrom" "adbusers"];
shell = pkgs.zsh; shell = pkgs.zsh;
password = "password"; password = "password";
}; };
@ -66,47 +83,7 @@
xkcd-font xkcd-font
]; ];
boot = {
supportedFilesystems = [ "nfts" ];
loader.systemd-boot.configurationLimit = 5;
};
networking.networkmanager.enable = true;
hardware = {
bluetooth.enable = true;
opentabletdriver.enable = true;
steam-hardware.enable = true;
};
security = {
rtkit.enable = true;
pam.services.kwallet = {
name = "kdewallet";
enableKwallet = true;
};
};
services = {
# Enable CUPS to print documents.
printing.enable = true;
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
#jack.enable = true;
};
};
sound = {
enable = false;
mediaKeys.enable = true;
};
time.timeZone = "America/Los_Angeles"; time.timeZone = "America/Los_Angeles";
time.hardwareClockInLocalTime = true;
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
console = { console = {
@ -114,19 +91,29 @@
useXkbConfig = true; # use xkbOptions in tty. useXkbConfig = true; # use xkbOptions in tty.
}; };
nixpkgs.config.allowUnfree = true; hardware = {
opentabletdriver.enable = true;
steam-hardware.enable = true;
};
sound = {
enable = false;
mediaKeys.enable = true;
};
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
#jack.enable = true;
};
# Enable CUPS to print documents.
services.printing.enable = true;
nix = { nix = {
gc = {
automatic = true;
options = "--delete-generations 20d";
};
settings = {
auto-optimise-store = true;
# max cores used per derivation
cores = 8;
# max derivations that can be built at once
# nix.settings.max-jobs = 2;
};
package = pkgs.nixVersions.stable; package = pkgs.nixVersions.stable;
extraOptions = "experimental-features = nix-command flakes"; extraOptions = "experimental-features = nix-command flakes";
}; };

87
hosts/default.nix Normal file
View file

@ -0,0 +1,87 @@
{ lib, inputs, nixpkgs, home-manager, user, kmonad, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
lib = nixpkgs.lib;
in {
NicksNixLaptop = lib.nixosSystem {
inherit system;
specialArgs = { inherit user; };
modules = [
./laptop
./configuration.nix
../modules/plasma_desktop.nix
../modules/kmonad.nix
{
networking.hostName = "NicksNixLaptop";
}
kmonad.nixosModules.default
home-manager.nixosModules.home-manager {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit user; };
users.${user} = {
imports = [
../users/${user}.nix
../modules/emacs.nix
../modules/git.nix
../modules/fusuma.nix
../modules/vim.nix
../modules/wezterm.nix
../modules/xdg.nix
../modules/zsh.nix
];
};
};
}
];
};
NixsServer = lib.nixosSystem {
inherit system;
specialArgs = { inherit user; };
modules = [
./nixsserver
./nixsserver/configuration.nix
{
networking.hostName = "NicksServer";
}
];
};
NicksNixVMBox = lib.nixosSystem {
inherit system;
specialArgs = { inherit user; };
modules = [
./virtualbox
./configuration.nix
../modules/plasma_desktop.nix
../modules/kmonad.nix
{
networking.hostName = "NicksNixVMBox";
}
kmonad.nixosModules.default
home-manager.nixosModules.home-manager {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit user; };
users.${user} = {
imports = [
./home.nix
../modules/git.nix
../modules/urxvt.nix
../modules/vim.nix
../modules/zsh.nix
];
};
};
}
];
};
}

View file

@ -1,4 +1,4 @@
{ config, ... }: { config, user, ... }:
{ {
@ -7,6 +7,9 @@
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
programs.adb.enable = true;
users.users.${user}.extraGroups = [ "adbusers" ];
networking = { networking = {
firewall = { firewall = {
checkReversePath = "loose"; checkReversePath = "loose";
@ -46,6 +49,8 @@
# Optionally, you may need to select the appropriate driver version for your specific GPU. # Optionally, you may need to select the appropriate driver version for your specific GPU.
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable; hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
hardware.nvidia.modesetting.enable = true; hardware.nvidia.modesetting.enable = true;
hardware.bluetooth.enable = true;
environment.sessionVariables = { environment.sessionVariables = {
# Resolves jellyfin black screen under hyprland # Resolves jellyfin black screen under hyprland
@ -53,6 +58,7 @@
QT_QPA_PLATFORM = "xcb"; QT_QPA_PLATFORM = "xcb";
}; };
time.hardwareClockInLocalTime = true;
boot.loader = { boot.loader = {
efi = { efi = {
@ -79,4 +85,6 @@
''; '';
}; };
}; };
boot.supportedFilesystems = [ "ntfs" ];
} }

View file

@ -1,4 +1,4 @@
{ config, ... }: { config, user, ... }:
{ {
imports = [ imports = [
@ -6,36 +6,38 @@
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
programs.adb.enable = true;
users.users.${user}.extraGroups = [ "adbusers" ];
hardware.bluetooth.enable = true;
networking.hosts = { networking.hosts = {
"100.64.0.1" = ["files.nickiel.net" "git.nickiel.net" "nickiel.net" "100.64.0.1" = ["files.nickiel.net" "git.nickiel.net" "nickiel.net"
"jellyfin.nickiel.net" ]; "jellyfin.nickiel.net" ];
}; };
# tailscale set --exit-node <SEVERNAME> to route through an exit node # tailscale set --exit-node <SEVERNAME> to route through an exit node
services.tailscale.enable = true; services.tailscale.enable = true; networking.firewall = {
networking.firewall = {
checkReversePath = "loose"; trustedInterfaces = [ "tailscale0" ]; checkReversePath = "loose"; trustedInterfaces = [ "tailscale0" ];
allowedUDPPorts = [ config.services.tailscale.port ]; allowedUDPPorts = [ config.services.tailscale.port ];
}; };
time.hardwareClockInLocalTime = true;
boot.loader = { boot.loader = { efi = {
efi = { canTouchEfiVariables = true; efiSysMountPoint = "/boot";
canTouchEfiVariables = true;
efiSysMountPoint = "/boot";
}; };
grub = { grub = {
devices = [ "nodev" ]; devices = [ "nodev" ];
efiSupport = true; efiSupport = true;
enable = true; enable = true;
useOSProber = false; useOSProber = true;
extraEntries = '' # extraEntries = ''
menuentry 'Windows Boot Manager (on /dev/nvme0n1p1)' --class windows --class os $menuentry_id_option 'osprober-efi-364F-BE7A' { # menuentry 'Windows Boot Manager (on /dev/nvme0n1p1)' --class windows
insmod part_gpt # --class os $menuentry_id_option 'osprober-efi-364F-BE7A' {
insmod fat # insmod part_gpt insmod fat search --no-floppy --fs-uuid
search --no-floppy --fs-uuid --set=root 364F-BE7A # --set=root 364F-BE7A chainloader
chainloader /efi/Microsoft/Boot/bootmgfw.efi # /efi/Microsoft/Boot/bootmgfw.efi
} # }
# '';
'';
}; };
}; };

View file

@ -43,14 +43,12 @@ in
cat = "bat"; cat = "bat";
ls = "eza"; ls = "eza";
jq = "jaq"; jq = "jaq";
# gust = "/home/nixolas/Documents/Gust/target/debug/gust"; gust = "/home/nixolas/Documents/Gust/target/debug/gust";
rm = "rmtrash"; rm = "rmtrash";
open-config = "cd ~/Documents/nicks-nix-config; nvim"; open-config = "cd ~/Documents/nicks-nix-config; nvim";
switch-to-windows = "sudo grub-reboot 1; sudo reboot"; switch-to-windows = "sudo grub-reboot 1; sudo reboot";
screenshot = "grim -g \"$(slurp -d)\" - | wl-copy -t image/png"; screenshot = "grim -g \"$(slurp -d)\" - | wl-copy -t image/png";
move-to-alaska = "ssh nixolas@100.64.0.1"; move-to-alaska = "ssh nixolas@100.64.0.1";
rebuild-shutdown = "sudo nixos-rebuild switch --flake .# && shutdown now";
rebuild-exit = "sudo nixos-rebuild switch --flake .# && exit";
}; };
}; };