update
This commit is contained in:
parent
182ae5f58d
commit
b9258d9c40
@ -1,123 +0,0 @@
|
||||
# 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 =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# networking.hostName = "nixos"; # Define your hostname.
|
||||
# Pick only one of the below networking options.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
# networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Denver";
|
||||
|
||||
# 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.
|
||||
# };
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = 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.
|
||||
# hardware.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.errol = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
packages = with pkgs; [
|
||||
tree
|
||||
neovim
|
||||
git
|
||||
];
|
||||
};
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
# 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 = "24.05"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
41
disco.nix
Normal file
41
disco.nix
Normal file
@ -0,0 +1,41 @@
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
my-disk = {
|
||||
device = "/dev/sdb";
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
type = "EF00";
|
||||
size = "256M";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
|
||||
swap = {
|
||||
size = "8G";
|
||||
content = {
|
||||
type = "swap";
|
||||
resumeDevice = true;
|
||||
};
|
||||
};
|
||||
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
48
flake.nix
Normal file
48
flake.nix
Normal file
@ -0,0 +1,48 @@
|
||||
{
|
||||
description = "My system configuration";
|
||||
|
||||
inputs = {
|
||||
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nixvim = {
|
||||
url = "github:nix-community/nixvim";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
polymc.url = "github:PolyMC/PolyMC";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, nixpkgs-stable, home-manager, ... }@inputs:
|
||||
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
in {
|
||||
|
||||
# nixos - system hostname
|
||||
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
pkgs-stable = import nixpkgs-stable {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
inherit inputs system;
|
||||
};
|
||||
modules = [
|
||||
./nixos/configuration.nix
|
||||
inputs.nixvim.nixosModules.nixvim
|
||||
];
|
||||
};
|
||||
|
||||
homeConfigurations.amper = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
modules = [ ./home-manager/home.nix ];
|
||||
};
|
||||
};
|
||||
}
|
13
home-control/home.nix
Normal file
13
home-control/home.nix
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
|
||||
imports = [
|
||||
./zsh.nix
|
||||
./modules/bundle.nix
|
||||
];
|
||||
|
||||
home = {
|
||||
username = "errol";
|
||||
homeDirectory = "/home/errol";
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
}
|
5
home-control/modules/bundle.nix
Normal file
5
home-control/modules/bundle.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
imports = [
|
||||
./git.nix
|
||||
];
|
||||
}
|
7
home-control/modules/git.nix
Normal file
7
home-control/modules/git.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "errolsancaktar";
|
||||
userEmail = "errol@sancaktar.net";
|
||||
};
|
||||
}
|
27
home-control/modules/zsh.nix
Normal file
27
home-control/modules/zsh.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{ config, ... }: {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
shellAliases =
|
||||
let
|
||||
flakeDir = "~/nix";
|
||||
in {
|
||||
rb = "sudo nixos-rebuild switch --flake ${flakeDir}";
|
||||
upd = "nix flake update ${flakeDir}";
|
||||
upg = "sudo nixos-rebuild switch --upgrade --flake ${flakeDir}";
|
||||
|
||||
hms = "home-manager switch --flake ${flakeDir}";
|
||||
|
||||
conf = "nvim ${flakeDir}/nixos/configuration.nix";
|
||||
pkgs = "nvim ${flakeDir}/nixos/packages.nix";
|
||||
|
||||
ll = "ls -l";
|
||||
v = "nvim";
|
||||
se = "sudoedit";
|
||||
ff = "fastfetch";
|
||||
};
|
||||
};
|
||||
}
|
23
nixos/configuration.nix
Normal file
23
nixos/configuration.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{ inputs, ...}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./packages.nix
|
||||
./modules/bundle.nix
|
||||
];
|
||||
|
||||
disabledModules = [
|
||||
./modules/xserver.nix
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [ ];
|
||||
|
||||
networking.hostName = "homeControl"; # Define your hostname.
|
||||
|
||||
time.timeZone = "America/Denver"; # Set your time zone.
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8"; # Select internationalisation properties.
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ]; # Enabling flakes
|
||||
|
||||
system.stateVersion = "24.05"; # Don't change it bro
|
||||
}
|
14
nixos/modules/bluetooth.nix
Normal file
14
nixos/modules/bluetooth.nix
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
settings = {
|
||||
General = {
|
||||
Enable = "Source,Sink,Media,Socket";
|
||||
Experimental = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.blueman.enable = true;
|
||||
}
|
6
nixos/modules/bootloader.nix
Normal file
6
nixos/modules/bootloader.nix
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelParams = [ ];
|
||||
}
|
9
nixos/modules/bundle.nix
Normal file
9
nixos/modules/bundle.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
imports = [
|
||||
./bootloader.nix
|
||||
./env.nix
|
||||
./user.nix
|
||||
./virtualization.nix
|
||||
./bluetooth.nix
|
||||
];
|
||||
}
|
8
nixos/modules/env.nix
Normal file
8
nixos/modules/env.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
environment.variables = {
|
||||
EDITOR = "nvim";
|
||||
RANGER_LOAD_DEFAULT_RC = "FALSE";
|
||||
QT_QPA_PLATFORMTHEME = "qt5ct";
|
||||
GSETTINGS_BACKEND = "keyfile";
|
||||
};
|
||||
}
|
24
nixos/modules/podman.nix
Normal file
24
nixos/modules/podman.nix
Normal file
@ -0,0 +1,24 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# Enable common container config files in /etc/containers
|
||||
virtualisation.containers.enable = true;
|
||||
virtualisation = {
|
||||
podman = {
|
||||
enable = true;
|
||||
|
||||
# Create a `docker` alias for podman, to use it as a drop-in replacement
|
||||
dockerCompat = true;
|
||||
|
||||
# Required for containers under podman-compose to be able to talk to each other.
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Useful other development tools
|
||||
environment.systemPackages = with pkgs; [
|
||||
dive # look into docker image layers
|
||||
podman-tui # status of containers in the terminal
|
||||
docker-compose # start group of containers for dev
|
||||
#podman-compose # start group of containers for dev
|
||||
];
|
||||
}
|
17
nixos/modules/user.nix
Normal file
17
nixos/modules/user.nix
Normal file
@ -0,0 +1,17 @@
|
||||
{ pkgs, ... }: {
|
||||
programs.zsh.enable = true;
|
||||
|
||||
users = {
|
||||
defaultUserShell = pkgs.zsh;
|
||||
|
||||
users.amper = {
|
||||
isNormalUser = true;
|
||||
description = "Ampersand";
|
||||
extraGroups = [ "networkmanager" "wheel" "input" "libvirtd" ];
|
||||
packages = with pkgs; [];
|
||||
};
|
||||
};
|
||||
|
||||
# Enable automatic login for the user.
|
||||
services.getty.autologinUser = "amper";
|
||||
}
|
7
nixos/modules/virtualization.nix
Normal file
7
nixos/modules/virtualization.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{ pkgs-stable, ... }: {
|
||||
virtualisation.libvirtd.enable = true;
|
||||
programs.virt-manager = {
|
||||
enable = true;
|
||||
package = pkgs-stable.virt-manager;
|
||||
};
|
||||
}
|
0
nixos/modules/xserver.nix
Normal file
0
nixos/modules/xserver.nix
Normal file
101
nixos/packages.nix
Normal file
101
nixos/packages.nix
Normal file
@ -0,0 +1,101 @@
|
||||
{ pkgs, ... }: {
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
permittedInsecurePackages = ["python-2.7.18.8" "electron-25.9.0"];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
||||
# Coding stuff
|
||||
gnumake
|
||||
gcc
|
||||
nodejs
|
||||
python
|
||||
(python3.withPackages (ps: with ps; [ requests ]))
|
||||
|
||||
# CLI utils
|
||||
neofetch
|
||||
file
|
||||
tree
|
||||
wget
|
||||
git
|
||||
fastfetch
|
||||
htop
|
||||
nix-index
|
||||
unzip
|
||||
scrot
|
||||
ffmpeg
|
||||
# light
|
||||
# lux
|
||||
# mediainfo
|
||||
# ranger
|
||||
# zram-generator
|
||||
# cava
|
||||
zip
|
||||
# ntfs3g
|
||||
# yt-dlp
|
||||
brightnessctl
|
||||
# swww
|
||||
openssl
|
||||
lazygit
|
||||
bluez
|
||||
bluez-tools
|
||||
|
||||
# GUI utils
|
||||
# feh
|
||||
# imv
|
||||
# dmenu
|
||||
# screenkey
|
||||
# mako
|
||||
# gromit-mpx
|
||||
|
||||
# Xorg stuff
|
||||
#xterm
|
||||
#xclip
|
||||
#xorg.xbacklight
|
||||
|
||||
# Wayland stuff
|
||||
# xwayland
|
||||
# wl-clipboard
|
||||
# cliphist
|
||||
|
||||
# WMs and stuff
|
||||
# herbstluftwm
|
||||
# hyprland
|
||||
# seatd
|
||||
# xdg-desktop-portal-hyprland
|
||||
# polybar
|
||||
# waybar
|
||||
|
||||
# Sound
|
||||
# pipewire
|
||||
# pulseaudio
|
||||
# pamixer
|
||||
|
||||
# GPU stuff
|
||||
# amdvlk
|
||||
# rocm-opencl-icd
|
||||
# glaxnimate
|
||||
|
||||
# Screenshotting
|
||||
# grim
|
||||
# grimblast
|
||||
# slurp
|
||||
# flameshot
|
||||
# swappy
|
||||
|
||||
# Other
|
||||
home-manager
|
||||
];
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
jetbrains-mono
|
||||
noto-fonts
|
||||
noto-fonts-emoji
|
||||
twemoji-color-font
|
||||
font-awesome
|
||||
powerline-fonts
|
||||
powerline-symbols
|
||||
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" "Hack" ]; })
|
||||
];
|
||||
}
|
Loading…
Reference in New Issue
Block a user