mirror of
https://github.com/Superredstone/nixos.git
synced 2026-03-08 12:47:00 +01:00
Now using currentSystemUser for username across machines
This commit is contained in:
4
Makefile
4
Makefile
@@ -8,3 +8,7 @@ switch:
|
|||||||
|
|
||||||
test:
|
test:
|
||||||
nixos-rebuild test --flake ".#${HOSTNAME}" --use-remote-sudo
|
nixos-rebuild test --flake ".#${HOSTNAME}" --use-remote-sudo
|
||||||
|
|
||||||
|
clean:
|
||||||
|
sudo nix-collect-garbage -d
|
||||||
|
sudo nix-store --optimise
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ ... }:
|
{ currentSystemUser, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./nvim
|
./nvim
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
./zoxide.nix
|
./zoxide.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
home.username = "r3ddy";
|
home.username = "${currentSystemUser}";
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ ... }:
|
{ currentSystemUser, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
@@ -11,5 +11,14 @@
|
|||||||
|
|
||||||
networking.hostName = "katana"; # Define your hostname.
|
networking.hostName = "katana"; # Define your hostname.
|
||||||
|
|
||||||
|
# I still don't know why my configuration fails if i omit this
|
||||||
|
system.userActivationScripts = {
|
||||||
|
removeConflictingFiles = {
|
||||||
|
text = ''
|
||||||
|
rm -f /home/${currentSystemUser}/.gtkrc-2.0.backup
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
system.stateVersion = "24.05"; # Did you read the comment?
|
system.stateVersion = "24.05"; # Did you read the comment?
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{ ... }:
|
{ currentSystemUser, ... }:
|
||||||
{
|
{
|
||||||
virtualisation.podman.enable = true;
|
virtualisation.podman.enable = true;
|
||||||
virtualisation.podman.dockerCompat = true;
|
virtualisation.podman.dockerCompat = true;
|
||||||
|
|
||||||
programs.virt-manager.enable = true;
|
programs.virt-manager.enable = true;
|
||||||
users.groups.libvirtd.members = ["r3ddy"];
|
users.groups.libvirtd.members = ["${currentSystemUser}"];
|
||||||
virtualisation.libvirtd.enable = true;
|
virtualisation.libvirtd.enable = true;
|
||||||
virtualisation.spiceUSBRedirection.enable = true;
|
virtualisation.spiceUSBRedirection.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,16 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, currentSystemUser, ... }:
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
./fonts.nix
|
||||||
|
];
|
||||||
|
|
||||||
nix.gc = {
|
nix.gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
dates = "weekly";
|
dates = "weekly";
|
||||||
options = "--delete-older-than 1w";
|
options = "--delete-older-than 1w";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Remove old gtkrc file, otherwise it will not work
|
nix.optimise.automatic = true;
|
||||||
system.userActivationScripts = {
|
|
||||||
removeConflictingFiles = {
|
|
||||||
text = ''
|
|
||||||
rm -f /home/r3ddy/.gtkrc-2.0.backup
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
time.timeZone = "Europe/Rome";
|
time.timeZone = "Europe/Rome";
|
||||||
|
|
||||||
@@ -40,16 +36,12 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
programs.fish.enable = true; # This must be true before initializing my user
|
programs.fish.enable = true; # This must be true before initializing my user
|
||||||
users.users.r3ddy = {
|
users.users.${currentSystemUser} = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Patrick Canal";
|
description = "Patrick Canal";
|
||||||
extraGroups = [ "networkmanager" "wheel" "docker" ];
|
extraGroups = [ "networkmanager" "wheel" "docker" ];
|
||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
};
|
};
|
||||||
|
|
||||||
fonts.packages = with pkgs; [
|
|
||||||
nerd-fonts.jetbrains-mono
|
|
||||||
];
|
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
}
|
}
|
||||||
|
|||||||
6
modules/nix-config/fonts.nix
Normal file
6
modules/nix-config/fonts.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
nerd-fonts.jetbrains-mono
|
||||||
|
];
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user