Merge branch 'development' of git.malice.zone:alisceon/nixos_config into development
This commit is contained in:
commit
090f98718d
9 changed files with 332 additions and 59 deletions
24
flake.lock
generated
24
flake.lock
generated
|
|
@ -25,11 +25,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1753056897,
|
"lastModified": 1754613544,
|
||||||
"narHash": "sha256-AVVMBFcuOXqIgmShvRv9TED3fkiZhQ0ZvlhsPoFfkNE=",
|
"narHash": "sha256-ueR1mGX4I4DWfDRRxxMphbKDNisDeMPMusN72VV1+cc=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "13a83d1b6545b7f0e8f7689bad62e7a3b1d63771",
|
"rev": "cc2fa2331aebf9661d22bb507d362b39852ac73f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -40,11 +40,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1752950548,
|
"lastModified": 1754498491,
|
||||||
"narHash": "sha256-NS6BLD0lxOrnCiEOcvQCDVPXafX1/ek1dfJHX1nUIzc=",
|
"narHash": "sha256-erbiH2agUTD0Z30xcVSFcDHzkRvkRXOQ3lb887bcVrs=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "c87b95e25065c028d31a94f06a62927d18763fdf",
|
"rev": "c2ae88e026f9525daf89587f3cbee584b92b6134",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -54,18 +54,18 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1753115646,
|
"lastModified": 1754498491,
|
||||||
"narHash": "sha256-yLuz5cz5Z+sn8DRAfNkrd2Z1cV6DaYO9JMrEz4KZo/c=",
|
"narHash": "sha256-erbiH2agUTD0Z30xcVSFcDHzkRvkRXOQ3lb887bcVrs=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "92c2e04a475523e723c67ef872d8037379073681",
|
"rev": "c2ae88e026f9525daf89587f3cbee584b92b6134",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-25.05",
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
@ -75,7 +75,7 @@
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-stable": "nixpkgs-stable"
|
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
|
|
|
||||||
56
flake.nix
56
flake.nix
|
|
@ -2,8 +2,8 @@
|
||||||
description = "NixOS configuration for all hosts";
|
description = "NixOS configuration for all hosts";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; #"github:NixOS/nixpkgs/nixos-25.05";
|
||||||
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.05";
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
|
|
@ -11,15 +11,32 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils, home-manager, ... }:
|
outputs = { self, nixpkgs, nixpkgs-unstable, flake-utils, home-manager, ... }:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
};
|
};
|
||||||
|
pkgs-unstable = import nixpkgs-unstable {
|
||||||
|
inherit system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
sharedModules = [
|
sharedModules = [
|
||||||
./hosts/common.nix
|
./hosts/common.nix
|
||||||
|
{
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
}
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
({ config, ...}: {
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.extraSpecialArgs = {
|
||||||
|
inherit (config.networking) hostName;
|
||||||
|
}; # end extraSpecialArgs
|
||||||
|
home-manager.users.alisceon = import ./home/alisceon.nix;
|
||||||
|
home-manager.backupFileExtension = "backup";
|
||||||
|
}) # end home manager
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
@ -27,41 +44,24 @@
|
||||||
electra = nixpkgs.lib.nixosSystem {
|
electra = nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
modules = sharedModules ++ [
|
modules = sharedModules ++ [
|
||||||
{
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
}
|
|
||||||
./hosts/electra/configuration.nix
|
./hosts/electra/configuration.nix
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
({ config, ...}: {
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.extraSpecialArgs = {
|
|
||||||
inherit (config.networking) hostName;
|
|
||||||
}; # end extraSpecialArgs
|
|
||||||
home-manager.users.alisceon = import ./home/alisceon.nix;
|
|
||||||
home-manager.backupFileExtension = "backup";
|
|
||||||
}) # end home manager
|
|
||||||
]; # end modules
|
]; # end modules
|
||||||
}; # end electra
|
}; # end electra
|
||||||
tower = nixpkgs.lib.nixosSystem {
|
tower = nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
modules = sharedModules ++ [
|
modules = sharedModules ++ [
|
||||||
|
./hosts/tower/configuration.nix
|
||||||
|
]; # end modules
|
||||||
|
}; # end tower
|
||||||
|
tesla-nixos = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules = [
|
||||||
|
./hosts/tesla-nixos/configuration.nix
|
||||||
{
|
{
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
}
|
}
|
||||||
./hosts/tower/configuration.nix
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
({ config, ...}: {
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.extraSpecialArgs = {
|
|
||||||
inherit (config.networking) hostName;
|
|
||||||
}; #end extraSpecialArgs
|
|
||||||
home-manager.users.alisceon = import ./home/alisceon.nix;
|
|
||||||
home-manager.backupFileExtension = "backup";
|
|
||||||
}) # end home manager
|
|
||||||
]; # end modules
|
]; # end modules
|
||||||
}; # end tower
|
}; # end tesla-nixos
|
||||||
}; # end nixos conf
|
}; # end nixos conf
|
||||||
}; # end "in"
|
}; # end "in"
|
||||||
} # end file
|
} # end file
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
fish = {
|
fish = {
|
||||||
enable = true;
|
enable = false;
|
||||||
# Disable greeting
|
# Disable greeting
|
||||||
interactiveShellInit = ''
|
interactiveShellInit = ''
|
||||||
set fish_greeting
|
set fish_greeting
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
ls = "exa";
|
ls = "exa";
|
||||||
ll = "exa -lah";
|
ll = "exa -lah";
|
||||||
grep = "rg";
|
grep = "rg";
|
||||||
cat = "bat";
|
cat = "bat -p";
|
||||||
tsla-fan = "ipmitool -H 10.30.0.3 -U ADMIN -P ADMIN raw 0x30 0x70 0x66 0x01 0x0";
|
tsla-fan = "ipmitool -H 10.30.0.3 -U ADMIN -P ADMIN raw 0x30 0x70 0x66 0x01 0x0";
|
||||||
|
|
||||||
# NixOS commands
|
# NixOS commands
|
||||||
|
|
@ -38,8 +38,38 @@
|
||||||
|
|
||||||
# Tower commands
|
# Tower commands
|
||||||
weboot = "nix shell nixpkgs#efibootmgr -c sudo efibootmgr -n 0000 && reboot";
|
weboot = "nix shell nixpkgs#efibootmgr -c sudo efibootmgr -n 0000 && reboot";
|
||||||
|
|
||||||
|
# Misc commands
|
||||||
|
nix-shell = "nix shell";
|
||||||
};
|
};
|
||||||
}; # end fish
|
}; # end fish
|
||||||
|
nushell = {
|
||||||
|
enable = true;
|
||||||
|
configFile.source = ./conf/config.nu;
|
||||||
|
shellAliases = {
|
||||||
|
tsla-fan = "ipmitool -H 10.30.0.3 -U ADMIN -P ADMIN raw 0x30 0x70 0x66 0x01 0x0";
|
||||||
|
|
||||||
|
# NixOS commands
|
||||||
|
nixoss = "sudo nixos-rebuild switch --flake .#${hostName}";
|
||||||
|
nixos-main = "git checkout main ; git pull ; sudo nixos-rebuild switch --flake #${hostName}";
|
||||||
|
nixossr = "sudo nixos-rebuild switch --flake .#${hostName} ; reboot";
|
||||||
|
nixost = "sudo nixos-rebuild build-vm --flake .#${hostName}";
|
||||||
|
|
||||||
|
# Development commands
|
||||||
|
devt = "devenv test";
|
||||||
|
|
||||||
|
devtas = "devenv tasks list";
|
||||||
|
devtar = "devenv tasks run";
|
||||||
|
devs = "devenv shell";
|
||||||
|
devu = "devenv up -d";
|
||||||
|
devi = "nix flake init -t templates#";
|
||||||
|
|
||||||
|
pypod = "podman run --rm -it --network host -v '.:/run' -w '/run' python /run/";
|
||||||
|
|
||||||
|
# Tower commands
|
||||||
|
weboot = "nix shell nixpkgs#efibootmgr -c sudo efibootmgr -n 0000 ; reboot";
|
||||||
|
};
|
||||||
|
};
|
||||||
git = {
|
git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userName = "alisceon";
|
userName = "alisceon";
|
||||||
|
|
@ -91,6 +121,9 @@
|
||||||
hostname = "alma03.lab.the.malice.zone";
|
hostname = "alma03.lab.the.malice.zone";
|
||||||
user = "root";
|
user = "root";
|
||||||
};
|
};
|
||||||
|
"tsla-nixos" = {
|
||||||
|
hostname = "tesla-nixos.lab.the.malice.zone";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}; # end ssh
|
}; # end ssh
|
||||||
direnv = {
|
direnv = {
|
||||||
|
|
@ -104,6 +137,9 @@
|
||||||
# overide broken config
|
# overide broken config
|
||||||
xdg.configFile."obsidian/obsidian.json".source = lib.mkForce ./conf/obsidian.json;
|
xdg.configFile."obsidian/obsidian.json".source = lib.mkForce ./conf/obsidian.json;
|
||||||
|
|
||||||
|
# nixpkgs config
|
||||||
|
xdg.configFile."nixpkgs/config.nix".source = ./conf/config.nix;
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
signal-desktop
|
signal-desktop
|
||||||
discord
|
discord
|
||||||
|
|
|
||||||
1
home/conf/config.nix
Normal file
1
home/conf/config.nix
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{ allowUnfree = true; }
|
||||||
34
home/conf/config.nu
Normal file
34
home/conf/config.nu
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
let fish_completer = {|spans|
|
||||||
|
fish --command $"complete '--do-complete=($spans | str replace --all "'" "\\'" | str join ' ')'"
|
||||||
|
| from tsv --flexible --noheaders --no-infer
|
||||||
|
| rename value description
|
||||||
|
| update value {|row|
|
||||||
|
let value = $row.value
|
||||||
|
let need_quote = ['\' ',' '[' ']' '(' ')' ' ' '\t' "'" '"' "`"] | any {$in in $value}
|
||||||
|
if ($need_quote and ($value | path exists)) {
|
||||||
|
let expanded_path = if ($value starts-with ~) {$value | path expand --no-symlink} else {$value}
|
||||||
|
$'"($expanded_path | str replace --all "\"" "\\\"")"'
|
||||||
|
} else {$value}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$env.config = {
|
||||||
|
show_banner: false,
|
||||||
|
completions: {
|
||||||
|
case_sensitive: false # case-sensitive completions
|
||||||
|
quick: true # set to false to prevent auto-selecting completions
|
||||||
|
partial: true # set to false to prevent partial filling of the prompt
|
||||||
|
algorithm: "fuzzy" # prefix or fuzzy
|
||||||
|
external: {
|
||||||
|
# set to false to prevent nushell looking into $env.PATH to find more suggestions
|
||||||
|
enable: true
|
||||||
|
# set to lower can improve completion performance at the cost of omitting some options
|
||||||
|
max_results: 100
|
||||||
|
completer: $fish_completer
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$env.PATH = ($env.PATH |
|
||||||
|
split row (char esep) |
|
||||||
|
prepend /home/myuser/.apps |
|
||||||
|
append /usr/bin/env
|
||||||
|
)
|
||||||
|
|
@ -27,13 +27,25 @@
|
||||||
automatic = true;
|
automatic = true;
|
||||||
persistent = true;
|
persistent = true;
|
||||||
dates = "daily";
|
dates = "daily";
|
||||||
options = "--delete-older-than 3d";
|
options = "--delete-older-than 7d";
|
||||||
}; # end gc
|
}; # end gc
|
||||||
registry = {
|
registry = {
|
||||||
templates.to = {
|
templates.to = {
|
||||||
type = "git";
|
type = "git";
|
||||||
url = "git+ssh://git@git.malice.zone/alisceon/devenv_templates.git";
|
url = "git+ssh://git@git.malice.zone/alisceon/devenv_templates.git";
|
||||||
};
|
}; # end templates.to
|
||||||
|
nixpkgs.to = {
|
||||||
|
type = "github";
|
||||||
|
owner = "NixOS";
|
||||||
|
repo = "nixpkgs";
|
||||||
|
ref = "nixos-unstable";
|
||||||
|
}; # end nixpkgs.to
|
||||||
|
nixpkgs-stable.to = {
|
||||||
|
type = "github";
|
||||||
|
owner = "NixOS";
|
||||||
|
repo = "nixpkgs";
|
||||||
|
ref = "nixos-25.05";
|
||||||
|
}; # end nixpkgs.to
|
||||||
}; #end registry
|
}; #end registry
|
||||||
}; #end nix
|
}; #end nix
|
||||||
|
|
||||||
|
|
@ -91,12 +103,19 @@
|
||||||
git
|
git
|
||||||
wget
|
wget
|
||||||
curl
|
curl
|
||||||
btop
|
btop # system monitor
|
||||||
ripgrep
|
ripgrep # grep replacement
|
||||||
bat
|
bat # cat replacement
|
||||||
fd
|
fd # find replacement
|
||||||
eza
|
eza # ls replacement
|
||||||
|
nh # nix helper
|
||||||
|
jq # JSON processor
|
||||||
|
|
||||||
|
# Shells
|
||||||
bash
|
bash
|
||||||
|
nushell
|
||||||
|
fish
|
||||||
|
powershell
|
||||||
|
|
||||||
# Chat
|
# Chat
|
||||||
discord
|
discord
|
||||||
|
|
@ -125,7 +144,9 @@
|
||||||
krita
|
krita
|
||||||
edk2-uefi-shell
|
edk2-uefi-shell
|
||||||
obsidian
|
obsidian
|
||||||
|
gparted
|
||||||
]; # end systemPackages
|
]; # end systemPackages
|
||||||
|
|
||||||
gnome.excludePackages = with pkgs; [
|
gnome.excludePackages = with pkgs; [
|
||||||
evolution
|
evolution
|
||||||
geary
|
geary
|
||||||
|
|
@ -139,7 +160,12 @@
|
||||||
gnome-initial-setup
|
gnome-initial-setup
|
||||||
gnome-clocks
|
gnome-clocks
|
||||||
]; # end gnome.excludePackages
|
]; # end gnome.excludePackages
|
||||||
shells = with pkgs; [ fish ];
|
shells = with pkgs; [
|
||||||
|
bash
|
||||||
|
nushell
|
||||||
|
fish
|
||||||
|
powershell
|
||||||
|
];
|
||||||
}; # end environment
|
}; # end environment
|
||||||
|
|
||||||
virtualisation.podman = {
|
virtualisation.podman = {
|
||||||
|
|
@ -151,7 +177,6 @@
|
||||||
users.users.alisceon = {
|
users.users.alisceon = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [ "wheel" "networkmanager" "podman" ];
|
extraGroups = [ "wheel" "networkmanager" "podman" ];
|
||||||
shell = pkgs.fish;
|
shell = pkgs.nushell;
|
||||||
}; # end users
|
}; # end users
|
||||||
|
|
||||||
} #end file
|
} #end file
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
theme = "rings";
|
theme = "rings";
|
||||||
themePackages = with pkgs; [
|
themePackages = with pkgs; [
|
||||||
# By default we would install all themes
|
|
||||||
(adi1090x-plymouth-themes.override {
|
(adi1090x-plymouth-themes.override {
|
||||||
selected_themes = [ "rings" ];
|
selected_themes = [ "rings" ];
|
||||||
})
|
})
|
||||||
|
|
@ -35,18 +34,27 @@
|
||||||
];
|
];
|
||||||
loader.timeout = 0;
|
loader.timeout = 0;
|
||||||
#resumeDevice = "/dev/disk/by-uuid/c49249b9-0d68-44af-97e0-e399c8409408";
|
#resumeDevice = "/dev/disk/by-uuid/c49249b9-0d68-44af-97e0-e399c8409408";
|
||||||
};
|
}; # end boot
|
||||||
systemd.services = {
|
systemd.services = {
|
||||||
fprintd = {
|
fprintd = {
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
serviceConfig.Type = "simple";
|
serviceConfig.Type = "simple";
|
||||||
};
|
};
|
||||||
};
|
}; # end systemd.services
|
||||||
services = {
|
services = {
|
||||||
fprintd = {
|
fprintd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
tod.enable = true;
|
tod.enable = true;
|
||||||
tod.driver = pkgs.libfprint-2-tod1-goodix;
|
tod.driver = pkgs.libfprint-2-tod1-goodix;
|
||||||
};
|
}; # end fprintd
|
||||||
};
|
tuned = {
|
||||||
}
|
enable = true;
|
||||||
|
}; # end tuned
|
||||||
|
}; # end services
|
||||||
|
hardware = {
|
||||||
|
bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
powerOnBoot = true;
|
||||||
|
}; # end bluetooth
|
||||||
|
}; # end hardware
|
||||||
|
} # end file
|
||||||
|
|
|
||||||
132
hosts/tesla-nixos/configuration.nix
Normal file
132
hosts/tesla-nixos/configuration.nix
Normal file
|
|
@ -0,0 +1,132 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ ./hardware-configuration.nix ];
|
||||||
|
networking.hostName = "tesla-nixos";
|
||||||
|
boot.initrd.enable = true;
|
||||||
|
boot.loader = {
|
||||||
|
systemd-boot = {
|
||||||
|
enable = true;
|
||||||
|
}; # end loader.systemd-boot
|
||||||
|
}; # end boot
|
||||||
|
system.stateVersion = "24.05";
|
||||||
|
system.autoUpgrade = {
|
||||||
|
enable = true;
|
||||||
|
persistent = true;
|
||||||
|
flake = "/home/alisceon/nixos_config";
|
||||||
|
flags = [
|
||||||
|
"--update-input"
|
||||||
|
"nixpkgs"
|
||||||
|
"-L"
|
||||||
|
];
|
||||||
|
dates = "daily";
|
||||||
|
}; # end system.autoUpgrade
|
||||||
|
|
||||||
|
nix = {
|
||||||
|
settings = {
|
||||||
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
auto-optimise-store = true;
|
||||||
|
trusted-users = [ "root" "alisceon" ];
|
||||||
|
}; # end settings
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
persistent = true;
|
||||||
|
dates = "daily";
|
||||||
|
options = "--delete-older-than 7d";
|
||||||
|
}; # end gc
|
||||||
|
registry = {
|
||||||
|
templates.to = {
|
||||||
|
type = "git";
|
||||||
|
url = "git+ssh://git@git.malice.zone/alisceon/devenv_templates.git";
|
||||||
|
}; # end templates.to
|
||||||
|
nixpkgs.to = {
|
||||||
|
type = "github";
|
||||||
|
owner = "NixOS";
|
||||||
|
repo = "nixpkgs";
|
||||||
|
ref = "nixos-unstable";
|
||||||
|
}; # end nixpkgs.to
|
||||||
|
nixpkgs-stable.to = {
|
||||||
|
type = "github";
|
||||||
|
owner = "NixOS";
|
||||||
|
repo = "nixpkgs";
|
||||||
|
ref = "nixos-25.05";
|
||||||
|
}; # end nixpkgs.to
|
||||||
|
}; #end registry
|
||||||
|
}; #end nix
|
||||||
|
|
||||||
|
console.keyMap = "sv-latin1";
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
time.timeZone = "Europe/Stockholm";
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "sv_SE.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "sv_SE.UTF-8";
|
||||||
|
LC_MEASUREMENT = "sv_SE.UTF-8";
|
||||||
|
LC_MONETARY = "sv_SE.UTF-8";
|
||||||
|
LC_NAME = "sv_SE.UTF-8";
|
||||||
|
LC_NUMERIC = "sv_SE.UTF-8";
|
||||||
|
LC_PAPER = "sv_SE.UTF-8";
|
||||||
|
LC_TELEPHONE = "sv_SE.UTF-8";
|
||||||
|
LC_TIME = "sv_SE.UTF-8";
|
||||||
|
};
|
||||||
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
||||||
|
services = {
|
||||||
|
openssh.enable = true;
|
||||||
|
}; # end services
|
||||||
|
|
||||||
|
services.fwupd.enable = true;
|
||||||
|
programs = {
|
||||||
|
dconf.enable = true;
|
||||||
|
fish.enable = true;
|
||||||
|
}; # end programs
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
systemPackages = with pkgs; [
|
||||||
|
# CLI tools
|
||||||
|
git
|
||||||
|
wget
|
||||||
|
curl
|
||||||
|
btop # system monitor
|
||||||
|
ripgrep # grep replacement
|
||||||
|
bat # cat replacement
|
||||||
|
fd # find replacement
|
||||||
|
eza # ls replacement
|
||||||
|
nh # nix helper
|
||||||
|
jq # JSON processor
|
||||||
|
|
||||||
|
# Shells
|
||||||
|
bash
|
||||||
|
nushell
|
||||||
|
fish
|
||||||
|
powershell
|
||||||
|
|
||||||
|
devenv
|
||||||
|
direnv
|
||||||
|
|
||||||
|
# Virtualization
|
||||||
|
podman
|
||||||
|
|
||||||
|
]; # end systemPackages
|
||||||
|
|
||||||
|
shells = with pkgs; [
|
||||||
|
bash
|
||||||
|
nushell
|
||||||
|
fish
|
||||||
|
powershell
|
||||||
|
];
|
||||||
|
}; # end environment
|
||||||
|
|
||||||
|
virtualisation.podman = {
|
||||||
|
enable = true;
|
||||||
|
dockerCompat = true;
|
||||||
|
defaultNetwork.settings.dns_enabled = true;
|
||||||
|
}; # end virtualisation
|
||||||
|
|
||||||
|
users.users.alisceon = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [ "wheel" "networkmanager" "podman" ];
|
||||||
|
shell = pkgs.nushell;
|
||||||
|
}; # end users
|
||||||
|
} # end file
|
||||||
37
hosts/tesla-nixos/hardware-configuration.nix
Normal file
37
hosts/tesla-nixos/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
# 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 = [ "uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/8befd164-4151-4116-83ec-727e44e87ea8";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/6841-1339";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0077" "dmask=0077" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
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.ens18.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue