mirror of
https://github.com/Nickiel12/nicks-nix-config.git
synced 2024-11-24 13:45:29 -08:00
Compare commits
No commits in common. "0a7f9ecc863da362f852f67277820ff38e684c7a" and "86643cca452b3edfd94aeac78d8660bb4ec63424" have entirely different histories.
0a7f9ecc86
...
86643cca45
9 changed files with 185 additions and 100 deletions
12
flake.lock
12
flake.lock
|
@ -160,11 +160,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1703527373,
|
||||
"narHash": "sha256-AjypRssRtS6F3xkf7rE3/bXkIF2WJOZLbTIspjcE1zM=",
|
||||
"lastModified": 1703499046,
|
||||
"narHash": "sha256-A6wclPJCOMEYuD28KBOBTwHEVOKy3f9yvuMFAJ55dco=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "80679ea5074ab7190c4cce478c600057cfb5edae",
|
||||
"rev": "d5a917bab40daf4e5f82cd27162b8a6656d3beab",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -230,11 +230,11 @@
|
|||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1703550282,
|
||||
"narHash": "sha256-G8DrHbmocUO4bzmi12w+5hvLhElhqlQfbV/OTQowEPo=",
|
||||
"lastModified": 1703520782,
|
||||
"narHash": "sha256-G5hdGOjRHP6PwX3yFkCVBipy4Tv4mZZo7slLAvehsf8=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e173e2e409e2bcc977d8726178d7943dabb83ce0",
|
||||
"rev": "0fcb94fb63231092733b5d367fd56110bedcec41",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
url = github:nix-community/home-manager;
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
outputs = inputs@{
|
||||
|
@ -53,20 +55,23 @@
|
|||
lib = nixpkgs.lib;
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
inherit lib;
|
||||
|
||||
|
||||
# Home server
|
||||
Alaska = lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit user headscale;
|
||||
inherit user headscale pkgs-stable;
|
||||
};
|
||||
|
||||
modules = [
|
||||
inputs.nicks_nextcloud_integrations.nixosModules.default
|
||||
{
|
||||
networking.hostName = "Alaska";
|
||||
}
|
||||
inputs.nicks_nextcloud_integrations.nixosModules.default
|
||||
./hosts/Alaska
|
||||
./hosts/Alaska/configuration.nix
|
||||
home-manager.nixosModules.home-manager {
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
|
|
12
home.nix
12
home.nix
|
@ -90,15 +90,14 @@ in
|
|||
imports = [
|
||||
./modules/discord.nix
|
||||
#./modules/emacs.nix
|
||||
./modules/fusuma.nix
|
||||
./modules/git.nix
|
||||
./modules/hyprland
|
||||
./modules/kitty.nix
|
||||
./modules/neovim.nix
|
||||
./modules/kitty.nix
|
||||
./modules/rofi.nix
|
||||
./modules/tmux.nix
|
||||
./modules/wezterm.nix
|
||||
./modules/xdg.nix
|
||||
./modules/hyprland
|
||||
./modules/yazi.nix
|
||||
./modules/zsh.nix
|
||||
];
|
||||
|
@ -106,10 +105,9 @@ in
|
|||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
programs.direnv.enable = true;
|
||||
programs.direnv.nix-direnv.enable = true;
|
||||
|
||||
home = {
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
{
|
||||
imports = [
|
||||
./modules/backup_script.nix
|
||||
./configuration.nix
|
||||
|
||||
./hardware-configuration.nix
|
||||
./modules/dnsmasq.nix
|
||||
./modules/forgejo.nix
|
||||
|
|
|
@ -5,6 +5,23 @@
|
|||
{ 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
|
||||
# (Looking at you home-manager yazi)
|
||||
environment.sessionVariables = rec {
|
||||
|
@ -42,20 +59,20 @@
|
|||
};
|
||||
};
|
||||
|
||||
# Android Debugging interface
|
||||
programs.adb.enable = true;
|
||||
services.udev.packages = [
|
||||
pkgs.android-udev-rules
|
||||
];
|
||||
boot.supportedFilesystems = [ "nfts" ];
|
||||
boot.loader.systemd-boot.configurationLimit = 5;
|
||||
|
||||
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;
|
||||
users.users.${user} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel" "video"
|
||||
"audio" "networkmanager"
|
||||
"lp" "scanner"
|
||||
"input" "uinput"
|
||||
"cdrom" "adbusers"];
|
||||
extraGroups = [ "wheel" "video" "audio" "networkmanager" "lp" "scanner" "input" "uinput" "cdrom"];
|
||||
shell = pkgs.zsh;
|
||||
password = "password";
|
||||
};
|
||||
|
@ -66,47 +83,7 @@
|
|||
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.hardwareClockInLocalTime = true;
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
console = {
|
||||
|
@ -114,19 +91,29 @@
|
|||
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 = {
|
||||
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;
|
||||
extraOptions = "experimental-features = nix-command flakes";
|
||||
};
|
||||
|
|
87
hosts/default.nix
Normal file
87
hosts/default.nix
Normal 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
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{ config, ... }:
|
||||
{ config, user, ... }:
|
||||
|
||||
|
||||
{
|
||||
|
@ -7,6 +7,9 @@
|
|||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
programs.adb.enable = true;
|
||||
users.users.${user}.extraGroups = [ "adbusers" ];
|
||||
|
||||
networking = {
|
||||
firewall = {
|
||||
checkReversePath = "loose";
|
||||
|
@ -46,6 +49,8 @@
|
|||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
hardware.nvidia.modesetting.enable = true;
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
|
||||
environment.sessionVariables = {
|
||||
# Resolves jellyfin black screen under hyprland
|
||||
|
@ -53,6 +58,7 @@
|
|||
QT_QPA_PLATFORM = "xcb";
|
||||
};
|
||||
|
||||
time.hardwareClockInLocalTime = true;
|
||||
|
||||
boot.loader = {
|
||||
efi = {
|
||||
|
@ -79,4 +85,6 @@
|
|||
'';
|
||||
};
|
||||
};
|
||||
|
||||
boot.supportedFilesystems = [ "ntfs" ];
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, ... }:
|
||||
{ config, user, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
|
@ -6,36 +6,38 @@
|
|||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
programs.adb.enable = true;
|
||||
users.users.${user}.extraGroups = [ "adbusers" ];
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
|
||||
networking.hosts = {
|
||||
"100.64.0.1" = ["files.nickiel.net" "git.nickiel.net" "nickiel.net"
|
||||
"jellyfin.nickiel.net" ];
|
||||
};
|
||||
# tailscale set --exit-node <SEVERNAME> to route through an exit node
|
||||
services.tailscale.enable = true;
|
||||
networking.firewall = {
|
||||
services.tailscale.enable = true; networking.firewall = {
|
||||
checkReversePath = "loose"; trustedInterfaces = [ "tailscale0" ];
|
||||
allowedUDPPorts = [ config.services.tailscale.port ];
|
||||
};
|
||||
time.hardwareClockInLocalTime = true;
|
||||
|
||||
boot.loader = {
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
efiSysMountPoint = "/boot";
|
||||
boot.loader = { efi = {
|
||||
canTouchEfiVariables = true; efiSysMountPoint = "/boot";
|
||||
};
|
||||
grub = {
|
||||
devices = [ "nodev" ];
|
||||
efiSupport = true;
|
||||
enable = true;
|
||||
useOSProber = false;
|
||||
extraEntries = ''
|
||||
menuentry 'Windows Boot Manager (on /dev/nvme0n1p1)' --class windows --class os $menuentry_id_option 'osprober-efi-364F-BE7A' {
|
||||
insmod part_gpt
|
||||
insmod fat
|
||||
search --no-floppy --fs-uuid --set=root 364F-BE7A
|
||||
chainloader /efi/Microsoft/Boot/bootmgfw.efi
|
||||
}
|
||||
|
||||
'';
|
||||
useOSProber = true;
|
||||
# extraEntries = ''
|
||||
# menuentry 'Windows Boot Manager (on /dev/nvme0n1p1)' --class windows
|
||||
# --class os $menuentry_id_option 'osprober-efi-364F-BE7A' {
|
||||
# insmod part_gpt insmod fat search --no-floppy --fs-uuid
|
||||
# --set=root 364F-BE7A chainloader
|
||||
# /efi/Microsoft/Boot/bootmgfw.efi
|
||||
# }
|
||||
# '';
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -43,14 +43,12 @@ in
|
|||
cat = "bat";
|
||||
ls = "eza";
|
||||
jq = "jaq";
|
||||
# gust = "/home/nixolas/Documents/Gust/target/debug/gust";
|
||||
gust = "/home/nixolas/Documents/Gust/target/debug/gust";
|
||||
rm = "rmtrash";
|
||||
open-config = "cd ~/Documents/nicks-nix-config; nvim";
|
||||
switch-to-windows = "sudo grub-reboot 1; sudo reboot";
|
||||
screenshot = "grim -g \"$(slurp -d)\" - | wl-copy -t image/png";
|
||||
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";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue