Merge branch 'main' of github.com:FredzyW/nix

This commit is contained in:
fwastring 2025-01-28 12:41:51 +01:00
commit 5ca7a88213
18 changed files with 571 additions and 69 deletions

View file

@ -12,7 +12,7 @@ fi
xrdb -merge ~/.Xresources
setxkbmap -option caps:swapescape
feh --bg-scale ~/nix/wallpapers/inverted.png
feh --bg-scale ~/nix/wallpapers/blue.png
dwmblocks &
dunst &

View file

@ -12,7 +12,7 @@ fi
xrdb -merge ~/.Xresources
setxkbmap -option caps:swapescape
feh --bg-center ~/nix/wallpapers/inverted.png
feh --bg-center ~/nix/wallpapers/blue.png
dwmblocks &
dunst &

View file

@ -22,7 +22,6 @@
nix.nixPath = ["/etc/nix/path"];
users.defaultUserShell = pkgs.bash;
documentation.man.generateCaches = false;
# systemd.services.NetworkManager-wait-online.enable = lib.mkForce false;
programs.fish.enable = true;
programs.bash = {
interactiveShellInit = ''
@ -76,9 +75,8 @@
fonts.packages = with pkgs; [
(nerdfonts.override {
fonts = [
"ComicShannsMono"
"Hack"
"FiraCode"
"Iosevka"
];
})
];
@ -97,8 +95,6 @@
LC_TIME = "sv_SE.UTF-8";
};
# boot.loader.systemd-boot.enable = true;
# boot.loader.efi.canTouchEfiVariables = true;
boot.loader = {
efi = {
canTouchEfiVariables = false;
@ -119,15 +115,6 @@
nano
git
openssh
# (
# catppuccin-sddm.override {
# flavor = "mocha";
# font = "ComicShannsMono Nerd Font Bold";
# fontSize = "17";
# background = "${../wallpapers/inverted.png}";
# loginBackground = true;
# }
# )
];

View file

@ -15,7 +15,6 @@
../shared/rofi.nix
../shared/kitty.nix
../shared/alacritty.nix
# ../shared/dunst.nix
../shared/tmux.nix
../shared/vim.nix
../shared/fish.nix
@ -24,26 +23,16 @@
../shared/firefox.nix
../shared/zathura.nix
../shared/lazygit.nix
# ../shared/spotifyd.nix
../shared/ssh.nix
../shared/aerc.nix
../shared/rbw.nix
../shared/oh-my-posh.nix
../shared/mpv.nix
];
nixpkgs = {
overlays = [];
config = {
# allowUnfree = false;
# allowUnfreePredicate = _: false;
allowUnfree = true;
allowUnfreePredicate = _: true;
permittedInsecurePackages = [
"electron-25.9.0"
"electron-19.1.9"
"nix-2.16.2"
];
};
};
@ -67,51 +56,46 @@
networkmanager
fd
bat
appimage-run
bluez
bluez-tools
betterlockscreen
unstable.betterlockscreen
tmux
yt-dlp
unstable.fzf
eza
btop
thttpd
xcolor
beets
openssl
dig
jq
# Dev
unstable.arduino-cli
conda
kaggle
unstable.cargo
unstable.rustc
cargo-generate
unstable.deno
unstable.hugo
unstable.logstash
ngrok
tailwindcss
nodejs_22
gleam
gh-f
gh
yarn
plantuml
go
jq
dotnetCorePackages.sdk_8_0_3xx
templ
#Tools
qrencode
air
k9s
git
lazydocker
air
templ
ranger
tesseract4
k9s
kubectl
ngrok
zrok
graphviz
clang-tools
#LSP
roslyn
roslyn-ls
python312Packages.python-lsp-server
arduino-language-server
yaml-language-server
nil
jdt-language-server
@ -127,15 +111,9 @@
gopls
rust-analyzer
# Geography
geos
# UI
fooyin
rofi-bluetooth
pastel
unstable.rmpc
mpd
imagemagick
#VPN
@ -151,7 +129,7 @@
brightnessctl
dunst
# Documentas
# Documents
ripgrep
grc
texliveFull
@ -159,16 +137,16 @@
poppler_utils
#Desktop
unstable.feishin
firefox
libreoffice
unstable.signal-desktop
kompare
pinta
zathura
firefox
vial
thunderbird
alacritty
neovim
unstable.neovim
fastfetch
lazygit
byzanz
@ -177,7 +155,6 @@
# Utils
speedcrunch
termusic
#Unfree
discord

157
config/lill-home.nix Normal file
View file

@ -0,0 +1,157 @@
# This is your home-manager configuration file
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
{
inputs,
lib,
config,
pkgs,
myhostname,
...
}: {
imports = [
../shared/dwm.nix
../shared/dmenu.nix
../shared/kitty.nix
../shared/alacritty.nix
../shared/tmux.nix
../shared/fish.nix
../shared/git.nix
../shared/nixpkgs.nix
../shared/firefox.nix
../shared/zathura.nix
../shared/lazygit.nix
../shared/ssh.nix
../shared/oh-my-posh.nix
];
nixpkgs = {
overlays = [];
config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
};
};
home.packages = with pkgs; [
# System
xsel
unzip
zip
wget
alsa-utils
upower
gcc
gnumake
cmake
arion
htop
pavucontrol
procps
openssh
networkmanager
fd
bat
bluez
bluez-tools
unstable.betterlockscreen
tmux
unstable.fzf
eza
btop
thttpd
xcolor
openssl
dig
jq
# Dev
unstable.hugo
tailwindcss
nodejs_22
go
#Tools
qrencode
air
git
lazydocker
kubectl
#LSP
roslyn
roslyn-ls
python312Packages.python-lsp-server
yaml-language-server
nil
jdt-language-server
texlab
marksman
nodePackages_latest.bash-language-server
typescript
nodePackages_latest.typescript-language-server
nodePackages_latest.vls
nodePackages_latest.volar
lua-language-server
tree-sitter
gopls
rust-analyzer
# UI
pastel
imagemagick
#VPN
openvpn
networkmanagerapplet
networkmanager-l2tp
strongswan
# Display
scrot
xbanish
feh
brightnessctl
dunst
# Documents
ripgrep
grc
# texliveFull
pandoc
poppler_utils
#Desktop
unstable.feishin
firefox
unstable.signal-desktop
pinta
zathura
thunderbird
alacritty
unstable.neovim
fastfetch
lazygit
byzanz
remmina
# Utils
speedcrunch
#Unfree
discord
];
programs.home-manager.enable = true;
programs.fish.enable = true;
programs.man.generateCaches = false;
xsession.enable = true;
xsession.windowManager.command = if myhostname == "laptop" then "/home/fw/nix/.xinitrc.laptop" else if myhostname == "jobb" then "/home/fw/nix/.xinitrc.jobb" else "/home/fw/nix/.xinitrc";
home.username = "fw";
home.homeDirectory = "/home/fw";
home.stateVersion = "23.11"; # Did you read the comment?
systemd.user.startServices = "sd-switch";
}

View file

@ -25,7 +25,7 @@
overlay-unstable = final: prev: {
unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = false;
config.allowUnfree = true;
};
};
overlay-fw-pkgs = final: prev: {
@ -72,6 +72,13 @@
};
modules = [./maskiner/work-desktop/configuration.nix];
};
lillen = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
myhostname = "lillen";
};
modules = [./maskiner/lillen/configuration.nix];
};
};
# Standalone home-manager configuration entrypoint
@ -128,6 +135,19 @@
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-fw-pkgs ]; })
];
};
"fw@lillen" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {
inherit inputs outputs;
myhostname = "lillen";
};
# > Our main home-manager configuration file <
modules = [
./config/home.nix
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-fw-pkgs ]; })
];
};
};
};
}

40
jobb/users.nix Normal file
View file

@ -0,0 +1,40 @@
{ config
, pkgs
, ...
}: {
# TODO: Configure your system-wide user settings (groups, etc), add more users as needed.
users = {
defaultUserShell = pkgs.bash;
groups = {
ios = {};
};
users = {
fw = {
initialPassword = "password";
isNormalUser = true;
description = "Fredrik Wastring";
extraGroups = [
"networkmanager"
"wheel"
"audio"
"docker"
"input"
];
openssh.authorizedKeys = {
keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDALsdpwvC0w/Aj+1fWtzJyyWoUrGkdh8o2thVHeQQBNo0D7cmVberYmi4Cv9gWGX6PaElrnOl0KRdGyro2wxOYokSxgk2VgWW67BFITAQAbKyG2NhXXPbhb4jccDo7WH7TtOG8IofuJTPRu1Duda6k4RN0I0CkyAN6LGX+zy49cq0qKf9ijXYhCDYNih3+Fu/ig0aW/SYmsVoUl2VFTWdI5x5/wLvIjTEZhmAtYIeYADaLnom356cFrUysZa++FUujQAz3Ow236BvP95XZdTsqvfWNZFNIpC9VYF72JeIDCs5wDIr0GFmanF2On1nar+jJpoOE8SdHt357p5g/PqXV5TisN2xQRkqVwO9tWtMl4sF84jA4ULnY2gQWv9jErMxymUQ1IwuPUzDDlbRHCtfexAtkBy7wv6xslKAzG1QahvF/btNs5Caj3LN31rgAuxyooCbKGKTeBP3kHPKcz1iupgidfbO/QqVXBRQJTEdGyAKa8hVmLQZZPC/XUhxESAk= fw@fw-nix"
];
};
};
max = {
initialPassword = "password";
isNormalUser = true;
description = "Max Huldin";
extraGroups = [
"audio"
"docker"
];
};
};
};
}

View file

@ -0,0 +1,41 @@
# This is your system's configuration file.
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
{
inputs,
lib,
config,
pkgs,
myhostname,
...
}: {
# You can import other NixOS modules here
imports = [
./hardware-configuration.nix
../../config/base.nix
../../config/users.nix
];
networking.hostName = myhostname;
environment.systemPackages = with pkgs; [
];
services.xserver.dpi = 140;
services = {
openssh = {
enable = true;
ports = [55504];
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
X11Forwarding = true;
};
extraConfig = ''
AllowUsers fw
'';
};
};
system.stateVersion = "23.11";
}

View file

@ -0,0 +1,100 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "nixos"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "Europe/Stockholm";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "sv_SE.UTF-8";
LC_IDENTIFICATION = "sv_SE.UTF-8";
LC_MEASUREMENT = "sv_SE.UTF-8";
LC_MONETARY = "sv_SE.UTF-8";
LC_NAME = "sv_SE.UTF-8";
LC_NUMERIC = "sv_SE.UTF-8";
LC_PAPER = "sv_SE.UTF-8";
LC_TELEPHONE = "sv_SE.UTF-8";
LC_TIME = "sv_SE.UTF-8";
};
# Configure keymap in X11
services.xserver.xkb = {
layout = "se";
variant = "";
};
# Configure console keymap
console.keyMap = "sv-latin1";
# Define a user account. Don't forget to set a password with passwd.
users.users.fw = {
isNormalUser = true;
description = "Fredrik Wastring";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [];
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# 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
git
];
# 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;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment?
}

View file

@ -0,0 +1,41 @@
# 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" "ahci" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/e6dc4f13-d85c-44a0-89ae-d8bbe111bd5c";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/AF48-6246";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/4eb1a6f5-2c5d-4bf1-82d0-797bf2839c52"; }
];
# 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.enp4s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -15,6 +15,14 @@
../../config/users.nix
];
environment.systemPackages = with pkgs; [
kubectl
azure-cli
];
networking.hostName = myhostname;
services.xserver.dpi = 140;

View file

@ -0,0 +1,101 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "nixos"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "Europe/Stockholm";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "sv_SE.UTF-8";
LC_IDENTIFICATION = "sv_SE.UTF-8";
LC_MEASUREMENT = "sv_SE.UTF-8";
LC_MONETARY = "sv_SE.UTF-8";
LC_NAME = "sv_SE.UTF-8";
LC_NUMERIC = "sv_SE.UTF-8";
LC_PAPER = "sv_SE.UTF-8";
LC_TELEPHONE = "sv_SE.UTF-8";
LC_TIME = "sv_SE.UTF-8";
};
# Configure keymap in X11
services.xserver.xkb = {
layout = "se";
variant = "";
};
# Configure console keymap
console.keyMap = "sv-latin1";
# Define a user account. Don't forget to set a password with passwd.
users.users.fw = {
isNormalUser = true;
description = "Fredrik Wastring";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [];
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# 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
git
ssh
];
# 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;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.11"; # Did you read the comment?
}

View file

@ -8,23 +8,25 @@
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "nvme" "xhci_pci" "firewire_ohci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/54b2d5d8-d0cf-4aa2-a92a-7128abc98a85";
{ device = "/dev/disk/by-uuid/ab96fcd1-cab1-43e1-aae2-161bd088bb46";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/C1AA-0689";
{ device = "/dev/disk/by-uuid/3F89-6CDD";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices = [ ];
swapDevices =
[ { device = "/dev/disk/by-uuid/5b889d43-0313-4fa2-ac22-5e303a3efb5b"; }
];
# 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

View file

@ -39,6 +39,7 @@
];
shellAbbrs = {
homec="nvim ~/nix/config/home.nix";
n="eza -l --no-time --no-permissions --no-user";
ls="eza -l --no-time --no-permissions --no-user";
dev="nix develop --command fish";
spot="steam-run ~/program/spotify_player";

View file

@ -4,11 +4,13 @@
enable = true;
font = if myhostname == "laptop" then {
# name = "Iosevka Nerd Font Bold";
name = "ComicShannsMono Nerd Font Bold";
size = 20;
# name = "ComicShannsMono Nerd Font Bold";
name = "Hack Nerd Font Mono Bold";
size = 15;
} else {
# name = "Iosevka Nerd Font Bold";
name = "ComicShannsMono Nerd Font Bold";
# name = "ComicShannsMono Nerd Font Bold";
name = "Hack Nerd Font Mono Bold";
size = 13;
};
shellIntegration = {

16
shared/openssh.nix Normal file
View file

@ -0,0 +1,16 @@
{ config, pkgs, ...}:
{
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
settings = {
AuthenticationMethods = "publickey password";
TrustedUserCAKeys = "/etc/ssh/ssh_ca.pub";
Banner = "none";
PasswordAuthentication = true;
# PasswordAuthentication = false;
PubKeyAuthentication = true;
Port = 22;
};
};
}

9
shared/ranger.nix Normal file
View file

@ -0,0 +1,9 @@
{ pkgs, lib, ... }:
{
programs.firefox = {
enable = true;
extraConfig = ''
set colorscheme dracula
'';
};
}

BIN
wallpapers/blue.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB