mirror of
https://github.com/JuLi0n21/publicConfig.git
synced 2026-04-19 16:00:08 +00:00
first commit
This commit is contained in:
86
base/base.nix
Normal file
86
base/base.nix
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
{ hostVars, baseVars, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
users.users.${baseVars.username} = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
time.timeZone = "Europe/Berlin";
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "de_DE.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||||
|
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||||
|
LC_MONETARY = "de_DE.UTF-8";
|
||||||
|
LC_NAME = "de_DE.UTF-8";
|
||||||
|
LC_NUMERIC = "de_DE.UTF-8";
|
||||||
|
LC_PAPER = "de_DE.UTF-8";
|
||||||
|
LC_TELEPHONE = "de_DE.UTF-8";
|
||||||
|
LC_TIME = "de_DE.UTF-8";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.xserver.xkb = {
|
||||||
|
layout = "us";
|
||||||
|
variant = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
nix.settings.experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
config = {
|
||||||
|
user = {
|
||||||
|
name = "JuLi0n21";
|
||||||
|
email = "email@gmail.com";
|
||||||
|
};
|
||||||
|
url."ssh://git@github.com/" = {
|
||||||
|
insteadOf = "https://github.com/";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = hostVars.stateVersion;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
git
|
||||||
|
xclip
|
||||||
|
spotify
|
||||||
|
cloudflared
|
||||||
|
gnumake
|
||||||
|
gcc
|
||||||
|
ripgrep
|
||||||
|
unzip
|
||||||
|
cliphist
|
||||||
|
bind
|
||||||
|
];
|
||||||
|
|
||||||
|
services.fwupd.enable = true;
|
||||||
|
|
||||||
|
services.printing.enable = true;
|
||||||
|
services.openssh.enable = true;
|
||||||
|
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
nerd-fonts.fira-code
|
||||||
|
nerd-fonts.droid-sans-mono
|
||||||
|
nerd-fonts.noto
|
||||||
|
nerd-fonts.hack
|
||||||
|
nerd-fonts.ubuntu
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
nix.optimise.automatic = true;
|
||||||
|
programs.nix-ld.enable = true;
|
||||||
|
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
}
|
||||||
14
base/docker.nix
Normal file
14
base/docker.nix
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{ baseVars,pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
virtualisation.docker.enable = true;
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
docker-compose
|
||||||
|
];
|
||||||
|
|
||||||
|
users.users.${baseVars.username} = {
|
||||||
|
extraGroups = [
|
||||||
|
"docker"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
11
base/nvim.nix
Normal file
11
base/nvim.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
neovim
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.variables = {
|
||||||
|
EDITOR = "nvim";
|
||||||
|
};
|
||||||
|
}
|
||||||
40
configs.nix
Normal file
40
configs.nix
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{ inputs }:
|
||||||
|
|
||||||
|
let
|
||||||
|
lib = inputs.nixpkgs.lib;
|
||||||
|
|
||||||
|
recursiveImport = import ./rI.nix { inherit lib; };
|
||||||
|
|
||||||
|
specialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
baseVars.username = "julian";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
|
||||||
|
framework = lib.nixosSystem {
|
||||||
|
specialArgs = specialArgs // {
|
||||||
|
hostVars = {
|
||||||
|
hostname = "framework-12";
|
||||||
|
stateVersion = "25.05";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
modules = recursiveImport [
|
||||||
|
./base
|
||||||
|
./hosts/framework
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
notframework = lib.nixosSystem {
|
||||||
|
specialArgs = specialArgs // {
|
||||||
|
hostVars = {
|
||||||
|
hostname = "framework-12";
|
||||||
|
stateVersion = "25.05";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
modules = recursiveImport [
|
||||||
|
./base
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
27
flake.lock
generated
Normal file
27
flake.lock
generated
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1772773019,
|
||||||
|
"narHash": "sha256-E1bxHxNKfDoQUuvriG71+f+s/NT0qWkImXsYZNFFfCs=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "aca4d95fce4914b3892661bcb80b8087293536c6",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
27
flake.nix
Normal file
27
flake.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
description = "Configuration Based on the Synaptic Standard";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs =
|
||||||
|
{ nixpkgs, ... }@inputs:
|
||||||
|
let
|
||||||
|
lib = nixpkgs.lib;
|
||||||
|
|
||||||
|
supportedSystems = [ "x86_64-linux" ];
|
||||||
|
|
||||||
|
forAllSystems = apply:
|
||||||
|
lib.genAttrs
|
||||||
|
supportedSystems
|
||||||
|
(system: apply inputs.nixpkgs.legacyPackages.${system});
|
||||||
|
in
|
||||||
|
{
|
||||||
|
|
||||||
|
packages = forAllSystems (pkgs: {
|
||||||
|
});
|
||||||
|
|
||||||
|
nixosConfigurations = import ./configs.nix { inherit inputs; };
|
||||||
|
};
|
||||||
|
}
|
||||||
27
hosts/framework/framework.nix
Normal file
27
hosts/framework/framework.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
hardware.sensor.iio.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
pkgs.framework-tool
|
||||||
|
];
|
||||||
|
|
||||||
|
powerManagement.powertop.enable = true;
|
||||||
|
|
||||||
|
services.power-profiles-daemon.enable = false;
|
||||||
|
|
||||||
|
services.thermald.enable = true;
|
||||||
|
|
||||||
|
services.tlp = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||||
|
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||||
|
# CPU_ENERGY_PERF_POLICY_ON_BAT = "performance";
|
||||||
|
PLATFORM_PROFILE_ON_BAT = "low-power";
|
||||||
|
WIFI_PWR_ON_BAT = "on";
|
||||||
|
RUNTIME_PM_ON_BAT = "auto";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
25
hosts/framework/general.nix
Normal file
25
hosts/framework/general.nix
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
firefox
|
||||||
|
ungoogled-chromium
|
||||||
|
vscodium
|
||||||
|
|
||||||
|
spotify
|
||||||
|
nautilus
|
||||||
|
cloudflared
|
||||||
|
vesktop
|
||||||
|
|
||||||
|
keepassxc
|
||||||
|
btop
|
||||||
|
|
||||||
|
signal-desktop
|
||||||
|
gradia
|
||||||
|
gimp
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.obs-studio = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
23
hosts/framework/gnome.nix
Normal file
23
hosts/framework/gnome.nix
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.xserver.videoDrivers = [ "modesetting" ];
|
||||||
|
services.displayManager.gdm.enable = true;
|
||||||
|
services.desktopManager.gnome = {
|
||||||
|
enable = true;
|
||||||
|
extraGSettingsOverrides = ''
|
||||||
|
[org.gnome.mutter]
|
||||||
|
edge-tiling=true
|
||||||
|
|
||||||
|
experimental-features=['scale-monitor-framebuffer']
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
services.gnome.core-apps.enable = false;
|
||||||
|
|
||||||
|
environment.gnome.excludePackages = [ pkgs.gnome-tour ];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
gnome-terminal
|
||||||
|
];
|
||||||
|
}
|
||||||
58
hosts/framework/hardware-configuration.nix
Normal file
58
hosts/framework/hardware-configuration.nix
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
# 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"
|
||||||
|
"uas"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.kernelParams = [
|
||||||
|
"acpi_backlight=video"
|
||||||
|
"intel_iommu=on"
|
||||||
|
];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-uuid/b962ed03-4e8c-4497-8dc4-11fe93fb5491";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/FCB8-EBDD";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [
|
||||||
|
"fmask=0077"
|
||||||
|
"dmask=0077"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [
|
||||||
|
{ device = "/dev/disk/by-uuid/ab428817-6688-4f7d-a06b-6865e90a24a6"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
24
hosts/framework/networking.nix
Normal file
24
hosts/framework/networking.nix
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
services.nextdns = {
|
||||||
|
enable = false;
|
||||||
|
arguments = [
|
||||||
|
"-config"
|
||||||
|
"f57efb"
|
||||||
|
"-cache-size"
|
||||||
|
"16MB"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
powerManagement.resumeCommands = ''
|
||||||
|
systemctl try-restart nextdns
|
||||||
|
'';
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
nextdns
|
||||||
|
];
|
||||||
|
|
||||||
|
services.resolved.enable = true;
|
||||||
|
networking.networkmanager.dns = "systemd-resolved";
|
||||||
|
|
||||||
|
}
|
||||||
7
hosts/framework/niri.nix
Normal file
7
hosts/framework/niri.nix
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.niri.enable = false;
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
fuzzel
|
||||||
|
];
|
||||||
|
}
|
||||||
8
hosts/framework/steam.nix
Normal file
8
hosts/framework/steam.nix
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
#programs.steam = {
|
||||||
|
# enable = true;
|
||||||
|
# remotePlay.openFirewall = true;
|
||||||
|
# dedicatedServer.openFirewall = true;
|
||||||
|
# localNetworkGameTransfers.openFirewall = true;
|
||||||
|
#};
|
||||||
|
}
|
||||||
18
rI.nix
Normal file
18
rI.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{ lib }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) hasSuffix;
|
||||||
|
inherit (builtins) concatMap isPath filter readFileType;
|
||||||
|
|
||||||
|
expandIfFolder = elem:
|
||||||
|
if !isPath elem || readFileType elem != "directory"
|
||||||
|
then [ elem ]
|
||||||
|
else lib.filesystem.listFilesRecursive elem;
|
||||||
|
|
||||||
|
in
|
||||||
|
list: filter
|
||||||
|
# Filter out any path that doesn't look like `*.nix`. Don't forget to use
|
||||||
|
# toString to prevent copying paths to the store unnecessarily
|
||||||
|
(elem: !isPath elem || hasSuffix ".nix" (toString elem))
|
||||||
|
# Expand any folder to all the files within it.
|
||||||
|
(concatMap expandIfFolder list)
|
||||||
Reference in New Issue
Block a user