Compare commits
5 Commits
371201815e
...
1f0a61f56e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f0a61f56e | ||
|
|
fd2389fed1 | ||
|
|
edfc6cffdd | ||
|
|
957e88b6b5 | ||
|
|
3864496784 |
16
flake.lock
generated
16
flake.lock
generated
@@ -21,6 +21,21 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"impermanence": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1737831083,
|
||||||
|
"narHash": "sha256-LJggUHbpyeDvNagTUrdhe/pRVp4pnS6wVKALS782gRI=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "impermanence",
|
||||||
|
"rev": "4b3e914cdf97a5b536a889e939fb2fd2b043a170",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "impermanence",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764950072,
|
"lastModified": 1764950072,
|
||||||
@@ -40,6 +55,7 @@
|
|||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"impermanence": "impermanence",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
73
flake.nix
73
flake.nix
@@ -11,34 +11,57 @@
|
|||||||
# to avoid problems caused by different versions of nixpkgs.
|
# to avoid problems caused by different versions of nixpkgs.
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
impermanence.url = "github:nix-community/impermanence";
|
||||||
|
# nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.6.0";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs =
|
||||||
self,
|
{
|
||||||
nixpkgs,
|
self,
|
||||||
home-manager,
|
nixpkgs,
|
||||||
}@inputs: let
|
home-manager,
|
||||||
inherit (self) outputs;
|
impermanence,
|
||||||
nix.registry.nixos.flake = inputs.self;
|
# nix-flatpak,
|
||||||
environment.etc."nix/inputs/nixpkgs".source = nixpkgs.outPath;
|
}@inputs:
|
||||||
nix.nixPath = ["nixpkgs=${nixpkgs.outPath}"];
|
let
|
||||||
in{
|
inherit (self) outputs;
|
||||||
nixosConfigurations = {
|
nix.registry.nixos.flake = inputs.self;
|
||||||
homepc = nixpkgs.lib.nixosSystem {
|
environment.etc."nix/inputs/nixpkgs".source = nixpkgs.outPath;
|
||||||
specialArgs = {inherit inputs outputs;};
|
nix.nixPath = [ "nixpkgs=${nixpkgs.outPath}" ];
|
||||||
system = "x86_64-linux";
|
in
|
||||||
modules = [
|
{
|
||||||
./machines/homepc/configuration.nix
|
nixosConfigurations = {
|
||||||
home-manager.nixosModules.home-manager
|
homepc = nixpkgs.lib.nixosSystem {
|
||||||
{
|
specialArgs = { inherit inputs outputs; };
|
||||||
home-manager.extraSpecialArgs = {inherit inputs outputs;};
|
system = "x86_64-linux";
|
||||||
home-manager.useGlobalPkgs = true;
|
modules = [
|
||||||
home-manager.useUserPackages = true;
|
./machines/homepc/configuration.nix
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.extraSpecialArgs = { inherit inputs outputs; };
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
|
||||||
home-manager.users.laythe = import ./machines/homepc/home.nix;
|
home-manager.users.laythe = import ./machines/homepc/home.nix;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
};
|
||||||
|
workstation = nixpkgs.lib.nixosSystem {
|
||||||
|
specialArgs = { inherit inputs outputs; };
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [
|
||||||
|
./machines/workstation/configuration.nix
|
||||||
|
impermanence.nixosModules.impermanence
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.extraSpecialArgs = { inherit inputs outputs; };
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
|
||||||
|
home-manager.users.laythe = import ./machines/homepc/home.nix;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,23 @@
|
|||||||
# This is for global config I DEFINITELY want on all machines, this should only include basic utilities and be relatively small.
|
# This is for global config I DEFINITELY want on all machines, this should only include basic utilities and be relatively small.
|
||||||
# There is no order for where things are in this, it's a little messy.
|
# There is no order for where things are in this, it's a little messy.
|
||||||
{pkgs, ...}:
|
{ pkgs, nix-flatpak, ... }:
|
||||||
{
|
{
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
# nix-flatpak.nixosModules.nix-flatpak
|
||||||
|
];
|
||||||
|
|
||||||
# Lix
|
# Lix
|
||||||
nixpkgs.overlays = [ (final: prev: {
|
nixpkgs.overlays = [
|
||||||
inherit (prev.lixPackageSets.stable)
|
(final: prev: {
|
||||||
nixpkgs-review
|
inherit (prev.lixPackageSets.stable)
|
||||||
nix-eval-jobs
|
nixpkgs-review
|
||||||
nix-fast-build
|
nix-eval-jobs
|
||||||
colmena;
|
nix-fast-build
|
||||||
}) ];
|
colmena
|
||||||
|
;
|
||||||
|
})
|
||||||
|
];
|
||||||
nix.package = pkgs.lixPackageSets.stable.lix;
|
nix.package = pkgs.lixPackageSets.stable.lix;
|
||||||
|
|
||||||
# 🇺🇸
|
# 🇺🇸
|
||||||
@@ -55,10 +62,27 @@
|
|||||||
users.users.laythe = {
|
users.users.laythe = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "laythe";
|
description = "laythe";
|
||||||
extraGroups = [ "networkmanager" "wheel" "docker" "adbusers" "jackaudio" "podman" ];
|
extraGroups = [
|
||||||
|
"networkmanager"
|
||||||
|
"wheel"
|
||||||
|
"docker"
|
||||||
|
"adbusers"
|
||||||
|
"jackaudio"
|
||||||
|
"podman"
|
||||||
|
];
|
||||||
#To make podman work
|
#To make podman work
|
||||||
subUidRanges = [{ startUid = 100000; count = 65536; }];
|
subUidRanges = [
|
||||||
subGidRanges = [{ startGid = 100000; count = 65536; }];
|
{
|
||||||
|
startUid = 100000;
|
||||||
|
count = 65536;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
subGidRanges = [
|
||||||
|
{
|
||||||
|
startGid = 100000;
|
||||||
|
count = 65536;
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.appimage = {
|
programs.appimage = {
|
||||||
@@ -126,5 +150,8 @@
|
|||||||
package = pkgs.usbmuxd2;
|
package = pkgs.usbmuxd2;
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [
|
||||||
}
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|||||||
73
global/eraseyourdarlings.nix
Normal file
73
global/eraseyourdarlings.nix
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
boot.initrd.postResumeCommands = lib.mkAfter ''
|
||||||
|
rm -rf /bin /etc /lib64 /srv /sys /tmp /usr /var
|
||||||
|
'';
|
||||||
|
# impermanence
|
||||||
|
environment.persistence."/persistent" = {
|
||||||
|
enable = true; # NB: Defaults to true, not needed
|
||||||
|
hideMounts = true;
|
||||||
|
directories = [
|
||||||
|
"/var/log"
|
||||||
|
"/var/lib/bluetooth"
|
||||||
|
"/var/lib/nixos"
|
||||||
|
"/var/lib/systemd/coredump"
|
||||||
|
"/etc/NetworkManager/system-connections"
|
||||||
|
"/etc/nixos"
|
||||||
|
"/var/lib/flatpak"
|
||||||
|
{
|
||||||
|
directory = "/var/lib/colord";
|
||||||
|
user = "colord";
|
||||||
|
group = "colord";
|
||||||
|
mode = "u=rwx,g=rx,o=";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
files = [
|
||||||
|
"/etc/machine-id"
|
||||||
|
{
|
||||||
|
file = "/var/keys/secret_file";
|
||||||
|
parentDirectory = {
|
||||||
|
mode = "u=rwx,g=,o=";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
users.laythe = {
|
||||||
|
directories = [
|
||||||
|
"Downloads"
|
||||||
|
"Music"
|
||||||
|
"Pictures"
|
||||||
|
"Documents"
|
||||||
|
"Videos"
|
||||||
|
"nixos-configv3"
|
||||||
|
{
|
||||||
|
directory = ".local/share/Steam";
|
||||||
|
mode = "0777";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
directory = ".local/share/flatpak";
|
||||||
|
mode = "0700";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
directory = ".gnupg";
|
||||||
|
mode = "0700";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
directory = ".ssh";
|
||||||
|
mode = "0700";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
directory = ".nixops";
|
||||||
|
mode = "0700";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
directory = ".local/share/keyrings";
|
||||||
|
mode = "0700";
|
||||||
|
}
|
||||||
|
".local/share/direnv"
|
||||||
|
];
|
||||||
|
files = [
|
||||||
|
".screenrc"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
138
machines/workstation/configuration.nix
Normal file
138
machines/workstation/configuration.nix
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
# Edit this configuration file to define what should be installed 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`).
|
||||||
|
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
../../global/default.nix
|
||||||
|
# ../../modules/communication/default.nix
|
||||||
|
# ../../modules/creative/default.nix
|
||||||
|
../../modules/development/default.nix
|
||||||
|
# ../../modules/fabrication/default.nix
|
||||||
|
../../modules/gaming/default.nix
|
||||||
|
../../modules/kde/default.nix
|
||||||
|
../../modules/virtualization/default.nix
|
||||||
|
# ../../modules/vr/default.nix
|
||||||
|
../../global/eraseyourdarlings.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Use the systemd-boot EFI boot loader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
networking.hostName = "workstation"; # Define your hostname.
|
||||||
|
|
||||||
|
# Configure network connections interactively with nmcli or nmtui.
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
# Only computer I own that can actually run ollama, and I don't want to make an ai folder.
|
||||||
|
# services.ollama = {
|
||||||
|
# enable = true;
|
||||||
|
# acceleration = "cuda";
|
||||||
|
# host = "[::]";
|
||||||
|
# };
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
# time.timeZone = "Europe/Amsterdam";
|
||||||
|
|
||||||
|
# Configure network proxy if necessary
|
||||||
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
|
||||||
|
# Select internationalisation properties.
|
||||||
|
# i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
# console = {
|
||||||
|
# font = "Lat2-Terminus16";
|
||||||
|
# keyMap = "us";
|
||||||
|
# useXkbConfig = true; # use xkb.options in tty.
|
||||||
|
# };
|
||||||
|
|
||||||
|
# services.xserver.enable = true; # On anything else modern this should be false.
|
||||||
|
|
||||||
|
# Configure keymap in X11
|
||||||
|
# services.xserver.xkb.layout = "us";
|
||||||
|
# services.xserver.xkb.options = "eurosign:e,caps:escape";
|
||||||
|
|
||||||
|
# Enable CUPS to print documents.
|
||||||
|
# services.printing.enable = true;
|
||||||
|
|
||||||
|
# Enable sound.
|
||||||
|
# services.pulseaudio.enable = true;
|
||||||
|
# OR
|
||||||
|
# services.pipewire = {
|
||||||
|
# enable = true;
|
||||||
|
# pulse.enable = true;
|
||||||
|
# };
|
||||||
|
|
||||||
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
|
# services.libinput.enable = true;
|
||||||
|
|
||||||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
# users.users.alice = {
|
||||||
|
# isNormalUser = true;
|
||||||
|
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||||
|
# packages = with pkgs; [
|
||||||
|
# tree
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
|
||||||
|
# programs.firefox.enable = true;
|
||||||
|
|
||||||
|
# List packages installed in system profile.
|
||||||
|
# You can use https://search.nixos.org/ to find more packages (and options).
|
||||||
|
# environment.systemPackages = with pkgs; [
|
||||||
|
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||||
|
# wget
|
||||||
|
# ];
|
||||||
|
|
||||||
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
|
# started in user sessions.
|
||||||
|
# programs.mtr.enable = true;
|
||||||
|
# programs.gnupg.agent = {
|
||||||
|
# enable = true;
|
||||||
|
# enableSSHSupport = true;
|
||||||
|
# };
|
||||||
|
|
||||||
|
# List services that you want to enable:
|
||||||
|
|
||||||
|
# Enable the OpenSSH daemon.
|
||||||
|
# services.openssh.enable = true;
|
||||||
|
|
||||||
|
# Open ports in the firewall.
|
||||||
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
|
# Or disable the firewall altogether.
|
||||||
|
# networking.firewall.enable = false;
|
||||||
|
|
||||||
|
# Copy the NixOS configuration file and link it from the resulting system
|
||||||
|
# (/run/current-system/configuration.nix). This is useful in case you
|
||||||
|
# accidentally delete configuration.nix.
|
||||||
|
# system.copySystemConfiguration = true;
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
# Most users should NEVER change this value after the initial install, for any reason,
|
||||||
|
# even if you've upgraded your system to a new NixOS release.
|
||||||
|
#
|
||||||
|
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||||
|
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
||||||
|
# to actually do that.
|
||||||
|
#
|
||||||
|
# This value being lower than the current NixOS release does NOT mean your system is
|
||||||
|
# out of date, out of support, or vulnerable.
|
||||||
|
#
|
||||||
|
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||||
|
# and migrated your data accordingly.
|
||||||
|
#
|
||||||
|
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||||
|
system.stateVersion = "25.11"; # Did you read the comment?
|
||||||
|
|
||||||
|
}
|
||||||
54
machines/workstation/hardware-configuration.nix
Normal file
54
machines/workstation/hardware-configuration.nix
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"ehci_pci"
|
||||||
|
"ahci"
|
||||||
|
"usbhid"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
"sr_mod"
|
||||||
|
];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-uuid/f111c9ae-2ac4-4b20-b46e-11d99552dfdd";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/191D-6D31";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [
|
||||||
|
"fmask=0077"
|
||||||
|
"dmask=0077"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [
|
||||||
|
{ device = "/dev/disk/by-uuid/11c4c704-87bc-4c76-b3e2-2166ef53dcaf"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|
||||||
|
hardware.graphics.enable = true;
|
||||||
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
hardware.nvidia.open = false;
|
||||||
|
}
|
||||||
14
machines/workstation/home.nix
Normal file
14
machines/workstation/home.nix
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{config, pkgs, lib, inputs, outputs, ...}:
|
||||||
|
{
|
||||||
|
# These both are probably always going to be the same, but I'll keep them local just in case:tm:
|
||||||
|
home.username = "laythe";
|
||||||
|
home.homeDirectory = lib.mkForce "/home/laythe";
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
../../home/default.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
home.stateVersion = "25.11";
|
||||||
|
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user