Compare commits

...

3 commits

Author SHA1 Message Date
sadan
0f89ab4db6
things 2024-10-02 23:37:49 -04:00
sadan
5a8735684d
minor changes 2024-10-02 17:37:35 -04:00
sadan
5fca9d16c0
more refactoring 2024-10-02 17:19:34 -04:00
17 changed files with 202 additions and 106 deletions

View file

@ -2,66 +2,43 @@
# your system. Help is available in the configuration.nix(5) man page, on # your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). # https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, inputs, ... }: { config, pkgs, ... }:
{ {
imports = imports =
[ [
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
../../common/systemModules/boot.nix
../../common/systemModules/audio.nix ../../common/systemModules/audio.nix
../../common/systemModules/kde.nix ../../common/systemModules/kde.nix
../../common/systemModules/tailscale.nix
../../common/systemModules/gaming.nix
../../common/systemModules/crypt.nix
../../common/systemModules/printing.nix
# USERS
../../common/users/meyer ../../common/users/meyer
]; ];
# Use the systemd-boot EFI boot loader. boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
boot.loader.grub.device = "nodev"; nix.settings.extra-platforms = config.boot.binfmt.emulatedSystems;
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.loader.grub.efiSupport = true;
boot.loader.grub.useOSProber = true;
boot.loader.grub.efiInstallAsRemovable = true;
# boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
# add user to "openrazer" group
hardware.openrazer.enable = true;
hardware.openrazer.users = [ "meyer" ];
hardware.i2c.enable = true; hardware.i2c.enable = true;
hardware.xpadneo.enable = true;
hardware.amdgpu.opencl.enable = true; hardware.amdgpu.opencl.enable = true;
services.xserver.videoDrivers = [ "amdgpu" ];
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
services.tailscale.enable = true;
networking.hostName = "nix-desktop-evo4b5"; # Define your hostname. networking.hostName = "nix-desktop-evo4b5"; # Define your hostname.
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Set your time zone. # Set your time zone.
time.timeZone = "America/New_York"; time.timeZone = "America/New_York";
# Select internationalisation properties. nixpkgs.config.allowUnfree = true;
# i18n.defaultLocale = "en_US.UTF-8"; nix.settings.experimental-features = [ "nix-command" "flakes" ];
# console = {
# font = "Lat2-Terminus16";
# keyMap = "us";
# useXkbConfig = true; # use xkb.options in tty.
# };
services = { services = {
teamviewer.enable = true; teamviewer.enable = true;
avahi.enable = true;
usbmuxd.enable = true; usbmuxd.enable = true;
}; };
services.xserver.videoDrivers = [ "amdgpu" ];
services.printing.enable = true;
services.printing.drivers = with pkgs; [
hplip
];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
programs.zsh.enable = true; programs.zsh.enable = true;
programs.steam.enable = true;
programs.steam.extraCompatPackages = with pkgs; [
proton-ge-bin
];
nixpkgs.config.allowUnfree = true;
@ -77,10 +54,6 @@
wget wget
ripgrep ripgrep
tldr tldr
gnupg
openssh
pinentry-curses
pinentry
libnotify libnotify
file file
]; ];
@ -116,13 +89,6 @@
mimalloc mimalloc
libstdcxx5 libstdcxx5
]; ];
programs.ssh.startAgent = true;
programs.ssh.askPassword = pkgs.lib.mkForce "${pkgs.ksshaskpass.out}/bin/ksshaskpass";
programs.gnupg.agent = {
enable = true;
pinentryPackage = pkgs.pinentry-gnome3;
};
# This option defines the first version of NixOS you have installed on this particular machine, # This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.

View file

@ -0,0 +1,14 @@
{ pkgs, ... }: {
boot = {
loader = {
grub = {
enable = true;
device = "nodev";
efiSupport = true;
useOSProber = true;
efiInstallAsRemovable = true;
};
};
kernelPackages = pkgs.linuxPackages_latest;
};
}

View file

@ -0,0 +1,22 @@
{ pkgs, ... }: {
environment = {
systemPackages = with pkgs; [
gnupg
openssh
pinentry-curses
pinentry
];
};
programs = {
ssh = {
startAgent = true;
askPassword = "${pkgs.ksshaskpass}/bin/ksshaskpass";
};
gnupg = {
agent = {
enable = true;
pinentryPackage = pkgs.pinentry-gnome3;
};
};
};
}

View file

@ -0,0 +1,15 @@
{ pkgs, ... }: {
hardware = {
xpadneo = {
enable = true;
};
};
programs = {
steam = {
enable = true;
extraCompatPackages = with pkgs; [
proton-ge-bin
];
};
};
}

View file

@ -0,0 +1,12 @@
{ NAME }: { ... }: {
programs = {
nh = {
enable = true;
clean = {
enable = true;
extraArgs = "--keep-since 4d --keep 3";
};
flake = "/home/${NAME}/nixos";
};
};
}

View file

@ -0,0 +1,13 @@
{ pkgs, ... }: {
services = {
avahi = {
enable = true;
};
printing = {
enable = true;
drivers = with pkgs; [
hplip
];
};
};
}

View file

@ -0,0 +1,8 @@
{ NAME }: { ... }: {
hardware = {
openrazer = {
enable = true;
users = [ NAME ];
};
};
}

View file

@ -0,0 +1,7 @@
{ ... }: {
services = {
tailscale = {
enable = true;
};
};
}

View file

@ -1,7 +1,16 @@
{ NAME }: { ... }: { { NAME }: { pkgs, ... }: {
virtualisation = { virtualisation = {
libvirtd = { libvirtd = {
enable = true; enable = true;
qemu = {
ovmf = {
enable = true;
packages = with pkgs; [
OVMF.fd
pkgsCross.aarch64-multiplatform.OVMF.fd
];
};
};
}; };
}; };
users = { users = {

View file

@ -0,0 +1,8 @@
{ pkgs, ... }: {
programs = {
java = {
enable = true;
package = pkgs.temurin-bin-17;
};
};
}

View file

@ -4,6 +4,8 @@ let
_ = [ _ = [
"source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme" "source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme"
"source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" "source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
"eval \"$(${pkgs.nh}/bin/nh completions --shell=zsh)\""
"eval \"$(${pkgs.nodejs_22}/bin/node --completion-bash)\""
"[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh" "[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh"
"setopt globstarshort" "setopt globstarshort"
]; ];

View file

@ -7,6 +7,8 @@ in
(import ../../systemModules/networkManager.nix { inherit NAME; }) (import ../../systemModules/networkManager.nix { inherit NAME; })
(import ../../systemModules/sops.nix { inherit NAME; }) (import ../../systemModules/sops.nix { inherit NAME; })
(import ../../systemModules/vm.nix { inherit NAME; }) (import ../../systemModules/vm.nix { inherit NAME; })
(import ../../systemModules/razer.nix { inherit NAME; })
(import ../../systemModules/nixHelper.nix { inherit NAME; })
(import ../../programs/wireshark.nix { inherit NAME; }) (import ../../programs/wireshark.nix { inherit NAME; })
]; ];
users = { users = {

View file

@ -0,0 +1,35 @@
{ ... }: {
programs = {
git = {
enable = true;
userName = "sadan";
userEmail = "117494111+sadan4@users.noreply.github.com";
extraConfig = {
gpg = {
format = "ssh";
};
user = {
signingkey = "~/.ssh/id_ed25519";
};
commit = {
gpgsign = true;
};
core = {
autocrlf = "input";
};
pull = {
rebase = true;
};
push = {
autoSetupRemote = true;
};
init = {
defaultBranch = "main";
};
rerere = {
enabled = true;
};
};
};
};
}

View file

@ -1,39 +1,24 @@
{ config, pkgs, inputs, ... }: { config, pkgs, ... }:
let let
files = import ../../files.nix { inherit config; }; file = import ../../files.nix { inherit config; };
shell = import ../../shell.nix { inherit config pkgs; }; shell = import ../../shell.nix { inherit config pkgs; };
pkgTypes = import ../../pkgs.nix { inherit pkgs config; }; pkgTypes = import ../../pkgs.nix { inherit pkgs config; };
packages = pkgTypes.dev ++ pkgTypes.gui ++ pkgTypes.general ++ pkgTypes.scripts ++ pkgTypes.gaming; packages = pkgTypes.dev ++ pkgTypes.gui ++ pkgTypes.general ++ pkgTypes.scripts ++ pkgTypes.gaming;
in in
{ {
nixpkgs.config.allowInsecurePredicate = (pkg: true); nixpkgs.config.allowInsecurePredicate = (pkg: true);
nixpkgs.config.allowUnfreePredicate = (pkg: true);
imports = [ imports = [
../homeModules/flameshot.nix ../homeModules/flameshot.nix
../homeModules/arrpc.nix ../homeModules/arrpc.nix
../homeModules/zsh.nix ../homeModules/zsh.nix
../homeModules/desktopEntries.nix ../homeModules/desktopEntries.nix
../homeModules/java.nix
./sops.nix ./sops.nix
./git.nix
]; ];
programs.java.enable = true;
programs.java.package = pkgs.temurin-bin-17;
programs.git.enable = true;
programs.git.userName = "sadan";
programs.git.userEmail = "117494111+sadan4@users.noreply.github.com";
programs.git.extraConfig = {
gpg.format = "ssh";
user = {
signingkey = "~/.ssh/id_ed25519";
};
commit.gpgsign = true;
core.autocrlf = "input";
pull.rebase = true;
push.autoSetupRemote = true;
init.defaultBranch = "main";
rerere.enabled = true;
};
nixpkgs.config.allowUnfreePredicate = (pkg: true);
# Home Manager needs a bit of information about you and the paths it should # Home Manager needs a bit of information about you and the paths it should
# nixpkg.config.allowUnfree = true; # nixpkg.config.allowUnfree = true;
# manage. # manage.
@ -41,22 +26,16 @@ in
home.homeDirectory = "/home/meyer"; home.homeDirectory = "/home/meyer";
# 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 = "23.11"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your # The home.packages option allows you to install Nix packages into your
# environment. # environment.
home = { home = {
inherit packages; inherit packages file;
}; };
home.shellAliases = shell.dev.aliases;
home.sessionPath = shell.dev.path;
home.sessionVariables = shell.dev.env;
# Home Manager is pretty good at managing dotfiles. The primary way to manage # Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'. # plain files is through 'home.file'.
home.file = files;
# Home Manager can also manage your environment variables through # Home Manager can also manage your environment variables through
# 'home.sessionVariables'. If you don't want to manage your shell through Home # 'home.sessionVariables'. If you don't want to manage your shell through Home
@ -73,10 +52,15 @@ in
# #
# /etc/profiles/per-user/meyer/etc/profile.d/hm-session-vars.sh # /etc/profiles/per-user/meyer/etc/profile.d/hm-session-vars.sh
# #
home.shellAliases = shell.dev.aliases;
home.sessionPath = shell.dev.path;
home.sessionVariables = shell.dev.env;
# 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 = "23.11"; # Please read the comment before changing.
# Let Home Manager install and manage itself. # Let Home Manager install and manage itself.
programs.home-manager.enable = true; programs.home-manager.enable = true;
} }

View file

@ -21,11 +21,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1726560853,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -41,11 +41,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726611136, "lastModified": 1727817100,
"narHash": "sha256-H3XQ8DHc/wtEcztf34IzWW7CPk7RZHTdB6PZd++0yt8=", "narHash": "sha256-dlyV9/eiWkm/Y/t2+k4CFZ29tBvCANmJogEYaHeAOTw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "4974dfb26e1c84d22bfdf943d41a33c9e51209a8", "rev": "437ec62009fa8ceb684eb447d455ffba25911cf9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -61,11 +61,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726449931, "lastModified": 1727658919,
"narHash": "sha256-1AX7MyYzP7sNgZiGF8jwehCCI75y2kBGwACeryJs+yE=", "narHash": "sha256-YAePt2GldkkRJ08LvZNHcuS6shIVStj+K+1DZN3gbnM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "c1b0fa0bec5478185eae2fd3f39b9e906fc83995", "rev": "f9fdf8285690a351e8998f1e703ebdf9cdf51dee",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -81,11 +81,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1726477654, "lastModified": 1727693804,
"narHash": "sha256-nE34QJfnkLZyZIVOXd73iICyvYROVSOo4h7pVRs0mqg=", "narHash": "sha256-Qwd+BzauhSXdtiL172wkp8JYJhe2BXyXkyWqPexytME=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixos-wsl", "repo": "nixos-wsl",
"rev": "20630a560fa658b1f4fc16e6ef2b6b3d6f8539f5", "rev": "acb21a72156c5b6e1aa607b9adcbac592bd60862",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -96,11 +96,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1726320982, "lastModified": 1727540905,
"narHash": "sha256-RuVXUwcYwaUeks6h3OLrEmg14z9aFXdWppTWPMTwdQw=", "narHash": "sha256-40J9tW7Y794J7Uw4GwcAKlMxlX2xISBl6IBigo83ih8=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8f7492cce28977fbf8bd12c72af08b1f6c7c3e49", "rev": "fbca5e745367ae7632731639de5c21f29c8744ed",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -128,11 +128,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1726463316, "lastModified": 1727802920,
"narHash": "sha256-gI9kkaH0ZjakJOKrdjaI/VbaMEo9qBbSUl93DnU7f4c=", "narHash": "sha256-HP89HZOT0ReIbI7IJZJQoJgxvB2Tn28V6XS3MNKnfLs=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "99dc8785f6a0adac95f5e2ab05cc2e1bf666d172", "rev": "27e30d177e57d912d614c88c622dcfdb2e6e6515",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -173,11 +173,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1726524647, "lastModified": 1727734513,
"narHash": "sha256-qis6BtOOBBEAfUl7FMHqqTwRLB61OL5OFzIsOmRz2J4=", "narHash": "sha256-i47LQwoGCVQq4upV2YHV0OudkauHNuFsv306ualB/Sw=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "e2d404a7ea599a013189aa42947f66cede0645c8", "rev": "3198a242e547939c5e659353551b0668ec150268",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -27,15 +27,14 @@
desktopIso = nixpkgs.lib.nixosSystem { desktopIso = nixpkgs.lib.nixosSystem {
system = "aarch64-linux"; system = "aarch64-linux";
modules = [ modules = [
# ./boxes/desktop/configuration.nix ({ pkgs, modulesPath,lib, ... }: {
# inputs.home-manager.nixosModules.default
({ pkgs, modulesPath, ... }: {
imports = [ (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix") ]; imports = [ (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix") ];
boot.kernelPackages = pkgs.linuxPackages_testing; boot.kernelPackages = pkgs.linuxPackages_latest;
boot.supportedFilesystems = lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" "ext4" ];
}) })
]; ];
}; };
desktop = nixpkgs.lib.nixosSystem { nix-desktop-evo4b5 = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ modules = [
./boxes/desktop/configuration.nix ./boxes/desktop/configuration.nix