Compare commits

...

2 Commits

Author SHA1 Message Date
c323a747ea Fix deprecated config 2025-04-23 22:55:20 +02:00
d87cec971a Migrate left hosts and homes configurations 2025-04-23 22:53:43 +02:00
14 changed files with 160 additions and 220 deletions

View File

@ -73,6 +73,9 @@
import nixpkgs { import nixpkgs {
inherit system; inherit system;
config.allowUnfree = true; config.allowUnfree = true;
config.permittedInsecurePackages = [
"olm-3.2.16"
];
} }
); );
in in
@ -104,6 +107,12 @@
inherit inputs outputs; inherit inputs outputs;
}; };
}; };
kardorf = lib.nixosSystem {
modules = [ ./hosts/pianonix ];
specialArgs = {
inherit inputs outputs;
};
};
}; };
# Standalone HM # Standalone HM
@ -130,16 +139,28 @@
inherit inputs outputs; inherit inputs outputs;
}; };
}; };
"julian@kardorf" = lib.homeManagerConfiguration {
modules = [
./homes/julian/kardorf.nix
./homes/julian/hm-standalone-config.nix
];
pkgs = pkgsFor.aarch64-linux;
extraSpecialArgs = {
inherit inputs outputs;
};
};
"julian@v3ms" = lib.homeManagerConfiguration {
modules = [
./homes/julian/v3ms
./homes/julian/hm-standalone-config.nix
];
pkgs = pkgsFor.aarch64-linux;
extraSpecialArgs = {
inherit inputs outputs;
};
};
}; };
# systems.modules.nixos = with inputs; [
# sops-nix.nixosModules.sops
# disko.nixosModules.disko
# TODO: add sops and disko modules somewhere
# ];
# systems.hosts.pianonix.modules = with inputs; [ nixos-hardware.nixosModules.raspberry-pi-4 ];
# TODO: add rpi4 hardware modules
# deploy-rs node configuration # deploy-rs node configuration
deploy.nodes = { deploy.nodes = {
pianonix = { pianonix = {

View File

@ -1,6 +1,3 @@
{
...
}:
{ {
imports = [ imports = [
./global ./global
@ -25,6 +22,6 @@
hostName = "aspi"; hostName = "aspi";
is-nixos = true; is-nixos = true;
terminal = "kitty"; # TODO: only terminal = ??? terminal = "kitty";
} }

View File

@ -7,13 +7,13 @@
# Apply overlays # Apply overlays
nixpkgs = { nixpkgs = {
overlays = builtins.attrValues outputs.overlays; overlays = builtins.attrValues outputs.overlays;
config = { # config = {
allowUnfree = true; # allowUnfree = true;
allowUnfreePredicate = _: true; # TODO: what is this # allowUnfreePredicate = _: true; # TODO: what is this
permittedInsecurePackages = [ # permittedInsecurePackages = [
"olm-3.2.16" # "olm-3.2.16"
]; # ];
}; # };
}; };
# Setup binary caches # Setup binary caches

View File

@ -1,57 +1,27 @@
{ {
# Snowfall Lib provides a customized `lib` instance with access to your flake's library imports = [
# as well as the libraries available from your flake's inputs. ./global
lib,
# An instance of `pkgs` with your overlays and packages applied is also available.
pkgs,
# You also have access to your flake's inputs.
inputs,
# Additional metadata is provided by Snowfall Lib. ./features/fish
namespace, # The namespace used for your flake, defaulting to "internal" if not set. ./features/direnv
home, # The home architecture for this host (eg. `x86_64-linux`). ./features/topgrade
target, # The Snowfall Lib target for this home (eg. `x86_64-home`). ./features/neovim
format, # A normalized name for the home target (eg. `home`). ./features/kitty
virtual, # A boolean to determine whether this home is a virtual target using nixos-generators. ./features/wezterm
host, # The host name for this home. ./features/yazi
./features/emacs
./features/i3
./features/nix-helper
./features/desktop
# All other arguments come from the home home. ./features/suites/cli
config, ./features/suites/desktop
... ./features/suites/development
}:
{
home.username = "julian";
home.homeDirectory = "/home/julian";
modules = { ];
non-nixos.is-nixos = true;
shell = {
fish.enable = true;
direnv.enable = true;
};
topgrade.enable = true;
neovim.enable = true;
# alacritty.enable = true;
kitty.enable = true;
yazi.enable = true;
emacs.enable = true;
i3.enable = true;
nix-helper.enable = true;
desktop.enable = true; hostName = "kardorf";
fonts.enable = true; is-nixos = true;
terminal = "kitty";
suites = {
cli.enable = true;
desktop.enable = true;
development.enable = true;
};
};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
# ======================== DO NOT CHANGE THIS ========================
home.stateVersion = "23.11";
# ======================== DO NOT CHANGE THIS ========================
} }

View File

@ -1,43 +1,23 @@
{ {
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
# as well as the libraries available from your flake's inputs.
lib,
# An instance of `pkgs` with your overlays and packages applied is also available.
pkgs, pkgs,
# You also have access to your flake's inputs.
inputs,
# Additional metadata is provided by Snowfall Lib.
namespace, # The namespace used for your flake, defaulting to "internal" if not set.
home,
target, # The Snowfall Lib target for this home (eg. `x86_64-home`).
format, # A normalized name for the home target (eg. `home`).
virtual, # A boolean to determine whether this home is a virtual target using nixos-generators.
host, # The host name for this home.
# All other arguments come from the home home.
config,
... ...
}@arguments: }:
{ {
home.username = "julian"; imports = [
home.homeDirectory = "/home/julian"; ./global
modules = { ./features/fish
non-nixos.is-nixos = true; ./features/topgrade
./features/neovim
./features/wezterm
./features/yazi
./features/nix-helper
./features/desktop
];
shell = { hostName = "pianonix";
fish.enable = true; is-nixos = true;
}; terminal = "wezterm";
yazi.enable = true;
topgrade.enable = true;
neovim.enable = true;
wezterm.enable = true;
nix-helper.enable = true;
desktop.enable = true;
fonts.enable = true;
};
services.syncthing.tray.enable = true; services.syncthing.tray.enable = true;
services.syncthing.tray.command = "syncthingtray --wait"; # Wait for tray to become available services.syncthing.tray.command = "syncthingtray --wait"; # Wait for tray to become available
@ -60,11 +40,4 @@
working_directory = "/home/julian/Klavier" working_directory = "/home/julian/Klavier"
''; '';
}; };
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
# ======================== DO NOT CHANGE THIS ========================
home.stateVersion = "23.11";
# ======================== DO NOT CHANGE THIS ========================
} }

1
homes/julian/ssh.pub Normal file
View File

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFjSZYdoF/51F+ykcBAYVCzCPTF5EEigWBL1APiR0h+H

View File

@ -1,41 +1,24 @@
{ {
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
# as well as the libraries available from your flake's inputs.
lib, lib,
# An instance of `pkgs` with your overlays and packages applied is also available.
pkgs, pkgs,
# You also have access to your flake's inputs.
inputs,
# Additional metadata is provided by Snowfall Lib.
namespace, # The namespace used for your flake, defaulting to "internal" if not set.
home, # The home architecture for this host (eg. `x86_64-linux`).
target, # The Snowfall Lib target for this home (eg. `x86_64-home`).
format, # A normalized name for the home target (eg. `home`).
virtual, # A boolean to determine whether this home is a virtual target using nixos-generators.
host, # The host name for this home.
# All other arguments come from the home home.
config,
... ...
}: }:
{ {
home.username = "julian"; imports = [
home.homeDirectory = "/home/julian"; ../global
modules = { ../features/fish
non-nixos.is-nixos = false; ../features/direnv
shell = { ../features/topgrade
fish.enable = true; ../features/neovim
direnv.enable = true; ../features/yazi
}; ../features/emacs
topgrade.enable = true; ../features/nix-helper
neovim.enable = true; ];
yazi.enable = true;
emacs.enable = true;
nix-helper.enable = true; hostName = "aspi";
}; is-nixos = false;
# terminal = "kitty";
home.packages = home.packages =
lib.lists.concatMap (packages-list-file: import packages-list-file { inherit pkgs; }) lib.lists.concatMap (packages-list-file: import packages-list-file { inherit pkgs; })
@ -43,11 +26,4 @@
./fonts.nix ./fonts.nix
./packages.nix ./packages.nix
]; ];
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
# ======================== DO NOT CHANGE THIS ========================
home.stateVersion = "23.11";
# ======================== DO NOT CHANGE THIS ========================
} }

View File

@ -4,7 +4,11 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
imports = [ ./hardware-configuration.nix ]; imports = [
./hardware-configuration.nix
../common/global
];
# hardware.graphics = { # hardware.graphics = {
# enable = true; # enable = true;

View File

@ -18,5 +18,8 @@ in
keyFile = "/home/julian/.config/sops/age/keys.txt"; keyFile = "/home/julian/.config/sops/age/keys.txt";
# Generate key if none of the above worked. With this, building will still work, just without secrets # Generate key if none of the above worked. With this, building will still work, just without secrets
generateKey = true; generateKey = true;
}; };
sops.defaultSopsFile = ../secrets.yaml;
} }

View File

@ -1,6 +1,6 @@
{ {
security.rtkit.enable = true; security.rtkit.enable = true;
hardware.pulseaudio.enable = false; services.pulseaudio.enable = false;
services.pipewire = { services.pipewire = {
enable = true; enable = true;
alsa.enable = true; alsa.enable = true;

View File

@ -11,38 +11,35 @@
... ...
}: }:
{ {
imports = [ ./hardware-configuration.nix ]; imports = [
# inputs.hardware.nixosModules.common-cpu-amd # TODO something useful for me?
./hardware-configuration.nix
../common/global
../common/users/julian
# ../common/optional/openssh.nix
# ../common/optional/greetd.nix
../common/optional/pipewire.nix
../common/optional/remote-builder.nix
../common/optional/boot-efi.nix
../common/optional/pcmanfm.nix
../common/optional/i3.nix
../common/optional/gdm.nix
../common/optional/redshift.nix
../common/optional/virtualbox.nix
../common/optional/xdg-portal.nix
../common/optional/polkit.nix # TODO: maybe not needed!
../common/optional/keyring.nix # TODO: maybe not needed!
];
networking.hostName = "kardorf"; # Define your hostname. networking.hostName = "kardorf"; # Define your hostname.
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
services.resolved.enable = true; services.resolved.enable = true;
topology.self = {
hardware.info = "Pc Kardorf";
};
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
modules = {
nix-settings.enable = true;
xserver-defaults.enable = true;
keymap.enable = true;
builder.enable = true;
system.boot-efi.enable = true;
sound.enable = true;
locales.enable = true;
pcmanfm.enable = true;
i3.enable = true;
gdm.enable = true;
virtualbox.enable = true;
users-julian.enable = true;
xdg-portal.enable = true;
polkit.enable = true;
keyring.enable = true;
redshift.enable = true;
syncthing.enable = true;
};
boot.loader.efi.efiSysMountPoint = "/boot/efi"; boot.loader.efi.efiSysMountPoint = "/boot/efi";
services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.legacy_470; hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.legacy_470;

View File

@ -10,7 +10,28 @@
... ...
}: }:
{ {
imports = [ ./hardware-configuration.nix ]; imports = [
inputs.nixos-hardware.nixosModules.raspberry-pi-4
./hardware-configuration.nix
../common/global
../common/users/julian
# ../common/optional/openssh.nix
# ../common/optional/greetd.nix
../common/optional/pipewire.nix
../common/optional/remote-builder.nix
# ../common/optional/boot-efi.nix
../common/optional/pcmanfm.nix
# ../common/optional/i3.nix
# ../common/optional/gdm.nix
../common/optional/redshift.nix
# ../common/optional/virtualbox.nix
../common/optional/xdg-portal.nix
../common/optional/polkit.nix # TODO: maybe not needed!
../common/optional/keyring.nix # TODO: maybe not needed!
];
# disko.devices.disk.main.device = "/dev/mmcblk1"; # disko.devices.disk.main.device = "/dev/mmcblk1";
@ -27,7 +48,7 @@
sops.secrets."vnc-passwd" = { sops.secrets."vnc-passwd" = {
owner = config.users.users.julian.name; owner = config.users.users.julian.name;
sopsFile = ../../../secrets/vnc-passwd; sopsFile = ./vnc-passwd;
format = "binary"; format = "binary";
}; };
sops.secrets."wifi/pianonix" = { }; sops.secrets."wifi/pianonix" = { };
@ -35,43 +56,15 @@
sops.secrets."syncthing/pianonix/cert" = { }; sops.secrets."syncthing/pianonix/cert" = { };
# sops.secrets."syncthing/public-keys/aspi-nix" = { }; # sops.secrets."syncthing/public-keys/aspi-nix" = { };
# sops.secrets."syncthing/public-keys/pianonix" = { }; # sops.secrets."syncthing/public-keys/pianonix" = { };
sops.secrets."password/pianonix" = {
neededForUsers = true; # necessary for setting password
};
modules = { modules = {
sops.enable = true;
nix-settings.enable = true;
xserver-defaults.enable = true;
keymap.enable = true;
builder.enable = false;
# system.boot-efi.enable = true;
sound.enable = true;
locales.enable = true;
pcmanfm.enable = true;
# i3.enable = true;
# gdm.enable = true;
redshift.enable = true;
# wayland.enable = true;
# hyprland.enable = true;
# tuigreet.enable = true;
# virtualbox.enable = true;
users-julian.enable = true;
syncthing = { syncthing = {
enable = true; enable = true;
overrideSettings = true; overrideSettings = true;
}; };
# xdg-portal.enable = true;
polkit.enable = true;
keyring.enable = true;
}; };
users.mutableUsers = false; users.mutableUsers = false;
users.users.julian.hashedPasswordFile = config.sops.secrets."password/pianonix".path;
# Enable the Desktop Environment. # Enable the Desktop Environment.
# services.xserver.displayManager.lightdm.enable = true; # services.xserver.displayManager.lightdm.enable = true;

View File

@ -1,6 +1,6 @@
{ {
inputs, inputs,
outputs, ...
}: }:
{ {
# For every flake input, aliases 'pkgs.inputs.${flake}' to # For every flake input, aliases 'pkgs.inputs.${flake}' to
@ -17,8 +17,13 @@
) inputs; ) inputs;
}; };
# Adds my custom packages input-flake-packages = final: prev: {
my-pkgs = final: prev: import ../pkgs { pkgs = final; }; sheet-organizer = inputs.sheet-organizer.packages.${prev.system}.default; # TODO: change sheet-organizer package output
music-reader = inputs.music-reader.defaultPackage.${prev.system}; # TODO: change music reader to packages.system
};
# Adds my custom packages, available as pkgs.frajul.xyz
my-pkgs = final: prev: { frajul = import ../pkgs { pkgs = final; }; };
nixpkgs-stable-unstable = final: prev: { nixpkgs-stable-unstable = final: prev: {
unstable = import inputs.nixpkgs { unstable = import inputs.nixpkgs {
@ -32,8 +37,8 @@
}; };
# Makes gparted actually open # Makes gparted actually open
gparted-xhost = self: super: { gparted-xhost = final: prev: {
gparted-xhost = super.gparted.overrideAttrs (oldAttrs: { gparted-xhost = prev.gparted.overrideAttrs (oldAttrs: {
configureFlags = oldAttrs.configureFlags ++ [ "--enable-xhost-root" ]; configureFlags = oldAttrs.configureFlags ++ [ "--enable-xhost-root" ];
}); });
}; };

View File

@ -3,15 +3,15 @@
... ...
}: }:
{ {
frajul.conda-direnv = pkgs.callPackage ./conda-direnv { }; conda-direnv = pkgs.callPackage ./conda-direnv { };
frajul.deploy-to-pianopi = pkgs.callPackage ./deploy-to-pianopi { }; deploy-to-pianopi = pkgs.callPackage ./deploy-to-pianopi { };
frajul.edit-config = pkgs.callPackage ./edit-config { }; edit-config = pkgs.callPackage ./edit-config { };
frajul.hyprshot-gui = pkgs.callPackage ./hyprshot-gui { }; hyprshot-gui = pkgs.callPackage ./hyprshot-gui { };
frajul.install = pkgs.callPackage ./install { }; install = pkgs.callPackage ./install { };
frajul.lntocp = pkgs.callPackage ./lntocp { }; lntocp = pkgs.callPackage ./lntocp { };
frajul.open-messaging = pkgs.callPackage ./open-messaging { }; open-messaging = pkgs.callPackage ./open-messaging { };
frajul.pulseaudio-popup = pkgs.callPackage ./pulseaudio-popup { }; pulseaudio-popup = pkgs.callPackage ./pulseaudio-popup { };
frajul.sos = pkgs.callPackage ./sos { }; sos = pkgs.callPackage ./sos { };
frajul.xwacomcalibrate = pkgs.callPackage ./xwacomcalibrate { }; xwacomcalibrate = pkgs.callPackage ./xwacomcalibrate { };
frajul.acer-battery-health-mode = pkgs.callPackage ./acer-battery-health-mode { }; acer-battery-health-mode = pkgs.callPackage ./acer-battery-health-mode { };
} }