initial commit here we are
This commit is contained in:
commit
82916ad718
59 changed files with 2155 additions and 0 deletions
21
laptop/aliases.nix
Normal file
21
laptop/aliases.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
tldr
|
||||
eza
|
||||
bat
|
||||
ripgrep
|
||||
];
|
||||
environment.shellAliases = {
|
||||
vi = "nvim";
|
||||
vim = "nvim";
|
||||
h = "tldr";
|
||||
# oxidized
|
||||
ls = "eza -l";
|
||||
cat = "bat";
|
||||
grep = "rg";
|
||||
top = "btm --color gruvbox";
|
||||
# some tools
|
||||
|
||||
};
|
||||
}
|
7
laptop/asciidoc.nix
Normal file
7
laptop/asciidoc.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs;
|
||||
[
|
||||
asciidoc-full asciidoctor
|
||||
];
|
||||
}
|
190
laptop/configuration.nix
Normal file
190
laptop/configuration.nix
Normal file
|
@ -0,0 +1,190 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./zsh.nix
|
||||
./tuigreet.nix
|
||||
./sway.nix
|
||||
./kitty.nix
|
||||
#./cosmic.nix
|
||||
./tty.nix
|
||||
./aliases.nix
|
||||
./fonts.nix
|
||||
./k8s.nix
|
||||
./tail.nix
|
||||
./asciidoc.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
algorithm = "zstd";
|
||||
};
|
||||
|
||||
# Enable all unfree hardware support.
|
||||
hardware.firmware = with pkgs; [ firmwareLinuxNonfree ];
|
||||
hardware.enableAllFirmware = true;
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
services.fwupd.enable = true;
|
||||
|
||||
services.fstrim.enable = true;
|
||||
|
||||
# Networking
|
||||
networking.networkmanager.enable = true;
|
||||
networking.hostName = "idea";
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Oslo";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
|
||||
# Enable the Desktop Environment.
|
||||
programs.steam.enable = true;
|
||||
#services.teamviewer.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
layout = "no";
|
||||
xkbVariant = "";
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
keyMap = "no";
|
||||
};
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "nb_NO.utf8";
|
||||
LC_IDENTIFICATION = "nb_NO.utf8";
|
||||
LC_MEASUREMENT = "nb_NO.utf8";
|
||||
LC_MONETARY = "nb_NO.utf8";
|
||||
LC_NAME = "nb_NO.utf8";
|
||||
LC_NUMERIC = "nb_NO.utf8";
|
||||
LC_PAPER = "nb_NO.utf8";
|
||||
LC_TELEPHONE = "nb_NO.utf8";
|
||||
LC_TIME = "nb_NO.utf8";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = false;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
# Enble flakes and other experimental features
|
||||
nix = {
|
||||
extraOptions = "experimental-features = nix-command flakes";
|
||||
package = pkgs.nixFlakes;
|
||||
};
|
||||
# Enable nix-2.15.3 for some reaseon something depends on it
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
"nix-2.15.3"
|
||||
];
|
||||
|
||||
services.emacs.enable = true;
|
||||
|
||||
# User account.
|
||||
nix.settings.trusted-users = [ "root" "geir" ];
|
||||
environment.localBinInPath = true;
|
||||
users.users.geir = {
|
||||
isNormalUser = true;
|
||||
description = "Geir Okkenhaug Jerstad";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
shell = pkgs.zsh;
|
||||
packages = with pkgs; [
|
||||
discord teamviewer evince
|
||||
# Browsers
|
||||
firefox qutebrowser
|
||||
# Monitoring tools
|
||||
htop glances bottom fwupd
|
||||
# shells & terminals
|
||||
terminator foot kitty
|
||||
starship
|
||||
nushell
|
||||
fzf
|
||||
# Multiplexers
|
||||
screen
|
||||
tmux
|
||||
zellij
|
||||
# Editors & command line text utils
|
||||
mc
|
||||
neovim
|
||||
poppler_utils
|
||||
emacs
|
||||
emacsPackages.vterm
|
||||
libvterm libtool
|
||||
magic-wormhole
|
||||
protonvpn-cli
|
||||
ytfzf
|
||||
nix-direnv
|
||||
#
|
||||
mpv
|
||||
# DevSecOps
|
||||
virt-manager
|
||||
# Audio tools
|
||||
ncpamixer
|
||||
# blog
|
||||
haunt
|
||||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
git hut unzip fastfetch
|
||||
wget curl
|
||||
neofetch inxi mlocate
|
||||
tailscale bluez-tools
|
||||
# Languages
|
||||
zig
|
||||
python3 python3Packages.pip
|
||||
guile
|
||||
go gotools golint
|
||||
rustup
|
||||
# language servers
|
||||
zls
|
||||
python3Packages.python-lsp-server
|
||||
rnix-lsp
|
||||
gopls
|
||||
luajitPackages.lua-lsp
|
||||
nodePackages.bash-language-server
|
||||
vimPlugins.cmp-nvim-lsp
|
||||
ccls
|
||||
rnix-lsp
|
||||
gdb
|
||||
# building software
|
||||
qemu
|
||||
cmake
|
||||
gcc
|
||||
bintools
|
||||
gnutar
|
||||
sccache
|
||||
ncurses
|
||||
];
|
||||
|
||||
# Open ports in the firewall.
|
||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||
networking.firewall.allowedUDPPorts = [ 22 ];
|
||||
networking.firewall.enable = true;
|
||||
system.stateVersion = "22.11";
|
||||
}
|
189
laptop/configuration.nix~
Normal file
189
laptop/configuration.nix~
Normal file
|
@ -0,0 +1,189 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./zsh.nix
|
||||
./tuigreet.nix
|
||||
./sway.nix
|
||||
./kitty.nix
|
||||
#./cosmic.nix
|
||||
./tty.nix
|
||||
./aliases.nix
|
||||
./fonts.nix
|
||||
./k8s.nix
|
||||
./tail.nix
|
||||
./asciidoc.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
algorithm = "zstd";
|
||||
};
|
||||
|
||||
# Enable all unfree hardware support.
|
||||
hardware.firmware = with pkgs; [ firmwareLinuxNonfree ];
|
||||
hardware.enableAllFirmware = true;
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
services.fwupd.enable = true;
|
||||
|
||||
services.fstrim.enable = true;
|
||||
|
||||
# Networking
|
||||
networking.networkmanager.enable = true;
|
||||
networking.hostName = "idea";
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Oslo";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
|
||||
# Enable the Desktop Environment.
|
||||
programs.steam.enable = true;
|
||||
#services.teamviewer.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
layout = "no";
|
||||
xkbVariant = "";
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
keyMap = "no";
|
||||
};
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "nb_NO.utf8";
|
||||
LC_IDENTIFICATION = "nb_NO.utf8";
|
||||
LC_MEASUREMENT = "nb_NO.utf8";
|
||||
LC_MONETARY = "nb_NO.utf8";
|
||||
LC_NAME = "nb_NO.utf8";
|
||||
LC_NUMERIC = "nb_NO.utf8";
|
||||
LC_PAPER = "nb_NO.utf8";
|
||||
LC_TELEPHONE = "nb_NO.utf8";
|
||||
LC_TIME = "nb_NO.utf8";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = false;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
# Enble flakes and other experimental features
|
||||
nix = {
|
||||
extraOptions = "experimental-features = nix-command flakes";
|
||||
package = pkgs.nixFlakes;
|
||||
};
|
||||
# Enable nix-2.15.3 for some reaseon something depends on it
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
"nix-2.15.3"
|
||||
];
|
||||
|
||||
services.emacs.enable = true;
|
||||
|
||||
# User account.
|
||||
nix.settings.trusted-users = [ "root" "geir" ];
|
||||
environment.localBinInPath = true;
|
||||
users.users.geir = {
|
||||
isNormalUser = true;
|
||||
description = "Geir Okkenhaug Jerstad";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
shell = pkgs.zsh;
|
||||
packages = with pkgs; [
|
||||
discord teamviewer evince
|
||||
# Browsers
|
||||
firefox qutebrowser
|
||||
# Monitoring tools
|
||||
htop glances bottom fwupd
|
||||
# shells & terminals
|
||||
terminator foot kitty
|
||||
starship
|
||||
nushell
|
||||
fzf
|
||||
# Multiplexers
|
||||
screen
|
||||
tmux
|
||||
zellij
|
||||
# Editors & command line text utils
|
||||
mc
|
||||
neovim
|
||||
poppler_utils
|
||||
emacs
|
||||
emacsPackages.vterm
|
||||
libvterm libtool
|
||||
magic-wormhole
|
||||
protonvpn-cli
|
||||
ytfzf
|
||||
nix-direnv
|
||||
#
|
||||
mpv
|
||||
# DevSecOps
|
||||
virt-manager
|
||||
# Audio tools
|
||||
ncpamixer
|
||||
# blog
|
||||
haunt
|
||||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
git hut unzip fastfetch
|
||||
wget curl
|
||||
neofetch inxi mlocate
|
||||
tailscale bluez-tools
|
||||
# Languages
|
||||
zig
|
||||
python3 python3Packages.pip
|
||||
guile
|
||||
go gotools golint
|
||||
rustup
|
||||
# language servers
|
||||
zls
|
||||
python3Packages.python-lsp-server
|
||||
rnix-lsp
|
||||
gopls
|
||||
luajitPackages.lua-lsp
|
||||
nodePackages.bash-language-server
|
||||
vimPlugins.cmp-nvim-lsp
|
||||
ccls
|
||||
rnix-lsp
|
||||
# building software
|
||||
qemu
|
||||
cmake
|
||||
gcc
|
||||
bintools
|
||||
gnutar
|
||||
sccache
|
||||
ncurses
|
||||
];
|
||||
|
||||
# Open ports in the firewall.
|
||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||
networking.firewall.allowedUDPPorts = [ 22 ];
|
||||
networking.firewall.enable = true;
|
||||
system.stateVersion = "22.11";
|
||||
}
|
10
laptop/fonts.nix
Normal file
10
laptop/fonts.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
fonts.packages = with pkgs; [
|
||||
# Fonts
|
||||
fira-code
|
||||
fira-mono
|
||||
fira-code-symbols
|
||||
meslo-lgs-nf
|
||||
];
|
||||
}
|
30
laptop/hardware-configuration.nix
Normal file
30
laptop/hardware-configuration.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/c00b4f87-0c38-45e8-a65e-acb63b837124";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/28E2-7988";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
9
laptop/k8s.nix
Normal file
9
laptop/k8s.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
talosctl
|
||||
kubectl
|
||||
kind
|
||||
k9s
|
||||
];
|
||||
}
|
3
laptop/k8s.nix~
Normal file
3
laptop/k8s.nix~
Normal file
|
@ -0,0 +1,3 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
}
|
7
laptop/kitty.nix
Normal file
7
laptop/kitty.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs;
|
||||
[
|
||||
kitty kitty-themes termpdfpy
|
||||
];
|
||||
}
|
1
laptop/nix-direnv.nix
Normal file
1
laptop/nix-direnv.nix
Normal file
|
@ -0,0 +1 @@
|
|||
|
29
laptop/nixvim.nix
Normal file
29
laptop/nixvim.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports = [ <nixvim_import> ]
|
||||
let
|
||||
nixvim = import (builtins.fetchGit {
|
||||
url = "https://github.com/nix-community/nixvim";
|
||||
# When using a different channel you can use `ref = "nixos-<version>"` to set it here
|
||||
});
|
||||
in
|
||||
{
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
|
||||
colorschemes.gruvbox.enable = true;
|
||||
plugins.lightline.enable = true;
|
||||
|
||||
plugins.lsp = {
|
||||
enable = true;
|
||||
|
||||
servers = {
|
||||
rust-analyzer = {
|
||||
enable = true;
|
||||
installCargo = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
9
laptop/river.nix
Normal file
9
laptop/river.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ configs, pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
river
|
||||
];
|
||||
programs.river = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
47
laptop/sway.nix
Normal file
47
laptop/sway.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
dbus-sway-environment = pkgs.writeTextFile {
|
||||
name = "dbus-sway-environment";
|
||||
destination = "/bin/dbus-sway-environment";
|
||||
executable = true;
|
||||
text = ''
|
||||
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_C URRENT_DESKTOP=sway
|
||||
systemctl --user stop pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
|
||||
systemctl --user start pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
|
||||
'';
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
sway
|
||||
dbus-sway-environment
|
||||
wayland
|
||||
xdg-utils # for opening default programs when clicking links
|
||||
glib # gsettings
|
||||
dracula-theme # gtk theme
|
||||
swaylock
|
||||
swayidle
|
||||
grim # screenshot functionality
|
||||
slurp # screenshot functionality
|
||||
wl-clipboard # wl-copy and wl-paste for copy/paste from stdin / stdout
|
||||
mako # notification system developed by swaywm maintainer
|
||||
waybar
|
||||
gammastep
|
||||
fuzzel
|
||||
];
|
||||
|
||||
# xdg-desktop-portal works by exposing a series of D-Bus interfaces
|
||||
# known as portals under a well-known name
|
||||
# (org.freedesktop.portal.Desktop) and object path
|
||||
# (/org/freedesktop/portal/desktop).
|
||||
# The portal interfaces include APIs for file access, opening URIs,
|
||||
# printing and others.
|
||||
services.dbus.enable = true;
|
||||
xdg.portal.wlr.enable = true;
|
||||
# enable sway window manager
|
||||
programs.sway = {
|
||||
enable = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
};
|
||||
}
|
9
laptop/tail.nix
Normal file
9
laptop/tail.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ pkgs, ...}:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
tailscale
|
||||
];
|
||||
|
||||
services.tailscale.enable = true;
|
||||
}
|
29
laptop/tty.nix
Normal file
29
laptop/tty.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
services.getty.greetingLine = ''\l'';
|
||||
|
||||
console = {
|
||||
earlySetup = true;
|
||||
|
||||
# Joker palette
|
||||
colors = [
|
||||
"1b161f"
|
||||
"ff5555"
|
||||
"54c6b5"
|
||||
"d5aa2a"
|
||||
"bd93f9"
|
||||
"ff79c6"
|
||||
"8be9fd"
|
||||
"bfbfbf"
|
||||
|
||||
"1b161f"
|
||||
"ff6e67"
|
||||
"5af78e"
|
||||
"ffce50"
|
||||
"caa9fa"
|
||||
"ff92d0"
|
||||
"9aedfe"
|
||||
"e6e6e6"
|
||||
];
|
||||
};
|
||||
}
|
16
laptop/tuigreet.nix
Normal file
16
laptop/tuigreet.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd sway";
|
||||
user = "geir";
|
||||
};
|
||||
};
|
||||
};
|
||||
environment.systemPackages = with pkgs;
|
||||
[
|
||||
greetd.tuigreet
|
||||
];
|
||||
}
|
15
laptop/zsh.nix
Normal file
15
laptop/zsh.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs;
|
||||
[
|
||||
zsh
|
||||
zsh-completions
|
||||
nix-zsh-completions
|
||||
starship
|
||||
direnv
|
||||
];
|
||||
|
||||
programs.zsh.enable = true;
|
||||
programs.zsh.syntaxHighlighting.enable = true;
|
||||
programs.zsh.autosuggestions.enable = true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue