mirror of
https://github.com/Nickiel12/nicks-nix-config.git
synced 2024-11-24 13:45:29 -08:00
Compare commits
7 commits
86643cca45
...
0a7f9ecc86
Author | SHA1 | Date | |
---|---|---|---|
0a7f9ecc86 | |||
5db210cee5 | |||
8af064577f | |||
ad9ab630b8 | |||
cef046b235 | |||
e59e776f15 | |||
1c3255f268 |
9 changed files with 94 additions and 179 deletions
12
flake.lock
12
flake.lock
|
@ -160,11 +160,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1703499046,
|
||||
"narHash": "sha256-A6wclPJCOMEYuD28KBOBTwHEVOKy3f9yvuMFAJ55dco=",
|
||||
"lastModified": 1703527373,
|
||||
"narHash": "sha256-AjypRssRtS6F3xkf7rE3/bXkIF2WJOZLbTIspjcE1zM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "d5a917bab40daf4e5f82cd27162b8a6656d3beab",
|
||||
"rev": "80679ea5074ab7190c4cce478c600057cfb5edae",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -230,11 +230,11 @@
|
|||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1703520782,
|
||||
"narHash": "sha256-G5hdGOjRHP6PwX3yFkCVBipy4Tv4mZZo7slLAvehsf8=",
|
||||
"lastModified": 1703550282,
|
||||
"narHash": "sha256-G8DrHbmocUO4bzmi12w+5hvLhElhqlQfbV/OTQowEPo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "0fcb94fb63231092733b5d367fd56110bedcec41",
|
||||
"rev": "e173e2e409e2bcc977d8726178d7943dabb83ce0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -29,8 +29,6 @@
|
|||
url = github:nix-community/home-manager;
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
outputs = inputs@{
|
||||
|
@ -55,23 +53,20 @@
|
|||
lib = nixpkgs.lib;
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
inherit lib;
|
||||
|
||||
|
||||
# Home server
|
||||
Alaska = lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit user headscale pkgs-stable;
|
||||
inherit user headscale;
|
||||
};
|
||||
|
||||
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,14 +90,15 @@ in
|
|||
imports = [
|
||||
./modules/discord.nix
|
||||
#./modules/emacs.nix
|
||||
./modules/fusuma.nix
|
||||
./modules/git.nix
|
||||
./modules/neovim.nix
|
||||
./modules/hyprland
|
||||
./modules/kitty.nix
|
||||
./modules/neovim.nix
|
||||
./modules/rofi.nix
|
||||
./modules/tmux.nix
|
||||
./modules/wezterm.nix
|
||||
./modules/xdg.nix
|
||||
./modules/hyprland
|
||||
./modules/yazi.nix
|
||||
./modules/zsh.nix
|
||||
];
|
||||
|
@ -105,9 +106,10 @@ in
|
|||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
|
||||
programs.direnv.enable = true;
|
||||
programs.direnv.nix-direnv.enable = true;
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
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,23 +5,6 @@
|
|||
{ 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 {
|
||||
|
@ -59,20 +42,20 @@
|
|||
};
|
||||
};
|
||||
|
||||
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";
|
||||
};
|
||||
|
||||
# Android Debugging interface
|
||||
programs.adb.enable = true;
|
||||
services.udev.packages = [
|
||||
pkgs.android-udev-rules
|
||||
];
|
||||
programs.zsh.enable = true;
|
||||
users.users.${user} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "video" "audio" "networkmanager" "lp" "scanner" "input" "uinput" "cdrom"];
|
||||
extraGroups = [
|
||||
"wheel" "video"
|
||||
"audio" "networkmanager"
|
||||
"lp" "scanner"
|
||||
"input" "uinput"
|
||||
"cdrom" "adbusers"];
|
||||
shell = pkgs.zsh;
|
||||
password = "password";
|
||||
};
|
||||
|
@ -83,37 +66,67 @@
|
|||
xkcd-font
|
||||
];
|
||||
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
useXkbConfig = true; # use xkbOptions in tty.
|
||||
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;
|
||||
};
|
||||
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
#jack.enable = true;
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
time.hardwareClockInLocalTime = true;
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
useXkbConfig = true; # use xkbOptions in tty.
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
nixpkgs.config.allowUnfree = 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";
|
||||
};
|
||||
|
|
|
@ -1,87 +0,0 @@
|
|||
{ 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, user, ... }:
|
||||
{ config, ... }:
|
||||
|
||||
|
||||
{
|
||||
|
@ -7,9 +7,6 @@
|
|||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
programs.adb.enable = true;
|
||||
users.users.${user}.extraGroups = [ "adbusers" ];
|
||||
|
||||
networking = {
|
||||
firewall = {
|
||||
checkReversePath = "loose";
|
||||
|
@ -50,15 +47,12 @@
|
|||
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
|
||||
# See also: https://github.com/jellyfin/jellyfin-media-player/issues/165#issuecomment-1030690851
|
||||
QT_QPA_PLATFORM = "xcb";
|
||||
};
|
||||
|
||||
time.hardwareClockInLocalTime = true;
|
||||
|
||||
boot.loader = {
|
||||
efi = {
|
||||
|
@ -85,6 +79,4 @@
|
|||
'';
|
||||
};
|
||||
};
|
||||
|
||||
boot.supportedFilesystems = [ "ntfs" ];
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, user, ... }:
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
|
@ -6,38 +6,36 @@
|
|||
./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 = 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
|
||||
# }
|
||||
# '';
|
||||
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
|
||||
}
|
||||
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -43,12 +43,14 @@ 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