Several hosts first try
This commit is contained in:
@@ -15,18 +15,34 @@
|
|||||||
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
|
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./configuration.nix
|
./hosts/nixos
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
users.ulve = import ./home.nix;
|
users.ulve = import ./hosts/nixos/home.nix;
|
||||||
backupFileExtension = "backup";
|
backupFileExtension = "backup";
|
||||||
extraSpecialArgs = { inherit herdr; };
|
extraSpecialArgs = { inherit herdr; };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nixosConfigurations.macnix = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "aarch64-linux";
|
||||||
|
modules = [
|
||||||
|
./hosts/macnix
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager = {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
users.ulve = import ./hosts/macnix/home.nix;
|
||||||
|
backupFileExtension = "backup";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ./hardware-configuration.nix ];
|
||||||
|
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
networking.hostName = "macnix";
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
time.timeZone = "Europe/Stockholm";
|
||||||
|
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
console.keyMap = "sv-latin1";
|
||||||
|
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
X11Forwarding = false;
|
||||||
|
PermitRootLogin = "no";
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
};
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users."ulve" = {
|
||||||
|
isNormalUser = true;
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICpiU4gStAtrJOBSkQA2YJh98fpWPpxWtWgwAGzVa/wc johansson.olov@gmail.com"
|
||||||
|
];
|
||||||
|
description = "ulve";
|
||||||
|
extraGroups = [ "networkmanager" "wheel" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
security.polkit.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
wget
|
||||||
|
curl
|
||||||
|
git
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
nix.gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 14d";
|
||||||
|
};
|
||||||
|
nix.settings.auto-optimise-store = true;
|
||||||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
|
system.stateVersion = "26.05";
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
# 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 = [ ];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "ehci_pci" "xhci_pci" "usbhid" "sr_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/db8f8871-6d7d-4e15-b65d-87f44e5e8dd5";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/C375-5622";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "umask=0077" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices =
|
||||||
|
[ { device = "/dev/disk/by-uuid/5192523e-a21c-4223-9ee3-a5150213b479"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
||||||
|
hardware.parallels.enable = true;
|
||||||
|
nixpkgs.config.allowUnfreePackages = [ "prl-tools" ];
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{config, pkgs, ...}:
|
||||||
|
{
|
||||||
|
imports = [ ../../modules/home-common.nix ];
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
{config, pkgs, herdr, ...}:
|
||||||
|
{
|
||||||
|
imports = [ ../../modules/home-common.nix ../../modules/niri.nix ];
|
||||||
|
|
||||||
|
niri.useNoctalia = true;
|
||||||
|
|
||||||
|
home.sessionVariables = {
|
||||||
|
NIXOS_OZONE_WL = "1";
|
||||||
|
};
|
||||||
|
|
||||||
|
# ── Config files ─────────────────────────────────────────────────────────────
|
||||||
|
xdg.dataFile."applications/switch-wallpaper.desktop".source = ../../config/applications/switch-wallpaper.desktop;
|
||||||
|
xdg.dataFile."applications/signal.desktop".source = ../../config/applications/signal.desktop;
|
||||||
|
xdg.dataFile."applications/vesktop.desktop".source = ../../config/applications/vesktop.desktop;
|
||||||
|
xdg.dataFile."applications/steam.desktop".source = ../../config/applications/steam.desktop;
|
||||||
|
|
||||||
|
# ── Packages ─────────────────────────────────────────────────────────────────
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
herdr.packages.${pkgs.system}.default # wallpaper manager
|
||||||
|
brave # browser
|
||||||
|
teams-for-linux # teams
|
||||||
|
|
||||||
|
# terminal
|
||||||
|
foot # terminal
|
||||||
|
|
||||||
|
# file managers
|
||||||
|
thunar # gui file manager
|
||||||
|
|
||||||
|
# messaging
|
||||||
|
telegram-desktop
|
||||||
|
signal-desktop
|
||||||
|
vesktop
|
||||||
|
karere
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,10 +1,5 @@
|
|||||||
{config, pkgs, herdr, ...}:
|
{config, pkgs, ...}:
|
||||||
{
|
{
|
||||||
imports = [ ./niri.nix ];
|
|
||||||
|
|
||||||
niri.useNoctalia = true;
|
|
||||||
|
|
||||||
# ── Identity ────────────────────────────────────────────────────────────────
|
|
||||||
home.username = "ulve";
|
home.username = "ulve";
|
||||||
home.homeDirectory = "/home/ulve";
|
home.homeDirectory = "/home/ulve";
|
||||||
home.stateVersion = "26.05";
|
home.stateVersion = "26.05";
|
||||||
@@ -195,7 +190,6 @@
|
|||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
_ZO_FZF_OPTS = "--preview 'eza --tree --level=2 --color=always {2..}' --preview-window=right:40%";
|
_ZO_FZF_OPTS = "--preview 'eza --tree --level=2 --color=always {2..}' --preview-window=right:40%";
|
||||||
NIX_BUILD_SHELL = "bash";
|
NIX_BUILD_SHELL = "bash";
|
||||||
NIXOS_OZONE_WL = "1";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# ── Git ─────────────────────────────────────────────────────────────────────
|
# ── Git ─────────────────────────────────────────────────────────────────────
|
||||||
@@ -257,29 +251,20 @@
|
|||||||
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos-dotfiles/config/nvim";
|
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos-dotfiles/config/nvim";
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.dataFile."applications/switch-wallpaper.desktop".source = ./config/applications/switch-wallpaper.desktop;
|
|
||||||
xdg.dataFile."applications/signal.desktop".source = ./config/applications/signal.desktop;
|
|
||||||
xdg.dataFile."applications/vesktop.desktop".source = ./config/applications/vesktop.desktop;
|
|
||||||
xdg.dataFile."applications/steam.desktop".source = ./config/applications/steam.desktop;
|
|
||||||
|
|
||||||
# ── Packages ─────────────────────────────────────────────────────────────────
|
# ── Packages ─────────────────────────────────────────────────────────────────
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# general
|
# general
|
||||||
herdr.packages.${pkgs.system}.default # wallpaper manager
|
|
||||||
claude-code # ai coding assistant
|
claude-code # ai coding assistant
|
||||||
azure-cli # az cli
|
azure-cli # az cli
|
||||||
git-credential-manager # git credential helper (azure devops PAT)
|
git-credential-manager # git credential helper (azure devops PAT)
|
||||||
pass # password store (used by GCM gpg backend)
|
pass # password store (used by GCM gpg backend)
|
||||||
brave # browser
|
|
||||||
fastfetch # vanity
|
fastfetch # vanity
|
||||||
jq # json processor
|
jq # json processor
|
||||||
powershell # yes
|
powershell # yes
|
||||||
teams-for-linux # teams
|
|
||||||
nh # nix helper
|
nh # nix helper
|
||||||
unzip # compression
|
unzip # compression
|
||||||
|
|
||||||
# terminal
|
# terminal
|
||||||
foot # terminal
|
|
||||||
tmux # terminal multiplexer
|
tmux # terminal multiplexer
|
||||||
btop # resource monitor
|
btop # resource monitor
|
||||||
fd # fast find alternative
|
fd # fast find alternative
|
||||||
@@ -288,10 +273,10 @@
|
|||||||
dust # intuitive disk usage
|
dust # intuitive disk usage
|
||||||
lsof # list open files
|
lsof # list open files
|
||||||
asciinema # terminal recording
|
asciinema # terminal recording
|
||||||
|
kew # terminal music player
|
||||||
|
|
||||||
# file managers
|
# file managers
|
||||||
yazi # terminal file manager
|
yazi # terminal file manager
|
||||||
thunar # gui file manager
|
|
||||||
|
|
||||||
# editors
|
# editors
|
||||||
neovim # editor
|
neovim # editor
|
||||||
@@ -299,9 +284,6 @@
|
|||||||
# compilers / runtimes
|
# compilers / runtimes
|
||||||
gcc # c compiler (needed by treesitter)
|
gcc # c compiler (needed by treesitter)
|
||||||
|
|
||||||
# music
|
|
||||||
kew
|
|
||||||
|
|
||||||
# nvim: lsp servers
|
# nvim: lsp servers
|
||||||
tree-sitter # parser generator (nvim)
|
tree-sitter # parser generator (nvim)
|
||||||
nil # language server for nix
|
nil # language server for nix
|
||||||
@@ -315,11 +297,5 @@
|
|||||||
shfmt # formatter: bash/sh
|
shfmt # formatter: bash/sh
|
||||||
lua54Packages.luacheck # linter: lua
|
lua54Packages.luacheck # linter: lua
|
||||||
shellcheck # linter: bash/sh
|
shellcheck # linter: bash/sh
|
||||||
|
|
||||||
# messaging
|
|
||||||
telegram-desktop
|
|
||||||
signal-desktop
|
|
||||||
vesktop
|
|
||||||
karere
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
xdg.configFile."niri" = {
|
xdg.configFile."niri" = {
|
||||||
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos-dotfiles/config/niri";
|
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos-dotfiles/config/niri";
|
||||||
};
|
};
|
||||||
xdg.configFile."foot".source = ./config/foot;
|
xdg.configFile."foot".source = ../config/foot;
|
||||||
|
|
||||||
systemd.user.services.xwayland-satellite = {
|
systemd.user.services.xwayland-satellite = {
|
||||||
Unit = {
|
Unit = {
|
||||||
@@ -52,19 +52,19 @@
|
|||||||
|
|
||||||
# ── Non-noctalia ─────────────────────────────────────────────────────────────
|
# ── Non-noctalia ─────────────────────────────────────────────────────────────
|
||||||
(lib.mkIf (!useNoctalia) {
|
(lib.mkIf (!useNoctalia) {
|
||||||
xdg.configFile."waybar".source = ./config/waybar;
|
xdg.configFile."waybar".source = ../config/waybar;
|
||||||
xdg.configFile."fuzzel/fuzzel.ini".source = ./config/fuzzel/fuzzel.ini;
|
xdg.configFile."fuzzel/fuzzel.ini".source = ../config/fuzzel/fuzzel.ini;
|
||||||
|
|
||||||
home.file.".local/bin/wallpaper.sh" = {
|
home.file.".local/bin/wallpaper.sh" = {
|
||||||
source = ./config/niri/wallpaper.sh;
|
source = ../config/niri/wallpaper.sh;
|
||||||
executable = true;
|
executable = true;
|
||||||
};
|
};
|
||||||
home.file.".local/bin/waybar-network.sh" = {
|
home.file.".local/bin/waybar-network.sh" = {
|
||||||
source = ./config/waybar/network.sh;
|
source = ../config/waybar/network.sh;
|
||||||
executable = true;
|
executable = true;
|
||||||
};
|
};
|
||||||
home.file.".local/bin/waybar-weather.sh" = {
|
home.file.".local/bin/waybar-weather.sh" = {
|
||||||
source = ./config/waybar/weather.sh;
|
source = ../config/waybar/weather.sh;
|
||||||
executable = true;
|
executable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
Reference in New Issue
Block a user