switch to cosmic

This commit is contained in:
Gustav Bruhn 2025-03-17 19:21:14 +01:00
parent c77cfc1d0b
commit adab63ab35
4 changed files with 99 additions and 6 deletions

75
flake.lock generated
View File

@ -1,5 +1,21 @@
{
"nodes": {
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1717312683,
"narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=",
"owner": "nix-community",
"repo": "flake-compat",
"rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "flake-compat",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -20,7 +36,59 @@
"type": "github"
}
},
"nixos-cosmic": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": "nixpkgs",
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1742209773,
"narHash": "sha256-+d9zNzXHK/qQnWfFrjFxmCNJLm1JShsLNNViJxnKIpI=",
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"rev": "0b2d5feae25fe6176b5844a689712a3a13954f12",
"type": "github"
},
"original": {
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1742069588,
"narHash": "sha256-C7jVfohcGzdZRF6DO+ybyG/sqpo1h6bZi9T56sxLy+k=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c80f6a7e10b39afcc1894e02ef785b1ad0b0d7e5",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1742136038,
"narHash": "sha256-DDe16FJk18sadknQKKG/9FbwEro7A57tg9vB5kxZ8kY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a1185f4064c18a5db37c5c84e5638c78b46e3341",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1742069588,
"narHash": "sha256-C7jVfohcGzdZRF6DO+ybyG/sqpo1h6bZi9T56sxLy+k=",
@ -39,7 +107,12 @@
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
"nixos-cosmic": "nixos-cosmic",
"nixpgs": [
"nixos-cosmic",
"nixpkgs"
],
"nixpkgs": "nixpkgs_2"
}
}
},

View File

@ -3,6 +3,8 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpgs.follows = "nixos-cosmic/nixpkgs";
nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic";
home-manager = {
url = "github:nix-community/home-manager";
@ -10,7 +12,7 @@
};
};
outputs = { self, nixpkgs, ... }@inputs: {
outputs = { self, nixpkgs, nixos-cosmic, ... }@inputs: {
# use "nixos", or your hostname as the name of the configuration
# it's a better practice than "default" shown in the video
nixosConfigurations.framework = nixpkgs.lib.nixosSystem {
@ -18,6 +20,13 @@
modules = [
./hosts/framework/configuration.nix
inputs.home-manager.nixosModules.default
{
nix.settings = {
substituters = ["https://cosmic.cachix.org/"];
trusted-public-keys = ["cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="];
};
}
nixos-cosmic.nixosModules.default
];
};
};

View File

@ -9,6 +9,7 @@
[ # Include the results of the hardware scan.
./hardware-configuration.nix
inputs.home-manager.nixosModules.default
./modules/nixos/cosmic.nix
];
# Bootloader.
@ -46,11 +47,8 @@
};
# Enable the X11 windowing system.
services.xserver.enable = true;
# services.xserver.enable = true;
# Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
# Configure keymap in X11
services.xserver.xkb = {

13
modules/nixos/cosmic.nix Normal file
View File

@ -0,0 +1,13 @@
{configs, pkgs, ...}
{
services.desktopManager.cosmic.enable = true;
services.displayManager.cosmic-greeter.enable = true;
enviroment.sessionVariable.COSMIC_DATA_CONTROLL_ENABLED = 1;
services.geoclue2.enable = true;
enviroment.systemPackages = with pkgs; [
cosmic-reader
]
}