#10 Reorganize Nix code
- Flake to build personal systems moved to `dotfiles/` - Flake to build silver-flame cluster moved to `homelab/local-hosts/silver-flame - Delete undercooked "digitalocean" and "iso" image builds
@ -11,6 +11,7 @@
|
||||
url = "github:nix-community/home-manager/release-24.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixgl.url = "github:nix-community/nixGL";
|
||||
nix-flatpak.url = "github:gmodena/nix-flatpak";
|
||||
stylix = {
|
||||
url = "github:danth/stylix";
|
||||
@ -25,63 +26,68 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.home-manager.follows = "home-manager";
|
||||
};
|
||||
sops-nix = {
|
||||
url = "github:Mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
deploy-rs.url = "github:serokell/deploy-rs";
|
||||
vars = {
|
||||
"joey-laptop" = {
|
||||
username = "joey";
|
||||
hostname = "joey-laptop";
|
||||
theme = "gruvbox-warm";
|
||||
wm = "hyprland";
|
||||
};
|
||||
"joey-desktop" = {
|
||||
realname = "Joey Hafner";
|
||||
username = "joey";
|
||||
hostname = "joey-desktop";
|
||||
email = "joey@jafner.net";
|
||||
};
|
||||
};
|
||||
};
|
||||
outputs = inputs@{
|
||||
nixpkgs,
|
||||
nixpkgs-unstable,
|
||||
home-manager,
|
||||
nixgl,
|
||||
plasma-manager,
|
||||
...
|
||||
}:
|
||||
let
|
||||
systemSettings = {
|
||||
system = "x86_64-linux";
|
||||
hostname = "joey-laptop";
|
||||
};
|
||||
userSettings = {
|
||||
user = "joey";
|
||||
theme = "gruvbox-warm";
|
||||
wm = "hyprland";
|
||||
};
|
||||
system = "x86_64-linux";
|
||||
lib = nixpkgs.lib;
|
||||
pkgs = import inputs.nixpkgs {
|
||||
system = systemSettings.system;
|
||||
config = { allowUnfreePredicate = (_: true); };
|
||||
inherit system;
|
||||
overlays = [ nixgl.overlay ];
|
||||
config = { allowUnfreePredicate = (_: true); };
|
||||
};
|
||||
pkgs-unstable = import nixpkgs-unstable {
|
||||
inherit system;
|
||||
overlays = [ nixgl.overlay ];
|
||||
config = { allowUnfreePredicate = (_: true); };
|
||||
};
|
||||
pkgs-unstable = nixpkgs-unstable.legacyPackages.${systemSettings.system};
|
||||
|
||||
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
iso = lib.nixosSystem {
|
||||
modules = [
|
||||
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
|
||||
"${nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix"
|
||||
./iso/server-configuration.nix
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
specialArgs = {inherit pkgs; };
|
||||
};
|
||||
${systemSettings.hostname} = lib.nixosSystem {
|
||||
joey-laptop = lib.nixosSystem {
|
||||
modules = [
|
||||
./nixos/configuration.nix
|
||||
./nixos/joey-laptop/configuration.nix
|
||||
inputs.hyprland.nixosModules.default
|
||||
inputs.stylix.nixosModules.stylix
|
||||
inputs.nix-flatpak.nixosModules.nix-flatpak
|
||||
];
|
||||
system = systemSettings.system;
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit pkgs;
|
||||
inherit pkgs-unstable;
|
||||
inherit systemSettings;
|
||||
inherit userSettings;
|
||||
inherit inputs;
|
||||
};
|
||||
};
|
||||
};
|
||||
homeConfigurations = {
|
||||
${userSettings.user} = home-manager.lib.homeManagerConfiguration {
|
||||
"joey-laptop" = home-manager.lib.homeManagerConfiguration {
|
||||
modules = [
|
||||
./home-manager/home.nix
|
||||
./home-manager/joey-laptop/home.nix
|
||||
inputs.stylix.homeManagerModules.stylix
|
||||
inputs.plasma-manager.homeManagerModules.plasma-manager
|
||||
inputs.nix-flatpak.homeManagerModules.nix-flatpak
|
||||
@ -90,8 +96,21 @@
|
||||
extraSpecialArgs = {
|
||||
inherit pkgs;
|
||||
inherit pkgs-unstable;
|
||||
inherit systemSettings;
|
||||
inherit userSettings;
|
||||
inherit inputs;
|
||||
};
|
||||
};
|
||||
"joey-desktop" = home-manager.lib.homeManagerConfiguration {
|
||||
modules = [
|
||||
./home-manager/joey-desktop/home.nix
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
inputs.stylix.homeManagerModules.stylix
|
||||
inputs.nix-flatpak.homeManagerModules.nix-flatpak
|
||||
inputs.plasma-manager.homeManagerModules.plasma-manager
|
||||
];
|
||||
inherit pkgs;
|
||||
extraSpecialArgs = {
|
||||
inherit pkgs;
|
||||
inherit pkgs-unstable;
|
||||
inherit inputs;
|
||||
};
|
||||
};
|
@ -1,4 +1,4 @@
|
||||
{ config, pkgs, pkgs-unstable, inputs, ... }:
|
||||
{ pkgs, pkgs-unstable, inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./unstable.nix
|
||||
@ -6,7 +6,7 @@
|
||||
#./scripts.nix
|
||||
];
|
||||
sops = {
|
||||
age.sshKeyPaths = [ "/home/joey/.ssh/main_id_ed25519" ];
|
||||
age.sshKeyPaths = [ "/home/${inputs.vars."joey-desktop".username}/.ssh/main_id_ed25519" ];
|
||||
defaultSopsFile = ./secrets.yaml;
|
||||
};
|
||||
stylix = {
|
||||
@ -157,10 +157,10 @@
|
||||
};
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Joey Hafner";
|
||||
userEmail = "joey@jafner.net";
|
||||
userName = "${inputs.vars."joey-desktop".realname}";
|
||||
userEmail = "${inputs.vars."joey-desktop".email}";
|
||||
extraConfig = {
|
||||
core.sshCommand = "ssh -i /home/joey/.ssh/main_id_ed25519";
|
||||
core.sshCommand = "ssh -i /home/${inputs.vars."joey-desktop".username}/.ssh/main_id_ed25519";
|
||||
};
|
||||
delta.enable = true;
|
||||
delta.options = {
|
||||
@ -194,7 +194,7 @@
|
||||
fetch = "fastfetch";
|
||||
neofetch = "fetch";
|
||||
find = ''fzf --preview "bat --color=always --style=numbers --line-range=:500 {}"'';
|
||||
hmu = "home-manager switch -b backup --flake ~/Git/Jafner.net/nix/dungeon-master/home-manager/ --impure";
|
||||
hmu = "home-manager switch -b backup --flake ~/Git/Jafner.net/dotfiles#joey-desktop --impure";
|
||||
nixgc = "nix-env --delete-generations 7d && nix-store --gc --print-dead";
|
||||
kitty = "nixGL kitty";
|
||||
fzf-ssh = "ssh $(cat ~/.ssh/profiles | fzf --height 20%)";
|
||||
@ -282,14 +282,14 @@
|
||||
Service = {
|
||||
Restart = "always";
|
||||
RestartSec = 10;
|
||||
ExecStart = "${pkgs-unstable.librespot}/bin/librespot --backend pulseaudio --system-cache /home/joey/.spotify -j";
|
||||
ExecStart = "${pkgs-unstable.librespot}/bin/librespot --backend pulseaudio --system-cache /home/${inputs.vars."joey-desktop".username}/.spotify -j";
|
||||
};
|
||||
};
|
||||
};
|
||||
home.enableNixpkgsReleaseCheck = false;
|
||||
home.preferXdgDirectories = true;
|
||||
home.username = "joey";
|
||||
home.homeDirectory = "/home/joey";
|
||||
home.username = "${inputs.vars."joey-desktop".username}";
|
||||
home.homeDirectory = "/home/${inputs.vars."joey-desktop".username}";
|
||||
home.stateVersion = "24.05";
|
||||
home.packages = with pkgs; [
|
||||
rofi rofi-rbw-wayland rbw pinentry-rofi pinentry-all
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
6
dotfiles/home-manager/joey-laptop/home.nix
Normal file
@ -0,0 +1,6 @@
|
||||
{ inputs, ... }:
|
||||
|
||||
{
|
||||
home.stateVersion = "24.05";
|
||||
imports = [ ./users/${inputs.homeConf.username}.nix ];
|
||||
}
|
Before Width: | Height: | Size: 9.6 MiB After Width: | Height: | Size: 9.6 MiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 208 KiB After Width: | Height: | Size: 208 KiB |
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
@ -1,8 +1,8 @@
|
||||
{ pkgs, userSettings, ... }:
|
||||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./wm/${userSettings.wm}/desktopEnvironment.nix
|
||||
./wm/${inputs.vars."joey-laptop".wm}/desktopEnvironment.nix
|
||||
./system.nix
|
||||
./security.nix
|
||||
./flatpak.nix
|
||||
@ -13,10 +13,10 @@
|
||||
|
||||
# Configure user
|
||||
programs.zsh.enable = true;
|
||||
users.users.${userSettings.user} = {
|
||||
users.users.${inputs.vars."joey-laptop".username} = {
|
||||
isNormalUser = true;
|
||||
shell = pkgs.zsh;
|
||||
description = "${userSettings.user}";
|
||||
description = "${inputs.vars."joey-laptop".username}";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
openssh.authorizedKeys.keys = let
|
||||
authorizedKeys = pkgs.fetchurl {
|
@ -1,4 +1,4 @@
|
||||
{ pkgs, inputs, systemSettings, ... }:
|
||||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
# Configure system packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
@ -21,7 +21,7 @@
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Configure networking
|
||||
networking.hostName = "${systemSettings.hostname}";
|
||||
networking.hostName = "${inputs.vars."joey-laptop".hostname}";
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Disable systemd's getty and autovt on tty1
|
@ -1,4 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
mako libnotify
|
||||
@ -18,7 +18,7 @@
|
||||
services.displayManager = {
|
||||
autoLogin = {
|
||||
enable = true;
|
||||
user = "joey";
|
||||
user = "${inputs.vars."joey-laptop".username}";
|
||||
};
|
||||
sddm = {
|
||||
enable = true;
|
@ -1,4 +1,4 @@
|
||||
{ pkgs, lib, ... }:
|
||||
{ pkgs, lib, inputs, ... }:
|
||||
|
||||
{
|
||||
# Configure displayManager
|
||||
@ -6,7 +6,7 @@
|
||||
services.displayManager = {
|
||||
enable = true;
|
||||
autoLogin.enable = true;
|
||||
autoLogin.user = "joey";
|
||||
autoLogin.user = "${inputs.vars."joey-laptop".username}";
|
||||
sddm = {
|
||||
enable = true;
|
||||
autoNumlock = true;
|
@ -1,6 +0,0 @@
|
||||
{ pkgs ? import <nixpkgs> { } }:
|
||||
let config = {
|
||||
imports = [ <nixpkgs/nixos/modules/virtualisation/digital-ocean-image.nix> ];
|
||||
};
|
||||
in
|
||||
(pkgs.nixos config).digitalOceanImage
|
@ -1,4 +0,0 @@
|
||||
{ pkgs ? import <nixpkgs> { } }:
|
||||
pkgs.mkShell {
|
||||
buildInputs = with pkgs; [ curl morph ];
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
{ userSettings, ... }:
|
||||
|
||||
{
|
||||
home.stateVersion = "24.05";
|
||||
imports = [ ./users/${userSettings.user}.nix ];
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
{
|
||||
network = {
|
||||
pkgs = import
|
||||
(builtins.fetchGit {
|
||||
name = "nixos-21.11-2021-12-19";
|
||||
url = "https://github.com/NixOS/nixpkgs";
|
||||
ref = "refs/heads/nixos-21.11";
|
||||
rev = "e6377ff35544226392b49fa2cf05590f9f0c4b43";
|
||||
})
|
||||
{ };
|
||||
};
|
||||
|
||||
nixie = { modulesPath, lib, name, ... }: {
|
||||
imports = lib.optional (builtins.pathExists ./do-userdata.nix) ./do-userdata.nix ++ [
|
||||
(modulesPath + "/virtualisation/digital-ocean-config.nix")
|
||||
];
|
||||
|
||||
deployment.targetHost = "198.51.100.207";
|
||||
deployment.targetUser = "root";
|
||||
|
||||
networking.hostName = name;
|
||||
|
||||
system.stateVersion = "21.11"; # Do not change lightly!
|
||||
|
||||
deployment.healthChecks = {
|
||||
http = [
|
||||
{
|
||||
scheme = "http";
|
||||
port = 80;
|
||||
path = "/";
|
||||
description = "check that nginx is running";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts.default = {
|
||||
default = true;
|
||||
locations."/".return = "200 \"Hello from Nixie!\"";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -1,413 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
];
|
||||
services = {
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
openssh = {
|
||||
enable = true;
|
||||
settings.PasswordAuthentication = false;
|
||||
settings.KbdInteractiveAuthentication = false;
|
||||
};
|
||||
printing.enable = true;
|
||||
libinput = {
|
||||
enable = true;
|
||||
mouse.naturalScrolling = true;
|
||||
touchpad.naturalScrolling = true;
|
||||
};
|
||||
flatpak = {
|
||||
enable = true;
|
||||
update.onActivation = true;
|
||||
};
|
||||
displayManager = {
|
||||
autoLogin = {
|
||||
enable = true;
|
||||
user = "admin";
|
||||
};
|
||||
sddm = {
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
fonts.packages = with pkgs; [
|
||||
font-awesome
|
||||
noto-fonts noto-fonts-cjk noto-fonts-emoji
|
||||
powerline-symbols
|
||||
(pkgs.nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; } )
|
||||
];
|
||||
home-manager.users.admin = { pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
vim
|
||||
fastfetch
|
||||
tree
|
||||
btop
|
||||
bat
|
||||
fd
|
||||
eza
|
||||
fzf
|
||||
cifs-utils
|
||||
git
|
||||
dig
|
||||
];
|
||||
programs.home-manager.enable = true;
|
||||
home.stateVersion = "24.05";
|
||||
};
|
||||
home-manager.users.joey = { pkgs, ... }: {
|
||||
home.username = "joey";
|
||||
home.homeDirectory = "/home/joey";
|
||||
home.file = {
|
||||
rbw-config = {
|
||||
target = ".config/rbw/config.json";
|
||||
text = ''
|
||||
{
|
||||
"email": "jafner425@gmail.com",
|
||||
"sso_id": null,
|
||||
"base_url": "https://bitwarden.jafner.tools",
|
||||
"identity_url": null,
|
||||
"ui_url": null,
|
||||
"notifications_url": null,
|
||||
"lock_timeout": 3600,
|
||||
"sync_interval": 3600,
|
||||
"pinentry": "pinentry-curses",
|
||||
"client_cert_path": null
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
fastfetch
|
||||
tree
|
||||
btop
|
||||
bat
|
||||
fd
|
||||
eza
|
||||
fzf-git-sh
|
||||
wl-clipboard
|
||||
killall
|
||||
pkgs-unstable.fzf
|
||||
git
|
||||
kdePackages.kdeconnect-kde
|
||||
base16-schemes
|
||||
rofi-rbw-wayland
|
||||
rbw
|
||||
pinentry-rofi
|
||||
pinentry-all
|
||||
nixd
|
||||
vesktop
|
||||
vlc
|
||||
feh
|
||||
flatpak
|
||||
];
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
git = {
|
||||
enable = true;
|
||||
userName = "Joey Hafner";
|
||||
userEmail = "joey@jafner.net";
|
||||
delta.enable = true;
|
||||
delta.options = {
|
||||
side-by-side = true;
|
||||
};
|
||||
};
|
||||
obs-studio = {
|
||||
enable = true;
|
||||
plugins = with pkgs.obs-studio-plugins; [
|
||||
obs-vaapi
|
||||
obs-vkcapture
|
||||
input-overlay
|
||||
];
|
||||
};
|
||||
rofi = { enable = true; };
|
||||
vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscodium;
|
||||
mutableExtensionsDir = true;
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
jnoortheen.nix-ide
|
||||
continue.continue
|
||||
];
|
||||
userSettings = {
|
||||
"nix.serverPath" = "nixd";
|
||||
"nix.enableLanguageServer" = true;
|
||||
"explorer.confirmDragAndDrop" = false;
|
||||
"workbench.colorTheme" = "Stylix";
|
||||
"git.autofetch" = true;
|
||||
"git.confirmSync" = false;
|
||||
"editor.fontFamily" = lib.mkForce "'Symbols Nerd Font Mono', 'PowerlineSymbols', 'DejaVu Sans Mono'";
|
||||
"git.enableSmartCommit" = true;
|
||||
};
|
||||
userTasks = {
|
||||
version = "2.0.0";
|
||||
tasks = [
|
||||
{
|
||||
type = "shell";
|
||||
label = "NixOS Rebuild Switch";
|
||||
command = "sudo nixos-rebuild switch --flake ~/Jafner.net/nix";
|
||||
problemMatcher = [];
|
||||
}
|
||||
{
|
||||
type = "shell";
|
||||
label = "Home-Manager Switch";
|
||||
command = "home-manager switch -b bak --flake ~/Jafner.net/nix";
|
||||
problemMatcher = [];
|
||||
}
|
||||
{
|
||||
label = "System Rebuild";
|
||||
dependsOn = ["NixOS Rebuild Switch" "Home-Manager Switch" ];
|
||||
dependsOrder = "sequence";
|
||||
problemMatcher = [];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
kitty = { enable = true; };
|
||||
tmux = {
|
||||
enable = true;
|
||||
newSession = true;
|
||||
shell = "$HOME/.nix-profile/bin/zsh";
|
||||
};
|
||||
zsh = {
|
||||
enable = true;
|
||||
dotDir = ".config/zsh";
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
shellAliases = {
|
||||
bat = "bat --paging=never --color=always";
|
||||
fd = "fd -Lu";
|
||||
ls = "eza";
|
||||
lt = "eza --tree";
|
||||
fetch = "fastfetch";
|
||||
neofetch = "fetch";
|
||||
find = ''fzf --preview "bat --color=always --style=numbers --line-range=:500 {}"'';
|
||||
nu = "sudo nixos-rebuild switch --flake ~/Jafner.net/nix";
|
||||
hmu = "home-manager switch -b bak --flake ~/Jafner.net/nix";
|
||||
ngls = "nix-env --profile /nix/var/nix/profiles/system --list-generations";
|
||||
ngclean = "nix-collect-garbage --delete-old";
|
||||
ngcleanboot = "/run/current-system/bin/switch-to-configuration boot";
|
||||
};
|
||||
history = {
|
||||
share = true;
|
||||
save = 10000;
|
||||
size = 10000;
|
||||
expireDuplicatesFirst = false;
|
||||
extended = false;
|
||||
ignoreAllDups = false;
|
||||
ignoreDups = true;
|
||||
};
|
||||
initExtra = ''
|
||||
bindkey '^[[1;5A' history-search-backward # Ctrl+Up-arrow
|
||||
bindkey '^[[1;5B' history-search-forward # Ctrl+Down-arrow
|
||||
bindkey '^[[1;5D' backward-word # Ctrl+Left-arrow
|
||||
bindkey '^[[1;5C' forward-word # Ctrl+Right-arrow
|
||||
bindkey '^[[H' beginning-of-line # Home
|
||||
bindkey '^[[F' end-of-line # End
|
||||
bindkey '^[w' kill-region # Delete
|
||||
bindkey '^I^I' autosuggest-accept # Tab, Tab
|
||||
bindkey '^[' autosuggest-clear # Esc
|
||||
_fzf_compgen_path() {
|
||||
fd --hidden --exclude .git . "$1"
|
||||
}
|
||||
_fzf_compgen_dir() {
|
||||
fd --hidden --exclude .git . "$1"
|
||||
}
|
||||
eval "$(~/.nix-profile/bin/fzf --zsh)"
|
||||
source ${pkgs.fzf-git-sh}/share/fzf-git-sh/fzf-git.sh
|
||||
'';
|
||||
};
|
||||
eza = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
git = true;
|
||||
extraOptions = [
|
||||
"--color=always"
|
||||
"--long"
|
||||
"--icons=always"
|
||||
"--no-time"
|
||||
"--no-user"
|
||||
];
|
||||
};
|
||||
vim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
settings = {
|
||||
copyindent = true;
|
||||
relativenumber = true;
|
||||
expandtab = true;
|
||||
tabstop = 2;
|
||||
};
|
||||
extraConfig = ''
|
||||
set nocompatible
|
||||
filetype on
|
||||
filetype plugin on
|
||||
filetype indent on
|
||||
syntax on
|
||||
set cursorline
|
||||
set wildmenu
|
||||
set wildmode=list:longest
|
||||
'';
|
||||
};
|
||||
fzf = {
|
||||
enable = true;
|
||||
package = pkgs-unstable.fzf;
|
||||
};
|
||||
};
|
||||
services = {
|
||||
flatpak = {
|
||||
enable = true;
|
||||
uninstallUnmanaged = true;
|
||||
packages = [
|
||||
{ appId = "io.github.zen_browser.zen"; origin = "flathub"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
stylix = {
|
||||
enable = true;
|
||||
autoEnable = true;
|
||||
polarity = "dark";
|
||||
targets {
|
||||
wofi.enable = true;
|
||||
waybar = {
|
||||
enableLeftBackColors = true;
|
||||
enableCenterBackColors = true;
|
||||
enableRightBackColors = true;
|
||||
};
|
||||
};
|
||||
fonts = {
|
||||
monospace = {
|
||||
name = "DejaVu Sans Mono";
|
||||
package = pkgs.dejavu_fonts;
|
||||
};
|
||||
serif = {
|
||||
name = "DejaVu Serif";
|
||||
package = pkgs.dejavu_fonts;
|
||||
};
|
||||
sansSerif = {
|
||||
name = "DejaVu Sans";
|
||||
package = pkgs.dejavu_fonts;
|
||||
};
|
||||
emoji = {
|
||||
name = "Noto Color Emoji";
|
||||
package = pkgs.noto-fonts-color-emoji;
|
||||
};
|
||||
sizes = {
|
||||
terminal = 14;
|
||||
applications = 12;
|
||||
popups = 12;
|
||||
desktop = 12;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.stateVersion = "24.05";
|
||||
};
|
||||
users.users = {
|
||||
admin = {
|
||||
isNormalUser = true;
|
||||
shell = pkgs.zsh;
|
||||
description = "${userSettings.user}";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
openssh.authorizedKeys.keys = let
|
||||
authorizedKeys = pkgs.fetchurl {
|
||||
url = "https://github.com/Jafner.keys";
|
||||
sha256 = "1i3Vs6mPPl965g3sRmbXGzx6zQBs5geBCgNx2zfpjF4=";
|
||||
};
|
||||
in pkgs.lib.splitString "\n" (builtins.readFile authorizedKeys);
|
||||
};
|
||||
joey = {
|
||||
isNormalUser = true;
|
||||
shell = pkgs.zsh;
|
||||
description = "${userSettings.user}";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
openssh.authorizedKeys.keys = let
|
||||
authorizedKeys = pkgs.fetchurl {
|
||||
url = "https://github.com/Jafner.keys";
|
||||
sha256 = "1i3Vs6mPPl965g3sRmbXGzx6zQBs5geBCgNx2zfpjF4=";
|
||||
};
|
||||
in pkgs.lib.splitString "\n" (builtins.readFile authorizedKeys);
|
||||
};
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
mako
|
||||
libnotify
|
||||
swww
|
||||
wofi
|
||||
polkit-kde-agent
|
||||
xfce.thunar
|
||||
( writeShellScriptBin "nix-installer" ''
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
if [ "$(id -u)" -eq 0 ]; then
|
||||
echo "$ERROR! $(basename "$0") should be run as a regular user"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -d "$HOME/Jafner.net/.git ]; then
|
||||
git clone https://gitea.jafner.tools "$HOME/Jafner.net"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
sudo nixos-install --flake "$HOME/Jafner.net/nix"
|
||||
'' )
|
||||
];
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
networking = {
|
||||
hostName = "${systemSettings.hostname}";
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
security = {
|
||||
sudo = {
|
||||
enable = true;
|
||||
extraRules = [{
|
||||
commands = [
|
||||
{
|
||||
command = "ALL";
|
||||
options = [ "NOPASSWD" ];
|
||||
}
|
||||
];
|
||||
groups = [ "wheel" ];
|
||||
}];
|
||||
};
|
||||
rtkit.enable = true;
|
||||
};
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
wlr.enable = true;
|
||||
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
|
||||
};
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
};
|
||||
systemd.services = {
|
||||
"getty@tty1".enable = false;
|
||||
"autovt@tty1".enable = false;
|
||||
};
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
hardware.pulseaudio.enable = false;
|
||||
# DO NOT CHANGE
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
|
@ -1,107 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
nixpkgs = {
|
||||
hostPlatform = "x86_64-linux";
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
imports = [ ];
|
||||
services = {
|
||||
openssh = {
|
||||
enable = true;
|
||||
settings.PasswordAuthentication = false;
|
||||
settings.KbdInteractiveAuthentication = false;
|
||||
};
|
||||
};
|
||||
home-manager.users.admin = { pkgs, ... }: {
|
||||
home.packages = with pkgs; [ ];
|
||||
programs.home-manager.enable = true;
|
||||
home.stateVersion = "24.05";
|
||||
};
|
||||
users.users = {
|
||||
admin = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
openssh.authorizedKeys.keys = let
|
||||
authorizedKeys = pkgs.fetchurl {
|
||||
url = "https://github.com/Jafner.keys";
|
||||
sha256 = "1i3Vs6mPPl965g3sRmbXGzx6zQBs5geBCgNx2zfpjF4=";
|
||||
};
|
||||
in pkgs.lib.splitString "\n" (builtins.readFile authorizedKeys);
|
||||
};
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
fastfetch
|
||||
tree
|
||||
btop
|
||||
bat
|
||||
fd
|
||||
eza
|
||||
fzf
|
||||
cifs-utils
|
||||
dig
|
||||
git
|
||||
( writeShellScriptBin "nix-installer" ''
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
if [ "$(id -u)" -eq 0 ]; then
|
||||
echo "$ERROR! $(basename "$0") should be run as a regular user"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -d "$HOME/Jafner.net/.git" ]; then
|
||||
git clone https://gitea.jafner.tools "$HOME/Jafner.net"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
sudo nixos-install --flake "$HOME/Jafner.net/nix"
|
||||
'' )
|
||||
];
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
networking = {
|
||||
wireless = { enable = false; };
|
||||
hostName = "nixos-installer";
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
security = {
|
||||
sudo = {
|
||||
enable = true;
|
||||
extraRules = [{
|
||||
commands = [
|
||||
{
|
||||
command = "ALL";
|
||||
options = [ "NOPASSWD" ];
|
||||
}
|
||||
];
|
||||
groups = [ "wheel" ];
|
||||
}];
|
||||
};
|
||||
rtkit.enable = true;
|
||||
};
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
};
|
||||
systemd.services = {
|
||||
"getty@tty1".enable = false;
|
||||
"autovt@tty1".enable = false;
|
||||
};
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
# DO NOT CHANGE
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
|