mirror of
https://github.com/0x1d/nix.git
synced 2025-12-14 14:01:29 +01:00
refactor base system
This commit is contained in:
4
ctl.sh
4
ctl.sh
@@ -34,8 +34,8 @@ function os {
|
|||||||
sudo nixos-rebuild --flake ./os#nixos test
|
sudo nixos-rebuild --flake ./os#nixos test
|
||||||
}
|
}
|
||||||
function rebuild {
|
function rebuild {
|
||||||
echo "Rebuild OS"
|
echo "Rebuild OS config: ${1}"
|
||||||
sudo nixos-rebuild --flake ./os#nixos switch
|
sudo nixos-rebuild --flake ./os#${1} switch
|
||||||
}
|
}
|
||||||
function upgrade {
|
function upgrade {
|
||||||
echo "Upgrade channels and rebuild OS"
|
echo "Upgrade channels and rebuild OS"
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
|
||||||
[
|
|
||||||
./hardware-configuration.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
package = pkgs.nixFlakes;
|
package = pkgs.nixFlakes;
|
||||||
|
|||||||
20
os/flake.nix
20
os/flake.nix
@@ -14,13 +14,19 @@
|
|||||||
modules = [
|
modules = [
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
./system/boot.nix
|
./hw/lenovo-thinkpad-e14.nix
|
||||||
./system/i18n.nix
|
./system/base.nix
|
||||||
./system/network.nix
|
./users/demo.nix
|
||||||
./system/sound.nix
|
./users/master.nix
|
||||||
./system/xserver.nix
|
];
|
||||||
./system/virtualisation.nix
|
};
|
||||||
./system/packages.nix
|
testos = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
./configuration.nix
|
||||||
|
./hw/lenovo-thinkpad-e14.nix
|
||||||
|
./system/base.nix
|
||||||
./users/demo.nix
|
./users/demo.nix
|
||||||
./users/master.nix
|
./users/master.nix
|
||||||
];
|
];
|
||||||
|
|||||||
12
os/system/base.nix
Normal file
12
os/system/base.nix
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
imports = [
|
||||||
|
./boot.nix
|
||||||
|
./security.nix
|
||||||
|
./i18n.nix
|
||||||
|
./network.nix
|
||||||
|
./sound.nix
|
||||||
|
./xserver.nix
|
||||||
|
./virtualisation.nix
|
||||||
|
./packages.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -26,8 +26,6 @@
|
|||||||
gcc
|
gcc
|
||||||
unzip
|
unzip
|
||||||
wget
|
wget
|
||||||
plasma5Packages.bismuth
|
|
||||||
kdeconnect
|
|
||||||
firefox
|
firefox
|
||||||
thunderbird
|
thunderbird
|
||||||
remmina
|
remmina
|
||||||
|
|||||||
4
os/system/security.nix
Normal file
4
os/system/security.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
security.polkit.enable = true;
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
}
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
hardware.pulseaudio.enable = false;
|
hardware.pulseaudio.enable = false;
|
||||||
security.rtkit.enable = true;
|
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
alsa.enable = true;
|
alsa.enable = true;
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
home.username = "master";
|
home.username = "master";
|
||||||
home.homeDirectory = "/home/master";
|
home.homeDirectory = "/home/master";
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
plasma5Packages.bismuth
|
||||||
|
kdeconnect
|
||||||
nerdfonts
|
nerdfonts
|
||||||
tmux
|
tmux
|
||||||
btop
|
btop
|
||||||
@@ -29,32 +31,30 @@
|
|||||||
obsidian
|
obsidian
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
programs = {
|
||||||
|
home-manager.enable = true;
|
||||||
programs.bash = {
|
bash = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
direnv = {
|
||||||
programs.direnv = {
|
enable = true;
|
||||||
enable = true;
|
nix-direnv.enable = true;
|
||||||
nix-direnv.enable = true;
|
};
|
||||||
};
|
starship = {
|
||||||
|
enable = true;
|
||||||
programs.starship = {
|
enableBashIntegration = true;
|
||||||
enable = true;
|
settings = {
|
||||||
enableBashIntegration = true;
|
directory.fish_style_pwd_dir_length = 1;
|
||||||
settings = {
|
directory.truncation_length = 2;
|
||||||
directory.fish_style_pwd_dir_length = 1;
|
};
|
||||||
directory.truncation_length = 2;
|
};
|
||||||
|
neovim = {
|
||||||
|
enable = true;
|
||||||
|
defaultEditor = true;
|
||||||
|
viAlias = true;
|
||||||
|
vimAlias = true;
|
||||||
|
vimdiffAlias = true;
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
programs.neovim = {
|
|
||||||
enable = true;
|
|
||||||
defaultEditor = true;
|
|
||||||
viAlias = true;
|
|
||||||
vimAlias = true;
|
|
||||||
vimdiffAlias = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
|
|||||||
Reference in New Issue
Block a user