init
This commit is contained in:
@@ -0,0 +1,86 @@
|
||||
# This is your system's configuration file.
|
||||
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hostname = "";
|
||||
in
|
||||
{
|
||||
# You can import other NixOS modules here
|
||||
imports = [
|
||||
# If you want to use modules your own flake exports (from modules/nixos):
|
||||
# inputs.self.nixosModules.example
|
||||
|
||||
# Or modules from other flakes (such as nixos-hardware):
|
||||
# inputs.hardware.nixosModules.common-cpu-amd
|
||||
# inputs.hardware.nixosModules.common-ssd
|
||||
|
||||
./hardware-configuration.nix
|
||||
|
||||
../common/users/Winter/default.nix
|
||||
#../common/global/default.nix
|
||||
#../common/features/Desktop.nix
|
||||
#../common/features/Applications.nix
|
||||
#../common/features/servers/minecraft.nix
|
||||
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
# You can add overlays here
|
||||
overlays = [
|
||||
# Add overlays your own flake exports (from overlays and pkgs dir):
|
||||
inputs.self.overlays.additions
|
||||
inputs.self.overlays.modifications
|
||||
inputs.self.overlays.unstable-packages
|
||||
|
||||
# You can also add overlays exported from other flakes:
|
||||
# neovim-nightly-overlay.overlays.default
|
||||
|
||||
# Or define it inline, for example:
|
||||
# (final: prev: {
|
||||
# hi = final.hello.overrideAttrs (oldAttrs: {
|
||||
# patches = [ ./change-hello-to-hi.patch ];
|
||||
# });
|
||||
# })
|
||||
];
|
||||
# Configure your nixpkgs instance
|
||||
config = {
|
||||
# Disable if you don't want unfree packages
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
# build home-manager with nixos-rebuild and not home-manager command
|
||||
home-manager = {
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
backupFileExtension = "backup";
|
||||
users = {
|
||||
Winter = import ../../home/Winter/${hostname}.nix; # FIXME
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
];
|
||||
|
||||
networking.hostName = hostname;
|
||||
|
||||
# This setups a SSH server. Very important if you're setting up a headless system.
|
||||
# Feel free to remove if you don't need it.
|
||||
#Unused, keeping for later reference
|
||||
services.openssh = {
|
||||
enable = false;
|
||||
settings = {
|
||||
PermitRootLogin = "no";
|
||||
PasswordAuthentication = false;
|
||||
};
|
||||
};
|
||||
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
system.stateVersion = "25.11";
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
# This is your system's configuration file.
|
||||
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
protonplus
|
||||
];
|
||||
services.flatpak = {
|
||||
enable = true;
|
||||
packages = [
|
||||
"com.vivaldi.Vivaldi"
|
||||
"dev.vencord.Vesktop"
|
||||
"com.github.tchx84.Flatseal"
|
||||
"com.heroicgameslauncher.hgl"
|
||||
"org.blender.Blender"
|
||||
"org.kde.krita"
|
||||
"com.mojang.Minecraft"
|
||||
"org.prismlauncher.PrismLauncher"
|
||||
"org.gnome.Showtime" #Duplicate -testing
|
||||
"io.github.diegopvlk.Cine" #Duplicate -testing
|
||||
"org.gnome.gThumb"
|
||||
"org.gnome.Calculator"
|
||||
"net.lutris.Lutris"
|
||||
];
|
||||
};
|
||||
systemd.services.flatpak-repo = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ pkgs.flatpak ];
|
||||
script = ''
|
||||
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
'';
|
||||
};
|
||||
programs.steam.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
# This is your system's configuration file.
|
||||
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# --- Display & window managers ---
|
||||
services.displayManager.sddm.enable = true;
|
||||
services.displayManager.sddm.wayland.enable = true;
|
||||
programs.niri.enable = true;
|
||||
programs.skwd-wall.enable = true;
|
||||
programs.gamescope.enable = true;
|
||||
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
security.pam.services.Winter.enableGnomeKeyring = true;
|
||||
programs.seahorse.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
# -- Niri extras --
|
||||
xwayland-satellite
|
||||
fuzzel
|
||||
waybar
|
||||
brightnessctl
|
||||
playerctl
|
||||
mako
|
||||
swaylock
|
||||
inputs.awww.packages.${pkgs.stdenv.hostPlatform.system}.awww
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
# This is your system's configuration file.
|
||||
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 25565 ];
|
||||
allowedUDPPorts = [ 25565 ];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
pkgs.jdk17
|
||||
];
|
||||
|
||||
users.users = {
|
||||
minecraft = {
|
||||
isNormalUser = true;
|
||||
shell = pkgs.bashInteractive;
|
||||
openssh.authorizedKeys.keys = [
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
# This is your system's configuration file.
|
||||
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
nix = {
|
||||
settings = {
|
||||
# Enable flakes and new 'nix' command
|
||||
experimental-features = "nix-command flakes";
|
||||
# Opinionated: disable global registry
|
||||
flake-registry = "";
|
||||
};
|
||||
# Opinionated: disable channels
|
||||
channel.enable = false;
|
||||
};
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
systemd.sleep.extraConfig = ''
|
||||
AllowSuspend=no
|
||||
AllowHibernation=no
|
||||
AllowHybridSleep=no
|
||||
AllowSuspendThenHibernate=no
|
||||
'';
|
||||
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
|
||||
# --- File Manager ---
|
||||
xdg.mime.enable = true;
|
||||
services.tumbler.enable = true;
|
||||
services.gvfs.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
# -- File manager --
|
||||
imagemagick
|
||||
poppler
|
||||
ffmpeg
|
||||
ffmpegthumbnailer
|
||||
file
|
||||
];
|
||||
fonts.packages = [ ] ++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts);
|
||||
|
||||
#general utils
|
||||
programs.vim.enable = true;
|
||||
programs.git.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
|
||||
in {
|
||||
users.users.Winter= {
|
||||
isNormalUser = true;
|
||||
extraGroups = ifTheyExist [
|
||||
"audio"
|
||||
"deluge"
|
||||
"docker"
|
||||
"git"
|
||||
"i2c"
|
||||
"libvirtd"
|
||||
"minecraft"
|
||||
"mysql"
|
||||
"wpa_supplicant"
|
||||
"plugdev"
|
||||
"podman"
|
||||
"tss"
|
||||
"video"
|
||||
"wheel"
|
||||
"wireshark"
|
||||
];
|
||||
|
||||
# TODO: use as needed
|
||||
#openssh.authorizedKeys.keys = lib.splitString "\n" (builtins.readFile ../../../../home/gabriel/ssh.pub);
|
||||
#hashedPasswordFile = config.sops.secrets.gabriel-password.path;
|
||||
#packages = [pkgs.home-manager];
|
||||
};
|
||||
|
||||
# unused for now, may add sops later on
|
||||
#sops.secrets = {
|
||||
# gabriel-password = {
|
||||
# sopsFile = ../../secrets.yaml;
|
||||
# neededForUsers = true;
|
||||
# };
|
||||
#};
|
||||
|
||||
# TODO: ensure correct paths
|
||||
home-manager.users.Winter = import ../../../../home/Winter/${config.networking.hostName}.nix;
|
||||
|
||||
security.pam.services = {
|
||||
swaylock = {};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user