mirror of
https://github.com/librephoenix/nixos-config
synced 2025-04-20 17:24:35 +05:30
adjusting scripts to my own user
This commit is contained in:
parent
ef32ac7a28
commit
0faf6690a6
18
.my_old_dotfiles/TODO.md
Normal file
18
.my_old_dotfiles/TODO.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
|
||||
- SSH
|
||||
- fail2ban
|
||||
- firewall
|
||||
- security features
|
||||
|
||||
- Fix Aga UEFI
|
||||
- Analyce if something missing
|
||||
|
||||
- SSD_4TB
|
||||
- auto mount
|
||||
- Syncthing
|
||||
- Service
|
||||
- config
|
||||
|
||||
- kitty config
|
||||
- .bashrc
|
||||
- dotfiles to home-manager
|
151
.my_old_dotfiles/backups/.dotfiles/configuration.nix
Executable file
151
.my_old_dotfiles/backups/.dotfiles/configuration.nix
Executable file
|
@ -0,0 +1,151 @@
|
|||
# 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 = "nixosaga"; # 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/Warsaw";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "pl_PL.UTF-8";
|
||||
LC_IDENTIFICATION = "pl_PL.UTF-8";
|
||||
LC_MEASUREMENT = "pl_PL.UTF-8";
|
||||
LC_MONETARY = "pl_PL.UTF-8";
|
||||
LC_NAME = "pl_PL.UTF-8";
|
||||
LC_NUMERIC = "pl_PL.UTF-8";
|
||||
LC_PAPER = "pl_PL.UTF-8";
|
||||
LC_TELEPHONE = "pl_PL.UTF-8";
|
||||
LC_TIME = "pl_PL.UTF-8";
|
||||
};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable the KDE Plasma Desktop Environment.
|
||||
services.xserver.displayManager.sddm.enable = true;
|
||||
services.xserver.desktopManager.plasma5.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
layout = "us";
|
||||
xkbVariant = "intl";
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "us-acentos";
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
};
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.aga = {
|
||||
isNormalUser = true;
|
||||
description = "aga";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [
|
||||
vlc
|
||||
spotify
|
||||
bitwarden
|
||||
];
|
||||
};
|
||||
|
||||
# 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
|
||||
fzf
|
||||
fail2ban
|
||||
syncthing
|
||||
atuin
|
||||
tldr
|
||||
];
|
||||
|
||||
# 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;
|
||||
|
||||
# # Define SSH config
|
||||
# users.users.aga = {
|
||||
# isNormalUser = true;
|
||||
# home = "/home/aga";
|
||||
# shell = pkgs.bash;
|
||||
# openssh.authorizedKeys.keys = [
|
||||
# "ssh-rsa "
|
||||
# ];
|
||||
# };
|
||||
|
||||
# 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. It‘s 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?
|
||||
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
}
|
46
.my_old_dotfiles/backups/.dotfiles/flake copy.nix
Executable file
46
.my_old_dotfiles/backups/.dotfiles/flake copy.nix
Executable file
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
|
||||
description = "My first flake!";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; # which is the branch. You should use the last version or the unstable
|
||||
home-manager.url = "github:nix-community/home-manager/master"; # master == unstable
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs"; # check that versions of nixpkgs and flake? are equal
|
||||
}; # git links
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, ... }:
|
||||
let
|
||||
lib = nixpkgs.lib; # we pass lib to be able to use ie: lib.nixosSystem and others
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
nixosaga = lib.nixosSystem { # nixosaga to match the hostname
|
||||
inherit system;
|
||||
modules = [ ./configuration.nix ];
|
||||
};
|
||||
# Enable SSH service
|
||||
services.openssh.enable = true;
|
||||
# Define SSH config
|
||||
users.users.akunito = {
|
||||
isNormalUser = true;
|
||||
home = "/home/akunito";
|
||||
shell = pkgs.bash;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-rsa "
|
||||
];
|
||||
};
|
||||
homeConfigurations = {
|
||||
aga = home-manager.lib.homeManagerConfiguration { # aga to match the username
|
||||
inherit pkgs;
|
||||
modules = [ ./home.nix ];
|
||||
};
|
||||
};
|
||||
|
||||
# # Exceptions
|
||||
# nixpkgs.config = {
|
||||
# allowUnfree = true;
|
||||
# permittedInsecurePackages = pkgs.lib.optional (pkgs.obsidian.version == "1.5.12") "electron-25.9.0";
|
||||
# };
|
||||
};
|
||||
}
|
49
.my_old_dotfiles/backups/.dotfiles/flake.lock
Executable file
49
.my_old_dotfiles/backups/.dotfiles/flake.lock
Executable file
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
"nodes": {
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719827439,
|
||||
"narHash": "sha256-tneHOIv1lEavZ0vQ+rgz67LPNCgOZVByYki3OkSshFU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "59ce796b2563e19821361abbe2067c3bb4143a7d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "master",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1719690277,
|
||||
"narHash": "sha256-0xSej1g7eP2kaUF+JQp8jdyNmpmCJKRpO12mKl/36Kc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2741b4b489b55df32afac57bc4bfd220e8bf617e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
43
.my_old_dotfiles/backups/.dotfiles/hardware-configuration.nix
Executable file
43
.my_old_dotfiles/backups/.dotfiles/hardware-configuration.nix
Executable file
|
@ -0,0 +1,43 @@
|
|||
# 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" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/e1b7a004-0d2b-4c73-95bf-1310d1da71bd";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-e9676686-10da-4b47-9ff0-d2ac4685f682".device = "/dev/disk/by-uuid/e9676686-10da-4b47-9ff0-d2ac4685f682";
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/2CDB-55A5";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# 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.enp0s20f0u4u4u5.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wwan0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
81
.my_old_dotfiles/backups/.dotfiles/home.nix
Executable file
81
.my_old_dotfiles/backups/.dotfiles/home.nix
Executable file
|
@ -0,0 +1,81 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# manage.
|
||||
home.username = "aga";
|
||||
home.homeDirectory = "/home/aga";
|
||||
|
||||
# This value determines the Home Manager release that your configuration is
|
||||
# compatible with. This helps avoid breakage when a new Home Manager release
|
||||
# introduces backwards incompatible changes.
|
||||
#
|
||||
# You should not change this value, even if you update Home Manager. If you do
|
||||
# want to update the value, then make sure to first check the Home Manager
|
||||
# release notes.
|
||||
home.stateVersion = "24.05"; # Please read the comment before changing.
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# The home.packages option allows you to install Nix packages into your
|
||||
# environment.
|
||||
home.packages = [
|
||||
# # Adds the 'hello' command to your environment. It prints a friendly
|
||||
# # "Hello, world!" when run.
|
||||
# pkgs.hello
|
||||
pkgs.vscode
|
||||
pkgs.ungoogled-chromium
|
||||
pkgs.obsidian
|
||||
|
||||
# # It is sometimes useful to fine-tune packages, for example, by applying
|
||||
# # overrides. You can do that directly here, just don't forget the
|
||||
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
|
||||
# # fonts?
|
||||
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
|
||||
|
||||
# # You can also create simple shell scripts directly inside your
|
||||
# # configuration. For example, this adds a command 'my-hello' to your
|
||||
# # environment:
|
||||
# (pkgs.writeShellScriptBin "my-hello" ''
|
||||
# echo "Hello, ${config.home.username}!"
|
||||
# '')
|
||||
];
|
||||
|
||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||
# plain files is through 'home.file'.
|
||||
home.file = {
|
||||
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
|
||||
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
|
||||
# # symlink to the Nix store copy.
|
||||
# ".screenrc".source = dotfiles/screenrc;
|
||||
|
||||
# # You can also set the file content immediately.
|
||||
# ".gradle/gradle.properties".text = ''
|
||||
# org.gradle.console=verbose
|
||||
# org.gradle.daemon.idletimeout=3600000
|
||||
# '';
|
||||
};
|
||||
|
||||
# Home Manager can also manage your environment variables through
|
||||
# 'home.sessionVariables'. These will be explicitly sourced when using a
|
||||
# shell provided by Home Manager. If you don't want to manage your shell
|
||||
# through Home Manager then you have to manually source 'hm-session-vars.sh'
|
||||
# located at either
|
||||
#
|
||||
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
# or
|
||||
#
|
||||
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
# or
|
||||
#
|
||||
# /etc/profiles/per-user/aga/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
home.sessionVariables = {
|
||||
# EDITOR = "vscode";
|
||||
};
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
}
|
1
.my_old_dotfiles/backups/.dotfiles/id_ed25519.pub
Executable file
1
.my_old_dotfiles/backups/.dotfiles/id_ed25519.pub
Executable file
|
@ -0,0 +1 @@
|
|||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM/TKh6hv6ZJl7k2rlmDPUgg1iTcFA82HSLYgV+L4m6Z diego88aku@gmail.com
|
138
.my_old_dotfiles/backups/.dotfiles/imported_files/configuration.nix
Executable file
138
.my_old_dotfiles/backups/.dotfiles/imported_files/configuration.nix
Executable file
|
@ -0,0 +1,138 @@
|
|||
# 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 = "nixosaku"; # 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/Warsaw";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "pl_PL.UTF-8";
|
||||
LC_IDENTIFICATION = "pl_PL.UTF-8";
|
||||
LC_MEASUREMENT = "pl_PL.UTF-8";
|
||||
LC_MONETARY = "pl_PL.UTF-8";
|
||||
LC_NAME = "pl_PL.UTF-8";
|
||||
LC_NUMERIC = "pl_PL.UTF-8";
|
||||
LC_PAPER = "pl_PL.UTF-8";
|
||||
LC_TELEPHONE = "pl_PL.UTF-8";
|
||||
LC_TIME = "pl_PL.UTF-8";
|
||||
};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable the KDE Plasma Desktop Environment.
|
||||
services.xserver.displayManager.sddm.enable = true;
|
||||
services.xserver.desktopManager.plasma5.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
layout = "us";
|
||||
xkbVariant = "intl";
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "us-acentos";
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
};
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.akunito = {
|
||||
isNormalUser = true;
|
||||
description = "akunito";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [
|
||||
# firefox
|
||||
# kate
|
||||
# vivaldi
|
||||
# obsidian
|
||||
];
|
||||
};
|
||||
|
||||
# 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
|
||||
cryptsetup
|
||||
];
|
||||
|
||||
# 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. It‘s 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 = "23.11"; # Did you read the comment?
|
||||
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
}
|
36
.my_old_dotfiles/backups/.dotfiles/imported_files/flake.nix
Executable file
36
.my_old_dotfiles/backups/.dotfiles/imported_files/flake.nix
Executable file
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
|
||||
description = "My first flake!";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; # which is the branch. You should use the last version or the unstable
|
||||
home-manager.url = "github:nix-community/home-manager/master"; # master == unstable
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs"; # check that versions of nixpkgs and flake? are equal
|
||||
}; # git links
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, ... }:
|
||||
let
|
||||
lib = nixpkgs.lib; # we pass lib to be able to use ie: lib.nixosSystem and others
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
nixosaku = lib.nixosSystem { # nixosaku to match the hostname
|
||||
inherit system;
|
||||
modules = [ ./configuration.nix ];
|
||||
};
|
||||
};
|
||||
homeConfigurations = {
|
||||
akunito = home-manager.lib.homeManagerConfiguration { # akunito to match the username
|
||||
inherit pkgs;
|
||||
modules = [ ./home.nix ];
|
||||
};
|
||||
};
|
||||
|
||||
# # Exceptions
|
||||
# nixpkgs.config = {
|
||||
# allowUnfree = true;
|
||||
# permittedInsecurePackages = pkgs.lib.optional (pkgs.obsidian.version == "1.5.12") "electron-25.9.0";
|
||||
# };
|
||||
};
|
||||
}
|
48
.my_old_dotfiles/backups/.dotfiles/imported_files/flake_ssh_draft.nix
Executable file
48
.my_old_dotfiles/backups/.dotfiles/imported_files/flake_ssh_draft.nix
Executable file
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
|
||||
description = "My first flake!";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; # which is the branch. You should use the last version or the unstable
|
||||
home-manager.url = "github:nix-community/home-manager/master"; # master == unstable
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs"; # check that versions of nixpkgs and flake? are equal
|
||||
}; # git links
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, ... }:
|
||||
let
|
||||
lib = nixpkgs.lib; # we pass lib to be able to use ie: lib.nixosSystem and others
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
nixosaku = lib.nixosSystem { # nixosaku to match the hostname
|
||||
inherit system;
|
||||
modules = [ ./configuration.nix ];
|
||||
|
||||
# Enable SSH service
|
||||
services.openssh.enable = true;
|
||||
|
||||
# Define SSH config
|
||||
users.users.akunito = {
|
||||
isNormalUser = true;
|
||||
home = "/home/akunito";
|
||||
shell = pkgs.bash;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-rsa "
|
||||
];
|
||||
};
|
||||
};
|
||||
homeConfigurations = {
|
||||
akunito = home-manager.lib.homeManagerConfiguration { # akunito to match the username
|
||||
inherit pkgs;
|
||||
modules = [ ./home.nix ];
|
||||
};
|
||||
};
|
||||
|
||||
# # Exceptions
|
||||
# nixpkgs.config = {
|
||||
# allowUnfree = true;
|
||||
# permittedInsecurePackages = pkgs.lib.optional (pkgs.obsidian.version == "1.5.12") "electron-25.9.0";
|
||||
# };
|
||||
};
|
||||
}
|
88
.my_old_dotfiles/backups/.dotfiles/imported_files/home.nix
Executable file
88
.my_old_dotfiles/backups/.dotfiles/imported_files/home.nix
Executable file
|
@ -0,0 +1,88 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# manage.
|
||||
home.username = "akunito";
|
||||
home.homeDirectory = "/home/akunito";
|
||||
|
||||
# This value determines the Home Manager release that your configuration is
|
||||
# compatible with. This helps avoid breakage when a new Home Manager release
|
||||
# introduces backwards incompatible changes.
|
||||
#
|
||||
# You should not change this value, even if you update Home Manager. If you do
|
||||
# want to update the value, then make sure to first check the Home Manager
|
||||
# release notes.
|
||||
home.stateVersion = "24.05"; # Please read the comment before changing.
|
||||
|
||||
# The home.packages option allows you to install Nix packages into your
|
||||
# environment.
|
||||
home.packages = [
|
||||
# # Adds the 'hello' command to your environment. It prints a friendly
|
||||
# # "Hello, world!" when run.
|
||||
# pkgs.hello
|
||||
|
||||
# # It is sometimes useful to fine-tune packages, for example, by applying
|
||||
# # overrides. You can do that directly here, just don't forget the
|
||||
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
|
||||
# # fonts?
|
||||
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
|
||||
|
||||
# # You can also create simple shell scripts directly inside your
|
||||
# # configuration. For example, this adds a command 'my-hello' to your
|
||||
# # environment:
|
||||
# (pkgs.writeShellScriptBin "my-hello" ''
|
||||
# echo "Hello, ${config.home.username}!"
|
||||
# '')
|
||||
pkgs.ungoogled-chromium
|
||||
#pkgs.vivaldi
|
||||
pkgs.vscode
|
||||
pkgs.kate
|
||||
];
|
||||
|
||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||
# plain files is through 'home.file'.
|
||||
home.file = {
|
||||
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
|
||||
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
|
||||
# # symlink to the Nix store copy.
|
||||
# ".screenrc".source = dotfiles/screenrc;
|
||||
|
||||
# # You can also set the file content immediately.
|
||||
# ".gradle/gradle.properties".text = ''
|
||||
# org.gradle.console=verbose
|
||||
# org.gradle.daemon.idletimeout=3600000
|
||||
# '';
|
||||
};
|
||||
|
||||
# Home Manager can also manage your environment variables through
|
||||
# 'home.sessionVariables'. These will be explicitly sourced when using a
|
||||
# shell provided by Home Manager. If you don't want to manage your shell
|
||||
# through Home Manager then you have to manually source 'hm-session-vars.sh'
|
||||
# located at either
|
||||
#
|
||||
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
# or
|
||||
#
|
||||
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
# or
|
||||
#
|
||||
# /etc/profiles/per-user/akunito/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
home.sessionVariables = {
|
||||
# EDITOR = "emacs";
|
||||
};
|
||||
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
ll = "ls -l";
|
||||
".." = "cd ..";
|
||||
};
|
||||
};
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
}
|
94
.my_old_dotfiles/backups/.dotfiles/imported_files/home2.nix
Executable file
94
.my_old_dotfiles/backups/.dotfiles/imported_files/home2.nix
Executable file
|
@ -0,0 +1,94 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# manage.
|
||||
home.username = "aga";
|
||||
home.homeDirectory = "/home/aga";
|
||||
|
||||
# This value determines the Home Manager release that your configuration is
|
||||
# compatible with. This helps avoid breakage when a new Home Manager release
|
||||
# introduces backwards incompatible changes.
|
||||
#
|
||||
# You should not change this value, even if you update Home Manager. If you do
|
||||
# want to update the value, then make sure to first check the Home Manager
|
||||
# release notes.
|
||||
home.stateVersion = "24.05"; # Please read the comment before changing.
|
||||
|
||||
# The home.packages option allows you to install Nix packages into your
|
||||
# environment.
|
||||
home.packages = with pkgs; [
|
||||
# # Adds the 'hello' command to your environment. It prints a friendly
|
||||
# # "Hello, world!" when run.
|
||||
# pkgs.hello
|
||||
|
||||
# # It is sometimes useful to fine-tune packages, for example, by applying
|
||||
# # overrides. You can do that directly here, just don't forget the
|
||||
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
|
||||
# # fonts?
|
||||
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
|
||||
|
||||
# # You can also create simple shell scripts directly inside your
|
||||
# # configuration. For example, this adds a command 'my-hello' to your
|
||||
# # environment:
|
||||
# (pkgs.writeShellScriptBin "my-hello" ''
|
||||
# echo "Hello, ${config.home.username}!"
|
||||
# '')
|
||||
ungoogle-chromium
|
||||
vscode
|
||||
kate
|
||||
|
||||
# utils
|
||||
btop
|
||||
p7zip
|
||||
eza
|
||||
fzf
|
||||
|
||||
];
|
||||
|
||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||
# plain files is through 'home.file'.
|
||||
home.file = {
|
||||
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
|
||||
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
|
||||
# # symlink to the Nix store copy.
|
||||
# ".screenrc".source = dotfiles/screenrc;
|
||||
|
||||
# # You can also set the file content immediately.
|
||||
# ".gradle/gradle.properties".text = ''
|
||||
# org.gradle.console=verbose
|
||||
# org.gradle.daemon.idletimeout=3600000
|
||||
# '';
|
||||
};
|
||||
|
||||
# Home Manager can also manage your environment variables through
|
||||
# 'home.sessionVariables'. These will be explicitly sourced when using a
|
||||
# shell provided by Home Manager. If you don't want to manage your shell
|
||||
# through Home Manager then you have to manually source 'hm-session-vars.sh'
|
||||
# located at either
|
||||
#
|
||||
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
# or
|
||||
#
|
||||
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
# or
|
||||
#
|
||||
# /etc/profiles/per-user/aga/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
home.sessionVariables = {
|
||||
EDITOR = "vscode";
|
||||
};
|
||||
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
ll = "ls -l";
|
||||
".." = "cd ..";
|
||||
};
|
||||
};
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
}
|
219
.my_old_dotfiles/configuration copy.nix
Normal file
219
.my_old_dotfiles/configuration copy.nix
Normal file
|
@ -0,0 +1,219 @@
|
|||
# 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 = "nixosaku"; # 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/Warsaw";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "pl_PL.UTF-8";
|
||||
LC_IDENTIFICATION = "pl_PL.UTF-8";
|
||||
LC_MEASUREMENT = "pl_PL.UTF-8";
|
||||
LC_MONETARY = "pl_PL.UTF-8";
|
||||
LC_NAME = "pl_PL.UTF-8";
|
||||
LC_NUMERIC = "pl_PL.UTF-8";
|
||||
LC_PAPER = "pl_PL.UTF-8";
|
||||
LC_TELEPHONE = "pl_PL.UTF-8";
|
||||
LC_TIME = "pl_PL.UTF-8";
|
||||
};
|
||||
|
||||
# KDE Plasma 6
|
||||
services.xserver.enable = true;
|
||||
services.xserver.displayManager.sddm.enable = true;
|
||||
services.xserver.displayManager.sddm.wayland.enable = true; # enable if blackscreen with plasma6
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
|
||||
# KDE Plasma 5
|
||||
# services.xserver.enable = true;
|
||||
# services.xserver.displayManager.sddm.enable = true;
|
||||
# services.xserver.desktopManager.plasma5.enable = true;
|
||||
# services.xserver.displayManager.defaultSession = "plasmawayland";
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
layout = "us";
|
||||
xkbVariant = "intl";
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "us-acentos";
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
};
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define an user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.akunito = {
|
||||
isNormalUser = true;
|
||||
description = "akunito";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
home = "/home/akunito";
|
||||
packages = with pkgs; [
|
||||
#kate
|
||||
];
|
||||
};
|
||||
|
||||
users.users.aku = {
|
||||
isNormalUser = true;
|
||||
description = "aku";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
home = "/home/aku";
|
||||
packages = with pkgs; [
|
||||
#kate
|
||||
];
|
||||
};
|
||||
# users.users.akunito = {
|
||||
# isNormalUser = true;
|
||||
# description = "akunito";
|
||||
# extraGroups = [ "networkmanager" "wheel" ];
|
||||
# home = "/home/akunito";
|
||||
# openssh.authorizedKeys.keys = [
|
||||
# "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM/TKh6hv6ZJl7k2rlmDPUgg1iTcFA82HSLYgV+L4m6Z diego88aku@gmail.com" # Replace with your actual public key
|
||||
# ];
|
||||
# packages = with pkgs; [
|
||||
# vivaldi
|
||||
# # firefox
|
||||
# # they have been added on home.nix
|
||||
# ];
|
||||
# };
|
||||
|
||||
hardware.bluetooth.enable = true; # enables support for Bluetooth
|
||||
hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot
|
||||
|
||||
# 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
|
||||
tldr
|
||||
atuin
|
||||
btop
|
||||
fzf
|
||||
firefox
|
||||
#cryptsetup
|
||||
];
|
||||
|
||||
# # 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;
|
||||
# # };
|
||||
|
||||
# Enable the SSH service with enhanced security
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
permitRootLogin = "no"; # Disable root login
|
||||
passwordAuthentication = false; # Disable password authentication
|
||||
extraConfig = ''
|
||||
Port 34389 # Use a non-default port
|
||||
ListenAddress 192.168.0.80:34389 # Bind to the new port
|
||||
ListenAddress [::]:34389
|
||||
AllowUsers akunito # Allow only specific user
|
||||
MaxAuthTries 3 # Limit authentication attempts
|
||||
LoginGraceTime 30s # Reduce grace time
|
||||
'';
|
||||
};
|
||||
|
||||
# # Ensure SSH starts at boot
|
||||
# systemd.services.sshd.wantedBy = [ "multi-user.target" ];
|
||||
|
||||
# # Firewall settings
|
||||
# networking.firewall = {
|
||||
# enable = true;
|
||||
# allowedTCPPorts = [ 34389 ];
|
||||
# extraCommands = ''
|
||||
# # Default deny incoming traffic
|
||||
# iptables -P INPUT DROP
|
||||
# iptables -P FORWARD DROP
|
||||
|
||||
# # Default allow outgoing traffic
|
||||
# iptables -P OUTPUT ACCEPT
|
||||
|
||||
# # Allow HTTP and HTTPS traffic
|
||||
# iptables -A INPUT -p tcp --dport 80 -j ACCEPT
|
||||
# iptables -A INPUT -p tcp --dport 443 -j ACCEPT
|
||||
|
||||
# # Allow SSH from specific IP addresses to port 34389
|
||||
# iptables -A INPUT -p tcp --dport 34389 -s 192.168.1.90 -j ACCEPT
|
||||
# iptables -A INPUT -p tcp --dport 34389 -s 192.168.1.91 -j ACCEPT
|
||||
|
||||
# # Drop other connections to port 34389
|
||||
# iptables -A INPUT -p tcp --dport 34389 -j DROP
|
||||
|
||||
# # Ensure loopback traffic is allowed
|
||||
# iptables -A INPUT -i lo -j ACCEPT
|
||||
|
||||
# # Allow established and related connections
|
||||
# iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
|
||||
# '';
|
||||
# };
|
||||
|
||||
# Enable Fail2Ban
|
||||
# services.fail2ban = {
|
||||
# enable = true;
|
||||
# filters.sshd = ''
|
||||
# [sshd]
|
||||
# enabled = true
|
||||
# port = 34389
|
||||
# logpath = /var/log/auth.log
|
||||
# maxretry = 3
|
||||
# bantime = 600
|
||||
# '';
|
||||
# };
|
||||
|
||||
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
}
|
214
.my_old_dotfiles/configuration.nix
Normal file
214
.my_old_dotfiles/configuration.nix
Normal file
|
@ -0,0 +1,214 @@
|
|||
# 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, lib, pkgs, systemSettings, userSettings, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ ../../system/hardware-configuration.nix
|
||||
../../system/hardware/time.nix # Network time sync
|
||||
../../system/security/firewall.nix
|
||||
../../system/security/doas.nix
|
||||
../../system/security/gpg.nix
|
||||
( import ../../system/app/docker.nix {storageDriver = null; inherit pkgs userSettings lib;} )
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "nixosaku"; # 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/Warsaw";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "pl_PL.UTF-8";
|
||||
LC_IDENTIFICATION = "pl_PL.UTF-8";
|
||||
LC_MEASUREMENT = "pl_PL.UTF-8";
|
||||
LC_MONETARY = "pl_PL.UTF-8";
|
||||
LC_NAME = "pl_PL.UTF-8";
|
||||
LC_NUMERIC = "pl_PL.UTF-8";
|
||||
LC_PAPER = "pl_PL.UTF-8";
|
||||
LC_TELEPHONE = "pl_PL.UTF-8";
|
||||
LC_TIME = "pl_PL.UTF-8";
|
||||
};
|
||||
|
||||
# KDE Plasma 6
|
||||
services.xserver.enable = true;
|
||||
services.xserver.displayManager.sddm.enable = true;
|
||||
services.xserver.displayManager.sddm.wayland.enable = true; # enable if blackscreen with plasma6
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
|
||||
# KDE Plasma 5
|
||||
# services.xserver.enable = true;
|
||||
# services.xserver.displayManager.sddm.enable = true;
|
||||
# services.xserver.desktopManager.plasma5.enable = true;
|
||||
# services.xserver.displayManager.defaultSession = "plasmawayland";
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
layout = "us";
|
||||
xkbVariant = "intl";
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "us-acentos";
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
};
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define an user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.akunito = {
|
||||
isNormalUser = true;
|
||||
description = "akunito";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
home = "/home/akunito";
|
||||
packages = with pkgs; [
|
||||
#kate
|
||||
];
|
||||
};
|
||||
|
||||
# users.users.akunito = {
|
||||
# isNormalUser = true;
|
||||
# description = "akunito";
|
||||
# extraGroups = [ "networkmanager" "wheel" ];
|
||||
# home = "/home/akunito";
|
||||
# openssh.authorizedKeys.keys = [
|
||||
# "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM/TKh6hv6ZJl7k2rlmDPUgg1iTcFA82HSLYgV+L4m6Z diego88aku@gmail.com" # Replace with your actual public key
|
||||
# ];
|
||||
# packages = with pkgs; [
|
||||
# vivaldi
|
||||
# # firefox
|
||||
# # they have been added on home.nix
|
||||
# ];
|
||||
# };
|
||||
|
||||
hardware.bluetooth.enable = true; # enables support for Bluetooth
|
||||
hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot
|
||||
|
||||
# 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
|
||||
tldr
|
||||
atuin
|
||||
btop
|
||||
fzf
|
||||
firefox
|
||||
#cryptsetup
|
||||
];
|
||||
|
||||
# # 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;
|
||||
# # };
|
||||
|
||||
# # Enable the SSH service with enhanced security
|
||||
# services.openssh = {
|
||||
# enable = true;
|
||||
# permitRootLogin = "no"; # Disable root login
|
||||
# passwordAuthentication = false; # Disable password authentication
|
||||
# extraConfig = ''
|
||||
# Port 34389 # Use a non-default port
|
||||
# ListenAddress 192.168.0.80:34389 # Bind to the new port
|
||||
# ListenAddress [::]:34389
|
||||
# AllowUsers akunito # Allow only specific user
|
||||
# MaxAuthTries 3 # Limit authentication attempts
|
||||
# LoginGraceTime 30s # Reduce grace time
|
||||
# '';
|
||||
# };
|
||||
|
||||
# # Ensure SSH starts at boot
|
||||
# systemd.services.sshd.wantedBy = [ "multi-user.target" ];
|
||||
|
||||
# # Firewall settings
|
||||
# networking.firewall = {
|
||||
# enable = true;
|
||||
# allowedTCPPorts = [ 34389 ];
|
||||
# extraCommands = ''
|
||||
# # Default deny incoming traffic
|
||||
# iptables -P INPUT DROP
|
||||
# iptables -P FORWARD DROP
|
||||
|
||||
# # Default allow outgoing traffic
|
||||
# iptables -P OUTPUT ACCEPT
|
||||
|
||||
# # Allow HTTP and HTTPS traffic
|
||||
# iptables -A INPUT -p tcp --dport 80 -j ACCEPT
|
||||
# iptables -A INPUT -p tcp --dport 443 -j ACCEPT
|
||||
|
||||
# # Allow SSH from specific IP addresses to port 34389
|
||||
# iptables -A INPUT -p tcp --dport 34389 -s 192.168.1.90 -j ACCEPT
|
||||
# iptables -A INPUT -p tcp --dport 34389 -s 192.168.1.91 -j ACCEPT
|
||||
|
||||
# # Drop other connections to port 34389
|
||||
# iptables -A INPUT -p tcp --dport 34389 -j DROP
|
||||
|
||||
# # Ensure loopback traffic is allowed
|
||||
# iptables -A INPUT -i lo -j ACCEPT
|
||||
|
||||
# # Allow established and related connections
|
||||
# iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
|
||||
# '';
|
||||
# };
|
||||
|
||||
# Enable Fail2Ban
|
||||
# services.fail2ban = {
|
||||
# enable = true;
|
||||
# filters.sshd = ''
|
||||
# [sshd]
|
||||
# enabled = true
|
||||
# port = 34389
|
||||
# logpath = /var/log/auth.log
|
||||
# maxretry = 3
|
||||
# bantime = 600
|
||||
# '';
|
||||
# };
|
||||
|
||||
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
}
|
150
.my_old_dotfiles/configuration.nix.BAK
Normal file
150
.my_old_dotfiles/configuration.nix.BAK
Normal file
|
@ -0,0 +1,150 @@
|
|||
# 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.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/vda";
|
||||
boot.loader.grub.useOSProber = true;
|
||||
|
||||
networking.hostName = "nixosaku"; # 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/Warsaw";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "pl_PL.UTF-8";
|
||||
LC_IDENTIFICATION = "pl_PL.UTF-8";
|
||||
LC_MEASUREMENT = "pl_PL.UTF-8";
|
||||
LC_MONETARY = "pl_PL.UTF-8";
|
||||
LC_NAME = "pl_PL.UTF-8";
|
||||
LC_NUMERIC = "pl_PL.UTF-8";
|
||||
LC_PAPER = "pl_PL.UTF-8";
|
||||
LC_TELEPHONE = "pl_PL.UTF-8";
|
||||
LC_TIME = "pl_PL.UTF-8";
|
||||
};
|
||||
|
||||
# ==X11==
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable the KDE Plasma Desktop Environment.
|
||||
services.xserver.displayManager.sddm.enable = true;
|
||||
services.xserver.desktopManager.plasma5.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
layout = "us";
|
||||
xkbVariant = "intl";
|
||||
};
|
||||
|
||||
# ==wayland==
|
||||
# programs.hyprland.enable = true;
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "us-acentos";
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
};
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.akunito = {
|
||||
isNormalUser = true;
|
||||
description = "akunito";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [
|
||||
#kate
|
||||
];
|
||||
};
|
||||
|
||||
# Enable automatic login for the user.
|
||||
services.xserver.displayManager.autoLogin.enable = true;
|
||||
services.xserver.displayManager.autoLogin.user = "akunito";
|
||||
|
||||
# Enable VDA clipboard etc
|
||||
services.spice-vdagentd.enable = true;
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
#permittedInsecurePackages = pkgs.lib.optional (pkgs.obsidian.version == "1.5.12") "electron-25.9.0";
|
||||
};
|
||||
|
||||
# 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
|
||||
cryptsetup
|
||||
];
|
||||
|
||||
# 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. It‘s 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 = "23.11"; # Did you read the comment?
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
}
|
150
.my_old_dotfiles/configuration.nix.DESKTOP
Normal file
150
.my_old_dotfiles/configuration.nix.DESKTOP
Normal file
|
@ -0,0 +1,150 @@
|
|||
# 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.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/vda";
|
||||
boot.loader.grub.useOSProber = true;
|
||||
|
||||
networking.hostName = "nixosaku"; # 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/Warsaw";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "pl_PL.UTF-8";
|
||||
LC_IDENTIFICATION = "pl_PL.UTF-8";
|
||||
LC_MEASUREMENT = "pl_PL.UTF-8";
|
||||
LC_MONETARY = "pl_PL.UTF-8";
|
||||
LC_NAME = "pl_PL.UTF-8";
|
||||
LC_NUMERIC = "pl_PL.UTF-8";
|
||||
LC_PAPER = "pl_PL.UTF-8";
|
||||
LC_TELEPHONE = "pl_PL.UTF-8";
|
||||
LC_TIME = "pl_PL.UTF-8";
|
||||
};
|
||||
|
||||
# ==X11==
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable the KDE Plasma Desktop Environment.
|
||||
services.xserver.displayManager.sddm.enable = true;
|
||||
services.xserver.desktopManager.plasma5.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
layout = "us";
|
||||
xkbVariant = "intl";
|
||||
};
|
||||
|
||||
# ==wayland==
|
||||
# programs.hyprland.enable = true;
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "us-acentos";
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
};
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.akunito = {
|
||||
isNormalUser = true;
|
||||
description = "akunito";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [
|
||||
kate
|
||||
vivaldi
|
||||
];
|
||||
};
|
||||
|
||||
# Enable automatic login for the user.
|
||||
services.xserver.displayManager.autoLogin.enable = true;
|
||||
services.xserver.displayManager.autoLogin.user = "akunito";
|
||||
|
||||
# Enable VDA clipboard etc
|
||||
services.spice-vdagentd.enable = true;
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
permittedInsecurePackages = pkgs.lib.optional (pkgs.obsidian.version == "1.5.12") "electron-25.9.0";
|
||||
};
|
||||
|
||||
# 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. It‘s 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 = "23.11"; # Did you read the comment?
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
}
|
49
.my_old_dotfiles/flake.lock
Normal file
49
.my_old_dotfiles/flake.lock
Normal file
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
"nodes": {
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1720646128,
|
||||
"narHash": "sha256-BivO5yIQukDlJL+1875Sqf3GuOPxZDdA48dYDi3PkL8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "c085b984ff2808bf322f375b10fea5a415a9c43d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "master",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1720542800,
|
||||
"narHash": "sha256-ZgnNHuKV6h2+fQ5LuqnUaqZey1Lqqt5dTUAiAnqH0QQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "feb2849fdeb70028c70d73b848214b00d324a497",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
36
.my_old_dotfiles/flake.nix
Executable file
36
.my_old_dotfiles/flake.nix
Executable file
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
|
||||
description = "My first flake!";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; # which is the branch. You should use the last version or the unstable
|
||||
home-manager.url = "github:nix-community/home-manager/master"; # master == unstable
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs"; # check that versions of nixpkgs and flake? are equal
|
||||
}; # git links
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, ... }:
|
||||
let
|
||||
lib = nixpkgs.lib; # we pass lib to be able to use ie: lib.nixosSystem and others
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
nixosaku = lib.nixosSystem { # nixosaku to match the hostname
|
||||
inherit system;
|
||||
modules = [ ./configuration.nix ];
|
||||
};
|
||||
};
|
||||
homeConfigurations = {
|
||||
akunito = home-manager.lib.homeManagerConfiguration { # akunito to match the username
|
||||
inherit pkgs;
|
||||
modules = [ ./home.nix ];
|
||||
};
|
||||
};
|
||||
|
||||
# # Exceptions
|
||||
# nixpkgs.config = {
|
||||
# allowUnfree = true;
|
||||
# permittedInsecurePackages = pkgs.lib.optional (pkgs.obsidian.version == "1.5.12") "electron-25.9.0";
|
||||
# };
|
||||
};
|
||||
}
|
34
.my_old_dotfiles/flake.nix.broken
Normal file
34
.my_old_dotfiles/flake.nix.broken
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
|
||||
description = "My first flake!";
|
||||
|
||||
inputs = { # we import here git links
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; # which is the branch. You should use the last version or the unstable
|
||||
home-manager.url = "github:nix-community/home-manager/master"; # master == unstable
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs"; # check that versions of nixpkgs and flake? are equal
|
||||
|
||||
# plasma-manager CHECK WHAT IS THIS???
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, ... }:
|
||||
let
|
||||
lib = nixpkgs.lib; # we pass lib to be able to use ie: lib.nixosSystem and others
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
nixosaku = lib.nixosSystem { # nixosaku to match the hostname
|
||||
inherit system;
|
||||
modules = [
|
||||
./configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
homeConfigurations = {
|
||||
akunito = home-manager.lib.homeManagerConfiguration { # akunito to match the username
|
||||
inherit pkgs;
|
||||
modules = [ ./home.nix ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
22
.my_old_dotfiles/flake.nix.save
Normal file
22
.my_old_dotfiles/flake.nix.save
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
|
||||
description = "My first flake!";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; # which is the branch. You should use the last version or the unstable
|
||||
home-manager.url = github:nix-community/home-manager/
|
||||
}; # git links
|
||||
|
||||
outputs = { self, nixpkgs, ... }:
|
||||
let
|
||||
lib = nixpkgs.lib; # we pass lib to be able to use ie: lib.nixosSystem and others
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
nixosaku = lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [ ./configuration.nix ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
39
.my_old_dotfiles/hardware-configuration.nix
Normal file
39
.my_old_dotfiles/hardware-configuration.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
# 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 = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "uas" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/cbecfc7d-797b-46c7-8aa8-5be912d95661";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/C643-9D25";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# 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.eno1.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp9s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
31
.my_old_dotfiles/hardware-configuration.nix.BAK
Normal file
31
.my_old_dotfiles/hardware-configuration.nix.BAK
Normal file
|
@ -0,0 +1,31 @@
|
|||
# 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 + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/96cee182-d6fa-4f62-b450-4bd716a2839d";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# 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.enp1s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
159
.my_old_dotfiles/home-manager.log
Normal file
159
.my_old_dotfiles/home-manager.log
Normal file
|
@ -0,0 +1,159 @@
|
|||
[akunito@nixosaku:~/.dotfiles]$ sudo nixos-rebuild switch --flake ~/.dotfiles -v
|
||||
$ sudo cat /proc/sys/kernel/hostname
|
||||
$ nix --extra-experimental-features nix-command flakes build --out-link /tmp/nixos-rebuild.wKAgpG/nixos-rebuild /home/akunito/.dotfiles#nixosConfigurations."nixosaku".config.system.build.nixos-rebuild -v
|
||||
$ exec /nix/store/arsfa1815gv0nn5kk1r4p5wd73d78s31-nixos-rebuild/bin/nixos-rebuild switch --flake /home/akunito/.dotfiles -v
|
||||
$ sudo cat /proc/sys/kernel/hostname
|
||||
building the system configuration...
|
||||
Building in flake mode.
|
||||
$ nix --extra-experimental-features nix-command flakes build /home/akunito/.dotfiles#nixosConfigurations."nixosaku".config.system.build.toplevel -v --out-link /tmp/nixos-rebuild.u0L523/result
|
||||
trace: warning: The option `services.xserver.xkbVariant' defined in `/nix/store/yzp2hm5lkdh9fcivd320zwyzj5fdf95b-source/configuration.nix' has been renamed to `services.xserver.xkb.variant'.
|
||||
trace: warning: The option `services.xserver.layout' defined in `/nix/store/yzp2hm5lkdh9fcivd320zwyzj5fdf95b-source/configuration.nix' has been renamed to `services.xserver.xkb.layout'.
|
||||
trace: warning: The option `services.xserver.displayManager.sddm.enable' defined in `/nix/store/yzp2hm5lkdh9fcivd320zwyzj5fdf95b-source/configuration.nix' has been renamed to `services.displayManager.sddm.enable'.
|
||||
trace: warning: The option `services.xserver.displayManager.defaultSession' defined in `/nix/store/yzp2hm5lkdh9fcivd320zwyzj5fdf95b-source/configuration.nix' has been renamed to `services.displayManager.defaultSession'.
|
||||
these 33 derivations will be built:
|
||||
/nix/store/2fqms513afp26fppljjxxmvnr45h8lsw-nixos-version.drv
|
||||
/nix/store/9ww96mvmxjhpyca7c4hkg0ynqh5srh8i-nixos-help.drv
|
||||
/nix/store/qlscplapwa5ha74hms8bgskd6igbbqba-nixos-help.drv
|
||||
/nix/store/09irp7kb4yys85ms1d2n3ynlqfdswhzr-system-path.drv
|
||||
/nix/store/agb7ijfw6w7kxcvp1xq3h1y6iwc9vb3l-firmware.drv
|
||||
/nix/store/n8x6cb1vb6pif4bca2f2nrlbj29yfkx5-linux-6.6.37-modules-shrunk.drv
|
||||
/nix/store/hsac5f7whdkwmrrpd9qz031g1y8csnp6-initrd-linux-6.6.37.drv
|
||||
/nix/store/0f98nvzcfpm05w8j36r3dbk4c24c8p0y-boot.json.drv
|
||||
/nix/store/v1rrw96kh7gr070jqysgcw6cfrdnqajh-desktops.drv
|
||||
/nix/store/0qc9x84krk38mka0ksxib7sz5sk7fkb2-etc-pam-environment.drv
|
||||
/nix/store/2ymd0192zh5fw8f10jckhj2vg3nrapzs-unit-accounts-daemon.service.drv
|
||||
/nix/store/r2dfpdnvbn53rirra0hw5bgrqm9lndsl-etc-os-release.drv
|
||||
/nix/store/41gl7qxqygcw4wl07cwaga0vkynmrjmb-shutdown-ramfs-contents.drv
|
||||
/nix/store/4yccvwdl5z8hxdpx189czq9d9iz9vm5w-etc-nix-registry.json.drv
|
||||
/nix/store/4yk0qlvlwpcwajvjjix3h110kxn4xhr6-system-generators.drv
|
||||
/nix/store/7q48idjyqis609vpbl4fl48jhp2fxjc9-X-Restart-Triggers-polkit.drv
|
||||
/nix/store/azy663fc3fkdm0jsz99sdn4p5yq83rhy-system-shutdown.drv
|
||||
/nix/store/ba626wdi21g0cngf6r9rrcky8afcq9np-set-environment.drv
|
||||
/nix/store/daxjlafdrd8ck3qgwbvwszylil5v2dj4-user-generators.drv
|
||||
/nix/store/dw0h9jwdhgqgs44dn1hs4aiy2h9dyjay-unit-generate-shutdown-ramfs.service.drv
|
||||
/nix/store/jdnb95hjfc1c3kjnd4i03kbakzij8rji-dbus-1.drv
|
||||
/nix/store/ai2r6khnb5xp63w68af423dniaiprgj9-X-Restart-Triggers-dbus.drv
|
||||
/nix/store/kb2g9729czd3d9x0l4v0chd671r4bly7-unit-dbus.service.drv
|
||||
/nix/store/rvxcq5bxljp0rwfa4anbvwii95z888mx-unit-polkit.service.drv
|
||||
/nix/store/dj6wsl291aaf6b1s9gcrfpwby8v9zz8f-system-units.drv
|
||||
/nix/store/kqpgxbgdnsf6yd8zm56n1whb4caym0l0-issue.drv
|
||||
/nix/store/aam7nvdxzp4d3azk3z116nxxwczxgj8b-unit-dbus.service.drv
|
||||
/nix/store/kwbvq5x6gapms3wkv1nscw5vi63mjp1q-user-units.drv
|
||||
/nix/store/ma84lkbg1d78vhfp5wgv4jnjq2qbx3yj-sddm.conf.drv
|
||||
/nix/store/p7ygp7vkpi6d2rj2390y9sq6kjbqwz2i-etc-profile.drv
|
||||
/nix/store/r07knk7mf4gw22m2x3r174fc43n3ar7l-etc-modprobe.d-firmware.conf.drv
|
||||
/nix/store/8dj1a8rnj19fx8zc0b7bw1kls2kbgf00-etc.drv
|
||||
/nix/store/zyvdcb89mqw6l8gxplb7ig86lyhp1ljx-nixos-system-nixosaku-24.11.20240709.feb2849.drv
|
||||
these 33 paths will be fetched (600.41 MiB download, 974.53 MiB unpacked):
|
||||
/nix/store/6995w29adn192z7zpih0vhspvi2sa54b-amd-ucode-20240709
|
||||
/nix/store/dsvgy4pqmqf20ydfm05nw8mjzd23z7f5-baloo-5.116.0
|
||||
/nix/store/aa0wy179vywhqcar3zvg0ifry2ccnj8s-baloo-widgets-23.08.5
|
||||
/nix/store/bqk5j7sn04vfd1njsn9y4yn1gzyksljn-dolphin-23.08.5
|
||||
/nix/store/7r17yfgv0akpvdx6gcncrrs5bs0h5hrg-dolphin-plugins-23.08.5
|
||||
/nix/store/lfnla2nsxllsypnz77w0nypll4yaf99n-elisa-23.08.5
|
||||
/nix/store/szm63ck8zr67jm95wkfk6mrvzj930494-exiv2-0.28.3
|
||||
/nix/store/9aw744bfgprpwjpy2yk6adhl4k2vajzc-exiv2-0.28.3-lib
|
||||
/nix/store/s8xachhlz3vn30isxvy21h93x07b5kbn-firefox-128.0
|
||||
/nix/store/ml18xvdgs6vck5dy3gfna7g34gdqwyfk-firefox-unwrapped-128.0
|
||||
/nix/store/0v9kj5yjw7inywxm4wm0yq4rv6pasm2m-gwenview-23.08.5
|
||||
/nix/store/yziznjf33kszhbkagl15562mpdaab7vh-kde-cli-tools-5.27.11
|
||||
/nix/store/7zgg1g5hgvcbzlcj4l61pfj6snb1fz77-kdegraphics-thumbnailers-23.08.5
|
||||
/nix/store/5l91yljnh4arxmywkgyy5cx1n93vj52q-kdeplasma-addons-5.27.11
|
||||
/nix/store/gbrsy2g2rjjf9irclqs7jga0hbkc3v4x-kfilemetadata-5.116.0
|
||||
/nix/store/ck2mgcaw6j3662z8fr2yvfk3x3vwc3y0-kfilemetadata-5.116.0-bin
|
||||
/nix/store/2bra2rdv84p239gs8j4ncrxqyf2v1w07-khotkeys-5.27.11
|
||||
/nix/store/57hv18v0fkdcsi5i0gnwmgjjb0xalbfi-khotkeys-5.27.11-bin
|
||||
/nix/store/sgp62dn123b393bj5f1ls26bpzzyc3w3-kinfocenter-5.27.11
|
||||
/nix/store/3hkzqz2g8q96b8a4wi1b3gfq6hx3f747-kio-extras-23.08.5
|
||||
/nix/store/mcg41pv47cg2qlgly14mdvrz8q3v72k1-kmenuedit-5.27.11
|
||||
/nix/store/l80khgxm8g0ycdi9xgn5xg7b7017s2jl-libkexiv2-23.08.5
|
||||
/nix/store/1hmbi8hhdvj6xyl8jqragr1gn5dbl6xw-linux-firmware-20240709-zstd
|
||||
/nix/store/ym8bhhqm1qcmmf8zd6v12j8lcxkf03ml-nixos-configuration-reference-manpage
|
||||
/nix/store/wrh4ip9nsnn2n8gm57spk5fd95xfrlip-nixos-manual-html
|
||||
/nix/store/9rz7zxf6hxaa33d4hlsbvy4gwswcyh2y-okular-23.08.5
|
||||
/nix/store/98ams5z0lhc98spdzkfilsh8absfy47a-plasma-browser-integration-5.27.11
|
||||
/nix/store/3skzdkr0b7hspnj098r52gyyzpqmck3r-plasma-desktop-5.27.11
|
||||
/nix/store/4wrmzyr1ac848mcah6q0jxj9i9da3g2f-plasma-workspace-5.27.11.1
|
||||
/nix/store/c0f28cfpcx8hwv8ydxb2gv9lhy8186rb-powerdevil-5.27.11
|
||||
/nix/store/5laqpavr7h9jgcrq28xlj8cxzfpck1wr-systemsettings-5.27.11
|
||||
/nix/store/fqfi4m9b3y4j78qdfylij5bsw4412gld-systemsettings-5.27.11-bin
|
||||
/nix/store/v9kzxgb441mdb0yhmvmy0zbsil8klwqm-xdg-desktop-portal-kde-5.27.11
|
||||
copying path '/nix/store/1hmbi8hhdvj6xyl8jqragr1gn5dbl6xw-linux-firmware-20240709-zstd' from 'https://cache.nixos.org'...
|
||||
copying path '/nix/store/ym8bhhqm1qcmmf8zd6v12j8lcxkf03ml-nixos-configuration-reference-manpage' from 'https://cache.nixos.org'...
|
||||
copying path '/nix/store/wrh4ip9nsnn2n8gm57spk5fd95xfrlip-nixos-manual-html' from 'https://cache.nixos.org'...
|
||||
copying path '/nix/store/6995w29adn192z7zpih0vhspvi2sa54b-amd-ucode-20240709' from 'https://cache.nixos.org'...
|
||||
copying path '/nix/store/5l91yljnh4arxmywkgyy5cx1n93vj52q-kdeplasma-addons-5.27.11' from 'https://cache.nixos.org'...
|
||||
building '/nix/store/4yccvwdl5z8hxdpx189czq9d9iz9vm5w-etc-nix-registry.json.drv'...
|
||||
building '/nix/store/r2dfpdnvbn53rirra0hw5bgrqm9lndsl-etc-os-release.drv'...
|
||||
building '/nix/store/kqpgxbgdnsf6yd8zm56n1whb4caym0l0-issue.drv'...
|
||||
building '/nix/store/2fqms513afp26fppljjxxmvnr45h8lsw-nixos-version.drv'...
|
||||
copying path '/nix/store/9aw744bfgprpwjpy2yk6adhl4k2vajzc-exiv2-0.28.3-lib' from 'https://cache.nixos.org'...
|
||||
copying path '/nix/store/ml18xvdgs6vck5dy3gfna7g34gdqwyfk-firefox-unwrapped-128.0' from 'https://cache.nixos.org'...
|
||||
copying path '/nix/store/gbrsy2g2rjjf9irclqs7jga0hbkc3v4x-kfilemetadata-5.116.0' from 'https://cache.nixos.org'...
|
||||
copying path '/nix/store/5laqpavr7h9jgcrq28xlj8cxzfpck1wr-systemsettings-5.27.11' from 'https://cache.nixos.org'...
|
||||
building '/nix/store/41gl7qxqygcw4wl07cwaga0vkynmrjmb-shutdown-ramfs-contents.drv'...
|
||||
building '/nix/store/dw0h9jwdhgqgs44dn1hs4aiy2h9dyjay-unit-generate-shutdown-ramfs.service.drv'...
|
||||
building '/nix/store/9ww96mvmxjhpyca7c4hkg0ynqh5srh8i-nixos-help.drv'...
|
||||
copying path '/nix/store/szm63ck8zr67jm95wkfk6mrvzj930494-exiv2-0.28.3' from 'https://cache.nixos.org'...
|
||||
copying path '/nix/store/l80khgxm8g0ycdi9xgn5xg7b7017s2jl-libkexiv2-23.08.5' from 'https://cache.nixos.org'...
|
||||
copying path '/nix/store/ck2mgcaw6j3662z8fr2yvfk3x3vwc3y0-kfilemetadata-5.116.0-bin' from 'https://cache.nixos.org'...
|
||||
building '/nix/store/qlscplapwa5ha74hms8bgskd6igbbqba-nixos-help.drv'...
|
||||
copying path '/nix/store/dsvgy4pqmqf20ydfm05nw8mjzd23z7f5-baloo-5.116.0' from 'https://cache.nixos.org'...
|
||||
copying path '/nix/store/7zgg1g5hgvcbzlcj4l61pfj6snb1fz77-kdegraphics-thumbnailers-23.08.5' from 'https://cache.nixos.org'...
|
||||
copying path '/nix/store/aa0wy179vywhqcar3zvg0ifry2ccnj8s-baloo-widgets-23.08.5' from 'https://cache.nixos.org'...
|
||||
copying path '/nix/store/lfnla2nsxllsypnz77w0nypll4yaf99n-elisa-23.08.5' from 'https://cache.nixos.org'...
|
||||
copying path '/nix/store/bqk5j7sn04vfd1njsn9y4yn1gzyksljn-dolphin-23.08.5' from 'https://cache.nixos.org'...
|
||||
copying path '/nix/store/0v9kj5yjw7inywxm4wm0yq4rv6pasm2m-gwenview-23.08.5' from 'https://cache.nixos.org'...
|
||||
copying path '/nix/store/3hkzqz2g8q96b8a4wi1b3gfq6hx3f747-kio-extras-23.08.5' from 'https://cache.nixos.org'...
|
||||
copying path '/nix/store/9rz7zxf6hxaa33d4hlsbvy4gwswcyh2y-okular-23.08.5' from 'https://cache.nixos.org'...
|
||||
copying path '/nix/store/4wrmzyr1ac848mcah6q0jxj9i9da3g2f-plasma-workspace-5.27.11.1' from 'https://cache.nixos.org'...
|
||||
copying path '/nix/store/7r17yfgv0akpvdx6gcncrrs5bs0h5hrg-dolphin-plugins-23.08.5' from 'https://cache.nixos.org'...
|
||||
copying path '/nix/store/yziznjf33kszhbkagl15562mpdaab7vh-kde-cli-tools-5.27.11' from 'https://cache.nixos.org'...
|
||||
copying path '/nix/store/2bra2rdv84p239gs8j4ncrxqyf2v1w07-khotkeys-5.27.11' from 'https://cache.nixos.org'...
|
||||
copying path '/nix/store/98ams5z0lhc98spdzkfilsh8absfy47a-plasma-browser-integration-5.27.11' from 'https://cache.nixos.org'...
|
||||
copying path '/nix/store/3skzdkr0b7hspnj098r52gyyzpqmck3r-plasma-desktop-5.27.11' from 'https://cache.nixos.org'...
|
||||
copying path '/nix/store/c0f28cfpcx8hwv8ydxb2gv9lhy8186rb-powerdevil-5.27.11' from 'https://cache.nixos.org'...
|
||||
copying path '/nix/store/fqfi4m9b3y4j78qdfylij5bsw4412gld-systemsettings-5.27.11-bin' from 'https://cache.nixos.org'...
|
||||
copying path '/nix/store/v9kzxgb441mdb0yhmvmy0zbsil8klwqm-xdg-desktop-portal-kde-5.27.11' from 'https://cache.nixos.org'...
|
||||
building '/nix/store/v1rrw96kh7gr070jqysgcw6cfrdnqajh-desktops.drv'...
|
||||
building '/nix/store/0qc9x84krk38mka0ksxib7sz5sk7fkb2-etc-pam-environment.drv'...
|
||||
building '/nix/store/ma84lkbg1d78vhfp5wgv4jnjq2qbx3yj-sddm.conf.drv'...
|
||||
building '/nix/store/ba626wdi21g0cngf6r9rrcky8afcq9np-set-environment.drv'...
|
||||
copying path '/nix/store/sgp62dn123b393bj5f1ls26bpzzyc3w3-kinfocenter-5.27.11' from 'https://cache.nixos.org'...
|
||||
building '/nix/store/4yk0qlvlwpcwajvjjix3h110kxn4xhr6-system-generators.drv'...
|
||||
building '/nix/store/azy663fc3fkdm0jsz99sdn4p5yq83rhy-system-shutdown.drv'...
|
||||
building '/nix/store/daxjlafdrd8ck3qgwbvwszylil5v2dj4-user-generators.drv'...
|
||||
building '/nix/store/p7ygp7vkpi6d2rj2390y9sq6kjbqwz2i-etc-profile.drv'...
|
||||
copying path '/nix/store/57hv18v0fkdcsi5i0gnwmgjjb0xalbfi-khotkeys-5.27.11-bin' from 'https://cache.nixos.org'...
|
||||
copying path '/nix/store/mcg41pv47cg2qlgly14mdvrz8q3v72k1-kmenuedit-5.27.11' from 'https://cache.nixos.org'...
|
||||
copying path '/nix/store/s8xachhlz3vn30isxvy21h93x07b5kbn-firefox-128.0' from 'https://cache.nixos.org'...
|
||||
building '/nix/store/09irp7kb4yys85ms1d2n3ynlqfdswhzr-system-path.drv'...
|
||||
building '/nix/store/7q48idjyqis609vpbl4fl48jhp2fxjc9-X-Restart-Triggers-polkit.drv'...
|
||||
building '/nix/store/jdnb95hjfc1c3kjnd4i03kbakzij8rji-dbus-1.drv'...
|
||||
building '/nix/store/2ymd0192zh5fw8f10jckhj2vg3nrapzs-unit-accounts-daemon.service.drv'...
|
||||
building '/nix/store/rvxcq5bxljp0rwfa4anbvwii95z888mx-unit-polkit.service.drv'...
|
||||
building '/nix/store/ai2r6khnb5xp63w68af423dniaiprgj9-X-Restart-Triggers-dbus.drv'...
|
||||
building '/nix/store/aam7nvdxzp4d3azk3z116nxxwczxgj8b-unit-dbus.service.drv'...
|
||||
building '/nix/store/kb2g9729czd3d9x0l4v0chd671r4bly7-unit-dbus.service.drv'...
|
||||
building '/nix/store/kwbvq5x6gapms3wkv1nscw5vi63mjp1q-user-units.drv'...
|
||||
building '/nix/store/dj6wsl291aaf6b1s9gcrfpwby8v9zz8f-system-units.drv'...
|
||||
building '/nix/store/agb7ijfw6w7kxcvp1xq3h1y6iwc9vb3l-firmware.drv'...
|
||||
building '/nix/store/r07knk7mf4gw22m2x3r174fc43n3ar7l-etc-modprobe.d-firmware.conf.drv'...
|
||||
building '/nix/store/n8x6cb1vb6pif4bca2f2nrlbj29yfkx5-linux-6.6.37-modules-shrunk.drv'...
|
||||
building '/nix/store/8dj1a8rnj19fx8zc0b7bw1kls2kbgf00-etc.drv'...
|
||||
building '/nix/store/hsac5f7whdkwmrrpd9qz031g1y8csnp6-initrd-linux-6.6.37.drv'...
|
||||
building '/nix/store/0f98nvzcfpm05w8j36r3dbk4c24c8p0y-boot.json.drv'...
|
||||
building '/nix/store/zyvdcb89mqw6l8gxplb7ig86lyhp1ljx-nixos-system-nixosaku-24.11.20240709.feb2849.drv'...
|
||||
$ sudo nix-env -p /nix/var/nix/profiles/system --set /nix/store/fyfxfhdvz30l0f4jaxcpmq63f5xsxizf-nixos-system-nixosaku-24.11.20240709.feb2849
|
||||
$ sudo systemd-run -E LOCALE_ARCHIVE -E NIXOS_INSTALL_BOOTLOADER= --collect --no-ask-password --pipe --quiet --same-dir --service-type=exec --unit=nixos-rebuild-switch-to-configuration --wait true
|
||||
Using systemd-run to switch configuration.
|
||||
$ sudo systemd-run -E LOCALE_ARCHIVE -E NIXOS_INSTALL_BOOTLOADER= --collect --no-ask-password --pipe --quiet --same-dir --service-type=exec --unit=nixos-rebuild-switch-to-configuration --wait /nix/store/fyfxfhdvz30l0f4jaxcpmq63f5xsxizf-nixos-system-nixosaku-24.11.20240709.feb2849/bin/switch-to-configuration switch
|
||||
stopping the following units: accounts-daemon.service
|
||||
activating the configuration...
|
||||
setting up /etc...
|
||||
reloading user units for akunito...
|
||||
/home/akunito/.profile: line 1: /etc/profiles/per-user/akunito/etc/profile.d/hm-session-vars.sh: No such file or directory
|
||||
restarting sysinit-reactivation.target
|
||||
reloading the following units: dbus.service
|
||||
restarting the following units: polkit.service
|
||||
starting the following units: accounts-daemon.service
|
134
.my_old_dotfiles/home.nix
Normal file
134
.my_old_dotfiles/home.nix
Normal file
|
@ -0,0 +1,134 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# manage.
|
||||
home.username = "akunito";
|
||||
home.homeDirectory = "/home/akunito";
|
||||
|
||||
# This value determines the Home Manager release that your configuration is
|
||||
# compatible with. This helps avoid breakage when a new Home Manager release
|
||||
# introduces backwards incompatible changes.
|
||||
#
|
||||
# You should not change this value, even if you update Home Manager. If you do
|
||||
# want to update the value, then make sure to first check the Home Manager
|
||||
# release notes.
|
||||
home.stateVersion = "24.05"; # Please read the comment before changing.
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# The home.packages option allows you to install Nix packages into your
|
||||
# environment.
|
||||
home.packages = with pkgs; [
|
||||
brlaser # driver for brother laser printers - TO TEST
|
||||
vivaldi
|
||||
kitty
|
||||
ungoogled-chromium
|
||||
vscode
|
||||
obsidian
|
||||
spotify
|
||||
kdePackages.krdp
|
||||
# # key binding
|
||||
# xbindkeys
|
||||
# xdotool
|
||||
# xmodmap
|
||||
];
|
||||
|
||||
# # Create .xbindkeysrc file
|
||||
# home.file.".xbindkeysrc".text = ''
|
||||
# # Hold Caps Lock to act as Ctrl + Super
|
||||
# "xdotool keydown Control_L keydown Super_L"
|
||||
# Caps_Lock
|
||||
|
||||
# # Release Caps Lock to release Ctrl + Super
|
||||
# "xdotool keyup Control_L keyup Super_L"
|
||||
# Release+Caps_Lock
|
||||
# '';
|
||||
|
||||
# # Create disable_capslock.sh script
|
||||
# home.file.".disable_capslock.sh".text = ''
|
||||
# #!/bin/sh
|
||||
# xmodmap -e "clear Lock" -e "keycode 66 = NoSymbol"
|
||||
# '';
|
||||
|
||||
# # Service: xbindkeys
|
||||
# systemd.user.services.xbindkeys = {
|
||||
# Unit = {
|
||||
# Description = "xbindkeys service";
|
||||
# };
|
||||
# Install = {
|
||||
# WantedBy = [ "default.target" ];
|
||||
# };
|
||||
# Service = {
|
||||
# ExecStart = "${pkgs.xbindkeys}/bin/xbindkeys";
|
||||
# };
|
||||
# };
|
||||
|
||||
# # Service: Disable Caps Lock
|
||||
# systemd.user.services.disableCapsLock = {
|
||||
# Unit = {
|
||||
# Description = "Disable Caps Lock service";
|
||||
# };
|
||||
# Install = {
|
||||
# WantedBy = [ "default.target" ];
|
||||
# };
|
||||
# Service = {
|
||||
# ExecStart = "${config.home.homeDirectory}/.disable_capslock.sh";
|
||||
# };
|
||||
# };
|
||||
|
||||
|
||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||
# plain files is through 'home.file'.
|
||||
home.file = {
|
||||
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
|
||||
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
|
||||
# # symlink to the Nix store copy.
|
||||
# ".screenrc".source = dotfiles/screenrc;
|
||||
|
||||
# # You can also set the file content immediately.
|
||||
# ".gradle/gradle.properties".text = ''
|
||||
# org.gradle.console=verbose
|
||||
# org.gradle.daemon.idletimeout=3600000
|
||||
# '';
|
||||
};
|
||||
|
||||
# Home Manager can also manage your environment variables through
|
||||
# 'home.sessionVariables'. These will be explicitly sourced when using a
|
||||
# shell provided by Home Manager. If you don't want to manage your shell
|
||||
# through Home Manager then you have to manually source 'hm-session-vars.sh'
|
||||
# located at either
|
||||
#
|
||||
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
# or
|
||||
#
|
||||
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
# or
|
||||
#
|
||||
# /etc/profiles/per-user/akunito/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
home.sessionVariables = {
|
||||
EDITOR = "vscode";
|
||||
};
|
||||
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
ll = "ls -la";
|
||||
".." = "cd ..";
|
||||
};
|
||||
};
|
||||
|
||||
programs.atuin = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# Uncomment this to use your instance if selfhosting
|
||||
# sync_address = "https://majiy00-shell.fly.dev";
|
||||
};
|
||||
};
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
}
|
133
.my_old_dotfiles/home.nix.save
Normal file
133
.my_old_dotfiles/home.nix.save
Normal file
|
@ -0,0 +1,133 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# manage.
|
||||
home.username = "akunito";
|
||||
home.homeDirectory = "/home/akunito";
|
||||
|
||||
# This value determines the Home Manager release that your configuration is
|
||||
# compatible with. This helps avoid breakage when a new Home Manager release
|
||||
# introduces backwards incompatible changes.
|
||||
#
|
||||
# You should not change this value, even if you update Home Manager. If you do
|
||||
# want to update the value, then make sure to first check the Home Manager
|
||||
# release notes.
|
||||
home.stateVersion = "24.05"; # Please read the comment before changing.
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# The home.packages option allows you to install Nix packages into your
|
||||
# environment.
|
||||
home.packages = with pkgs; [
|
||||
brlaser # driver for brother laser printers
|
||||
vivaldi
|
||||
kitty
|
||||
ungoogled-chromium
|
||||
vscode
|
||||
obsidian
|
||||
spotify
|
||||
# # key binding
|
||||
# xbindkeys
|
||||
# xdotool
|
||||
# xmodmap
|
||||
];
|
||||
|
||||
# # Create .xbindkeysrc file
|
||||
# home.file.".xbindkeysrc".text = ''
|
||||
# # Hold Caps Lock to act as Ctrl + Super
|
||||
# "xdotool keydown Control_L keydown Super_L"
|
||||
# Caps_Lock
|
||||
|
||||
# # Release Caps Lock to release Ctrl + Super
|
||||
# "xdotool keyup Control_L keyup Super_L"
|
||||
# Release+Caps_Lock
|
||||
# '';
|
||||
|
||||
# # Create disable_capslock.sh script
|
||||
# home.file.".disable_capslock.sh".text = ''
|
||||
# #!/bin/sh
|
||||
# xmodmap -e "clear Lock" -e "keycode 66 = NoSymbol"
|
||||
# '';
|
||||
|
||||
# # Service: xbindkeys
|
||||
# systemd.user.services.xbindkeys = {
|
||||
# Unit = {
|
||||
# Description = "xbindkeys service";
|
||||
# };
|
||||
# Install = {
|
||||
# WantedBy = [ "default.target" ];
|
||||
# };
|
||||
# Service = {
|
||||
# ExecStart = "${pkgs.xbindkeys}/bin/xbindkeys";
|
||||
# };
|
||||
# };
|
||||
|
||||
# # Service: Disable Caps Lock
|
||||
# systemd.user.services.disableCapsLock = {
|
||||
# Unit = {
|
||||
# Description = "Disable Caps Lock service";
|
||||
# };
|
||||
# Install = {
|
||||
# WantedBy = [ "default.target" ];
|
||||
# };
|
||||
# Service = {
|
||||
# ExecStart = "${config.home.homeDirectory}/.disable_capslock.sh";
|
||||
# };
|
||||
# };
|
||||
|
||||
|
||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||
# plain files is through 'home.file'.
|
||||
home.file = {
|
||||
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
|
||||
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
|
||||
# # symlink to the Nix store copy.
|
||||
# ".screenrc".source = dotfiles/screenrc;
|
||||
|
||||
# # You can also set the file content immediately.
|
||||
# ".gradle/gradle.properties".text = ''
|
||||
# org.gradle.console=verbose
|
||||
# org.gradle.daemon.idletimeout=3600000
|
||||
# '';
|
||||
};
|
||||
|
||||
# Home Manager can also manage your environment variables through
|
||||
# 'home.sessionVariables'. These will be explicitly sourced when using a
|
||||
# shell provided by Home Manager. If you don't want to manage your shell
|
||||
# through Home Manager then you have to manually source 'hm-session-vars.sh'
|
||||
# located at either
|
||||
#
|
||||
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
# or
|
||||
#
|
||||
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
# or
|
||||
#
|
||||
# /etc/profiles/per-user/akunito/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
home.sessionVariables = {
|
||||
EDITOR = "vscode";
|
||||
};
|
||||
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
ll = "ls -la";
|
||||
".." = "cd ..";
|
||||
};
|
||||
};
|
||||
|
||||
programs.atuin = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# Uncomment this to use your instance if selfhosting
|
||||
# sync_address = "https://majiy00-shell.fly.dev";
|
||||
};
|
||||
};
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
}
|
1
.my_old_dotfiles/result
Symbolic link
1
.my_old_dotfiles/result
Symbolic link
|
@ -0,0 +1 @@
|
|||
/nix/store/h0w0xb7c6ngwd6wlrj7zi5d4xjy8f072-home-manager-generation
|
15
.my_old_dotfiles/system/security/sshd.nix
Normal file
15
.my_old_dotfiles/system/security/sshd.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ userSettings, authorizedKeys ? [], ... }:
|
||||
|
||||
{
|
||||
# Enable incoming ssh
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
PermitRootLogin = "no";
|
||||
};
|
||||
};
|
||||
users.users.${userSettings.username}.openssh.authorizedKeys.keys = authorizedKeys;
|
||||
}
|
||||
|
16
flake.nix
16
flake.nix
|
@ -1,14 +1,14 @@
|
|||
{
|
||||
description = "Flake of LibrePhoenix";
|
||||
description = "Flake of LibrePhoenix / Akunito's fork";
|
||||
|
||||
outputs = inputs@{ self, ... }:
|
||||
let
|
||||
# ---- SYSTEM SETTINGS ---- #
|
||||
systemSettings = {
|
||||
system = "x86_64-linux"; # system arch
|
||||
hostname = "snowfire"; # hostname
|
||||
profile = "personal"; # select a profile defined from my profiles directory
|
||||
timezone = "America/Chicago"; # select timezone
|
||||
hostname = "nixosaku"; # hostname
|
||||
profile = "aku-personal"; # select a profile defined from my profiles directory
|
||||
timezone = "Europe/Warsaw"; # select timezone
|
||||
locale = "en_US.UTF-8"; # select locale
|
||||
bootMode = "uefi"; # uefi or bios
|
||||
bootMountPath = "/boot"; # mount path for efi boot partition; only used for uefi boot mode
|
||||
|
@ -18,9 +18,9 @@
|
|||
|
||||
# ----- USER SETTINGS ----- #
|
||||
userSettings = rec {
|
||||
username = "emmet"; # username
|
||||
name = "Emmet"; # name/identifier
|
||||
email = "emmet@librephoenix.com"; # email (used for certain configurations)
|
||||
username = "akunito"; # username
|
||||
name = "akunito"; # name/identifier
|
||||
email = "diego88aku@gmail.com"; # email (used for certain configurations)
|
||||
dotfilesDir = "~/.dotfiles"; # absolute path of the local repo
|
||||
theme = "io"; # selcted theme from my themes directory (./themes/)
|
||||
wm = "hyprland"; # Selected window manager or desktop environment; must select one in both ./user/wm/ and ./system/wm/
|
||||
|
@ -31,7 +31,7 @@
|
|||
term = "alacritty"; # Default terminal command;
|
||||
font = "Intel One Mono"; # Selected font
|
||||
fontPkg = pkgs.intel-one-mono; # Font package
|
||||
editor = "emacsclient"; # Default editor;
|
||||
editor = "nano"; # Default editor;
|
||||
# editor spawning translator
|
||||
# generates a command that can be used to spawn editor inside a gui
|
||||
# EDITOR and TERM session variables must be set in home.nix or other module
|
||||
|
|
12
install.sh
12
install.sh
|
@ -1,5 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
# FORK: I have adjusted to my basic user and mail. But I never test it.
|
||||
|
||||
# Automated script to install my dotfiles
|
||||
|
||||
# Clone dotfiles
|
||||
|
@ -9,7 +11,9 @@ if [ $# -gt 0 ]
|
|||
else
|
||||
SCRIPT_DIR=~/.dotfiles
|
||||
fi
|
||||
nix-shell -p git --command "git clone https://gitlab.com/librephoenix/nixos-config $SCRIPT_DIR"
|
||||
|
||||
# DISABLED TO AVOID OVERWRITE FOR TESTING
|
||||
# nix-shell -p git --command "git clone https://gitlab.com/akunito/nixos-config $SCRIPT_DIR"
|
||||
|
||||
# Generate hardware config for new system
|
||||
sudo nixos-generate-config --show-hardware-config > $SCRIPT_DIR/system/hardware-configuration.nix
|
||||
|
@ -24,9 +28,9 @@ else
|
|||
fi
|
||||
|
||||
# Patch flake.nix with different username/name and remove email by default
|
||||
sed -i "0,/emmet/s//$(whoami)/" $SCRIPT_DIR/flake.nix
|
||||
sed -i "0,/Emmet/s//$(getent passwd $(whoami) | cut -d ':' -f 5 | cut -d ',' -f 1)/" $SCRIPT_DIR/flake.nix
|
||||
sed -i "s/emmet@librephoenix.com//" $SCRIPT_DIR/flake.nix
|
||||
sed -i "0,/akunito/s//$(whoami)/" $SCRIPT_DIR/flake.nix
|
||||
sed -i "0,/akunito/s//$(getent passwd $(whoami) | cut -d ':' -f 5 | cut -d ',' -f 1)/" $SCRIPT_DIR/flake.nix
|
||||
sed -i "s/diego88aku@gmail.com//" $SCRIPT_DIR/flake.nix
|
||||
sed -i "s+~/.dotfiles+$SCRIPT_DIR+g" $SCRIPT_DIR/flake.nix
|
||||
|
||||
# Open up editor to manually edit flake.nix before install
|
||||
|
|
3
profiles/aku-personal/README.org
Normal file
3
profiles/aku-personal/README.org
Normal file
|
@ -0,0 +1,3 @@
|
|||
#+title: Just chillin'
|
||||
|
||||
This is my profile for a personal computer. It is functionally identical to my [[../work]] profile, but includes extra things like games and social apps!
|
18
profiles/aku-personal/configuration.nix
Normal file
18
profiles/aku-personal/configuration.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
# 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’).
|
||||
|
||||
{ ... }:
|
||||
{
|
||||
imports =
|
||||
[ ../work/configuration.nix # Personal is essentially work system + games
|
||||
../../system/hardware-configuration.nix
|
||||
../../system/app/gamemode.nix
|
||||
../../system/app/steam.nix
|
||||
../../system/app/prismlauncher.nix
|
||||
../../system/security/doas.nix
|
||||
../../system/security/gpg.nix
|
||||
../../system/security/blocklist.nix
|
||||
../../system/security/firewall.nix
|
||||
];
|
||||
}
|
36
profiles/aku-personal/home.nix
Normal file
36
profiles/aku-personal/home.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ config, pkgs, userSettings, ... }:
|
||||
|
||||
{
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# manage.
|
||||
home.username = userSettings.username;
|
||||
home.homeDirectory = "/home/"+userSettings.username;
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
imports = [ ../work/home.nix # Personal is essentially work system + games
|
||||
../../user/app/games/games.nix # Various videogame apps
|
||||
];
|
||||
|
||||
home.stateVersion = "22.11"; # Please read the comment before changing.
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# Core
|
||||
zsh
|
||||
alacritty
|
||||
librewolf
|
||||
brave
|
||||
git
|
||||
syncthing
|
||||
|
||||
];
|
||||
|
||||
xdg.enable = true;
|
||||
xdg.userDirs = {
|
||||
extraConfig = {
|
||||
XDG_GAME_DIR = "${config.home.homeDirectory}/Media/Games";
|
||||
XDG_GAME_SAVE_DIR = "${config.home.homeDirectory}/Media/Game Saves";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in a new issue